www.gusucode.com > 08CMS空白站群系统 3.3 繁体 UTF-8 > upload/mspace/index.php

    <?
include_once './../include/general.inc.php';
include_once M_ROOT.'./include/common.fun.php';
include_once M_ROOT.'./include/parse.fun.php';
$cmsclosed && message(empty($cmsclosedreason) ? lang('defaultclosedreason') : mnl2br($cmsclosedreason));
$mspacedisabled && message(lang('mspacedisabled'));
$querystr = $_SERVER['QUERY_STRING'];
un_virtual($querystr);
parse_str($querystr);
$mid = empty($mid) ? 0 : max(0,intval($mid));
$caid = empty($caid) ? 0 : max(0,intval($caid));
$ucid = empty($ucid) ? 0 : max(0,intval($ucid));
include_once M_ROOT.'./include/mparse.fun.php';
$temparr = array();
if($caid){
	$temparr['caid'] = $caid;
}elseif($ucid){
	$temparr['ucid'] = $ucid;
}else{
	foreach($cotypes as $coid => $cotype){
		if($cotype['sortable']){
			${'ccid'.$coid} = empty(${'ccid'.$coid}) ? 0 : max(0,intval(${'ccid'.$coid}));
			if(${'ccid'.$coid}){
				$temparr['ccid'.$coid] = ${'ccid'.$coid};
				break;
			}
		}
	}
}
if($cnstr = cnstr($temparr)){
	$pmids = cn_pmids($cnstr);
	!$curuser->pmbypmids('cread',$pmids) && message(lang('none catas browse permission'));
}
$cachemscircle && $cachefile = htmlcac_dir('ms','m'.($mid % 100),1).cac_namepre($mid,$cnstr).'.php';
if($cachemscircle && is_file($cachefile) && (filemtime($cachefile) > ($timestamp - $cachemscircle * 60))){
	mexit(read_htmlcac($cachefile));
}
empty($temparr) && $mode = 1;
$temparr['mid'] = $mid;
$item = array();
if(!empty($mode)){
	$tplname = @$mstpls['index']['index'];
	$item['mid'] = $mid;
}else{
	$tplname = mcn_tpl($temparr,'index');
	$item = mcn_parsearr($temparr);
}
$item['cms_counter'] = "<script type=\"text/javascript\" src=\"".$cms_abs."counter.php?mid=$mid\"></script>";
(!$tplname || !($template = load_tpl($tplname))) && message(lang('please define related template'));
nreplace($template,'c',$temparr);
nreplace($template,'u',$item);
nreplace($template,'b',$item);
code_parse($template);
$cachemscircle && save_htmlcac($template,$cachefile);
mexit($template);
?>