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('

需要添加更多文章单页,才能完美运行!'); } $user['description']=str_ireplace('[域名]', $_SERVER['HTTP_HOST'], $user['description']); $rand=rand(10,999); $us= $DB->query("SELECT * FROM `seo_article` WHERE `id` > ".round($id+$rand)." and `id` <= ".round($id+rand(5,25)+$rand)." and `active`=1"); foreach($us as $row){ $row['description']=str_ireplace('[域名]', $_SERVER['HTTP_HOST'], $row['description']); $row['url']=danye_url($row['id'],$danye_url_type); $user2[]=$row; } $img=explode('|',$user['img']); $tximg=explode('|',$user['tximg']); $juzi=explode('|',$user['juzi']); $chengyu=explode('|',$user['chengyu']); $button=explode('|',$user['button']); if($is_spider=='蜘蛛'){ $xiadanurl=danye_url($user2[2]['id'],$danye_url_type); } include_once(ROOT.'template/'.$user['muban'].'/index.php'); $content = ob_get_contents(); ob_end_clean(); exit($content.$config['footer']);//文章单页 }elseif($config['symuban']==1){ ?> -
query("SELECT * FROM seo_article WHERE `id` >= ".$orderbyid." and `id` <= ".round($orderbyid+$limit)." and `active`='1' limit ".$limit); while($lib = $li->fetch()){ $lib['description']=str_ireplace('[域名]', $_SERVER['HTTP_HOST'], $lib['description']); $lib['title']=mningan_replace($lib['title']); $lib['description']=mningan_replace($lib['description']);?>