} else { $list = "SELECT * FROM #__{vm}_product "; $count = "SELECT count(*) as num_rows FROM #__{vm}_product "; $q = "WHERE 1=1 "; $q .= $qfilter; $q .= "ORDER BY product_name "; $list .= $q . " LIMIT {$limitstart}, {$limit}"; $count .= $q; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_FEATURED_PRODUCTS_LIST_LBL'), IMAGEURL . "ps_image/product_code.png", $modulename, "specialprod"); echo '<strong>' . $VM_LANG->_('PHPSHOP_FILTER') . ':</strong> '; if ($filter != "all") { echo '<a href="' . $sess->url($_SERVER['PHP_SELF'] . "?page={$page}&filter=all") . '" title="' . $VM_LANG->_('PHPSHOP_LIST_ALL_PRODUCTS') . '">'; } echo $VM_LANG->_('PHPSHOP_LIST_ALL_PRODUCTS'); if ($filter != 'all') { echo '</a>'; } echo ' | '; if ($filter != 'featured_and_discounted') { echo '<a href="' . $sess->url($_SERVER['PHP_SELF'] . "?page={$page}&filter=featured_and_discounted") . '" title="' . $VM_LANG->_('PHPSHOP_SHOW_FEATURED_AND_DISCOUNTED') . '">'; } echo $VM_LANG->_('PHPSHOP_SHOW_FEATURED_AND_DISCOUNTED');
require_once CLASSPATH . "htmlTools.class.php"; global $ps_product_type; $q = "SELECT * FROM #__{vm}_product_type "; /* $q .= "WHERE #__{vm}_category_xref.category_parent_id='"; $q .= $category_id . "' AND "; $q .= "#__{vm}_category.category_id=#__{vm}_category_xref.category_child_id "; $q .= "AND #__{vm}_category.vendor_id = $ps_vendor_id ";*/ $q .= "ORDER BY product_type_list_order asc "; $db->query($q); $num_rows = $db->num_rows(); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); $q .= "LIMIT {$pageNav->limitstart}, {$pageNav->limit}"; $db->query($q); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_PRODUCT_TYPE_LIST_LBL'), IMAGEURL . "ps_image/categories.gif", $modulename, "product_type_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_FORM_NAME') => 'width="25%"', $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_FORM_DESCRIPTION') => 'width="30%"', $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_FORM_PARAMETERS') => 'width="15%"', $VM_LANG->_('PHPSHOP_PRODUCTS_LBL') => 'width="15%"', $VM_LANG->_('PHPSHOP_PRODUCT_LIST_PUBLISH') => 'width="5%"', $VM_LANG->_('PHPSHOP_MODULE_LIST_ORDER') => 'width="5%"', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $i = 0; while ($db->next_record()) { $product_count = $ps_product_type->product_count($db->f("product_type_id")); $parameter_count = $ps_product_type->parameter_count($db->f("product_type_id")); $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox
} else { $q = ""; $list = "SELECT * FROM #__{vm}_order_status WHERE "; $count = "SELECT count(*) as num_rows FROM #__{vm}_order_status WHERE "; $q .= "vendor_id='{$ps_vendor_id}' "; $q .= "ORDER BY list_order ASC"; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_ORDER_STATUS_LIST_MNU'), "", $modulename, "order_status_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_ORDER_STATUS_LIST_NAME') => '', $VM_LANG->_('PHPSHOP_ORDER_STATUS_LIST_CODE') => '', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("order_status_id"), false, "order_status_id"));
$q .= "ORDER BY creditcard_name "; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } else { $list = "SELECT * FROM #__{vm}_creditcard "; $list .= "ORDER BY creditcard_name "; $list .= "LIMIT {$limitstart}, " . $limit; $count = "SELECT count(*) as num_rows FROM #__{vm}_creditcard "; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_CREDITCARD_LIST_LBL'), VM_THEMEURL . 'images/administration/dashboard/credit.png', $modulename, "creditcard_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_CREDITCARD_NAME') => '', $VM_LANG->_('PHPSHOP_CREDITCARD_CODE') => '', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("creditcard_id"), false, "creditcard_id"));
while ($db->next_record()) { // Reorder the whole recordset and put pay-download files at the top $filename = $mosConfig_absolute_path . str_replace($mosConfig_absolute_path, '', $db->f("file_name")); $isProductDownload = in_array(basename($filename), $downloadFiles) ? true : false; if ($isProductDownload) { $arr[] = $db->getCurrentRow(); } else { $arr2[] = $db->getCurrentRow(); } } $db->record = array_merge($arr, $arr2); $num_rows = $db->num_rows(); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_FILES_LIST') . " " . $product_name, $mosConfig_live_site . "/administrator/images/mediamanager.png", $modulename, "file_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => 'width="20"', "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll({$num_rows})\" />" => 'width="20"', $VM_LANG->_('PHPSHOP_FILES_LIST_FILENAME') => '', $VM_LANG->_('VM_FILES_LIST_ROLE') => '', $VM_LANG->_('PHPSHOP_VIEW') => '', $VM_LANG->_('PHPSHOP_FILES_LIST_FILETITLE') => '', $VM_LANG->_('PHPSHOP_FILES_LIST_FILETYPE') => '', $VM_LANG->_('PHPSHOP_FILEMANAGER_PUBLISHED') => '', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $roles = array('isDownlodable' => IMAGEURL . 'ps_image/downloadable.gif', 'isImage' => IMAGEURL . 'ps_image/image.gif', 'isProductImage' => IMAGEURL . 'ps_image/image.png', 'isFile' => IMAGEURL . 'ps_image/attachment.gif', 'isRemoteFile' => IMAGEURL . 'ps_image/url.gif'); // Reset Result pointer $db->reset(); $i = 0; while ($db->next_record()) { $filename = $mosConfig_absolute_path . str_replace($mosConfig_absolute_path, '', $db->f("file_name")); $listObj->newRow(); // The row number
$count = "SELECT count(*) as num_rows FROM #__{vm}_product WHERE "; $q = "#__{vm}_product.vendor_id = '{$ps_vendor_id}' "; if ($allproducts != 1) { $q .= "AND product_in_stock > 0 "; } $q .= "ORDER BY product_name "; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_PRODUCT_INVENTORY_LBL'), IMAGEURL . "ps_image/inventory.gif", $modulename, "product_inventory"); echo ' '; if ($allproducts != 1) { echo '<a href="' . $sess->url($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page={$page}&allproducts=1") . '" title="' . $VM_LANG->_('PHPSHOP_LIST_ALL_PRODUCTS') . '">'; } echo $VM_LANG->_('PHPSHOP_LIST_ALL_PRODUCTS'); if ($allproducts != 1) { echo '</a>'; } echo ' | '; if ($allproducts == 1) { echo '<a href="' . $sess->url($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page={$page}&allproducts=0") . '" title="' . $VM_LANG->_('PHPSHOP_HIDE_OUT_OF_STOCK') . '">'; } echo $VM_LANG->_('PHPSHOP_HIDE_OUT_OF_STOCK');
$where[] = "p.product_id = r.product_id"; if (!empty($keyword)) { $where[] = "( comment LIKE '%{$keyword}%' OR username LIKE '%{$keyword}%' )"; } if (!empty($where)) { $q .= ' WHERE ' . implode(' AND ', $where); } $q .= ' ORDER BY time DESC'; $list .= $q . " LIMIT {$limitstart}, {$limit}"; $count .= $q; $db->query($count); $num_rows = $db->f('num_rows'); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); $title = $VM_LANG->_('PHPSHOP_REVIEWS'); // print out the search field and a list heading $listObj->writeSearchHeader($title, VM_THEMEURL . 'images/administration/dashboard/reviews.png', $modulename, "review_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_PRODUCT_NAME_TITLE') => 'width="20%"', $VM_LANG->_('VM_REVIEW_LIST_NAMEDATE') => 'width="15%"', $VM_LANG->_('PHPSHOP_REVIEWS') => 'width="35%"', $VM_LANG->_('PHPSHOP_RATE_NOM') => 'width="15%"', $VM_LANG->_('PHPSHOP_PRODUCT_LIST_PUBLISH') => 'width="5%"', $VM_LANG->_('E_REMOVE') => 'width="10%"'); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox
$count .= $q; } else { $q = ""; $list = "SELECT * FROM #__{vm}_manufacturer "; $count = "SELECT count(*) as num_rows FROM #__{vm}_manufacturer "; $q .= "ORDER BY mf_name ASC "; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_MANUFACTURER_LIST_LBL'), VM_THEMEURL . 'images/administration/dashboard/manufacturer.png', $modulename, "manufacturer_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", 'ID' => 'width="5%"', $VM_LANG->_('PHPSHOP_MANUFACTURER_LIST_MANUFACTURER_NAME') => 'width="45%"', $VM_LANG->_('PHPSHOP_MANUFACTURER_LIST_ADMIN') => 'width="45%"', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("manufacturer_id"), false, "manufacturer_id"));
$list = "SELECT shopper_group_name,product_price_id,product_price,product_currency,price_quantity_start,price_quantity_end "; $q = "FROM #__{vm}_shopper_group,#__{vm}_product_price "; $q .= "WHERE product_id = '{$product_id}' "; if (!$perm->check("admin")) { $q .= "AND #__{vm}_shopper_group.vendor_id = '{$ps_vendor_id}' "; } $q .= "AND #__{vm}_shopper_group.shopper_group_id = #__{vm}_product_price.shopper_group_id "; $q .= "ORDER BY shopper_group_name,price_quantity_start, product_price "; $count .= $q; $db->query($count); $num_rows = $db->num_rows(); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); $list .= $q . 'LIMIT ' . $pageNav->limitstart . ', ' . $pageNav->limit; // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($title, IMAGEURL . "ps_image/product_code.png", $modulename, "product_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_PRICE_LIST_GROUP_NAME') => '', $VM_LANG->_('PHPSHOP_PRICE_LIST_PRICE') => '', $VM_LANG->_('PHPSHOP_PRODUCT_LIST_CURRENCY') => '', $VM_LANG->_('PHPSHOP_PRODUCT_LIST_QUANTITY_START') => 'width="50"', $VM_LANG->_('PHPSHOP_PRODUCT_LIST_QUANTITY_END') => 'width="50"', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("product_price_id"), false, "product_price_id"));
$count .= $q; } else { $list = "SELECT * FROM #__{vm}_function WHERE module_id='{$module_id}' "; $list .= "ORDER BY function_name "; $list .= "LIMIT {$limitstart}, " . $limit; $count = "SELECT count(*) as num_rows FROM #__{vm}_function "; $count .= "WHERE module_id='{$module_id}' "; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); $db->query($list); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($title, VM_THEMEURL . "images/administration/dashboard/functions.png", "admin", "function_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . count($db->record) . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_FUNCTION_LIST_NAME') => "", $VM_LANG->_('PHPSHOP_FUNCTION_LIST_CLASS') => "", $VM_LANG->_('PHPSHOP_FUNCTION_LIST_METHOD') => ""); $usergroups = $vmUserGroup->get_groups(); while ($usergroups->next_record()) { $columns[$usergroups->f('group_name')] = 'width="5%"'; $groupArray[] = $usergroups->f('group_name'); } $columns['none'] = 'width="5%"'; $usergroups->reset(); $columns['<a href="javascript: document.adminForm.func.value = \'setFunctionPermissions\'; saveorder( ' . (count($db->record) - 1) . ' );"><img src="' . $mosConfig_live_site . '/administrator/images/filesave.png" border="0" width="16" height="16" alt="' . $VM_LANG->_('SAVE_PERMISSIONS') . '" align="left"/>' . $VM_LANG->_('SAVE_PERMISSIONS') . '</a>'] = ''; $columns[$VM_LANG->_('E_REMOVE')] = "width=\"5%\"";
$list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } else { $q = ""; $list = "SELECT * FROM #__{vm}_country ORDER BY country_id ASC "; $count = "SELECT count(*) as num_rows FROM #__{vm}_country"; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_ASSIGN_ZONE_PG_LBL'), '', $modulename, "assign_zones"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", $VM_LANG->_('PHPSHOP_ZONE_ASSIGN_COUNTRY_LBL') => '', $VM_LANG->_('PHPSHOP_ZONE_ASSIGN_CURRENT_LBL') => '', $VM_LANG->_('PHPSHOP_ZONE_ASSIGN_ASSIGN_LBL') => ''); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); $tmp_cell = '<input type="hidden" name="country_id[]" value="' . $db->f("country_id") . '" />'; $tmp_cell .= $db->f("country_name");
$count .= $q; $q .= " ORDER BY product_publish DESC,product_name "; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); $limitstart = $pageNav->limitstart; $list .= $q . " LIMIT {$limitstart}, " . $limit; if ($num_rows > 0) { $db->query($list); $num_rows = $db->num_rows(); } // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_PRODUCT_LIST_LBL'), VM_THEMEURL . 'images/administration/dashboard/product_code.png', "product", "product_list"); echo $VM_LANG->_('PHPSHOP_FILTER'); ?> : <select class="inputbox" id="category_id" name="category_id" onchange="window.location='<?php echo $_SERVER['PHP_SELF']; ?> ?option=com_virtuemart&page=product.product_list&category_id='+document.getElementById('category_id').options[selectedIndex].value;"> <option value=""><?php echo $VM_LANG->_('SEL_CATEGORY'); ?> </option> <?php $ps_product_category->list_tree($category_id);
$count .= $q; } else { $q = ""; $list = "SELECT * FROM #__{vm}_module ORDER BY list_order ASC "; $count = "SELECT count(*) as num_rows FROM #__{vm}_module ORDER BY list_order "; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); $db->query($list); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_MODULE_LIST_LBL'), VM_THEMEURL . 'images/administration/dashboard/modules.png', "admin", "module_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => 'width="3%"', '<input type="checkbox" name="toggle" value="" onclick="checkAll(' . count($db->record) . ')" />' => 'width="3%"', $VM_LANG->_('PHPSHOP_MODULE_LIST_NAME') => 'width="20%"'); $usergroups = $vmUserGroup->get_groups(); while ($usergroups->next_record()) { $columns[$usergroups->f('group_name')] = 'width="5%"'; $groupArray[] = $usergroups->f('group_name'); } $columns['none'] = 'width="5%"'; $usergroups->reset(); $columns['<a href="javascript: document.adminForm.func.value = \'setModulePermissions\'; saveorder( ' . (count($db->record) - 1) . ' );"><img src="' . $mosConfig_live_site . '/administrator/images/filesave.png" border="0" width="16" height="16" alt="' . $VM_LANG->_('SAVE_PERMISSIONS') . '" align="left"/>' . $VM_LANG->_('SAVE_PERMISSIONS') . '</a>'] = ''; $columns[$VM_LANG->_('PHPSHOP_MODULE_LIST_FUNCTIONS')] = 'width="10%"';
$list = "SELECT * FROM #__{vm}_shopper_group "; $count = "SELECT count(*) as num_rows FROM #__{vm}_shopper_group "; if (!$perm->check("admin")) { $q = "WHERE vendor_id='{$ps_vendor_id}' "; } $q .= " ORDER BY vendor_id, shopper_group_name "; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_SHOPPER_GROUP_LIST_LBL'), VM_THEMEURL . "images/administration/dashboard/shop_users.png", $modulename, "shopper_group_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_SHOPPER_GROUP_LIST_NAME') => 'width="30%"', $VM_LANG->_('PHPSHOP_PRODUCT_FORM_VENDOR') => '', $VM_LANG->_('PHPSHOP_SHOPPER_GROUP_LIST_DESCRIPTION') => '', $VM_LANG->_('PHPSHOP_DEFAULT') => '', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("shopper_group_id"), false, "shopper_group_id"));
$list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } else { $q = ""; $list = "SELECT * FROM #__{vm}_tax_rate ORDER BY tax_country, tax_state ASC "; $count = "SELECT count(*) as num_rows FROM #__{vm}_tax_rate"; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_TAX_LIST_LBL'), VM_THEMEURL . "images/administration/dashboard/tax.png", $modulename, "tax_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_TAX_LIST_COUNTRY') => 'width="44%"', $VM_LANG->_('PHPSHOP_TAX_LIST_STATE') => 'width="38%"', $VM_LANG->_('PHPSHOP_TAX_LIST_RATE') => 'width="18%"', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("tax_rate_id"), false, "tax_rate_id"));
require_once CLASSPATH . "htmlTools.class.php"; $start_date = mktime(0, 0, 0, date("n"), 1, date("Y")); $end_date = mktime(24, 0, 0, date("n") + 1, 0, date("Y")); $ps_affiliate = new ps_affiliate(); $affiliate = $ps_affiliate->get_affiliate_details($auth["user_id"]); $q = "select * from #__{vm}_orders,#__{vm}_affiliate_sale"; $q .= " where #__{vm}_orders.order_id = #__{vm}_affiliate_sale.order_id"; $q .= " and #__{vm}_affiliate_sale.affiliate_id = '" . $affiliate["id"] . "'"; $q .= " AND cdate BETWEEN {$start_date} AND {$end_date} "; $q .= " LIMIT {$limitstart}, {$limit}"; $db->query($q); $num_rows = $db->num_rows(); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('VM_AFFILIATE_ORDERSUMMARY_LBL') . ' ' . strftime('%b %Y', $date), "", "affiliate", "affiliate_orders_list"); echo $affiliate["company"]; // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('VM_AFFILIATE_ORDERLIST_ORDERREF') => "", $VM_LANG->_('VM_AFFILIATE_ORDERLIST_DATEORDERED') => "", $VM_LANG->_('VM_AFFILIATE_ORDERLIST_ORDERTOTAL') => "", $VM_LANG->_('VM_AFFILIATE_ORDERLIST_COMMISSION') => "", $VM_LANG->_('VM_AFFILIATE_ORDERLIST_ORDERSTATUS') => "", $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("order_id"), false, "order_id")); $listObj->addCell(sprintf("%08d", $db->f("order_id")));
$list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } else { $q = ""; $list = "SELECT * FROM #__{vm}_zone_shipping ORDER BY zone_name ASC "; $count = "SELECT count(*) as num_rows FROM #__{vm}_zone_shipping"; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_ZONE_LIST_LBL'), "", $modulename, "zone_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_ZONE_LIST_NAME_LBL') => '', $VM_LANG->_('PHPSHOP_ZONE_LIST_DESC_LBL') => '', $VM_LANG->_('PHPSHOP_ZONE_LIST_COST_PER_LBL') => '', $VM_LANG->_('PHPSHOP_ZONE_LIST_COST_LIMIT_LBL') => '', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("product_id"), false, "product_id"));
$list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } else { $q = ""; $list = "SELECT * FROM #__{vm}_vendor_category ORDER BY vendor_category_name ASC "; $count = "SELECT count(*) as num_rows FROM #__{vm}_vendor_category"; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_VENDOR_CAT_LIST_LBL'), "", $modulename, "vendor_category_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_VENDOR_CAT_NAME') => 'width="21%"', $VM_LANG->_('PHPSHOP_VENDOR_CAT_DESCRIPTION') => 'width="66%"', $VM_LANG->_('PHPSHOP_VENDOR_CAT_VENDORS') => 'width="13%"', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("vendor_category_id"), false, "vendor_category_id"));
$list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } else { $q = ""; $list = "SELECT * FROM #__{vm}_shipping_rate "; $count = "SELECT count(*) as num_rows FROM #__{vm}_shipping_rate"; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_RATE_LIST_LBL'), VM_THEMEURL . "images/administration/dashboard/shipping.gif", $modulename, "rate_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_SHIPPING_RATE_LIST_CARRIER_LBL') => '', $VM_LANG->_('PHPSHOP_SHIPPING_RATE_LIST_RATE_NAME') => '', $VM_LANG->_('PHPSHOP_SHIPPING_RATE_LIST_RATE_WSTART') => '', $VM_LANG->_('PHPSHOP_SHIPPING_RATE_LIST_RATE_WEND') => '', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("shipping_rate_id"), false, "shipping_rate_id"));
$q .= "ORDER BY amount "; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } else { $list = "SELECT * FROM #__{vm}_product_discount "; $list .= "ORDER BY amount "; $list .= "LIMIT {$limitstart}, " . $limit; $count = "SELECT count(*) as num_rows FROM #__{vm}_product_discount "; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_LIST_LBL'), IMAGEURL . "ps_image/percentage.png", $modulename, "product_discount_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_AMOUNT') => '', $VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_AMOUNTTYPE') => '', $VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_STARTDATE') => '', $VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_ENDDATE') => '', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("discount_id"), false, "discount_id"));
} if (!empty($show)) { $q .= "order_status = '{$show}' AND "; } $q .= "(#__{vm}_orders.order_id=#__{vm}_order_user_info.order_id) "; $q .= "AND #__{vm}_orders.vendor_id='" . $_SESSION['ps_vendor_id'] . "' "; $q .= "ORDER BY #__{vm}_orders.cdate DESC "; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_ORDER_LIST_LBL'), VM_THEMEURL . 'images/administration/dashboard/orders.png', $modulename, "order_list"); ?> <div align="center"> <?php $navi_db = new ps_DB(); $q = "SELECT order_status_code, order_status_name "; $q .= "FROM #__{vm}_order_status WHERE vendor_id = '{$ps_vendor_id}'"; $navi_db->query($q); while ($navi_db->next_record()) { ?> <a href="<?php $sess->purl($_SERVER['PHP_SELF'] . "?page={$modulename}.order_list&show=" . $navi_db->f("order_status_code")); ?>
if ($product_type_id && $db->f("product_type_name")) { $title .= $db->f("product_type_name"); } $title .= '<a href="' . $_SERVER['PHP_SELF'] . '?option=com_virtuemart&page=product.product_type_list">[' . $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_LIST_LBL') . ']</a>'; $q = "SELECT * FROM #__{vm}_product_type_parameter "; $q .= "WHERE product_type_id={$product_type_id} "; $q .= "ORDER BY parameter_list_order asc "; $q .= "LIMIT {$limitstart}, {$limit}"; $count = "SELECT count(*) as num_rows FROM #__{vm}_product_type_parameter WHERE product_type_id={$product_type_id} "; $db->query($count); $num_rows = $db->f("num_rows"); $db->query($q); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($title, IMAGEURL . "ps_image/categories.gif", $modulename, "product_type_parameter_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_PARAMETER_FORM_LABEL') => 'width="25%"', $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_PARAMETER_FORM_NAME') => 'width="20%"', $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_FORM_DESCRIPTION') => 'width="40%"', $VM_LANG->_('PHPSHOP_MODULE_LIST_ORDER') => 'width="5%"', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("parameter_name"), false, "parameter_name")); $tmp_cell = "<a href=\"" . $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_type_parameter_form&product_type_id=" . $db->f("product_type_id") . "¶meter_name=" . $db->f("parameter_name") . "&task=edit\">" . $db->f("parameter_label") . "</a>";
$q .= "CONCAT( `ui`.`first_name`, ' ', `ui`.`last_name`) LIKE '%{$keyword}%' OR "; $q .= "ui.phone_1 LIKE '%{$keyword}%' "; $q .= ") AND "; } $q .= "(ui.address_type='BT' OR ui.address_type IS NULL) "; $q .= "AND gid <= " . $my->gid; $q .= " ORDER BY username "; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_USER_LIST_LBL'), VM_THEMEURL . 'images/administration/header/icon-48-user.png', $modulename, "user_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => 'width="20"', '<input type="checkbox" name="toggle" value="" onclick="checkAll(' . $num_rows . ')" />' => 'width="20"', $VM_LANG->_('PHPSHOP_USER_LIST_USERNAME') => "", $VM_LANG->_('PHPSHOP_USER_LIST_FULL_NAME') => "", $VM_LANG->_('PHPSHOP_USER_LIST_GROUP') => "", $VM_LANG->_('PHPSHOP_SHOPPER_FORM_GROUP') => "", $VM_LANG->_('E_REMOVE') => 'width="5%"'); $listObj->writeTableHeader($columns); $db->query($list); $dbs = new ps_DB(); $i = 0; while ($db->next_record()) { $user_id = $db->f('id') ? intval($db->f('id')) : intval($db->f('user_id')); $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i));
/** * Shows the list of the orders of a user in the account mainenance section * * @param string $order_status Filter by order status (A=all, C=confirmed, P=pending,...) * @param int $secure Restrict the order list to a specific user id (=1) or not (=0)? */ function list_order($order_status = 'A', $secure = 0) { global $VM_LANG, $CURRENCY_DISPLAY, $sess, $limit, $limitstart, $keyword, $mm_action_url; $ps_vendor_id = $_SESSION["ps_vendor_id"]; $auth = $_SESSION['auth']; require_once CLASSPATH . 'ps_order_status.php'; require_once CLASSPATH . 'htmlTools.class.php'; require_once CLASSPATH . 'pageNavigation.class.php'; $db = new ps_DB(); $dbs = new ps_DB(); $listfields = 'o.order_id,o.cdate,order_total,o.order_status,order_currency'; $countfields = 'count(*) as num_rows'; $count = "SELECT {$countfields} FROM #__{vm}_orders o "; $list = "SELECT DISTINCT {$listfields} FROM #__{vm}_orders o "; $q = "WHERE o.vendor_id='{$ps_vendor_id}' "; if ($order_status != "A") { $q .= "AND order_status='{$order_status}' "; } if ($secure) { $q .= "AND user_id='" . $auth["user_id"] . "' "; } if (!empty($keyword)) { $count .= ', #__{vm}_order_item oi '; $list .= ', #__{vm}_order_item oi '; $q .= "AND (order_item_sku LIKE '%" . $keyword . "%' "; $q .= "OR order_number LIKE '%" . $keyword . "%' "; $q .= "OR o.order_id=" . (int) $keyword . ' '; $q .= "OR order_item_name LIKE '%" . $keyword . "%') "; $q .= "AND oi.order_id=o.order_id "; } $q .= "ORDER BY o.cdate DESC"; $count .= $q; $db->query($count); $db->next_record(); $num_rows = $db->f('num_rows'); if ($num_rows == 0) { echo "<span style=\"font-style:italic;\">" . $VM_LANG->_('PHPSHOP_ACC_NO_ORDERS') . "</span>\n"; return; } $pageNav = new vmPageNav($num_rows, $limitstart, $limit); $list .= $q .= " LIMIT " . $pageNav->limitstart . ", {$limit} "; $db->query($list); $listObj = new listFactory($pageNav); if ($num_rows > 0) { // print out the search field and a list heading $listObj->writeSearchHeader('', '', 'account', 'index'); } // start the list table $listObj->startTable(); $listObj->writeTableHeader(3); while ($db->next_record()) { $order_status = ps_order_status::getOrderStatusName($db->f("order_status")); $listObj->newRow(); $tmp_cell = "<a href=\"" . $sess->url($mm_action_url . "index.php?page=account.order_details&order_id=" . $db->f("order_id")) . "\">\n"; $tmp_cell .= "<img src=\"" . IMAGEURL . "ps_image/goto.png\" height=\"32\" width=\"32\" align=\"middle\" border=\"0\" alt=\"" . $VM_LANG->_('PHPSHOP_ORDER_LINK') . "\" /> " . $VM_LANG->_('PHPSHOP_VIEW') . "</a><br />"; $listObj->addCell($tmp_cell); $tmp_cell = "<strong>" . $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_DATE') . ":</strong> " . vmFormatDate($db->f("cdate"), "%d. %B %Y"); $tmp_cell .= "<br /><strong>" . $VM_LANG->_('PHPSHOP_ORDER_PRINT_TOTAL') . ":</strong> " . $CURRENCY_DISPLAY->getFullValue($db->f("order_total"), '', $db->f('order_currency')); $listObj->addCell($tmp_cell); $tmp_cell = "<strong>" . $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_STATUS') . ":</strong> " . $order_status; $tmp_cell .= "<br /><strong>" . $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_NUMBER') . ":</strong> " . sprintf("%08d", $db->f("order_id")); $listObj->addCell($tmp_cell); } $listObj->writeTable(); $listObj->endTable(); if ($num_rows > 0) { $listObj->writeFooter($keyword, '&Itemid=' . $sess->getShopItemid()); } }
$search .= "AND ( state_name LIKE '%{$keyword}%' OR "; $search .= "state_2_code LIKE '%{$keyword}%' OR "; $search .= "state_3_code LIKE '%{$keyword}%' "; $search .= ") "; } $q .= "WHERE country_id='{$country_id}' "; $q .= $search; $q .= "ORDER BY state_name "; $q .= " LIMIT {$limitstart}, " . $limit; $db->query($q); $database->setQuery("SELECT FOUND_ROWS() as num_rows"); $num_rows = $database->loadResult(); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($title, VM_THEMEURL . "/images/administration/dashboard/countries.png", "admin", "country_state_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "", $VM_LANG->_('PHPSHOP_STATE_LIST_NAME') => "", $VM_LANG->_('PHPSHOP_STATE_LIST_3_CODE') => "", $VM_LANG->_('PHPSHOP_STATE_LIST_2_CODE') => "", $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("state_id"), false, "state_id")); $tmp_cell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page=admin.country_state_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&state_id=" . $db->f("state_id") . "&country_id=" . $country_id) . "\">";
* * http://virtuemart.net */ $product_id = vmGet($_REQUEST, 'product_id', 0); $product_parent_id = vmGet($_REQUEST, 'product_parent_id', 0); global $ps_product_type; require_once CLASSPATH . "pageNavigation.class.php"; require_once CLASSPATH . "htmlTools.class.php"; $q = "SELECT * FROM #__{vm}_product_type,#__{vm}_product_product_type_xref "; $q .= "WHERE #__{vm}_product_type.product_type_id=#__{vm}_product_product_type_xref.product_type_id "; $q .= "AND product_id='" . $product_id . "' "; $q .= "ORDER BY product_type_list_order asc "; $db->setQuery($q); $db->query(); // Create the List Object with page navigation $listObj = new listFactory(); $title = $VM_LANG->_('PHPSHOP_PRODUCT_PRODUCT_TYPE_LIST_LBL'); if (!empty($product_parent_id)) { $title .= " " . $VM_LANG->_('PHPSHOP_ITEM') . ": "; } else { $title .= " " . $VM_LANG->_('PHPSHOP_PRODUCT') . ": "; } $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.product_form&product_id={$product_id}&product_parent_id={$product_parent_id}"; $title .= "<a href=\"" . $sess->url($url) . "\">" . $ps_product->get_field($product_id, "product_name") . "</a>"; // print out the search field and a list heading $listObj->writeSearchHeader($title, IMAGEURL . "ps_image/product_code.png", $modulename, "product_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $db->num_rows() . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_FORM_NAME') => 'width="25%"', $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_FORM_DESCRIPTION') => 'width="30%"', $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_FORM_PARAMETERS') => 'width="15%"', $VM_LANG->_('PHPSHOP_PRODUCTS_LBL') => 'width="15%"', $VM_LANG->_('E_REMOVE') => "width=\"10%\""); $listObj->writeTableHeader($columns);
$db->next_record(); $num_rows = $db->f("num_rows"); if ($num_rows) { $tabs->startTab($VM_LANG->_('PHPSHOP_ORDER_LIST_LBL') . ' (' . $num_rows . ')', "order-list"); ?> <h3><?php echo $VM_LANG->_('PHPSHOP_ORDER_LIST_LBL'); ?> </h3> <?php // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", $VM_LANG->_('PHPSHOP_ORDER_LIST_ID') => '', $VM_LANG->_('PHPSHOP_CHECK_OUT_THANK_YOU_PRINT_VIEW') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_CDATE') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_MDATE') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_STATUS') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_TOTAL') => '', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); $url = $_SERVER['PHP_SELF'] . "?page=order.order_print&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&order_id=" . $db->f("order_id"); $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . sprintf("%08d", $db->f("order_id")) . "</a><br />"; $listObj->addCell($tmp_cell); $details_url = $sess->url($_SERVER['PHP_SELF'] . "?page=order.order_printdetails&order_id=" . $db->f("order_id") . "&no_menu=1"); $details_url = stristr($_SERVER['PHP_SELF'], "index2.php") ? str_replace("index2.php", "index3.php", $details_url) : str_replace("index.php", "index2.php", $details_url);
$q .= "ORDER BY coupon_id "; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } else { $list = "SELECT * FROM #__{vm}_coupons "; $list .= "ORDER BY coupon_id "; $list .= "LIMIT {$limitstart}, " . $limit; $count = "SELECT count(*) as num_rows FROM #__{vm}_coupons "; } $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_COUPON_LIST'), IMAGEURL . "ps_image/percentage.png", $modulename, "coupon_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_COUPON_CODE_HEADER') => '', $VM_LANG->_('PHPSHOP_COUPON_PERCENT_TOTAL') => '', $VM_LANG->_('PHPSHOP_COUPON_TYPE') => '', $VM_LANG->_('PHPSHOP_COUPON_VALUE_HEADER') => '', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("coupon_id"), false, "coupon_id"));
$where[] = "(group_name LIKE '%{$keyword}%' )"; } if (!empty($where)) { $q = ' WHERE ' . implode(' AND ', $where); } $count = "SELECT count(*) as num_rows FROM " . $usergroup->_table_name . $q; $list = "SELECT * FROM " . $usergroup->_table_name . $q; $list .= "\nORDER BY group_level, group_name"; $list .= "\nLIMIT {$limitstart}, " . $limit; $db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('VM_USERGROUP_LIST_LBL'), VM_THEMEURL . 'images/administration/dashboard/shoppers.png', "admin", "usergroup_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "", $VM_LANG->_('VM_USERGROUP_NAME') => "width=\"40%\"", $VM_LANG->_('VM_USERGROUP_LEVEL') => "width=\"20%\"", $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("group_id"), false, "group_id"));
* * http://virtuemart.net */ mm_showMyFileName(__FILE__); require_once CLASSPATH . "pageNavigation.class.php"; require_once CLASSPATH . "htmlTools.class.php"; $where = array(); if ($keyword != "") { $where[] = "(f.name LIKE '%{$keyword}%' OR f.type LIKE '%{$keyword}%')"; } $db->setQuery("SELECT COUNT(*)" . "\nFROM #__{vm}_userfield AS f " . (count($where) ? "\nWHERE " . implode(' AND ', $where) : "")); $total = $db->loadResult(); echo $db->getErrorMsg(); $pageNav = new vmPageNav($total, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('VM_MANAGE_USER_FIELDS'), $mosConfig_live_site . "/administrator/images/addusers.png", "admin", "user_field_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $pageNav->limit . ")\" />" => "", $VM_LANG->_('VM_FIELDMANAGER_NAME') => "width=\"20%\"", $VM_LANG->_('VM_FIELDMANAGER_TITLE') => "width=\"20%\"", $VM_LANG->_('VM_FIELDMANAGER_TYPE') => "width=\"10%\"", $VM_LANG->_('VM_FIELDMANAGER_REQUIRED') => "width=\"5%\"", $VM_LANG->_('VM_FIELDMANAGER_PUBLISHED') => "width=\"5%\"", $VM_LANG->_('VM_FIELDMANAGER_SHOW_ON_REGISTRATION') => "width=\"5%\"", $VM_LANG->_('VM_FIELDMANAGER_SHOW_ON_SHIPPING') => "width=\"5%\"", $VM_LANG->_('VM_FIELDMANAGER_SHOW_ON_ACCOUNT') => "width=\"5%\"", $VM_LANG->_('VM_FIELDMANAGER_REORDER') => "width=\"5%\"", vmCommonHTML::getSaveOrderButton(min($total - $pageNav->limitstart, $pageNav->limit), 'changeordering') => 'width="8%"', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query("SELECT f.fieldid, f.sys, f.title, f.name, f.description, f.type, f.required, f.published, f.account, f.ordering, f.registration, f.shipping" . "\nFROM #__{vm}_userfield AS f" . (count($where) ? "\nWHERE " . implode(' AND ', $where) : "") . "\n ORDER BY f.ordering" . "\nLIMIT {$pageNav->limitstart}, {$pageNav->limit}"); // The list of fields which CAN'T BE UNPUBLISHED OR UNREQUIRED $coreFields = array('username', 'email', 'password', 'password2'); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i));