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

if($_GET['cid']<=0||$_GET['cid']==''||$_GET['cid']==NULL){
     header("location: http://".$_SERVER["HTTP_HOST"]."/?sid=".$sid_info);
}
$listnums=class_get_info($_GET['cid'],"listnums",$wapid);
if($listnums<=0||$listnums==NULL){
  $listnums=10;
  }
//获取文章列表
$sql="SELECT articleid,gro,title,v,content,time FROM article WHERE gro='{$_GET['cid']}' ORDER BY articleid DESC LIMIT {$listnums}";
	/*执行数据查询语句*/  
    $result=mysql_query($sql);      
	if($result && mysql_num_rows($result)>0){
	$i=0;
	while(list($articleid,$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='.$articleid.'&">'.$title.'</a></div>';
	 }
	 }else{
	 $html = '此栏目暂无记录';
	 }

echo head_info($ver,class_name($_GET['cid'],'cn',$wapid),$css,NULL);
?>
<body>
<?php
 
 $html= $wap_top.class_get_info($_GET['cid'],"top_two",$wapid).$html.class_get_info($_GET['cid'],"bottom_two",$wapid);
 echo UBB($html,$wapid);
?>
<div class="showpage">
<?php
	$sql = "SELECT count(*) FROM article WHERE gro='{$_GET['cid']}'";   
	$result = mysql_query($sql); 
	list($nums) = mysql_fetch_row($result);
	$url = 'list.php?cid='.$_GET[cid].'&';
echo page($nums,15,$url,NULL,NULL);
?>
</div>
<div class="mylink"><a href="../index.php?&cid=<?php echo class_name($_GET['cid'],'gro',$wapid);?>&sid=<?php echo $sid_info;?>">返回上级</a><a href="../index.php?sid=<?php echo $sid_info;?>">返回首页</a></div>
</body>
</html>
  <?php echo UBB($wap_bottom,$wapid);?>
</body>
</html>