<?php $title = $bookInfo['bookname'].'书会 - ' . setting('webname');?>
<?php include_once tpl('globalHeader');?>

<?php if (!$style):?>
	<?php if (iElection::isAllowMonth(date('n'))):?>
    	<?php if (iElection::isAllowApply(date('n'), date('j'))):?>
        	<?php echo ilink(date('n').'月书管选举大会',url('system',array('s'=>'forum','c'=>'apply','id'=>$bookid)));?><br/>
    	<?php elseif(iElection::isAllowVote(date('n'), date('j'))):?>
        	<?php echo ilink(date('n').'月书管选举投票大会',url('system',array('s'=>'forum','c'=>'vote','id'=>$bookid)));?><br/>
    	<?php endif;?>
	<?php endif;?>
	<a href="http://25800.net/ad.php?aid=306">用QQ浏览器发书评更快</a><br/>
	<?php include_once tpl('globalPM');?>
	<?php if (!isPc() && !empty($forumRecommend)):?>
		最强:<a href="<?php echo url('system',array('s'=>'forum','id'=>$forumRecommend['bookid']));?>"><?php echo $this->filter($forumRecommend['forumname']);?></a>/<a href="<?php echo url('system',array('s'=>'member','uid'=>$forumRecommend['uid']));?>"><?php echo $this->filter(userName($forumRecommend['uid']));?>[荐]</a>
		<br/>
		---------------
		<br/>
	<?php endif;?>
	<?php echo ilink($this->filter($forumInfo['forumname']), url('bookshow',array('bid'=>$bookid)));?>/<a href="<?php echo url('system',array('s'=>'props','c'=>'frecommend','a'=>'use','do'=>1,'id'=>$bookid));?>">狂顶</a>/<a href="<?php echo url('system',array('s'=>'forum','a'=>'level','id'=>$bookid));?>"><?php echo iImg(getImageFile('bookforum/'.$level.'.gif'), '^_^');?></a>
	<br/>
	---------------
	<br/>
	<div class="pl"><b>[全城公告]</b><?php echo ilink('9月21号书会最新功能介绍！', url('system', array('s'=>'bbs','a'=>'thread','tid'=>26683)));?></div>

	<?php if (!empty($stick)):?>
		<b>[书会公告]</b><a href="<?php echo url('system',array('s'=>'forum','c'=>'stick','a'=>'view','id'=>$bookid,'tid'=>$stick['id']));?>"><?php echo $this->filter($stick['subject']);?></a>&gt;&gt;<?php echo ilink('更多',url('system',array('s'=>'forum','c'=>'stick','a'=>'list','id'=>$bookid)));?><br/>
	<?php endif;?>
<?php endif;?>
<div class="content">
<?php if (!empty($posts)):?>
    <?php foreach ($posts as $post):?>
        <?php echo $post['prefix'];?>[<?php echo $floor--;?>楼]<?php if (!empty($superManagers) && in_array($post['uid'],$superManagers)):?><?php echo printImage('bookforum/prop.gif');?><?php elseif (!empty($bookManagers) && in_array($post['uid'],$bookManagers)):?><?php echo printImage('bookforum/guan.gif');?><?php endif;?><?php if (!empty($post['medals']) && false !== $post['medals']):?><?php echo implode('',$post['medals']['images']);?><?php endif;?><a href="<?php echo url('system', array('s'=>'forum','c'=>'post','a'=>'to','id'=>$bookid,'cid'=>$post['bookpostsid']));?>"><?php echo userName($post['uid']);?></a>:<?php echo $post['message'];?>[<span class="f"><?php echo substr($post['createdate'], 2, -3);?></span>]<?php if (IS_MANAGE):?>[<?php echo ilink('管', $this->url('system',array('s'=>'forum','c'=>'manage','a'=>'lite','id'=>$bookid,'cid'=>$post['bookpostsid'])));?>]<?php endif;?><?php if (!$post['isadvance'] && !$post['digest'] && !$post['applydigest'] && $this->uid() && $this->uid() == $post['uid']):?>[<?php echo ilink('申', $this->url('system',array('s'=>'forum','c'=>'digest','a'=>'apply','id'=>$bookid,'cid'=>$post['bookpostsid'])));?>]<?php endif;?><br/>
    <?php endforeach;?>
    
    <?php if(!empty($start)):?>
        <?php echo $start . '至' . $end;?>
        <br/>
    <?php endif;?>
    <div class="search"><?php echo ilink('热聊', url('system', array('s'=>'forum','a'=>'new')));?>|今日<?php echo $todaypost;?>楼|总<?php echo $pageObj->getTotalRecord();?>楼[<?php echo $pageObj->getCurrentPage();?>/<?php echo $pageObj->getTotalPage();?>页]
    <br/>
    <a href="<?php echo url('system', array('s'=>'forum','id'=>$bookid));?>">刷新</a> <?php echo $pageObj->show(false);?>
    </div>
    <form action="<?php echo $this->url('system',array('s'=>'forum','id'=>$bookid));?>" method="get">
        <input type="hidden" name='s' value='forum'/>
        <input type="hidden" name='id' value='<?php echo $bookid;?>'/>
        <input type="hidden" name='sid' value='<?php echo $this->sid();?>'/>
        <?php if ($filter == 'digest'):?>
        	<input type="hidden" name='filter' value='digest'/>
        <?php elseif ($filter == 'advance'):?>
        	<input type="hidden" name='filter' value='advance'/>
        <?php endif;?>
        <input type="hidden" name="st" value="2" />

        <input type="submit" value="跳到" /><input name="page" type="text" size="4" />页|<?php if (!$style):?><?php echo ilink('简洁版',url('system',array('s'=>'forum','a'=>'style','do'=>'simple','id'=>$bookid)));?><?php else:?><?php echo ilink('完整版',url('system',array('s'=>'forum','a'=>'style','do'=>'complete','id'=>$bookid)));?><?php endif;?>
    </form>
<?php else:?>
    暂无评论，看看大家都在<?php echo ilink('哪里玩', url('system', array('s'=>'forum','a'=>'new')));?>！<br/>
<?php endif;?>
</div>
<form action="<?php echo $this->url('system',array('s'=>'forum','c'=>'post','a'=>'new','id'=>$bookid));?>" method="post">
<textarea rows="8" style="width: 99%" name="message"></textarea>
<br/>
<?php echo BookPost::showActionList();?>
<br/>
<input type="submit" value="发表评论" />
</form>

<?php echo randAd('forum');?>

<div class="content">
<?php if (!$style):?>
	<a href="<?php echo url('system', array('s'=>'forum','id'=>$bookid));?>">刷新</a>.<a href="<?php echo url('system',array('s'=>'forum','a'=>'join','id'=>$bookid));?>">入会</a>.<a href="<?php echo url('system', array('s'=>'forum','filter'=>'digest','id'=>$bookid));?>">精评</a>.<?php echo ilink('高级',url('system',array('s'=>'forum','filter'=>'advance','id'=>$bookid)));?>.<a href="<?php echo url('system',array('s'=>'forum','a'=>'info','id'=>$bookid));?>">信息</a>
	<br/>
	<a href="<?php echo url('system',array('s'=>'forum','c'=>'manage','id'=>$bookid));?>">管理</a>.<a href="<?php echo url('system',array('s'=>'forum','c'=>'ranking','a'=>'top'));?>">排行</a>.<a href="<?php echo url('system',array('s'=>'forum','a'=>'dedicate','id'=>$bookid));?>">捐赠</a>.<a href="<?php echo url('system',array('s'=>'forum','a'=>'users','id'=>$bookid));?>">成员</a>.<a href="<?php echo url('system',array('s'=>'forum','a'=>'help'));?>">规则</a><br/>---------------
	<br/>
<?php if (!empty($advancePosts)):?>
	<div class="kind">≠高级评论专区≠</div>
	<?php $i = 3;?>
	<?php foreach ($advancePosts as $advance):?>
		<?php echo $i--;?>.<?php echo ilink($this->filter(userName($advance['uid'])), url('system',array('s'=>'member','uid'=>$advance['uid'])));?>:<?php echo $this->filter(mb_substr($advance['message'], 0, 50, 'utf-8')) . ilink('...详细', url('system',array('s'=>'forum','c'=>'advance','a'=>'read','id'=>$bookid,'cid'=>$advance['bookpostsid'])));?><?php echo substr($advance['createdate'], 2, -3);?>]<br/>
	<?php endforeach;?>
	<?php echo ilink('>点击查看更多精彩高级贴',url('system',array('s'=>'forum','filter'=>'advance','id'=>$bookid)));?>
	<br/>
<?php endif;?>
	<?php echo ilink('>发表新高级贴(精评/更新)',url('system',array('s'=>'forum','c'=>'advance','a'=>'add','id'=>$bookid)));?><br/>
	---------------
	<br/>
	<?php echo ilink('按时间段查看书评&gt;&gt;',url('system',array('s'=>'forum','do'=>'time','id'=>$bookid)));?>
	<br/>
	---------------
	<br/>
<?php endif;?>
</div>
<?php if ($bookid != 13089):?>
	<a href="<?php echo url('bookshow', array('bid'=>$bookid));?>">该书封面</a>|<a href="<?php echo url('system',array('s'=>'member'));?>">返回书房</a>
	<br/>
	最新:<a href="<?php echo url('read',array('bid'=>$bookid,'cid'=>$bookInfo['lastchapterid']));?>"><?php echo $this->filter($bookInfo['lastchaptername']);?></a><?php if (!$bookInfo['status'] && CTIME - strtotime($bookInfo['updatedate']) < 8640000):?>[<?php echo time2Units(strtotime($bookInfo['updatedate']));?>前]<?php endif;?>
	<br/>
<?php endif;?>

<?php if (!$style):?>
	<div class="block">评论长度请保持在500字节内,严禁刷评,广告贴和违法言论,违者封号处理.</div>
	官方活动<?php echo ilink('疯狂挖宝', url('system',array('s'=>'props','c'=>'wa')));?>|<?php echo ilink('抢拍',url('system',array('s'=>'sale')));?>
    <br/>
	<?php if ($adView):?><?php echo iorange_ad();?><br/><?php endif;?>
<?php endif;?>
<?php include_once tpl('globalFooter');?>