<?php
	include("header.tpl.php");
	include("bodytop.tpl.php"); 
	include("navigation.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="rl_u">&nbsp;</div>
	<div class="content"><h2><?php echo $dbforumgroup['forumtitle']?></h2>
		<table class="grouptable">
				<tr>
				    <th height="25" align="left">&nbsp;</th>
					<th align="left">版块</th>
					<th align="center">主题数</th>
					<th align="center">回帖数</th>
					<th align="left">最后发表</th>
				</tr>
			<?php foreach($dbforums[$dbforumgroup['forid']] as $dbforum) {?>
			<tbody id="forum<?php echo $dbforum['forid']?>">
				<tr>
				  <td class="forum_icon_label" height="40">&nbsp;</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']){
						echo ' 今日('.$dbforum['todayposts'].')';
					}?>
					</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>
	   <div class="rl_d">&nbsp;</div>
	</div>
	<?php }?>
	<div class="clear"></div>
<?php
include("tail.tpl.php"); 
?>

