예제 #1
0
    @chmod('../temp/caches', 0777);
}
if (!file_exists('../temp/compiled/' . GURADIAN_PATH)) {
    @mkdir('../temp/compiled/' . GURADIAN_PATH, 0777);
    @chmod('../temp/compiled/' . GURADIAN_PATH, 0777);
}
clearstatcache();
/* 创建 Smarty 对象。*/
require ROOT_PATH . 'includes/cls_template.php';
$smarty = new cls_template();
$smarty->template_dir = ROOT_PATH . GURADIAN_PATH . '/templates';
$smarty->compile_dir = ROOT_PATH . 'temp/compiled/' . GURADIAN_PATH;
if ((DEBUG_MODE & 2) == 2) {
    $smarty->force_compile = true;
}
$smarty->assign('lang', $_LANG);
/* 验证管理员身份 */
if (!isset($_SESSION['admin_id']) || intval($_SESSION['admin_id']) <= 0) {
    /* session 不存在,检查cookie */
    if (!empty($_COOKIE['ECSCP']['admin_id']) && !empty($_COOKIE['ECSCP']['admin_pass'])) {
        // 找到了cookie, 验证cookie信息
        $sql = 'SELECT * ' . ' FROM hteacher.ht_admin_user ' . " WHERE user_id = '" . intval($_COOKIE['ECSCP']['admin_id']) . "'";
        $row = $db->GetRow($sql);
        if (!$row) {
            // 没有找到这个记录
            setcookie($_COOKIE['ECSCP']['admin_id'], '', 1);
            setcookie($_COOKIE['ECSCP']['admin_pass'], '', 1);
            if (!empty($_REQUEST['is_ajax'])) {
                make_json_error($_LANG['priv_error']);
            } else {
                //             	die("HTTP_REFERER2");
예제 #2
0
파일: init.php 프로젝트: nanhuacrab/ecshop
    header('Content-type: text/html; charset=' . EC_CHARSET);
    /* 创建 Smarty 对象。*/
    require ROOT_PATH . 'includes/cls_template.php';
    $smarty = new cls_template();
    $smarty->cache_lifetime = $_CFG['cache_time'];
    $smarty->template_dir = ROOT_PATH . 'themes/' . $_CFG['template'];
    $smarty->cache_dir = ROOT_PATH . 'temp/caches';
    $smarty->compile_dir = ROOT_PATH . 'temp/compiled';
    if ((DEBUG_MODE & 2) == 2) {
        $smarty->direct_output = true;
        $smarty->force_compile = true;
    } else {
        $smarty->direct_output = false;
        $smarty->force_compile = false;
    }
    $smarty->assign('lang', $_LANG);
    $smarty->assign('ecs_charset', EC_CHARSET);
    if (!empty($_CFG['stylename'])) {
        $smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style_' . $_CFG['stylename'] . '.css');
    } else {
        $smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style.css');
    }
}
if (!defined('INIT_NO_USERS')) {
    /* 会员信息 */
    $user =& init_users();
    if (!isset($_SESSION['user_id'])) {
        /* 获取投放站点的名称 */
        $site_name = isset($_GET['from']) ? htmlspecialchars($_GET['from']) : addslashes($_LANG['self_site']);
        $from_ad = !empty($_GET['ad_id']) ? intval($_GET['ad_id']) : 0;
        $_SESSION['from_ad'] = $from_ad;
예제 #3
0
파일: init.php 프로젝트: naliduo/ecshop
    }
}
if ((DEBUG_MODE & 1) == 1) {
    error_reporting(E_ALL);
} else {
    error_reporting(E_ALL ^ E_NOTICE);
}
if ((DEBUG_MODE & 4) == 4) {
    include ROOT_PATH . 'includes/lib.debug.php';
}
/* 判断是否支持gzip模式 */
if (gzip_enabled()) {
    ob_start('ob_gzhandler');
}
/* wap头文件 */
//if (substr($_SERVER['SCRIPT_NAME'], strrpos($_SERVER['SCRIPT_NAME'], '/')) != '/user.php')
//{}
header("Content-Type:text/html; charset=utf-8");
if (empty($_CFG['wap_config'])) {
    echo "<meta http-equiv='Content-Type' content='text/html; charset=utf-8' /><title>" . $GLOBALS['_CFG']['shop_name'] . "</title></head><body><p align='left'>对不起,{$_CFG['shop_name']}暂时没有开启手机购物功能</p></body></html>";
    exit;
}
//20:56 2013-7-11
$GLOBALS['smarty']->assign('shop_name', $GLOBALS['_CFG']['shop_name']);
$GLOBALS['smarty']->assign('service_phone', $GLOBALS['_CFG']['service_phone']);
$GLOBALS['smarty']->assign('points_name', $GLOBALS['_CFG']['integral_name']);
$GLOBALS['smarty']->assign('use_integral', $GLOBALS['_CFG']['use_integral']);
$GLOBALS['smarty']->assign('site', get_domain());
if (isset($_SESSION['user_id']) && $_SESSION['user_id'] && isset($smarty)) {
    $smarty->assign('bindusercardme', $db->getOne("select count(user_id) from " . $ecs->table("user_card") . " where user_id=" . $_SESSION['user_id']));
}
예제 #4
0
    header('Content-type: text/html; charset=' . EC_CHARSET);
    /* 创建 Smarty 对象。*/
    require ROOT_PATH . 'includes/cls_template.php';
    $smarty = new cls_template();
    $smarty->cache_lifetime = $_CFG['cache_time'];
    $smarty->template_dir = ROOT_PATH . 'themes/' . $_CFG['template'];
    $smarty->cache_dir = ROOT_PATH . 'temp/caches';
    $smarty->compile_dir = ROOT_PATH . 'temp/compiled';
    if ((DEBUG_MODE & 2) == 2) {
        $smarty->direct_output = true;
        $smarty->force_compile = true;
    } else {
        $smarty->direct_output = false;
        $smarty->force_compile = false;
    }
    $smarty->assign('lang', $_LANG);
    $smarty->assign('ecs_charset', EC_CHARSET);
}
if (!defined('INIT_NO_USERS')) {
    /* 会员信息 */
    $user =& init_users();
    if (!isset($_SESSION['user_id'])) {
        /* 获取投放站点的名称 */
        $site_name = isset($_GET['from']) ? $_GET['from'] : addslashes($_LANG['self_site']);
        $from_ad = !empty($_GET['ad_id']) ? intval($_GET['ad_id']) : 0;
        $_SESSION['from_ad'] = $from_ad;
        // 用户点击的广告ID
        $_SESSION['referer'] = stripslashes($site_name);
        // 用户来源
        unset($site_name);
        if (!defined('INGORE_VISIT_STATS')) {
예제 #5
0
파일: init2.php 프로젝트: shiruolin/hzzshop
    header('Cache-control: private');
    header('Content-type: text/html; charset=' . EC_CHARSET);
    require ROOT_PATH . 'includes/cls_template.php';
    $smarty = new cls_template();
    $smarty->cache_lifetime = $_CFG['cache_time'];
    $smarty->template_dir = ROOT_PATH . 'themes/' . $_CFG['template'];
    $smarty->cache_dir = ROOT_PATH . 'temp/caches';
    $smarty->compile_dir = ROOT_PATH . 'temp/compiled';
    if ((DEBUG_MODE & 2) == 2) {
        $smarty->direct_output = true;
        $smarty->force_compile = true;
    } else {
        $smarty->direct_output = false;
        $smarty->force_compile = false;
    }
    $smarty->assign('lang', $_LANG);
    $smarty->assign('hhs_charset', EC_CHARSET);
    $smarty->assign('hhs_css_path', 'themes/' . $_CFG['template'] . '/css');
    $smarty->assign('hhs_img_path', 'themes/' . $_CFG['template'] . '/images');
}
if (!defined('INIT_NO_USERS')) {
    /* 会员信息 */
    $user =& init_users();
    if (!isset($_SESSION['user_id'])) {
        /* 获取投放站点的名称 */
        $site_name = isset($_GET['from']) ? htmlspecialchars($_GET['from']) : addslashes($_LANG['self_site']);
        $from_ad = !empty($_GET['ad_id']) ? intval($_GET['ad_id']) : 0;
        $_SESSION['from_ad'] = $from_ad;
        // 用户点击的广告ID
        $_SESSION['referer'] = stripslashes($site_name);
        // 用户来源
예제 #6
0
 private function get_template()
 {
     global $_SGLOBAL, $_SC;
     $this->get_ua();
     if ($this->ua['is_pc'] || $this->ua['is_mac']) {
         $this->template = $_SGLOBAL['db']->getone('select value from ' . tname('wz_weixin_setting') . ' where op_wxid=' . $this->token_info['op_wxid'] . ' and mid=' . $this->token_info['mid'] . ' and var="pc_template"');
     } else {
         $this->template = $_SGLOBAL['db']->getone('select value from ' . tname('wz_weixin_setting') . ' where op_wxid=' . $this->token_info['op_wxid'] . ' and mid=' . $this->token_info['mid'] . ' and var="mobile_template"');
     }
     if (!$this->template) {
         $this->template = $this->module_info['module_default_template'];
     }
     header('Cache-control: private');
     header('Content-type: text/html; charset=' . $_SC['charset']);
     /* 创建 Smarty 对象。*/
     include_once S_ROOT . './source/cls_template.php';
     $smarty = new cls_template();
     $smarty->cache_lifetime = 1;
     //$_SCONFIG['cache_time'];
     $smarty->template_dir = S_ROOT . './module/' . $this->module_info['module_dir'] . '/themes/' . $this->template;
     $smarty->cache_dir = S_ROOT . './temp/caches';
     $smarty->compile_dir = S_ROOT . './temp/compiled';
     $smarty->compile_id = $this->module_info['module_dir'] . '_' . $this->weixin_info['op_uid'];
     $smarty->direct_output = false;
     $smarty->force_compile = false;
     $smarty->assign('lang', $_SC['lang']);
     $smarty->assign('charset', $_SC['charset']);
     $this->smarty = $smarty;
 }
예제 #7
0
파일: common.php 프로젝트: hugolong/weixiao
$_SGLOBAL['timestamp'] = $mtime[1];
$_SGLOBAL['supe_starttime'] = $_SGLOBAL['timestamp'] + $mtime[0];
//本站URL
if (empty($_SC['siteurl'])) {
    $_SC['siteurl'] = getsiteurl();
}
//链接数据库
dbconnect();
$_SCONFIG['template'] = 'base';
header('Cache-control: private');
header('Content-type: text/html; charset=' . $_SC['charset']);
/* 创建 Smarty 对象。*/
require S_ROOT . './source/cls_template.php';
$smarty = new cls_template();
$smarty->cache_lifetime = 1;
//$_SCONFIG['cache_time'];
$smarty->template_dir = S_ROOT . './themes/' . $_SCONFIG['template'];
$smarty->cache_dir = S_ROOT . './temp/caches';
$smarty->compile_dir = S_ROOT . './temp/compiled';
$smarty->compile_id = $_SCONFIG['template'];
$smarty->direct_output = false;
$smarty->force_compile = false;
$smarty->assign('lang', $_SC['lang']);
$smarty->assign('charset', $_SC['charset']);
//版本
include_once S_ROOT . './version.php';
$smarty->assign('template_path', './themes/' . $_SCONFIG['template']);
$smarty->assign('_SC', $_SC);
$smarty->assign('_SGLOBAL', $_SGLOBAL);
session_save_path(S_ROOT . "./data/session_tmp");
session_start();
예제 #8
0
    header('Content-type: text/html; charset=' . EC_CHARSET);
    /* 创建 Smarty 对象。*/
    require ROOT_PATH . 'includes/cls_template.php';
    $smarty = new cls_template();
    $smarty->cache_lifetime = $_CFG['cache_time'];
    $smarty->template_dir = ROOT_PATH . 'themes/' . $_CFG['template'];
    $smarty->cache_dir = ROOT_PATH . 'temp/caches';
    $smarty->compile_dir = ROOT_PATH . 'temp/compiled';
    if ((DEBUG_MODE & 2) == 2) {
        $smarty->direct_output = true;
        $smarty->force_compile = true;
    } else {
        $smarty->direct_output = false;
        $smarty->force_compile = false;
    }
    $smarty->assign('lang', $_LANG);
    $smarty->assign('ecs_charset', EC_CHARSET);
    if (!empty($_CFG['stylename'])) {
        $smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style_' . $_CFG['stylename'] . '.css');
    } else {
        $smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style.css');
    }
}
if (!defined('INIT_NO_USERS')) {
    /* 会员信息 */
    $user =& init_users();
    if (!isset($_SESSION['user_id'])) {
        /* 获取投放站点的名称 */
        $site_name = isset($_GET['from']) ? $_GET['from'] : addslashes($_LANG['self_site']);
        $from_ad = !empty($_GET['ad_id']) ? intval($_GET['ad_id']) : 0;
        $_SESSION['from_ad'] = $from_ad;
예제 #9
0
파일: init.php 프로젝트: dlpc/ecshop
    }
    //清理模板
    clear_all_files();
    /*end*/
    $smarty->cache_lifetime = $_CFG['cache_time'];
    $smarty->template_dir = ROOT_PATH . 'themes/' . $_CFG['template'];
    $smarty->cache_dir = ROOT_PATH . 'temp/caches';
    $smarty->compile_dir = ROOT_PATH . 'temp/compiled';
    if ((DEBUG_MODE & 2) == 2) {
        $smarty->direct_output = true;
        $smarty->force_compile = true;
    } else {
        $smarty->direct_output = false;
        $smarty->force_compile = false;
    }
    $smarty->assign('lang', $_LANG);
    $smarty->assign('ecs_charset', EC_CHARSET);
    if (!empty($_CFG['stylename'])) {
        $smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style_' . $_CFG['stylename'] . '.css');
    } else {
        $smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style.css');
    }
    $smarty->assign('css_path', 'themes/' . $_CFG['template'] . '/');
}
if (isset($smarty)) {
    //print_r($_SESSION);
    $GLOBALS['smarty']->assign('loogo', $_CFG['shop_logo']);
    $GLOBALS['smarty']->assign('user', $_SESSION ? $_SESSION : '0');
    $GLOBALS['smarty']->assign('is_store_user', $_SESSION['user_rank'] ? $_SESSION['user_rank'] : '0');
    if ($_SESSION['user_rank']) {
        $sql_rank_name = 'SELECT rank_name FROM ' . $ecs->table('user_rank') . " WHERE rank_id = " . $_SESSION['user_rank'];
예제 #10
0
파일: init.php 프로젝트: noikiy/mdwp
	//加载语言包文件
	require(ROOT_PATH . 'languages/' .$_CFG['lang']. '/admin/common.php');
	if (EC_CHARSET == 'utf-8'){
		if (file_exists(ROOT_PATH . 'plugins/zywx/languages/'.$_CFG['lang'].'/common.php'))
		{
			require(  ROOT_PATH . 'plugins/zywx/languages/'.$_CFG['lang']. '/common.php');
		}
	}
	if (EC_CHARSET == 'gbk'){
		if (file_exists(ROOT_PATH . 'plugins/zywx/languages/'.$_CFG['lang'].'/common_gbk.php'))
		{
			require(  ROOT_PATH . 'plugins/zywx/languages/'.$_CFG['lang']. '/common_gbk.php');
		}
	}

	!empty($_LANG) && $smarty->assign('lang', $_LANG);
	
	$smarty->assign('img_dir', 'images');

	
	/* 验证管理员身份 */
	
	if((!isset($_SESSION['admin_id']) || intval($_SESSION['admin_id']) <=0) && !in_array($_REQUEST['act'],array('login','signin'))  && !defined('NO_LOGIN'))
	{
		if (!empty($_REQUEST['is_ajax']))
		{
			make_json_error($_LANG['priv_error']);
		}else
		{
			echo $_LANG['login_time_past'];
		}
예제 #11
0
function template($module, $weixin)
{
    global $_SC;
    header('Cache-control: private');
    header('Content-type: text/html; charset=' . $_SC['charset']);
    /* 创建 Smarty 对象。*/
    require S_ROOT . './source/cls_template.php';
    $smarty = new cls_template();
    $smarty->cache_lifetime = 1;
    //$_SCONFIG['cache_time'];
    $smarty->template_dir = S_ROOT . './module/' . $module['module_dir'] . '/themes/' . $module['module_template'];
    $smarty->cache_dir = S_ROOT . './temp/caches';
    $smarty->compile_dir = S_ROOT . './temp/compiled';
    $smarty->compile_id = $module['module_dir'] . '_' . $weixin['op_uid'];
    $smarty->direct_output = false;
    $smarty->force_compile = false;
    $smarty->assign('lang', $_SC['lang']);
    $smarty->assign('charset', $_SC['charset']);
    return $smarty;
}
예제 #12
0
파일: init.php 프로젝트: shiruolin/hzzshop
    header('Content-type: text/html; charset=' . EC_CHARSET);
    /* 创建 Smarty 对象。*/
    require ROOT_PATH . 'includes/cls_template.php';
    $smarty = new cls_template();
    $smarty->cache_lifetime = $_CFG['cache_time'];
    $smarty->template_dir = ROOT_PATH . 'themes/' . $_CFG['template'];
    $smarty->cache_dir = ROOT_PATH . 'temp/caches';
    $smarty->compile_dir = ROOT_PATH . 'temp/compiled';
    if ((DEBUG_MODE & 2) == 2) {
        $smarty->direct_output = true;
        $smarty->force_compile = true;
    } else {
        $smarty->direct_output = false;
        $smarty->force_compile = false;
    }
    $smarty->assign('lang', $_LANG);
    $smarty->assign('hhs_charset', EC_CHARSET);
    $smarty->assign('hhs_css_path', 'themes/' . $_CFG['template'] . '/css');
    $smarty->assign('hhs_img_path', 'themes/' . $_CFG['template'] . '/images');
}
if (!defined('INIT_NO_USERS')) {
    /* 会员信息 */
    $user =& init_users();
    if (!isset($_SESSION['user_id'])) {
        /* 获取投放站点的名称 */
        $site_name = isset($_GET['from']) ? htmlspecialchars($_GET['from']) : addslashes($_LANG['self_site']);
        $from_ad = !empty($_GET['ad_id']) ? intval($_GET['ad_id']) : 0;
        $_SESSION['from_ad'] = $from_ad;
        // 用户点击的广告ID
        $_SESSION['referer'] = stripslashes($site_name);
        // 用户来源
예제 #13
0
파일: common.php 프로젝트: hugolong/weixiao
    require S_ROOT . './source/cls_template.php';
    $smarty = new cls_template();
    $smarty->cache_lifetime = 1;
    //$_SCONFIG['cache_time'];
    $smarty->template_dir = S_ROOT . './themes/' . $_SCONFIG['template'];
    $smarty->cache_dir = S_ROOT . './temp/caches';
    $smarty->compile_dir = S_ROOT . './temp/compiled';
    $smarty->compile_id = $_SCONFIG['template'];
    if ((DEBUG_MODE & 2) == 2) {
        $smarty->direct_output = true;
        $smarty->force_compile = true;
    } else {
        $smarty->direct_output = false;
        $smarty->force_compile = false;
    }
    $smarty->assign('lang', $_SC['lang']);
    $smarty->assign('charset', $_SC['charset']);
}
$_SGLOBAL['login'] = false;
if (checkauth()) {
    $_SGLOBAL['login'] = true;
    $query = $_SGLOBAL['db']->query("select uid,fullname,username,email,mobile,state from " . tname("open_member") . " where uid=" . $_SGLOBAL['supe_uid']);
    if ($rs = $_SGLOBAL['db']->fetch_array($query)) {
        $_SGLOBAL['uid'] = $rs['uid'];
        $_SGLOBAL['fullname'] = $rs['fullname'];
        $_SGLOBAL['username'] = $rs['username'];
        $_SGLOBAL['email'] = $rs['email'];
        $_SGLOBAL['mobile'] = $rs['mobile'];
        $_SGLOBAL['state'] = $rs['state'];
        unset($rs);
    }
예제 #14
0
    require ROOT_PATH . 'include/cls_template.php';
    $smarty = new cls_template();
    $smarty->cache_lifetime = $_CFG['cache_time'];
    $smarty->template_dir = ROOT_PATH . 'themes/' . $_CFG['template'];
    $smarty->cache_dir = ROOT_PATH . 'data/caches';
    $smarty->compile_dir = ROOT_PATH . 'data/compiled';
    if ((DEBUG_MODE & 2) == 2) {
        $smarty->direct_output = true;
        $smarty->force_compile = true;
    } else {
        $smarty->direct_output = false;
        $smarty->force_compile = false;
    }
    $smarty->direct_output = false;
    $smarty->force_compile = false;
    $smarty->assign('lang', $_LANG);
    $smarty->assign('ecs_charset', EC_CHARSET);
    if (!empty($_CFG['stylename'])) {
        $smarty->assign('ectouch_css', 'themes/' . $_CFG['template'] . '/style_' . $_CFG['stylename'] . '.css');
    } else {
        $smarty->assign('ectouch_css', 'themes/' . $_CFG['template'] . '/style.css');
    }
    $smarty->assign('ectouch_themes', 'themes/' . $_CFG['template']);
    $smarty->assign('site_url', $config['site_url']);
    //不带/结尾
}
if (!defined('INIT_NO_USERS')) {
    /* 会员信息 */
    $user =& init_users();
    if (!isset($_SESSION['user_id'])) {
        /* 获取投放站点的名称 */
예제 #15
0
파일: init.php 프로젝트: firsteam/falcons
        @chmod(APP_ROOT_PATH . 'temp/caches', 0777);
    }
    if (!file_exists(APP_ROOT_PATH . 'temp/compiled')) {
        @mkdir(APP_ROOT_PATH . 'temp/compiled', 0777);
        @chmod(APP_ROOT_PATH . 'temp/compiled', 0777);
    }
    $smarty->cache_dir = APP_ROOT_PATH . 'temp/caches';
    $smarty->compile_dir = APP_ROOT_PATH . 'temp/compiled';
    if ((DEBUG_MODE & 2) == 2) {
        $smarty->direct_output = true;
        $smarty->force_compile = true;
    } else {
        $smarty->direct_output = false;
        $smarty->force_compile = false;
    }
    $smarty->assign('lang', $_LANG);
    $smarty->assign('ecs_charset', EC_CHARSET);
    $smarty->assign('url', str_replace('app/', '', $ecs->url()));
    if (!empty($_CFG['stylename'])) {
        $smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style_' . $_CFG['stylename'] . '.css');
    } else {
        $smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style.css');
    }
}
if (!defined('INIT_NO_USERS')) {
    /* 会员信息 */
    $user =& init_users();
    if (!isset($_SESSION['user_id'])) {
        /* 获取投放站点的名称 */
        $site_name = isset($_GET['from']) ? $_GET['from'] : addslashes($_LANG['self_site']);
        $from_ad = !empty($_GET['ad_id']) ? intval($_GET['ad_id']) : 0;
예제 #16
0
function smarty_block_static($params, $content, &$smarty, &$repeat)
{
    cls_template::assign('STATIC', $content);
    return '';
}
예제 #17
0
    @chmod('../temp/compiled/admin', 0777);
}
clearstatcache();
/* 如果有新版本,升级 */
if (!isset($_CFG['ecs_version'])) {
    $_CFG['ecs_version'] = 'v2.0.5';
}
/* 创建 Smarty 对象。*/
require ROOT_PATH . 'includes/cls_template.php';
$smarty = new cls_template();
$smarty->template_dir = ROOT_PATH . ADMIN_PATH . '/templates';
$smarty->compile_dir = ROOT_PATH . 'temp/compiled/admin';
if ((DEBUG_MODE & 2) == 2) {
    $smarty->force_compile = true;
}
$smarty->assign('lang', $_LANG);
$smarty->assign('help_open', $_CFG['help_open']);
/* 验证管理员身份 */
if (!isset($_SESSION['admin_id']) || intval($_SESSION['admin_id']) <= 0) {
    /* session 不存在,检查cookie */
    if (!empty($_COOKIE['ECSCP']['admin_id']) && !empty($_COOKIE['ECSCP']['admin_pass'])) {
        // 找到了cookie, 验证cookie信息
        $sql = 'SELECT * ' . ' FROM ' . $ecs->table('admin_user') . " WHERE user_id = '" . intval($_COOKIE['ECSCP']['admin_id']) . "'";
        $row = $db->GetRow($sql);
        if (!$row) {
            // 没有找到这个记录
            setcookie($_COOKIE['ECSCP']['admin_id'], '', 1);
            setcookie($_COOKIE['ECSCP']['admin_pass'], '', 1);
            if (!empty($_REQUEST['is_ajax'])) {
                make_json_error($_LANG['priv_error']);
            } else {
예제 #18
0
파일: init.php 프로젝트: alphaouyang/ecshop
    $_CFG['ecs_version'] = 'v2.0.5';
}
if (preg_replace('/(?:\\.|\\s+)[a-z]*$/i', '', $_CFG['ecs_version']) != preg_replace('/(?:\\.|\\s+)[a-z]*$/i', '', VERSION) && file_exists('../upgrade/index.php')) {
    // 转到升级文件
    ecs_header("Location: ../upgrade/index.php\n");
    exit;
}
/* 创建 Smarty 对象。*/
require ROOT_PATH . 'includes/cls_template.php';
$smarty = new cls_template();
$smarty->template_dir = ROOT_PATH . ADMIN_PATH . '/templates';
$smarty->compile_dir = ROOT_PATH . 'temp/compiled/admin';
if ((DEBUG_MODE & 2) == 2) {
    $smarty->force_compile = true;
}
$smarty->assign('lang', $_LANG);
$smarty->assign('help_open', $_CFG['help_open']);
if (isset($_CFG['enable_order_check'])) {
    $smarty->assign('enable_order_check', $_CFG['enable_order_check']);
} else {
    $smarty->assign('enable_order_check', 0);
}
/* 验证通行证信息 */
if (isset($_GET['ent_id']) && isset($_GET['ent_ac']) && isset($_GET['ent_sign']) && isset($_GET['ent_email'])) {
    $ent_id = trim($_GET['ent_id']);
    $ent_ac = trim($_GET['ent_ac']);
    $ent_sign = trim($_GET['ent_sign']);
    $ent_email = trim($_GET['ent_email']);
    $certificate_id = trim($_CFG['certificate_id']);
    $domain_url = $ecs->url();
    $token = $_GET['token'];
예제 #19
0
파일: flow.php 프로젝트: GYWang1983/fruit
/**
 * 获取下单提醒说明文字
 */
function order_attention($order, $shop)
{
    global $_CFG;
    $ptime = get_order_pickup_time(0, 0, $shop['open_time'], $shop['close_time']);
    $tpl = new cls_template();
    $tpl->assign('lock_time', $_CFG['order_lock_time']);
    $tpl->assign('pickup_start_time', date('Y-m-d H:i', $ptime['start']));
    $tpl->assign('pickup_end_time', date('Y-m-d H:i', $ptime['end']));
    $tpl->assign('limit_time', $_CFG['shipping_limit_time']);
    return $tpl->fetch('str:' . $_CFG['order_attention']);
}