<?php  
require "../Run.php";
require "../include/page.inc.php";
if($_GET['sh'] == '0'){
	$sql="SELECT sitelinkid,gro,title,v,content,time,list FROM sitelink WHERE gro='{$_GET['cid']}' AND siteid='".WAPID."' AND list != '1' ORDER BY sitelinkid DESC LIMIT 15";
	$text = '<a href="?cid='.$_GET['cid'].'&sh=1">通过域名</a>|审核中';

}else{
$sql="SELECT sitelinkid,gro,title,v,content,time,list FROM sitelink WHERE gro='{$_GET['cid']}' AND siteid='".WAPID."' AND list = '1' ORDER BY sitelinkid DESC LIMIT 15";
$text = '通过域名|<a href="?cid='.$_GET['cid'].'&sh=0">审核中</a>';
}
	/*执行数据查询语句*/  
    $result=mysql_query($sql);      
	if($result && mysql_num_rows($result)>0){
	$i=0;
	while(list($sitelinkid,$gro,$title,$v,$content,$time,$list)=mysql_fetch_row($result)){
	$div = $num++%2 == 0?'line1':'line2';
	 $html.= '<div class="'.$div.'"><a href="content.php?cid='.$gro.'&id='.$sitelinkid.'&" target="_blank">'.$title.'</a></div>';
	 }
	 }else{
	 $html = '<div class="tip">此栏目暂无记录</div>';
	 }

echo head(class_name($_GET['cid'],'cn',$wapid)).'
<div class="title"><a href="add.php?cid='.$_GET['cid'].'">提交网址</a>|'.$text.'</div>'.$html.'<div class="showpage">';
	$sql = "SELECT count(*) FROM sitelink WHERE gro='{$_GET['cid']}'";   
	$result = mysql_query($sql); 
	list($nums) = mysql_fetch_row($result);
	$url = 'list.php?cid='.$_GET['cid'].'&sh='.$_GET['sh'].'&';
echo page($nums,15,$url,NULL,'view');
?>
</div>
<div class="mylink"><a href="../index.php?&cid=<?php  echo class_name($_GET['cid'],'gro',$wapid);?>">返回上级</a><a href="../index.php?">返回首页</a></div>
</body>
</html>
 <?php  echo footer(1);?>