www.gusucode.com > 08CMS空白站群系统 3.3 繁体 UTF-8 > upload/static.php
<?php define('M_ANONYMOUS', TRUE); $mode = empty($mode) ? 'arc' : trim($mode); include_once './include/general.inc.php'; if(!$enablestatic) mexit();//没有启用静态 //if(!empty($fromd)) mexit();//??????? include_once M_ROOT.'./include/common.fun.php'; if($mode == 'arc'){ !($aid = empty($aid) ? 0 : max(0,intval($aid))) && mexit(); $needstatic = $db->result_one("SELECT needstatic FROM {$tblprefix}archives WHERE aid='$aid'"); if(!$needstatic || $needstatic > $timestamp) mexit(); include_once M_ROOT.'./include/arc_static.fun.php'; //arc_static($aid,0);//不更新时间,调试用 arc_static($aid); }elseif($mode == 'cnindex'){ parse_str($_SERVER['QUERY_STRING'],$temparr); $cnstr = cnstr($temparr); if($cnstr){ $needstatic = $db->result_one("SELECT ineedstatic FROM {$tblprefix}cnodes WHERE ename='$cnstr'"); }elseif($sid){ $needstatic = $db->result_one("SELECT ineedstatic FROM {$tblprefix}subsites WHERE sid='$sid'"); }else{ $needstatic = $db->result_one("SELECT value FROM {$tblprefix}mconfigs WHERE varname='ineedstatic'"); } if(!$needstatic || $needstatic > $timestamp) mexit(); include_once M_ROOT.'./include/cn_static.fun.php'; index_static($cnstr,1); }elseif($mode == 'cnlist'){ parse_str($_SERVER['QUERY_STRING'],$temparr); if(!($cnstr = cnstr($temparr))) mexit(); $needstatic = $db->result_one("SELECT lneedstatic FROM {$tblprefix}cnodes WHERE ename='$cnstr'"); if(!$needstatic || $needstatic > $timestamp) mexit(); include_once M_ROOT.'./include/cn_static.fun.php'; list_static($cnstr,0,1); }elseif($mode == 'cnbk'){ parse_str($_SERVER['QUERY_STRING'],$temparr); if(!($cnstr = cnstr($temparr))) mexit(); $needstatic = $db->result_one("SELECT bkneedstatic FROM {$tblprefix}cnodes WHERE ename='$cnstr'"); if(!$needstatic || $needstatic > $timestamp) mexit(); include_once M_ROOT.'./include/cn_static.fun.php'; list_static($cnstr,1,1); } mexit(); ?>