<?php  
require "../Run.php";
require "../include/page.inc.php";

//获取文章列表
$sql="SELECT htmlid,gro,title,v,content,time FROM html WHERE gro='{$_GET['cid']}' ORDER BY htmlid DESC LIMIT 15";
	/*执行数据查询语句*/  
    $result=mysql_query($sql);      
	if($result && mysql_num_rows($result)>0){
	$i=0;
	while(list($htmlid,$gro,$title,$v,$content,$time)=mysql_fetch_row($result)){
	$div = $num++%2 == 0?'line1':'line2';
	 $html.= '<div class="'.$div.'">▪<a href="content.php?cid='.$gro.'&id='.$htmlid.'&">'.$title.'</a></div>';
	 }
	 }else{
	 $html = '此栏目暂无记录';
	 }
//获取栏目信息
$sql="SELECT cid,cn,url,xuhao,q,siteid,gro FROM class WHERE siteid='{$wapid}' AND cid='{$_GET['cid']}'";
    $classcon=mysql_query($sql);
	list($cid,$cn,$url,$xuhao,$q,$siteid,$gro)=mysql_fetch_row($classcon);
	if($url == 'NULL'){
	   $sitetitle = '网站首页';
	   }else{
	   $sitetitle = $cn;
	   }

	echo head($sitetitle);
	echo $html;
	$sql = "SELECT count(*) FROM html WHERE gro ='{$_GET['cid']}'";   
	$result = mysql_query($sql); 
	list($num) = mysql_fetch_row($result);
	$url = 'list.php?cid='.$_GET[cid].'&';
	echo page($num,15,$url,NULL,NULL);
?>
</div>
<div class="mylink"><a href="../index.php?&cid=<?php  echo $gro;?>&sid=<?php  echo $sid;?>">返回上级</a><a href="../index.php?sid=<?php  echo $sid;?>">返回首页</a></div>
</body>
</html>
 <?php    echo UBB($wap_bottom,$wapid);?>
</body>
</html>