Ejemplo n.º 1
0
 function __construct($apiName)
 {
     parent::__construct();
     $this->apiName = $apiName;
 }
Ejemplo n.º 2
0
require ROOT_PATH . 'languages/' . $_CFG['lang'] . '/admin/log_action.php';
if (file_exists(ROOT_PATH . 'languages/' . $_CFG['lang'] . '/admin/' . basename(PHP_SELF))) {
    include ROOT_PATH . 'languages/' . $_CFG['lang'] . '/admin/' . basename(PHP_SELF);
}
if (!file_exists('../temp/caches')) {
    @mkdir('../temp/caches', 0777);
    @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) {
            // 没有找到这个记录
Ejemplo n.º 3
0
}
if (!defined('INIT_NO_USERS')) {
    /* 初始化session */
    include ROOT_PATH . 'includes/cls_session.php';
    $sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'));
    define('SESS_ID', $sess->get_session_id());
}
if (isset($_SERVER['PHP_SELF'])) {
    $_SERVER['PHP_SELF'] = htmlspecialchars($_SERVER['PHP_SELF']);
}
if (!defined('INIT_NO_SMARTY')) {
    header('Cache-control: private');
    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');
Ejemplo n.º 4
0
$yhcwebsite = "http://weixin.dream-gardens.com.cn/";
$yhctestdb = new cls_mysql("112.124.110.58", "root", "dream@sh123data", "yhctest");
/* 创建错误处理对象 */
$err = new ecs_error('message.dwt');
/* 载入系统参数 */
$_CFG = load_config();
/* 初始化session */
require ROOT_PATH . 'includes/cls_session.php';
$sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'), 'ecsid');
define('SESS_ID', $sess->get_session_id());
if (!defined('INIT_NO_SMARTY')) {
    header('Cache-control: private');
    header('Content-type: text/html; charset=utf-8');
    /* 创建 Smarty 对象。*/
    require ROOT_PATH . 'includes/cls_template.php';
    $smarty = new cls_template();
    $smarty->cache_lifetime = $_CFG['cache_time'];
    $smarty->template_dir = ROOT_PATH . 'mobile/templates';
    $smarty->cache_dir = ROOT_PATH . 'temp/caches';
    $smarty->compile_dir = ROOT_PATH . 'temp/compiled/mobile';
    if ((DEBUG_MODE & 2) == 2) {
        $smarty->direct_output = true;
        $smarty->force_compile = true;
    } else {
        $smarty->direct_output = false;
        $smarty->force_compile = false;
    }
}
if (!defined('INIT_NO_USERS')) {
    /* 会员信息 */
    $user =& init_users();
Ejemplo n.º 5
0
        }
    }
    $_SESSION = array();
}
if (!defined('INIT_NO_USERS')) {
    /* 初始化session */
    include ROOT_PATH . 'includes/cls_session.php';
    $sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'));
    define('SESS_ID', $sess->get_session_id());
}
if (!defined('INIT_NO_SMARTY')) {
    header('Cache-control: private');
    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')) {
Ejemplo n.º 6
0
}
if (!defined('INIT_NO_USERS')) {
    /* 初始化session */
    include ROOT_PATH . 'includes/cls_session.php';
    $sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'));
    define('SESS_ID', $sess->get_session_id());
}
if (isset($_SERVER['PHP_SELF'])) {
    $_SERVER['PHP_SELF'] = htmlspecialchars($_SERVER['PHP_SELF']);
}
if (!defined('INIT_NO_SMARTY')) {
    header('Cache-control: private');
    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');
Ejemplo n.º 7
0
/* 载入语言文件 */
require ROOT_PATH . 'languages/' . $_CFG['lang'] . '/common.php';
if (!defined('INIT_NO_USERS')) {
    /* 初始化session */
    include ROOT_PATH . 'includes/cls_session.php';
    $sess = new cls_session($db, $hhs->table('sessions'), $hhs->table('sessions_data'));
    define('SESS_ID', $sess->get_session_id());
}
if (isset($_SERVER['PHP_SELF'])) {
    $_SERVER['PHP_SELF'] = htmlspecialchars($_SERVER['PHP_SELF']);
}
if (!defined('INIT_NO_SMARTY')) {
    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');
Ejemplo n.º 8
0
//时间
$mtime = explode(' ', microtime());
$_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);
Ejemplo n.º 9
0
}
if (!defined('INIT_NO_USERS')) {
    /* 初始化session */
    include ROOT_PATH . 'includes/cls_session.php';
    $sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'));
    define('SESS_ID', $sess->get_session_id());
}
if (isset($_SERVER['PHP_SELF'])) {
    $_SERVER['PHP_SELF'] = htmlspecialchars($_SERVER['PHP_SELF']);
}
if (!defined('INIT_NO_SMARTY')) {
    header('Cache-control: private');
    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 = APP_ROOT_PATH . 'themes/default';
    //$smarty->template_dir   = ROOT_PATH . 'themes/' . $_CFG['template'];
    if (!file_exists(APP_ROOT_PATH . 'temp')) {
        @mkdir(APP_ROOT_PATH . 'temp', 0777);
        @chmod(APP_ROOT_PATH . 'temp', 0777);
    }
    if (!file_exists(APP_ROOT_PATH . 'temp/caches')) {
        @mkdir(APP_ROOT_PATH . 'temp/caches', 0777);
        @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);
    }
Ejemplo n.º 10
0
Archivo: init.php Proyecto: dlpc/ecshop
}
if (!defined('INIT_NO_USERS')) {
    /* 初始化session */
    include ROOT_PATH . 'includes/cls_session.php';
    $sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'));
    define('SESS_ID', $sess->get_session_id());
}
if (isset($_SERVER['PHP_SELF'])) {
    $_SERVER['PHP_SELF'] = htmlspecialchars($_SERVER['PHP_SELF']);
}
if (!defined('INIT_NO_SMARTY')) {
    header('Cache-control: private');
    header('Content-type: text/html; charset=' . EC_CHARSET);
    /* 创建 Smarty 对象。*/
    require ROOT_PATH . 'includes/cls_template.php';
    $smarty = new cls_template();
    /*获取代理商关联user_id add by hg for date 2014-04-01*/
    $agency_where = agency_goods();
    $agency_user_id_arr = explode(' ', $agency_where);
    $agency_user_id = $agency_user_id_arr[2];
    if ($agency_user_id) {
        $user_tpl = $db->getRow("select agency_template from " . $ecs->table('admin_user') . " where agency_user_id = {$agency_user_id}");
    } else {
        $user_tpl = $db->getRow("select agency_template from " . $ecs->table('admin_user') . " where agency_user_id is null or action_list = 'all'");
    }
    if (!empty($user_tpl['agency_template'])) {
        //反序列化
        $user_tpl = unserialize($user_tpl['agency_template']);
        $_CFG['template'] = $user_tpl['tpl_name'];
        $_CFG['stylename'] = $user_tpl['tpl_fg'];
    } else {
Ejemplo n.º 11
0
Archivo: init.php Proyecto: noikiy/mdwp
	/* 初始化session */
	require(ROOT_PATH . 'includes/cls_session.php');
	$sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'), 'ECSCP_ID');

	/*初始化action*/
	if(!isset($_REQUEST['act']))
	{
		$_REQUEST['act'] = '';
	}

	/*载入系统参数*/
	$_CFG = load_config();

    /* 创建 Smarty 对象。*/
	require(ROOT_PATH . 'includes/cls_template.php');
	$smarty = new cls_template;

	$smarty->template_dir  = ROOT_PATH . 'plugins/zywx/templates';
	$smarty->compile_dir   = ROOT_PATH . 'temp/compiled/admin';
	if ((DEBUG_MODE & 2) == 2)
	{
		$smarty->force_compile = true;
	}

	
	//加载语言包文件
	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');
Ejemplo n.º 12
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;
}
Ejemplo n.º 13
0
}
if (!defined('INIT_NO_USERS')) {
    /* 初始化session */
    include ROOT_PATH . 'includes/cls_session.php';
    $sess = new cls_session($db, $hhs->table('sessions'), $hhs->table('sessions_data'));
    define('SESS_ID', $sess->get_session_id());
}
if (isset($_SERVER['PHP_SELF'])) {
    $_SERVER['PHP_SELF'] = htmlspecialchars($_SERVER['PHP_SELF']);
}
if (!defined('INIT_NO_SMARTY')) {
    header('Cache-control: private');
    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');
Ejemplo n.º 14
0
//判断是否Android;
$is_pc = strripos($_SERVER["HTTP_USER_AGENT"], 'windows nt');
//判断是否为(pc)电脑
$is_ucweb = strripos($_SERVER["HTTP_USER_AGENT"], 'UCWEB');
//判断是否为UC极速模式
if ($is_pc) {
    $_SCONFIG['template'] = 'pc';
} else {
    $_SCONFIG['template'] = 'pc';
}
if (!defined('INIT_NO_SMARTY')) {
    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'];
    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']);
Ejemplo n.º 15
0
}
if (!defined('INIT_NO_USERS')) {
    /* 初始化session */
    include ROOT_PATH . 'include/cls_session.php';
    $sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'));
    define('SESS_ID', $sess->get_session_id());
}
if (isset($_SERVER['PHP_SELF'])) {
    $_SERVER['PHP_SELF'] = htmlspecialchars($_SERVER['PHP_SELF']);
}
if (!defined('INIT_NO_SMARTY')) {
    header('Cache-control: private');
    header('Content-type: text/html; charset=' . EC_CHARSET);
    /* 创建 Smarty 对象。 */
    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);
Ejemplo n.º 16
0
if (!file_exists('../temp/caches')) {
    @mkdir('../temp/caches', 0777);
    @chmod('../temp/caches', 0777);
}
if (!file_exists('../temp/compiled/admin')) {
    @mkdir('../temp/compiled/admin', 0777);
    @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) {
Ejemplo n.º 17
0
function smarty_block_static($params, $content, &$smarty, &$repeat)
{
    cls_template::assign('STATIC', $content);
    return '';
}
Ejemplo n.º 18
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;
 }
Ejemplo n.º 19
0
    @mkdir('../temp/compiled/admin', 0777);
    @chmod('../temp/compiled/admin', 0777);
}
clearstatcache();
/* 如果有新版本,升级 */
if (!isset($_CFG['ecs_version'])) {
    $_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']);
Ejemplo n.º 20
0
/**
 * 获取下单提醒说明文字
 */
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']);
}