<?php
	include("header.tpl.php");
	include("bodytop.tpl.php"); 
?>

	<div class="g_navigation">
		<a href="index.php">网站首页</a> >> <?php echo $forumname?>
	</div>

 <div class="clear"></div>
<?php foreach($dbforumgroups as $dbforumgroup){?>
<div id="forumlist">
	<div class="forumlist_head">
	<label><?php echo $dbforumgroup['forumtitle']?></label></div>
		<table class="grouptable">
		<thead class="category">
				<tr>
					<th colspan="2" align="left">版块</th>
					<td align="center">主题数</td>
					<td align="center">回帖数</td>
					<td align="left">最后发表</td>
				</tr>
		</thead>
			<?php foreach($dbforums[$dbforumgroup['forid']] as $dbforum) {?>
			<tbody id="forum<?php echo $dbforum['forid']?>">
				<tr>
				  <td class="forum_icon_label" height="40">
				  <?php if($dbforum['todayposts']){?>
				  <a href="javascript:void(0)" title="有新帖"><img src="<?php echo $templatedir?>images/forum_new.gif" /></a>
				  <?php }else{?>
				  <a href="javascript:void(0)" title="无新帖"><img src="<?php echo $templatedir?>images/forum.gif" /></a>
				   <?php }?>
				  </td>
					<td class="forum_board_label"><strong>

					<a href="forumdisplay.php?forid=<?php echo $dbforum['forid']?>"><?php echo $dbforum['forumtitle']?></a>
					</strong>
					<?php if($dbforum['todayposts']){?>
					今日(<?php echo $dbforum['todayposts']?>)
					<?php }?>
					</td>
					<td class="forum_thread_label"><?php echo $dbforum['threads']?></td>
					<td class="forum_post_label"><?php echo $dbforum['posts']?></td>
					<td class="forum_lastpost_label">
					<?php if($dbforum['lastpost']){?>
					<a href="viewthread.php?tid=<?php echo $dbforum['lastpostid']?>"><?php echo $dbforum['lastpost']?></a>
					<br><span class="font_12">
					by <?php echo $dbforum['lastauthor']?> - <?php echo gmdate('Y-n-j H:i',$dbforum['lasttime']+8*3600)?>
					</span>
					<?php }else{?>
					<span style="color:#ccc;font-size:12px;">从未</span>
					<?php }?>
					</td>
				</tr>
			</tbody>
			<?php }?>
			</table>
	</div>
	<?php }?>
	<div class="clear"></div>
<?php
include("tail.tpl.php"); 
?>

