[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_cart_handler.php

Zen Cart 源代码 init_cart_handler.php




下载文件

文件名: init_cart_handler.php
文件类型: PHP文件
文件大小: 1.64 KiB
MD5: 3ad0013fcd4f3ce4d6594d56b4966e73

init_cart_handler.php - 关闭高亮
  1. <?php
  2. /**
  3.  * initialise and handle cart actions
  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-2011 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 GIT: $Id: Author: Ian Wilson  Sat Oct 6 15:06:42 2012 +0100 Modified in v1.5.2 $
  11.  */
  12. if (!defined('IS_ADMIN_FLAG')) {
  13.   die('Illegal Access');
  14. }
  15. if (isset($_GET['action'])) {
  16.   /**
  17.    * redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
  18.    */
  19.   if ($session_started == false) {
  20.     zen_redirect(zen_href_link(FILENAME_COOKIE_USAGE));
  21.   }
  22.   if (DISPLAY_CART == 'true') {
  23.     $goto =  FILENAME_SHOPPING_CART;
  24.     $parameters = array('action', 'cPath', 'products_id', 'pid', 'main_page');
  25.   } else {
  26.     $chk_handler = zen_get_info_page(isset($_GET['products_id']) ? $_GET['products_id'] : 0);
  27.     $goto = $_GET['main_page'];
  28.     if ($_GET['action'] == 'buy_now') {
  29.       if (strpos($goto, 'reviews') > 5) {
  30.         $parameters = array('action');
  31.         $goto = FILENAME_PRODUCT_REVIEWS;
  32.       } else {
  33.         $parameters = array('action', 'products_id');
  34.       }
  35.     } elseif ($_GET['main_page'] == $chk_handler) {
  36.       $parameters = array('action', 'pid', 'main_page');
  37.     } else {
  38.       $parameters = array('action', 'pid', 'main_page', 'products_id');
  39.     }
  40.   }
  41.   /**
  42.    * require file containing code to handle default cart actions
  43.    */
  44.   require(DIR_WS_INCLUDES . 'main_cart_actions.php');
  45. }
  46.