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

Zen Cart 源代码 init_category_path.php




下载文件

文件名: init_category_path.php
文件类型: PHP文件
文件大小: 1.62 KiB
MD5: 3d096ea6b3b1dd6a4b8698f13f3f6530

init_category_path.php - 关闭高亮
  1. <?php
  2. /**
  3.  * pre-calculate the category path
  4.  * see {@link  http://www.zen-cart.com/wiki/index.php/Developers_API_Tutorials#InitSystem wikitutorials} for more details.
  5.  *
  6.  * @package initSystem
  7.  * @copyright Copyright 2003-2010 Zen Cart Development Team
  8.  * @copyright Portions Copyright 2003 osCommerce
  9.  * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  10.  * @version $Id: init_category_path.php 17018 2010-07-27 07:25:41Z drbyte $
  11.  */
  12. if (!defined('IS_ADMIN_FLAG')) {
  13.   die('Illegal Access');
  14. }
  15. $show_welcome = false;
  16. if (isset($_GET['cPath'])) {
  17.   $cPath = $_GET['cPath'];
  18. } elseif (isset($_GET['products_id']) && !zen_check_url_get_terms()) {
  19.   $cPath = zen_get_product_path($_GET['products_id']);
  20. } else {
  21.   if (SHOW_CATEGORIES_ALWAYS == '1' && !zen_check_url_get_terms()) {
  22.     $show_welcome = true;
  23.     $cPath = (defined('CATEGORIES_START_MAIN') ? CATEGORIES_START_MAIN : '');
  24.   } else {
  25.     $show_welcome = false;
  26.     $cPath = '';
  27.   }
  28. }
  29. if (zen_not_null($cPath)) {
  30.   $cPath_array = zen_parse_category_path($cPath);
  31.   $cPath = implode('_', $cPath_array);
  32.   $current_category_id = $cPath_array[(sizeof($cPath_array)-1)];
  33. } else {
  34.   $current_category_id = 0;
  35.   $cPath_array = array();
  36. }
  37.  
  38. // determine whether the current page is the home page or a product listing
  39. //$this_is_home_page = ($current_page=='index' && ((int)$cPath == 0 || $show_welcome == true));
  40. $this_is_home_page = ($current_page=='index' && (!isset($_GET['cPath']) || $_GET['cPath'] == '') && (!isset($_GET['manufacturers_id']) || $_GET['manufacturers_id'] == '') && (!isset($_GET['typefilter']) || $_GET['typefilter'] == '') );
  41.