<?php $title = $bookname . '章节列表 - ' . setting('webname');?>
<?php include_once tpl('globalHeader');?>
<div class="nav">《<?php echo $bookname;?>》/<?php if ($sort == 'ASC'):?><?php echo ilink('倒序目录', url('chapter',array('bid'=>$bookid,'sort'=>'desc')));?><?php else:?><?php echo ilink('顺序目录', url('chapter',array('bid'=>$bookid)));?><?php endif;?></div>
<div class="content">
<?php if (!empty($chapters)):?>
    <?php foreach($chapters as $chapter):?>
        <a href="<?php echo url('read', array('bid'=>$chapter['bookid'], 'cid'=>$chapter['chapterid']));?>"><?php echo $chapter['chaptername'];?></a><br/>
    <?php endforeach;?>
</div>
    <div class="search">共<?php echo $pageObj->getTotalRecord();?>章[<?php echo $pageObj->getCurrentPage();?>/<?php echo $pageObj->getTotalPage();?>页]<br/><?php echo $pageObj->show();?></div>
<?php else:?>
    暂无章节内容
<?php endif;?>
[<a href="<?php echo url('bookshow', array('bid'=>$bookid));?>">本书首页</a>][<a href="<?php echo url('system',array('s'=>'props','c'=>'recommend'));?>">推荐该书</a>]<br/>

<?php include_once tpl('globalFooter');?>