include_once("includes/common.php");
include_once(SYSTEM_ROOT.'auxiliary.func.php');
//if($is_spider!='蜘蛛'&&$config['tiaozhuan']=='跳转'){ exit(header("location:".$xiadanurl)); }
preg_match('/\d+/',$_SERVER['HTTP_HOST'], $matches);
$matchess=intval($matches[0]);
if($matchess<=9000){ $id=round( (mb_strlen($_SERVER['HTTP_HOST'])+$matchess+$classlist['id']) *100);
}else{ $id=round( (mb_strlen($_SERVER['HTTP_HOST'])+$classlist['id']) *100)+$matchess; }
if($config['class_youlian']!=0 &&$config['symuban']!=2&&$is_spider!='蜘蛛'){
$class = $DB->query("SELECT * FROM `seo_classlist` ORDER BY `sort` ASC");
$class_num = $DB->query("SELECT count(*) from seo_classlist where 1")->fetchColumn();
if($class_num!=0){ $yl_id=$id; $max_ylid=round($yl_id+($class_num*3));
$yl_titless=$DB->query("SELECT * FROM `seo_article` WHERE `id` >'{$yl_id}' and `id`<='$max_ylid' and `active`=1 LIMIT ".$class_num);
while($yl_titles = $yl_titless->fetch()){ $yl_title[]=$yl_titles; }
$qz=str_replace(get_host($_SERVER['HTTP_HOST']) ,'',$_SERVER['HTTP_HOST']); //获取域名前缀
if($qz!=null&&$qz!='www.'){ $qz='www.'; } $yl_footer='
友情链接:';
$i=0; while($class_list = $class->fetch()){
$length = round(strlen($class_list['host'])*10+$class_list['id']);
$yl_url="http://".$qz.$class_list['host'];
$yl_name=$yl_title[$i]['title'];
if($yl_name!=null){ $yl_footer.=''.mb_substr($yl_name,0,5,'utf-8').' | '; }
$i++; } unset($i,$yl_title);
$config['footer'].=$yl_footer; } }
if($config['symuban']==2||$is_spider=='蜘蛛'){
ob_end_clean();ob_start(); //文章单页
$user = user($id);
if($user==null){ exit('