[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
Zen Cart 源代码 featured.php

Zen Cart 源代码 featured.php




下载文件

文件名: featured.php
文件类型: PHP文件
文件大小: 1.88 KiB
MD5: 1071c6d41a6f03765b683645643e9ef4

featured.php - 关闭高亮
  1. <?php
  2. /**
  3.  * featured sidebox - displays a random Featured Product
  4.  *
  5.  * @package templateSystem
  6.  * @copyright Copyright 2003-2007 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: featured.php 6475 2007-06-08 21:10:33Z ajeh $
  10.  */
  11.  
  12. // test if box should display
  13.   $show_featured= true;
  14.  
  15.   if ($show_featured == true) {
  16.     $random_featured_products_query = "select p.products_id, p.products_image, pd.products_name,
  17.                                       p.master_categories_id
  18.                           from (" . TABLE_PRODUCTS . " p
  19.                           left join " . TABLE_FEATURED . " f on p.products_id = f.products_id
  20.                           left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
  21.                           where p.products_id = f.products_id
  22.                           and p.products_id = pd.products_id
  23.                           and p.products_status = 1
  24.                           and f.status = 1
  25.                           and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
  26.  
  27.     // randomly select ONE featured product from the list retrieved:
  28.     //$random_featured_product = zen_random_select($random_featured_products_query);
  29.     $random_featured_product = $db->ExecuteRandomMulti($random_featured_products_query, MAX_RANDOM_SELECT_FEATURED_PRODUCTS);
  30.  
  31.     if ($random_featured_product->RecordCount() > 0)  {
  32.       require($template->get_template_dir('tpl_featured.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_featured.php');
  33.       $title =  BOX_HEADING_FEATURED_PRODUCTS;
  34.       $title_link = FILENAME_FEATURED_PRODUCTS;
  35.       require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
  36.     }
  37.   }
  38. ?>


cron