} if (!empty($_POST)) { $_POST = addslashes_deep($_POST); } $_COOKIE = addslashes_deep($_COOKIE); $_REQUEST = addslashes_deep($_REQUEST); } //$db_name = 'mescake'; /* 创建 ECSHOP 对象 */ $ecs = new ECS($db_name, $prefix); define('DATA_DIR', $ecs->data_dir()); define('IMAGE_DIR', $ecs->image_dir()); /* 初始化数据库类 */ require ROOT_PATH . 'includes/cls_mysql.php'; $db = new cls_mysql($db_host, $db_user, $db_pass, $db_name); $db->set_disable_cache_tables(array($ecs->table('sessions'), $ecs->table('sessions_data'), $ecs->table('cart'))); $db_host = $db_user = $db_pass = $db_name = NULL; /* 创建错误处理对象 */ $err = new ecs_error('message.dwt'); /* 载入系统参数 */ $_CFG = load_config(); /* 载入语言文件 */ require ROOT_PATH . 'languages/' . $_CFG['lang'] . '/common.php'; if ($_CFG['shop_closed'] == 1) { /* 商店关闭了,输出关闭的消息 */ header('Content-type: text/html; charset=' . EC_CHARSET); die('<div style="margin: 150px; text-align: center; font-size: 14px"><p>' . $_LANG['shop_closed'] . '</p><p>' . $_CFG['close_comment'] . '</p></div>'); } if (is_spider()) { /* 如果是蜘蛛的访问,那么默认为访客方式,并且不记录到日志中 */ if (!defined('INIT_NO_USERS')) {