php /* '软件名称:苹果CMS '开发作者:MagicBlack 官方网站:http://www.maccms.com/ '-------------------------------------------------------- '适用本程序需遵循 CC BY-ND 许可协议 '这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用; '不允许对程序代码以任何形式任何目的的再发布。 '-------------------------------------------------------- */ if(!file_exists('inc/install.lock')) { echo '';exit; } define('MAC_MODULE','home'); require('inc/conn.php'); require(MAC_ROOT.'/inc/common/360_safe3.php'); $m = be('get','m'); if(strpos($m,'.')){ $m = substr($m,0,strpos($m,'.')); } $par = explode('-',$m); $parlen = count($par); $ac = $par[0]; if(empty($ac)){ $ac='vod'; $method='index'; } $colnum = array('id','pg','year','typeid','class','classid','src','num','aid','vid','play'); if($parlen>=2){ $method = $par[1]; for($i=2;$i<$parlen;$i+=2){ $tpl->P[$par[$i]] = in_array($par[$i],$colnum) ? intval($par[$i+1]) : chkSql(urldecode($par[$i+1])); } } if($ac=='vod'){ if($method=='detail'||$method=='play'){ header('Cache-Control:max-age=60'); header('Last-Modified:' . gmdate('D, d M Y H:i:s') . ' GMT'); }else{ header('Cache-Control:max-age=300'); header('Last-Modified:' . gmdate('D, d M Y H:i:s') . ' GMT'); } }elseif($ac=='art'){ header('Cache-Control:max-age=300'); header('Last-Modified:' . gmdate('D, d M Y H:i:s') . ' GMT'); }elseif($ac=='map'){ header('Cache-Control:max-age=600'); header('Last-Modified:' . gmdate('D, d M Y H:i:s') . ' GMT'); }elseif($ac=='user'){ @session_start(); }elseif($ac=='gbook'){ @session_start(); }elseif($ac=='comment'){ @session_start(); }elseif($ac=='label'){ header('Cache-Control:max-age=3600'); header('Last-Modified:' . gmdate('D, d M Y H:i:s') . ' GMT'); }else{ @session_start(); } if($tpl->P['pg']<1){ $tpl->P['pg']=1; } if(!empty($tpl->P['cp'])){ $tpl->P['cp']=''; } unset($colnum); $tpl->initData(); $acs = array('vod','art','map','user','gbook','comment','label'); if(in_array($ac,$acs)){ $tpl->P['module'] = $ac; include MAC_ROOT.'/inc/module/'.$ac.'.php'; } else{ die('not file!'); showErr('System','未找到指定系统模块'); } unset($par); unset($acs); $tpl->ifex(); if(!empty($tpl->P['cp'])){ setPageCache($tpl->P['cp'],$tpl->P['cn'],$tpl->H); } $tpl->run(); if($_SERVER['SERVER_NAME']=='u.shankuwang.com'){ echo "cache true"; }else{ echo $tpl->H; } ?>