[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 /** 3 * upcoming_products module 4 * 5 * @package modules 6 * @copyright Copyright 2003-2006 Zen Cart Development Team 7 * @copyright Portions Copyright 2003 osCommerce 8 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 9 * @version $Id: upcoming_products.php 4162 2006-08-17 03:55:02Z ajeh $ 10 */ 11 if (!defined('IS_ADMIN_FLAG')) { 12 die('Illegal Access'); 13 } 14 15 $display_limit = zen_get_upcoming_date_range(); 16 if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { 17 /* 18 $expected_query = "select p.products_id, pd.products_name, products_date_available as date_expected 19 from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd 20 where to_days(products_date_available) > to_days(now()) 21 and p.products_id = pd.products_id 22 and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' 23 order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . " 24 limit " . MAX_DISPLAY_UPCOMING_PRODUCTS; 25 */ 26 $expected_query = "select p.products_id, pd.products_name, products_date_available as date_expected 27 from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd 28 where 29 p.products_id = pd.products_id 30 and p.products_status = 1 31 and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" . 32 $display_limit . " 33 order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . " 34 limit " . MAX_DISPLAY_UPCOMING_PRODUCTS; 35 36 } else { 37 /* 38 $expected_query = "select p.products_id, pd.products_name, products_date_available as date_expected 39 from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . 40 TABLE_CATEGORIES . " c 41 where p.products_id = p2c.products_id 42 and p2c.categories_id = c.categories_id 43 and c.parent_id = '" . (int)$new_products_category_id . "' 44 and to_days(products_date_available) > to_days(now()) 45 and p.products_id = pd.products_id 46 and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' 47 order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . " 48 limit " . MAX_DISPLAY_UPCOMING_PRODUCTS; 49 */ 50 $expected_query = "select p.products_id, pd.products_name, products_date_available as date_expected 51 from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . 52 TABLE_CATEGORIES . " c 53 where p.products_id = p2c.products_id 54 and p2c.categories_id = c.categories_id 55 and c.parent_id = '" . (int)$new_products_category_id . "'" . 56 $display_limit . " 57 and p.products_id = pd.products_id 58 and p.products_status = 1 59 and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' 60 order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . " 61 limit " . MAX_DISPLAY_UPCOMING_PRODUCTS; 62 63 } 64 65 $expected = $db->Execute($expected_query); 66 67 if ($expected->RecordCount() > 0) { 68 require($template->get_template_dir('tpl_modules_upcoming_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_upcoming_products.php'); 69 } 70 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 16:45:43 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |