예제 #1
0
<br />
<?php 
$listObj->startTable();
// these are the columns in the table
$checklimit = $num_rows < $limit ? $num_rows : $limit;
$columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $checklimit . ")\" />" => "width=\"20\"", $zas_modul->lang('order_exported') => "width=\"20\"", $zas_modul->lang('order_number') => '', $zas_modul->lang('customer_name') => '', $zas_modul->lang('cod') => '', 'Zasilkovna' => '', $zas_modul->lang('order_date') => '', $zas_modul->lang('total') => '', $zas_modul->lang('order_remove') => "width=\"5%\"");
$listObj->writeTableHeader($columns);
// so we can determine if shipping labels can be printed
$dbl = new ps_DB();
$db->query($list);
//get list of exported orders
$vm_db = new ps_DB();
$q = "SELECT order_id ";
$q .= "FROM #__zasilkovna_orders where exported='1' ";
$vm_db->query($q);
$exported_orders_arr = $vm_db->loadAssocList('order_id');
$export_url = JURI::base(false) . "index.php?pshop_mode=admin&page={$modulename}." . $mod_name . "_export&option=com_virtuemart";
$self_url = JURI::base(false) . "index.php?pshop_mode=admin&page={$modulename}." . $mod_name . "&option=com_virtuemart";
$listObj->newRow();
$i = 0;
while ($db->next_record()) {
    //$listObj->newRow("\" style=\"background-color: red;");
    $listObj->newRow();
    // The row number
    $listObj->addCell($pageNav->rowNumber($i));
    // The Checkbox
    $listObj->addCell('<input type="checkbox" class="zasilkovna-cb" id="cb' . $i . '" name="orders_id[]" value="' . $db->f("order_id") . '" >');
    // Is exported?
    if ($exported_orders_arr[$db->f("order_id")]['order_id'] == $db->f("order_id")) {
        $is_exported = $zas_modul->lang('yes');
    } else {
예제 #2
0
 function checkMenuItems($parameter, $value)
 {
     global $mainframe;
     $db = new ps_DB();
     if (!isset($mainframe->vm_menuitems)) {
         $db->setQuery("SELECT id, params FROM #__menu WHERE link='index.php?option=com_virtuemart' AND published=1");
         $mainframe->vm_menuitems = $db->loadAssocList();
         if (!is_array($mainframe->vm_menuitems)) {
             $mainframe->vm_menuitems = array();
             // Query failed, empty result
         }
     }
     foreach ($mainframe->vm_menuitems as $chkmenu) {
         if (strpos($chkmenu['params'], $parameter . "=" . $value . "\n") !== false) {
             return $chkmenu['id'];
         }
     }
     return false;
 }