<%
sub forum_board(ft,c_id,f_id,f_name)
  dim rsforum,strsqlforum,rstopic,sqltopic,topics,classid,forumid,forumname,forum_type,forum_new_info,forum_pic,new_info_dim,forumpic,forumn,forumw,ftn
  response.write admin_bar(f_name,1,"100%")
  response.write vbcrlf & "<table width='100%' border=0 align=center cellpadding=2 cellspacing=1>"

  strsqlforum="select forum_id,forum_n,forum_w,forum_name,forum_type,forum_new_info,forum_topic_num,forum_data_num,forum_power,forum_remark,forum_pic " & _
	      "from bbs_forum where forum_f="&f_id&" and class_id="&c_id&" and forum_hidden=0 order by forum_order,forum_id desc"
  set rsforum=conn.execute(strsqlforum)
  do while not rsforum.eof
    forumn=rsforum("forum_n"):forumw=rsforum("forum_w")
    forumid=rsforum("forum_id"):forumname=rsforum("forum_name")
    forum_type=rsforum("forum_type")
    forum_new_info=rsforum("forum_new_info")
    forum_pic=rsforum("forum_pic")
    ftn=""
    if len(forum_new_info)>3 then
      new_info_dim=split(forum_new_info,"|")
      new_info_dim(0)=format_user_view(new_info_dim(0),1,"")
      if isdate(new_info_dim(1)) then new_info_dim(1)=objv7.time_type(new_info_dim(1),8)
      new_info_dim(3)="<a href='forum_view.asp?forum_id="&forumid&"&view_id="&new_info_dim(2)&"' title='"&objv7.code_html(new_info_dim(3),0,0)&"'>"&objv7.code_html(new_info_dim(3),0,12)&"</a>"
      if objv7.time_type(new_info_dim(1),3)=objv7.time_type(now_time,3) then ftn="n"
    else
      redim new_info_dim(3)
    end if
    if len(forum_pic)>1 then
      if left(forum_pic,1)="$" then forum_pic="images/forum/"&right(forum_pic,len(forum_pic)-1)
      forum_pic="<td align=right><img src='"&forum_pic&"' border=0></td>"
    end if
    response.write vbcrlf&"<tr class=tdbg-dark><td width='8%' align=center><img src='images/forum/label_"&forum_type&ftn&".gif' border=0></td>" & _
		   vbcrlf&"<td width='82%'>" & _
		   vbcrlf&"<table border=0 width='100%' cellpadding=0 cellspacing=0>" & _
		   vbcrlf&"<tr height=22 class=tdbg-tree><td width='72%'>" & _
		   vbcrlf&"<table border=0 width='100%' cellpadding=0 cellspacing=0>" & _
		   vbcrlf&"<tr align=center>" & _
		   vbcrlf&"<td width='30%'><a href='forum_list.asp?forum_id="&forumid&"'>『 " & forumname & " 』</a></td>" & _
		   vbcrlf&"<td width='12%' class=gray>"&format_forum_type(forum_type,1)&"</td>"
    if forumw=true then
      response.write vbcrlf&"<td width='4%'></td><td align=left width='20%'><img src='images/small/forum_num_topic.gif' title='论坛主题数' border=0>&nbsp;&nbsp;<font class=time_3>"&rsforum("forum_topic_num")&"</font></td>" & _
		     vbcrlf&"<td align=left width='20%'><img src='images/small/forum_num_data.gif' title='论坛贴子数' border=0>&nbsp;&nbsp;<font class=time_3>"&rsforum("forum_data_num")&"</font></td>" & _
		     vbcrlf&"<td width='10%' align=right>"
      if int(forumn)>0 then response.write "<font class=gray title='本论坛下面有 "&forumn&" 分论坛'>[<font class=time>"&forumn&"</font>]</font>&nbsp;"
      response.write "<a href='forum_write.asp?forum_id="&forumid&"'><img src='images/small/mini_write.gif' align=absmiddle title='发表主题' border=0></a>&nbsp;</td>"
    else
      response.write vbcrlf&"<td width='54%' align=center class=gray>本论坛下面有 <font class=time>"&forumn&"</font> 分论坛</td>"
    end if
    response.write vbcrlf&"</tr>" & _
		   vbcrlf&"</table>" & _
		   vbcrlf&"</td>" & _
		   vbcrlf&"<td width='28%'>"&forum_power(rsforum("forum_power"),ptnums)&"</td>" & _
		   vbcrlf&"</tr>" & _
		   vbcrlf&"<tr>" & _
		   vbcrlf&"<td align=center><table border=0 width='99%'><tr><td class=hit>"&objv7.code_html(rsforum("forum_remark"),2,0)&"</td>"&forum_pic&"</tr></table></td>" & _
		   vbcrlf&"<td><font class=hit>"
    if forumw=true then
      response.write "<font class=hit>新贴："&new_info_dim(3)&"<br>作者："&new_info_dim(0)&"<br>时间："&new_info_dim(1)&"</font>"
    else
      response.write vbcrlf&"<p class=gray align=center>本论坛为不可发贴模式</p>"
    end if
    response.write "</font></td></tr></table></td></tr>"
    erase new_info_dim
    rsforum.movenext
  loop
  rsforum.close:set rsforum=nothing
  response.write "</table>"&kong&admin_bar("",2,"100%")&kong
  if forum_mode="full" then response.write web_right()&web_left(fvar3)		'分屏
end sub
%>