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

Zen Cart 源代码 ajax.php




下载文件

文件名: ajax.php
文件类型: PHP文件
文件大小: 961 Bytes
MD5: 15059c272117b042e1b15d4bba481fb0

ajax.php - 关闭高亮
  1. <?php
  2. /**
  3.  * ajax front controller
  4.  *
  5.  * @package templateSystem
  6.  * @copyright Copyright 2003-2014 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 GIT: $Id: Author: Ian Wilson   New in v1.5.4 $
  10.  */
  11. require ('includes/application_top.php');
  12. $language_page_directory = DIR_WS_LANGUAGES.$_SESSION['language'].'/';
  13. if (isset ($_GET['act'])&&isset ($_GET['method'])) {
  14.   $className = 'zc'.ucfirst ($_GET['act']);
  15.   $classFile = $className.'.php';
  16.   if (file_exists (DIR_FS_CATALOG.DIR_WS_CLASSES.'ajax/'.$classFile)) {
  17.     require (DIR_FS_CATALOG.DIR_WS_CLASSES.'ajax/'.$classFile);
  18.     $class = new $className ();
  19.     if (method_exists ($class, $_GET['method'])) {
  20.       $result = call_user_func (array(
  21.           $class,
  22.           $_GET['method']
  23.       ));
  24.       echo json_encode ($result);exit();
  25.     } else {
  26.       echo 'method error';
  27.     }
  28.   }
  29. }


cron