?php @session_start(); @error_reporting(E_ALL ^ E_NOTICE); header('Content-Type: text/html; charset=utf-8'); define('THISISADMINI',true); if(!file_exists(dirname(__FILE__).'/config/dt-config.php')||filesize(dirname(__FILE__).'/config/dt-config.php')==0||filesize(dirname(__FILE__).'/config/dt-config.php')==3)die('系统尚未安装,请进入安装目录'); require(dirname(__FILE__).'/config/dt-config.php'); function_exists('date_default_timezone_set') && @date_default_timezone_set('Etc/GMT-'.TIMEZONENAME); require(ABSPATH.'/inc/function.php'); if(file_exists(ABSPATH.'/inc/common.php'))require_once(ABSPATH.'/inc/common.php'); require(ABSPATH.'/inc/class.database.php'); require(ABSPATH.'/inc/class.pager.php'); require(ABSPATH.'/content/common/common.php'); $_REQUEST = cleanArrayForMysql($_REQUEST); $_GET = cleanArrayForMysql($_GET); $_POST = cleanArrayForMysql($_POST); $request = $_REQUEST; $data = array(); $menu_arr=array(); //写路由语句 $pfileName = $request['f']; if(!empty($pfileName) && $pfileName != 'search') $request['p'] = getIdByFile($pfileName); elseif($pfileName == 'search') $request['m'] = 'search'; global $search; (URLREWRITE)?($search='/html/search/'):($search='./?m=search'); $request['p']=intval($request['p']); $request['c']=intval($request['c']); $request['r']=intval($request['r']); $request['i']=intval($request['i']); $request['comment']=intval($request['comment']); $request['mdtp']=intval($request['mdtp']); if($request['p'])$params['id']=intval($request['p']);else $params['id']=0; if($request['c'])$params['cid']=intval($request['c']);else $params['cid']=0; $menu_arr=get_model_type($params['id']); if(empty($request['m'])) $params['model']=$menu_arr['type']; else $params['model']=$request['m']; $params['action']=empty($request['a'])?'index':$request['a']; $params['related_common']=empty($menu_arr['related_common'])?$params['model']:$menu_arr['related_common']; $params['args']=intval($request['r']); $params['i']=intval($request['i']); if($params['model']!='user' || $params['model']!='index') { if(intval($_SESSION[TB_PREFIX.'user_roleId'])您当前选择的信息所在的分类栏目或频道可能已经被删除或不存在,请检查一下,该信息所在的栏目情况以及栏目是否存在!'; isComment(); } function get_model_type($id) { global $db; if($id==0) return array('type'=>'index','level'=>0); else return $db->get_row("select * from ".TB_PREFIX."menu where id=$id",ARRAY_A); } ?>