[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 // 3 // +----------------------------------------------------------------------+ 4 // |zen-cart Open Source E-commerce | 5 // +----------------------------------------------------------------------+ 6 // | Copyright (c) 2003 The zen-cart developers | 7 // | | 8 // | http://www.zen-cart.com/index.php | 9 // | | 10 // | Portions Copyright (c) 2003 osCommerce | 11 // +----------------------------------------------------------------------+ 12 // | This source file is subject to version 2.0 of the GPL license, | 13 // | that is bundled with this package in the file LICENSE, and is | 14 // | available through the world-wide-web at the following url: | 15 // | http://www.zen-cart.com/license/2_0.txt. | 16 // | If you did not receive a copy of the zen-cart license and are unable | 17 // | to obtain it through the world-wide-web, please send a note to | 18 // | license@zen-cart.com so we can mail you a copy immediately. | 19 // +----------------------------------------------------------------------+ 20 // $Id: application_top.php 6526 2007-06-25 22:59:38Z drbyte $ 21 // 22 /** 23 * File contains just application_top code 24 * 25 * Initializes common classes & methods. Controlled by an array which describes 26 * the elements to be initialised and the order in which that happens. 27 * 28 * @package admin 29 * @copyright Copyright 2003-2005 zen-cart Development Team 30 * @copyright Portions Copyright 2003 osCommerce 31 */ 32 /** 33 * boolean if true the autoloader scripts will be parsed and their output shown. For debugging purposes only. 34 */ 35 define('DEBUG_AUTOLOAD', false); 36 /** 37 * boolean used to see if we are in the admin script, obviously set to false here. 38 * DO NOT REMOVE THE define BELOW. WILL BREAK ADMIN 39 */ 40 define('IS_ADMIN_FLAG', true); 41 /** 42 * integer saves the time at which the script started. 43 */ 44 // Start the clock for the page parse time log 45 define('PAGE_PARSE_START_TIME', microtime()); 46 /** 47 * set the level of error reporting 48 */ 49 error_reporting(E_ALL & ~E_NOTICE); 50 51 // set php_self in the local scope 52 if (!isset($PHP_SELF)) $PHP_SELF = $_SERVER['PHP_SELF']; 53 /** 54 * Set the local configuration parameters - mainly for developers 55 */ 56 if (file_exists('includes/local/configure.php')) { 57 /** 58 * load any local(user created) configure file. 59 */ 60 include('includes/local/configure.php'); 61 } 62 // Check for application configuration parameters 63 if (!file_exists('includes/configure.php')) { 64 if (file_exists('../zc_install/index.php')) { 65 //header('location: ../zc_install/index.php'); 66 echo 'ERROR: Admin configure.php not found. Suggest running install? <a href="../zc_install/index.php">Click here for installation</a>'; 67 } else { 68 die('ERROR: admin/includes/configure.php file not found. Suggest running zc_install/index.php?'); 69 } 70 } 71 /** 72 * load the main configure file. 73 */ 74 require('includes/configure.php'); 75 /** 76 * ignore version-check if INI file setting has been set 77 */ 78 if (file_exists(DIR_FS_ADMIN . 'includes/local/skip_version_check.ini')) { 79 $lines=@file(DIR_FS_ADMIN . 'includes/local/skip_version_check.ini'); 80 foreach($lines as $line) { 81 if (substr($line,0,14)=='admin_configure_php_check=') $check_cfg=substr(trim(strtolower(str_replace('admin_configure_php_check=','',$line))),0,3); 82 } 83 } 84 /* 85 // turned off for now 86 if ($check_cfg != 'off') { 87 // if the admin/includes/configure.php file doesn't contain admin-related content, throw error 88 $zc_pagepath = str_replace(basename($PHP_SELF),'',__FILE__); //remove page name from full path of current page 89 $zc_pagepath = str_replace(array('\\','\\\\'),'/',$zc_pagepath); // convert '\' marks to '/' 90 $zc_pagepath = str_replace('//','/',$zc_pagepath); //convert doubles to single 91 $zc_pagepath = str_replace(strrchr($zc_pagepath,'/'),'',$zc_pagepath); // remove trailing '/' 92 $zc_adminpage = str_replace('\\','/',DIR_FS_ADMIN); //convert "\" to '/' 93 $zc_adminpage = str_replace('//','/',$zc_adminpage); // remove doubles 94 $zc_adminpage = str_replace(strrchr($zc_adminpage,'/'),'',$zc_adminpage); // remove trailing '/' 95 if (!defined('DIR_WS_ADMIN') || $zc_pagepath != $zc_adminpage ) { 96 echo ('ERROR: The admin/includes/configure.php file has invalid configuration. Please rebuild, or verify specified paths.'); 97 if (file_exists('../zc_install/index.php')) { 98 echo '<br /><a href="../zc_install/index.php">Click here for installation</a>'; 99 } 100 echo '<br /><br /><br /><br />['.$zc_pagepath.'] «» [' .$zc_adminpage.']<br />'; 101 } 102 } 103 */ 104 /** 105 * include the list of extra configure files 106 */ 107 if ($za_dir = @dir(DIR_WS_INCLUDES . 'extra_configures')) { 108 while ($zv_file = $za_dir->read()) { 109 if (preg_match('/\.php$/', $zv_file) > 0) { 110 /** 111 * load any user/contribution specific configuration files. 112 */ 113 include(DIR_WS_INCLUDES . 'extra_configures/' . $zv_file); 114 } 115 } 116 $za_dir->close(); 117 } 118 119 $autoLoadConfig = array(); 120 $loader_file = 'config.core.php'; 121 $base_dir = DIR_WS_INCLUDES . 'auto_loaders/'; 122 if (file_exists(DIR_WS_INCLUDES . 'auto_loaders/overrides/' . $loader_file)) { 123 $base_dir = DIR_WS_INCLUDES . 'auto_loaders/overrides/'; 124 } 125 /** 126 * load the default application_top autoloader file. 127 */ 128 include($base_dir . $loader_file); 129 if ($loader_dir = dir(DIR_WS_INCLUDES . 'auto_loaders')) { 130 while ($loader_file = $loader_dir->read()) { 131 if ((preg_match('/^config\./', $loader_file) > 0) && (preg_match('/\.php$/', $loader_file) > 0)) { 132 if ($loader_file != 'config.core.php') { 133 $base_dir = DIR_WS_INCLUDES . 'auto_loaders/'; 134 if (file_exists(DIR_WS_INCLUDES . 'auto_loaders/overrides/' . $loader_file)) { 135 $base_dir = DIR_WS_INCLUDES . 'auto_loaders/overrides/'; 136 } 137 /** 138 * load the application_top autoloader files. 139 */ 140 include($base_dir . $loader_file); 141 } 142 } 143 } 144 $loader_dir->close(); 145 } 146 /** 147 * load the autoloader interpreter code. 148 */ 149 require (DIR_FS_CATALOG . 'includes/autoload_func.php'); 150 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 16:45:43 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |