<?php
。。。。。。
$_areaids = '';
$_areaid = array();
isset($file) or $file = 'index'; //如果url参数里无 $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;
}
//什么情况下$module才是destoon??
if($module == 'destoon') {
(include DT_ROOT.'/admin/'.$file.'.inc.php') or msg();
} else { //后台管理界面一般走这个分支,例如供应模块里的添加供应 链接是weigouadmin.php?moduleid=5&action=add
include DT_ROOT.'/module/'.$module.'/common.inc.php';//这里加载的就应该是/module/sell/common.inc.php DT_ROOT是 根目录/
(include MD_ROOT.'/admin/'.$file.'.inc.php') or msg(); //这里加载的就应该是/module/sell/admin/index.inc.php MD_ROOT是/module/sell/
}
?>