[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 源代码 categories_tabs.php

Zen Cart 源代码 categories_tabs.php




下载文件

文件名: categories_tabs.php
文件类型: PHP文件
文件大小: 1.54 KiB
MD5: 8f7dc403085099d7f0bb6d677dd1d74c

categories_tabs.php - 关闭高亮
  1. <?php
  2. /**
  3.  * categories_tabs.php module
  4.  *
  5.  * @package templateSystem
  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: categories_tabs.php 3018 2006-02-12 21:04:04Z wilt $
  10.  */
  11. if (!defined('IS_ADMIN_FLAG')) {
  12.   die('Illegal Access');
  13. }
  14. $order_by = " order by c.sort_order, cd.categories_name ";
  15.  
  16. $categories_tab_query = "select c.categories_id, cd.categories_name from " .
  17. TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
  18.                          where c.categories_id=cd.categories_id and c.parent_id= '0' and cd.language_id='" . (int)$_SESSION['languages_id'] . "' and c.categories_status='1'" .
  19. $order_by;
  20. $categories_tab = $db->Execute($categories_tab_query);
  21.  
  22. $links_list = array();
  23. while (!$categories_tab->EOF) {
  24.  
  25.   // currently selected category
  26.   if ((int)$cPath == $categories_tab->fields['categories_id']) {
  27.     $new_style = 'category-top';
  28.     $categories_tab_current = '<span class="category-subs-selected">' . $categories_tab->fields['categories_name'] . '</span>';
  29.   } else {
  30.     $new_style = 'category-top';
  31.     $categories_tab_current = $categories_tab->fields['categories_name'];
  32.   }
  33.  
  34.   // create link to top level category
  35.   $links_list[] = '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' . $categories_tab_current . '</a> ';
  36.   $categories_tab->MoveNext();
  37. }
  38.  
  39. ?>