<?php $this->widget('bbs.widgets.web.HeaderWidget',array('title'=>'讨论区 - '.setting('webname'),'keywords'=>'小说 免费小时 WAP书城 手打小说','desctiption'=>'小说阅读,精彩小说尽在起点小说。起点小说提供玄幻小说,武侠小说,网游小说,都市言情小说,历史军事小说,首发小说最新章节免费阅读,精彩尽在起点小说！热门小说:斗破苍穹,天珠变,吞噬星空,凡人修仙传,遮天。坚决抵制成人小说、情色小说、黄色小说等成人文学和色情小说。'));?>
<style type="text/css">
#forum table, th, td {
    border: 1px solid #E9F4E9;
    margin-top: 10px;
}
#forum caption {
    height: 30px;
    line-height: 30px;
    text-align: left;
    background-color: #E9F4E9;
    padding: 2px 10px 0;
    font-weight: bold;
}

#forum td, #forum th,#forum .forum_name {
	text-align: center;
}
#forum th {
	height: 24px;
	color: #999999;
}
#forum .forum_img {
	width: 10px;
	padding: 4px;
}
#forum .forum_name, #forum .forum_last {
	padding-left: 10px;
	text-align: left;
}
#forum .forum_last {
	width: 30%;
}
#forum .forum_name {
	width: 40%;
	padding: 4px;
}
#forum .forum_admin {
	width: 12%;
}
.forum_name a {
	font-weight: bold;
}
#forum .today_post {
	color:#FF5500;
	padding-left: 4px;
}
.chart {
    background: url("<?php echo getImageFile('bbs/web/chart.png');?>") no-repeat scroll 0 50% transparent;
    padding-left: 22px;
    margin: 2px 0px;
}
</style>

<div class="chart">今日: <?php echo $bbsinfo['tposts'];?> | 昨日: <?php echo $bbsinfo['yposts'];?> | 最高：<?php echo $bbsinfo['hposts'];?> | 帖子: <?php echo $bbsinfo['posts'];?> | 欢迎新会员: <?php echo $bbsinfo['newmember'][0];?></div>
<div class="clear"></div>
<div id="forum">
	<?php foreach ($allowForums as $forum):?>
	<table>
		<caption><span class="caption_bold"><b>»<?php echo $forum['name'];?></b></span></caption>
		<tbody>
			<tr>
    	    	<th colspan="2">版块</th>
		        <th>版主</th>

    	    	<th>主题数</th>
        		<th>帖子数</th>
		        <th>最后发表</th>
		    </tr>
		    <?php foreach ($forum['child'] as $fid => $name):?>
		    <tr>
		    	<td class="forum_img"><a href="<?php echo $this->url('system',array('s'=>'bbs','a'=>'forum','fid'=>$fid));?>" target="_blank" title="新窗口打开"><?php if ($forumCounts[$fid]['todayposts']):?><?php echo printImage('bbs/web/forum_new.gif');?><?php else:?><?php echo printImage('bbs/web/forum.gif');?><?php endif;?></a></td>
		    	<td class="forum_name"><a href="<?php echo $this->url('system',array('s'=>'bbs','a'=>'forum','fid'=>$fid));?>"><?php echo $name;?></a><span class="today_post">(<?php echo $forumCounts[$fid]['todayposts'];?>)</span><?php if (!empty($forums[$fid]['description'])):?><br/><span><?php echo $forums[$fid]['description'];?></span><?php endif;?></td>
		    	<td class="forum_admin"><?php echo $forums[$fid]['admin'];?></td>
		    	<td><?php echo $forumCounts[$fid]['threads'];?></td>
		    	<td><?php echo $forumCounts[$fid]['posts'];?></td>
		    	<td class="forum_last">	<?php if (isset($forums[$fid]['lastpost'])):?><?php echo ilink(BookPost::filter(iSubstr($forums[$fid]['lastpost'][0],0, 20, '...')),url('system',array('s'=>'bbs','c'=>'post','a'=>'last','tid'=>$forums[$fid]['lastpost'][3])));?><br/>by <?php echo $forums[$fid]['lastpost'][1];?> - <?php echo date('Y-m-d H:i', $forums[$fid]['lastpost'][2]);?><?php endif;?></td>
		    </tr>
		    <?php endforeach;?>
		    
		</tbody>
	</table>
	<?php endforeach;?>
</div>
<?php $this->widget('bbs.widgets.web.FooterWidget');?>