网站因'.$LA['site_close_tips'].'暂时关闭,请稍后访问!谢谢!
'; exit(); } if(SITETYPE && (!$_SESSION['sid'] || isset($_GET['s']))) { $allcities=$db->fetch_all("SELECT `id`,`www`,`name`,`c` FROM `".LA_PRE."area` WHERE `".LA_PRE."area`.`m`=1 AND `".LA_PRE."area`.`isopen`=1 ORDER BY `".LA_PRE."area`.`c` ASC"); $nowcity=array(); $tiparea=ip2area(IP); foreach($allcities as $key => $city) { $city['name']=str_replace(array('省','市','县'),array('','',''),$city['name']); if(strpos($tiparea,$city['name'])!==false) { $nowcity['id']=$city['id']; $nowcity['name']=$city['name']; $nowcity['www']=$city['www']; } $allcities[$key]=$city; } $nowcity=$nowcity?$nowcity:$allcities[0]; header("location:".formatsiteurl($nowcity['www'])); exit(); } else { $agent = $_SERVER['HTTP_USER_AGENT']; if(strpos($agent,"NetFront") || strpos($agent,"iPhone") || strpos($agent,"MIDP-2.0") || strpos($agent,"Opera Mini") || strpos($agent,"UCWEB") || strpos($agent,"Android") || strpos($agent,"Windows CE") || strpos($agent,"SymbianOS")) { header("Location:/wap/index.php"); exit(); } if(is_file(SYSTEM_ROOT.'data/cache_page/'.la_md5($LA['siteurl'].$LA['template']).'.cache.php')) { include SYSTEM_ROOT.'data/cache_page/'.la_md5($LA['siteurl'].$LA['template']).'.cache.php'; } else { ob_start(); $typeid=0; $_GET=la_htmlspecialchars($_GET); ksort($_GET); $orderby=' ORDER BY a.isvip DESC,a.isauth DESC,a.istop DESC,a.updatetime DESC'; $pagesize=isset($pagesize)?max(1,intval($pagesize)):36; $areaid=intval($_GET['sareaid'])?intval($_GET['sareaid']):intval($_GET['areaid']); $topsql="SELECT * FROM ".LA_PRE."content a WHERE a.status=1 AND a.isdeleted=0 AND a.ishidden=0 AND a.moduleid!=41 AND a.istop>=".TIME." ORDER BY a.updatetime DESC LIMIT 0,10"; $topdata=$cacheobj->get($topsql); if(!$topdata) { $topdata=$db->fetch_all($topsql); if($topdata) { $cacheobj->set($topsql,$topdata); } } $where='a.status=1 AND a.isdeleted=0 AND a.ishidden=0 AND a.moduleid!=41'; $where.=$areaid?' AND a.areaid IN('.implode(',',$areaobj->getchildid($areaid)).')':''; $where.=SITETYPE?' AND a.sid IN('.implode(',',$areaobj->getchildid($_SESSION['sid'])).')':''; $sql="SELECT * FROM ".LA_PRE."content a WHERE ".$where.$orderby." LIMIT ".max(0,($page-1)*$pagesize).",$pagesize"; $count_sql=preg_replace("/^SELECT([^(]+)\s*FROM(.+)(ORDER BY.+)$/i", "SELECT COUNT(*) AS `count` FROM\\2", $sql); $totalnum=get_cache_counts($count_sql); $pagenum=ceil($totalnum/$pagesize); $page=isset($page)?min($pagenum,max(1,intval($page))):1; $pagearray=range(1,$pagenum); $pagearray=array_slice($pagearray,($page/10 < 1?0:floor($page/10)*10) ,10); $data=$cacheobj->get($sql); if(!$data) { $data=$db->fetch_all($sql); if($data) { $cacheobj->set($sql,$data); } } $list_page=array(); $querystring=array(); if($_GET) { if(isset($_GET['page']))unset($_GET['page']); foreach($_GET as $key => $val) { if($_mod['is_rewrite']) { $querystring[]=$key.'-'.$val; } else { $querystring[]=$key.'='.$val; } } } if($page!=1) { $querystring['page']='page='.max($page-1,1); $list_page[]='上一页'; } foreach($pagearray as $_page) { if($page==$_page) { $list_page[]=''.$_page.''; } else { $querystring['page']='page='.$_page; $list_page[]=''.$_page.''; } } if($page!=$pagenum) { $querystring['page']='page='.min($page+1,$pagenum); $list_page[]='下一页'; } $PAGE['list']=$data?implode(' ',$list_page):''; //$industylist=$ypobj->tlptypelist($typeid); include template('index'); $con=ob_get_contents(); ob_end_clean(); @mkdir(SYSTEM_ROOT.'data/cache_page/',0777); file_put_contents(SYSTEM_ROOT.'data/cache_page/'.la_md5($LA['siteurl'].$LA['template']).'.cache.php',$con); echo $con; } exit(); } ?>