ZenCart_Documentation  1.5.0
http://www.collinsharper.com
C:/xampp/htdocs/zen-cart/admin/includes/modules/prod_cat_header_code.php
Go to the documentation of this file.
00001 <?php
00009 if (!defined('IS_ADMIN_FLAG')) {
00010   die('Illegal Access');
00011 }
00012   require(DIR_WS_CLASSES . 'currencies.php');
00013   $currencies = new currencies();
00014 
00015 
00016   if (isset($_GET['product_type'])) {
00017     $product_type = zen_db_prepare_input($_GET['product_type']);
00018   } else {
00019     $product_type='1';
00020   }
00021 
00022   $type_admin_handler = $zc_products->get_admin_handler($product_type);
00023 
00024   function zen_reset_page() {
00025     global $db, $current_category_id;
00026     $look_up = $db->Execute("select p.products_id, pd.products_name, p.products_model, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute, p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping, p.products_quantity_order_max from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . $current_category_id . "' order by pd.products_name");
00027     while (!$look_up->EOF) {
00028       $look_count ++;
00029       if ($look_up->fields['products_id']== $_GET['pID']) {
00030         exit;
00031       } else {
00032         $look_up->MoveNext();
00033       }
00034     }
00035     return round( ($look_count+.05)/MAX_DISPLAY_RESULTS_CATEGORIES);
00036   }
00037 // make array for product types
00038 
00039   $sql = "select * from " . TABLE_PRODUCT_TYPES;
00040   $product_types = $db->Execute($sql);
00041   while (!$product_types->EOF) {
00042     $product_types_array[] = array('id' => $product_types->fields['type_id'],
00043                                      'text' => $product_types->fields['type_name']);
00044   
00045     $product_types->MoveNext();
00046   }
00047 ?>
 All Data Structures Namespaces Files Functions Variables Enumerations