예제 #1
0
파일: init.php 프로젝트: netroby/ecshop
parse_json($json, $_POST['Json']);
/* 初始化包含文件 */
require ROOT_PATH . 'includes/inc_constant.php';
require ROOT_PATH . 'includes/cls_ecshop.php';
require ROOT_PATH . 'includes/lib_time.php';
require ROOT_PATH . 'includes/lib_main.php';
require ROOT_PATH . 'includes/lib_insert.php';
require ROOT_PATH . 'includes/lib_goods.php';
/* 创建 ECSHOP 对象 */
$ecs = new ECS($db_name, $prefix);
/* 初始化数据库类 */
$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;
/* 载入系统参数 */
$_CFG = load_config();
/* 载入语言包 */
require ROOT_PATH . 'languages/' . $_CFG['lang'] . '/admin/common.php';
require ROOT_PATH . 'languages/' . $_CFG['lang'] . '/admin/log_action.php';
/* 初始化session */
include ROOT_PATH . 'includes/cls_session.php';
$sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'), 'CL_ECSCP_ID');
define('SESS_ID', $sess->get_session_id());
/* 判断是否登录了 */
if ((!isset($_SESSION['admin_id']) || intval($_SESSION['admin_id']) <= 0) && $_POST['Action'] != 'UserLogin') {
    client_show_message(110);
}
if ($_CFG['shop_closed'] == 1) {
    /* 商店关闭了,输出关闭的消息 */
    client_show_message(105);
}
예제 #2
0
파일: lib_api.php 프로젝트: Ryan007/mybb
/**
 * 出错函数
 *
 */
function API_Error()
{
    client_show_message(102);
}