@set_time_limit(0); //设置程序执行时间 0 无限制 ,超出指定秒数后返回错误
define('DT_ADMIN', true);
define('DT_MEMBER', true);
require 'common.inc.php'; //加载公共入口
if($DT_BOT) dhttp(403); //屏蔽蜘蛛 ,dhttp函数返回指定 http头 在global.func.php中定义
$_areaids = '';
$_areaid = array();
if($DT['city']) { //$DT是全局设置参数,对应后台的系统设置里的网站设置,$DT['city'] 是城市分站开关
$AREA or $AREA = cache_read('area.php'); // 读取城市缓存
if($_aid) {
$_areaids = $AREA[$_aid]['child'] ? $AREA[$_aid]['arrchildid'] : $_aid;
$_areaid = explode(',', $_areaids);
}
} else {
$_aid < 1 or dalert('系统未开启分站功能,您的分站管理帐号暂不可用', $MODULE[2]['linkurl'].'logout.php');
}
require DT_ROOT.'/admin/global.func.php'; //加载公共函数
require DT_ROOT.'/admin/license.func.php'; //加载版权函数,去版权从这个文件修改
require DT_ROOT.'/include/post.func.php'; //加载表单相关函数
require_once DT_ROOT.'/include/cache.func.php';
isset($file) or $file = 'index'; //无$file参数时默认index
$secretkey = 'a'.strtolower(substr(md5(DT_KEY), -6));
if($CFG['authadmin'] == 'cookie') {
$_destoon_admin = get_cookie($secretkey);
$_destoon_admin = $_destoon_admin ? intval($_destoon_admin) : 0;
} else {
$session = new dsession();
$_destoon_admin = isset($_SESSION[$secretkey]) ? intval($_SESSION[$secretkey]) : 0;
}
$_founder = $CFG['founderid'] == $_userid ? $_userid : 0;
$_catids = $_childs = '';
$_catid = $_child = array();
if($file != 'login') {
if($_groupid != 1 || $_admin < 1 || !$_destoon_admin) msg('', '?file=login&forward='.urlencode($DT_URL));
if(!admin_check()) {
admin_log(1);
$db->query("DELETe FROM {$db->pre}admin WHERe userid=$_userid AND url='?".$DT_QST."'");
msg('警告!您无权进行此操作 Error(00)');
}
}
if($DT['admin_log'] && $action != 'import') admin_log();
if($DT['admin_online']) admin_online();
if(isset($reason) && is_array($itemid)) admin_notice();
$widget = isset($widget) ? intval($widget) : 0;
$psize = isset($psize) ? intval($psize) : 0;
if($psize > 0 && $psize != $pagesize) {
$pagesize = $psize;
$offset = ($page-1)*$pagesize;
}
if($module == 'destoon') {
(include DT_ROOT.'/admin/'.$file.'.inc.php') or msg();
} else {
include DT_ROOT.'/module/'.$module.'/common.inc.php';
(include MD_ROOT.'/admin/'.$file.'.inc.php') or msg(); //例如 模块设置链接?file=setting&moduleid=2 $module 的值是member 则加载 /module/member/common.inc.php 和 /module/member/admin/setting.inc.php
//setting.inc.php的模板在 /module/member/admin/template/setting.tpl.php
}
?>