<?php
include_once("../inc/conn.php");
include_once("../inc/function.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD>
<TITLE>论坛-<?=$web_name;?></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="<?=$web_description;?>" name="cescription">
<META content="<?=$web_keywords;?>" name="keywords">
<META content="MSHTML 6.00.3790.4426" name=GENERATOR>
<link href="../style/default.css" rel="stylesheet" type="text/css" />
<body>
<?php include_once("../top.php");?>
<script language="javascript">
qiehuan(8);
</script>
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0" style="margin:0 auto">
  <tr>
    <td width="60%" height="25" style="margin:0px;padding:0px;"><img src="images/icon_homepage.gif"> <a href="../index.php"><?=$web_name?></a></td>
    <td><TABLE cellSpacing=1 cellPadding=0 width="100%" bgColor=#e8e8e8 border=0>
      <TBODY>
        <TR>
          <TD bgColor=#f7f7f7 height=30>
		  <FORM style="MARGIN: 0px" name=search_form action=forum.php method=get>
		  	<input name="act" type="hidden" value="search">
              <TABLE cellSpacing=4 cellPadding=0 align=center border=0>
                <TBODY>
                  <TR>
                    <TD width=50>搜索：</TD>
                    <TD><INPUT style="BORDER: #7f9db9 1px solid;PADDING-TOP: 0px;HEIGHT: 16px; padding-top:2px;" maxLength=20 size=30 name=kword></TD>
                    <TD><input name="" type="image" src="images/sbutton.gif"></TD>
                  </TR>
                </TBODY>
              </TABLE>
          </FORM></TD>
        </TR>
      </TBODY>
    </TABLE></td>
  </tr>
</table>
 <DIV class=blank10></DIV>
 <table width="960" border="0" align="center" cellpadding="4" cellspacing="0" style="border: 1px solid #CAD9EA;margin:0 auto">
   <tr>
     <td width="60" height="28" align="center" background="images/menu_bg.gif">&nbsp;</td>
     <td align="center" background="images/menu_bg.gif">板块名</td>
     <td width="100" align="center" background="images/menu_bg.gif">主题/帖数</td>
     <td width="302" align="center" background="images/menu_bg.gif">最后发表</td>
   </tr>
   <?
   $query=$db->query("Select * from {$web_dbtop}bbs_section Order by sort asc");
   while($rs=$db->fetch_array($query)){
   ?>
	<tr>
     <td height="50" align="center" style="border-top:1px #CAD9EA solid;"><img src="<?=($rs["pic"]?$rs["pic"]:"images/topic_permit.gif")?>" width="31" height="37"></td>
	      <td style="border-top:1px #CAD9EA solid;">
		        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><a href="forum.php?forumsid=<?=$rs["id"]?>"><strong><?=$rs["name"]?></strong></a><span class="font-yellow">(<?=today_posts_num($rs["id"])?>)</span></td>
                  </tr>
                  <tr>
                    <td style="color: #999999;"><?=$rs["introduction"]?></td>
                  </tr>
                  <tr>
                    <td  style="color: #999999;">版主：<? $moderators=explode(",",$rs["moderators"]);
					foreach ($moderators as $usersbz){
								if($usersbz){
	  								echo showcontent("users","name",$usersbz)."&nbsp;&nbsp;";
								}
	  						}
							?></td>
                  </tr>
                </table>
      </td>
	 <td align="center" style="border-top:1px #CAD9EA solid;color: #999999;"><span class="font-green01"><?=posts_num($rs["id"])?></span>/<?=reply_num($rs["id"])?></td>
     <td style="border-top:1px #CAD9EA solid;">
	 <?
	 $query_f=$db->query("Select id,uid,title,time from {$web_dbtop}bbs_posts where section=".$rs["id"]." Order by id desc limit 0,1");
	   if($rs_f=$db->fetch_array($query_f)){
	   $time=$rs_f["time"];
	 ?>
     <table width="100%"  border="0" cellspacing="0" cellpadding="2">
       <tr>
         <td style="color: #999999;"><a href="read.php?forumsid=<?=$rs["id"]?>&threadsid=<?=$rs_f["id"]?>" class="bbs"><?=$rs_f["title"]?></a></td>
       </tr>
       <tr>
         <td style="color: #999999;"><a href="<?=$web_dir?>user.php?id=<?=$rs_f["uid"]?>"><?=showcontent("users","name",$rs_f["uid"])?></a>-<?=date("m-d H:i",strtotime($time));?></td>
       </tr>
     </table>
	 <? }?>
	 </td>
   </tr>
   <?
   }
   ?>
</table>
 <DIV class=blank10></DIV>
<?php include_once("../footer.php");?>