<?php $title = $bookname . ' - ' . setting('webname');?>
<?php include_once tpl('globalHeader');?>
<div class="nav"><?php echo ilink('首页', url('index'));?> > <a href="<?php echo url('booktype', array('tid'=>$typeid));?>"><?php echo $typename;?></a></div>

<div class="content">
    <?php if ($book['image'] && false !== ($cover = bookCover($book['bookid']))):?><img src="<?php echo $cover;?>" alt="封面" /><br/><?php endif;?>
    《<?php echo $bookname;?>》<a href="<?php echo url('search', array('class'=>2,'author'=>urlencode($author)));?>"><?php echo $author;?></a><?php if (Book::isOriginal($type)):?><?php if ($tipping):?>/<?php echo ilink('打赏', url('system',array('s'=>'member','a'=>'tipping','bid'=>$bookid)));?><?php endif;?>/<?php echo ilink('催更',url('system',array('s'=>'props','c'=>'update','bid'=>$bookid)));?><?php endif;?>
    <br/>
    【<a href="<?php echo url('system',array('s'=>'member','a'=>'favorite','bid'=>$bookid));?>">收藏</a>】<?php echo ilink($favorites, url('system', array('s'=>'member','a'=>'flist','bid'=>$bookid)));?>人/<?php echo ilink('推荐', url('system',array('s'=>'props','c'=>'recommend','a'=>'use','bid'=>$bookid)));?>
    <br/>
    <?php if ($keyWords):?>【标签】<?php echo $keyWords;?><br/><?php endif;?>
    <?php if (Book::isOriginal($type)):?>
        【点击】<?php echo $click;?>人次<br/>
        【投票】<?php if ($redNum):?><?php echo round($redNum / ($redNum + $blackNum), 2) * 100;?><?php else:?>0<?php endif?>%<?php echo ilink('红票('.$redNum.')', url('system', array('s'=>'member','a'=>'vr','bid'=>$bookid,'t'=>1)));?>|<?php if ($blackNum):?><?php echo round($blackNum / ($redNum + $blackNum), 2) * 100;?><?php else:?>0<?php endif;?>%<?php echo ilink('黑票('.$blackNum.')', url('system', array('s'=>'member','a'=>'vr','bid'=>$bookid,'t'=>2)));?><br/>
        【授权】本站首发<br/>
    <?php endif;?>
        【状态】<?php if ($status):?><a href="<?php echo url('over');?>" style="color: red;font-weight: bold;">完成</a><?php else:?><?php echo ilink('连载',url('new'));?><?php endif;?><?php if (!isPc()):?>(分类<a href="<?php echo url('booktype', array('tid'=>$typeid));?>"><?php echo $typename;?></a>)<?php endif;?>
    <br/>
    【字数】约<?php echo round($size / 10000,2);?>万字(id:<?php echo $bookid;?>)<br/>
    【简介】<?php echo str_replace("\n",'<br/>',$bookinfo);?>
    <?php if ($cut):?><a href="<?php echo url('bookinfo', array('bid'=>$bookid));?>">...</a>
    <?php endif;?>
    <br/>
    <?php echo printImage('flower.gif');?><?php echo ilink('送花('.$flower.')',url('system',array('s'=>'props','c'=>'flower','a'=>'use','do'=>1,'bid'=>$bookid)));?>↑<a href="<?php echo url('top',array('sort'=>'flower'));?>">排行</a><br/><?php echo printImage('zhuan.gif');?><?php echo ilink('砸砖('.$egg.')',url('system',array('s'=>'props','c'=>'brick','a'=>'use','do'=>1,'bid'=>$bookid)));?>↓<a href="<?php echo url('top',array('sort'=>'egg'));?>">排行</a>
    <br/>
    <?php if (!empty($lastchapter)) echo '[' .$lastupdate. '更新]'.$lastchapter."<br/>";?>
    <?php echo randAd('other');?>
</div>
<div class="pl"><?php if (!empty($firstChapter)):?><a href="<?php echo url('read',array('bid'=>$bookid,'cid'=>$firstChapter['chapterid']));?>" style="color: red;font-weight: bold;">直接看</a>|<?php endif;?><a href="<?php echo $url;?>" style="color: red;font-weight: bold;">目录</a>|<a href="<?php echo url('system',array('s'=>'member','a'=>'looklist','bid'=>$bookid));?>" style="color: red;font-weight: bold;">接上次</a>|<a href="<?php echo url('system', array('s'=>'download','bid'=>$bookid));?>" style="color: red;font-weight: bold;">下载</a>|<a href="<?php echo url('system', array('s'=>'bcart','c'=>'member','a'=>'to','bid'=>$bookid, 'redirect'=>$selfurl));?>" style="color: red;font-weight: bold;">加书单</a></div>

<div class="kind"><img src="<?php echo getImageFile('reyi.gif');?>" alt='↓'/><?php if ($isDigest):?>书会精评<?php else:?>书友热议<?php endif;?>↓(<a href="<?php echo url('system', array('s'=>'forum','id'=>$bookid));?>"><?php echo $postCount;?>条</a>)</div>
<?php if (!$iorange_id || ($iorange_id && u('viewcomment'))):?>
<?php if (!empty($posts)):?>
    <?php foreach ($posts as $post):?>
        <div class="comment"><?php echo ilink(userName($post['uid']), url('system', array('s'=>'member','uid'=>$post['uid'])));?>:<?php echo iubb(iSubstr($post['message'], 0, 70, '...'));?></div>
    <?php endforeach;?>
    <a href="<?php echo url('system', array('s'=>'forum','id'=>$bookid));?>">进入书会聊天&gt;&gt;</a><br/>
<?php else:?>
    <a href="<?php echo url('system', array('s'=>'forum','id'=>$bookid));?>">沙发还在，速抢！</a><br/>
<?php endif;?>
<form action="<?php echo urldecode($selfurl);?>" method="post">
<textarea name='message' row="2" style="width:90%"></textarea>
<br/>
<input type="submit" value="快速发表评论">
</form>
<?php endif;?>
<div class="kind">没被人发觉的经典</div>
<div class="content">
    <?php echo bookLink(5421, '鹅靠的暧昧《大明星爱上我》', array('sp'=>63));?>
    <br/>
    <?php echo bookLink(340, '不朽的暴君传说《猛龙过江》', array('sp'=>62));?>
    <br/>
    <?php echo bookLink(418, '新奇有趣的网游《百炼成妖》', array('sp'=>61));?>
    <br/>
    <?php echo bookLink(3838, '绝对暴力的奶妈《牧师传说》', array('sp'=>60));?>
    <br/>
    <?php echo bookLink(2565, '我很丑但很温柔《异能丑汉》', array('sp'=>56));?>
</div>
<?php include_once tpl('globalFooter');?>