<?php $title = $book['bookname'] . '章节列表 - 作者中心 - ' . setting('webname');?>
<?php include_once tpl('globalHeader');?>
<?php echo backLink();?> <?php echo ilink('作者中心', url('system', array('s'=>'author')));?> <?php echo memberLink();?> <?php echo indexLink();?>
<div class="nav">《<?php echo $book['bookname'];?>》章节列表</div>
<div class="pl"><a href="<?php echo $this->url('system',array('s'=>'author','c'=>'chapter','a'=>'create','bid'=>$book['bookid']));?>">[添加新章节]</a> <a href="<?php echo $this->url('system',array('s'=>'author'));?>">[作者中心]</a></div>
<?php if (!empty($chapters)):?>
	<?php foreach ($chapters as $chapter):?>
    <div class="comment">
    <?php if ($chapter['isvip']):?><span class="r">[VIP]</span><?php endif;?><a href="<?php echo $this->url('system',array('s'=>'author','c'=>'draft','cid'=>$chapter['chapterid']));?>"><?php echo $chapter['chaptername'];?></a>[<?php echo $chapter['size'];?>字](<?php if (!$chapter['display']):?><span class="f">未发布</span><?php else:?><b>已发布</b><?php endif;?>)
    <br/>
    时间:<span class="f"><?php echo $chapter['createdate'];?></span>
    <br/>
    <?php if (!$chapter['display']):?><?php if (false !== $chapter['cron']):?>定时:<?php echo $chapter['cron'];?>发布,<?php echo ilink('取消', url('system', array('s'=>'author','c'=>'chapter','a'=>'cc','bid'=>$chapter['bookid'],'cid'=>$chapter['chapterid'])));?><br/><?php endif;?><?php endif;?>

    操作:<a href="<?php echo $this->url('system',array('s'=>'author','c'=>'draft','a'=>'create','cid'=>$chapter['chapterid']));?>">添加字数</a>|<?php echo ilink('修改', $this->url('system',array('s'=>'author','c'=>'chapter','a'=>'edit','bid'=>$book['bookid'],'cid'=>$chapter['chapterid'])));?>|<?php echo ilink('删除',$this->url('system',array('s'=>'author','c'=>'chapter','a'=>'delete','bid'=>$book['bookid'],'cid'=>$chapter['chapterid'])));?>|<?php echo ilink('预览', url('read', array('bid'=>$chapter['bookid'],'cid'=>$chapter['chapterid'])));?>
    </div>
	<?php endforeach;?>
    <div class="search">
	共<?php echo $pageObj->getTotalRecord();?>章[<?php echo $pageObj->getCurrentPage();?>/<?php echo $pageObj->getTotalPage();?>页]
	<br/>
	<?php echo $pageObj->show();?>
	</div>
<?php else:?>
	本书暂无章节，现在<a href="<?php echo $this->url('system',array('s'=>'author','c'=>'chapter','a'=>'create','bid'=>$book['bookid']));?>">添加</a>？<br/>
<?php endif;?>

<div class="kind">【作品数据】</div>
<div class="content">
<?php if ($book['view']):?>已发布<?php else:?>未发布，如果达到<?php echo ilink('发布标准', url('system',array('s'=>'author')));?>，请联系<?php echo ilink('编辑', url('system', array('s'=>'member','uid'=>411041)));?><?php endif;?>
<br/>
收藏:<?php echo $book['favorites'];?>人
<br/>
红票:日<?php echo $book['d_red'];?>/周<?php echo $book['w_red'];?>/月<?php echo $book['m_red'];?>/总<?php echo $book['red'];?>
<br/>
阅读:日<?php echo $book['day'];?>/周<?php echo $book['week'];?>/月<?php echo $book['month'];?>/总<?php echo $book['click'];?>
<br/>
鲜花:<?php echo $book['flower'];?>朵
<br/>
板砖:<?php echo $book['egg'];?>块
<br/>
章节:<?php echo $pageObj->getTotalRecord();?>章
<br/>
字数:<?php echo $book['size'] ? round($book['size'] / 10000, 2) : 0;?>万
<br/>
最新:<?php if (!empty($book['lastchaptername'])):?><?php echo ilink($book['lastchaptername'], $this->url('read',array('bid'=>$book['bookid'],'cid'=>$book['lastchapterid'])));?><?php else:?>暂无<?php endif;?>
<br/>
时间:<?php echo $book['updatedate'];?>
</div>
<div class="pl"><a href="<?php echo $this->url('system',array('s'=>'author','c'=>'chapter','a'=>'create','bid'=>$book['bookid']));?>">添加新章节</a>|<a href="<?php echo $this->url('system',array('s'=>'author'));?>">作者中心</a>|<a href="<?php echo url('system', array('s'=>'author','c'=>'book','a'=>'recommend','bid'=>$book['bookid']));?>">自助推荐</a></div>
<div class="block">
*提示&gt;电脑上传章节方法:通过<?php echo setting('webhost');?>登陆<?php echo setting('webname');?>，进入‘作者中心’<br/>
如需要修改章节间的排列顺序，请通过WEB版操作，WAP由于数据过多暂不提供！
</div>
<?php include_once tpl('globalFooter');?>