示例#1
0
// load server configuration parameters
if (file_exists('includes/local/configure.php')) {
    // for developers
    include 'includes/local/configure.php';
} else {
    include 'includes/configure.php';
}
if (DB_SERVER == '') {
    if (is_dir('install')) {
        header('Location: install/index.php');
        exit;
    }
}
require OSCOM_BASE_DIR . 'OSC/OM/OSCOM.php';
spl_autoload_register('OSC\\OM\\OSCOM::autoload');
OSCOM::initialize();
// set the type of request (secure or not)
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' || isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) {
    $request_type = 'SSL';
    define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
    // set the cookie domain
    $cookie_domain = HTTPS_COOKIE_DOMAIN;
    $cookie_path = HTTPS_COOKIE_PATH;
} else {
    $request_type = 'NONSSL';
    define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
    $cookie_domain = HTTP_COOKIE_DOMAIN;
    $cookie_path = HTTP_COOKIE_PATH;
}
// set php_self in the local scope
$req = parse_url($_SERVER['SCRIPT_NAME']);
require DIR_WS_CLASSES . 'shopping_cart.php';
require DIR_WS_FUNCTIONS . 'sessions.php';
require DIR_WS_CLASSES . 'language.php';
require DIR_WS_FUNCTIONS . 'localization.php';
require DIR_WS_FUNCTIONS . 'validations.php';
require DIR_WS_CLASSES . 'table_block.php';
require DIR_WS_CLASSES . 'box.php';
require DIR_WS_CLASSES . 'message_stack.php';
require DIR_WS_CLASSES . 'split_page_results.php';
require DIR_WS_CLASSES . 'object_info.php';
require DIR_WS_CLASSES . 'mime.php';
require DIR_WS_CLASSES . 'email.php';
require DIR_WS_CLASSES . 'upload.php';
require DIR_WS_CLASSES . 'action_recorder.php';
require DIR_WS_CLASSES . 'cfg_modules.php';
OSCOM::initialize('Admin');
// calculate category path
if (isset($_GET['cPath'])) {
    $cPath = $_GET['cPath'];
} else {
    $cPath = '';
}
if (tep_not_null($cPath)) {
    $cPath_array = tep_parse_category_path($cPath);
    $cPath = implode('_', $cPath_array);
    $current_category_id = $cPath_array[sizeof($cPath_array) - 1];
} else {
    $current_category_id = 0;
}
// the following cache blocks are used in the Tools->Cache section
// ('language' in the filename is automatically replaced by available languages)