<?php
	require '../Run.php';
	require root_path."/include/page.inc.php";
	echo head(class_name($_GET['cid'],'cn',WAPID));
	echo topNav('小说列表','<a href="http://'.HTTP_HOST.'/index.php?&cid='.class_name($_GET['cid'],'gro',$wapid).'">返回</a>','<a href="../index.php">首页</a>');
	$mysql = new D('dd_book_name');
	$back = $mysql
		->where(array('gro'=>$_GET['cid'],'siteid'=>WAPID))
		->limit(slist($_GET['page'],15),15)
		->order('bookid DESC')
		->select();
		if($back){
		$num = 0;
			foreach($back as $value)
			{
			$olt = '[已完结]';
			if($value['ol'] == '1'){
				$olt = '[连载中]';
			}
				$div = $num++%2 == 0?'line1':'line2';
				echo '<div class="'.$div.'"><a href="content.php?cid='.$value['gro'].'&id='.$value['bookid'].'">'.$olt.$value['title'].'</a>[作者:'.user('nc','id',$value['userid']).'('.user('xid','id',$value['userid']).')]</div>';
			}
		}else{
			echo '<div class="tip">暂无记录</div>';
		}
	$backnums = $mysql
		->where(array('gro'=>$_GET['cid'],'siteid'=>WAPID))
		->select();
	$url = 'list.php?cid='.$_GET['cid'].'&';
	echo page(count($backnums),12,$url,NULL,'view');
	echo footer(1);