[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.4 KiB
MD5: 44a7cdedea5fc01cf1ec36f91693d28e

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-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_cart_handler.php 17047 2010-07-29 06:00:38Z drbyte $
  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.     $goto = $_GET['main_page'];
  27.     if ($_GET['action'] == 'buy_now') {
  28.       if (strpos($goto, 'reviews') > 5) {
  29.         $parameters = array('action');
  30.         $goto = FILENAME_PRODUCT_REVIEWS;
  31.       } else {
  32.         $parameters = array('action', 'products_id');
  33.       }
  34.     } else {
  35.       $parameters = array('action', 'pid', 'main_page');
  36.     }
  37.   }
  38.   /**
  39.    * require file containing code to handle default cart actions
  40.    */
  41.   require(DIR_WS_INCLUDES . 'main_cart_actions.php');
  42. }
  43.