<!-- #include file="config_forum_board.asp" -->
<%
function forum_main(mh)
  dim rsclass,strsqlclass,rsforum,strsqlforum,rstopic,sqltopic,topics,classid,forumid,forumname,forum_type,forum_new_info,forum_pic,new_info_dim,forumpic,forumn,forumw,ftn
  strsqlclass="select class_id,class_name from bbs_class order by class_order"
  set rsclass=conn.execute(strsqlclass)
  do while not rsclass.eof
    classid=rsclass("class_id")
    call forum_board(0,classid,0,rsclass("class_name"))
    rsclass.movenext
  loop
  rsclass.close:set rsclass=nothing
end function

'---------------------------------------main----------------------------------------
sub forum_down(dt)
  response.write admin_bar("论坛图例",1,"100%")
  dim udim,sql,rs,counter_r
  sql="select count(*) from user_login where l_type=0"
  set rs=conn.execute(sql)
  counter_r=rs(0)
  rs.close:set rs=nothing
%>
<script language=javascript>
<!--
function load_forum(fname){
  var targetimg =eval("document.all.forum_online_img");
  var targetDivtr =eval("document.all.forum_online_tr");
  var targetDiv =eval("document.all.forum_online");
  //if (targetimg.src.indexOf("nofollow")!=-1){return false;}
  if (targetDivtr.style.display!='block')
  {
    document.all.forum_online_1.style.display=document.all.forum_online_1.style.display=='none'?'':'none';
    document.all.forum_online_2.style.display=document.all.forum_online_2.style.display=='none'?'':'none';
    targetDivtr.style.display="block";
    if (targetimg.loaded=="no")
    {
      targetimg.loaded="";
      document.frames["hiddenframe"].location.replace("forum_loadonline.asp?fname="+fname);
    }
  }
  else
  {
    document.all.forum_online_1.style.display=document.all.forum_online_1.style.display=='none'?'':'none';
    document.all.forum_online_2.style.display=document.all.forum_online_2.style.display=='none'?'':'none';
    targetDivtr.style.display="none";
  }
}
-->
</script>
<iframe width=0 height=0 src='about:blank' id=hiddenframe></iframe>
<table width='100%' border=0 align=center cellpadding=2 cellspacing=1>
<tr><td align=center height=30><% response.write objv7.ip_sys(0,0) %></td></tr>
<tr><td align=center height=30><script language=javascript src='style/web_user.js'></script></td></tr>
<tr><td align=center>
  <table border=0 border=0 cellspacing=0 width='98%' align=center>
  <tr><td height=20>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr><td>网站当前在线 <font class=red><%response.write online_num%></font> 人，其中注册用户 <font class=red><%response.write counter_r%></font> 人，游客 <font class=red><%response.write online_num-counter_r%></font> 人</td>
    <td width=30 align=center><img loaded=no id='forum_online_img' src='images/small/new.gif' border=0></td>
    <td><div id=forum_online_1><a href='javascript:;' onclick="load_forum('')">打开在线列表</a></div>
<div id=forum_online_2 style="display='none';"><a href='javascript:;' onclick="load_forum('')">关闭在线列表</a></div></td>
     </td></tr>
     </table>
  </td></tr>
  <tr style="display:none" id=forum_online_tr height=30><td id=forum_online width='100%' style="padding:0px"><div style="width:240px;margin-left:18px;border:1px solid black;padding:2px" onclick="load_forum('')">正在读取在线用户数据，请稍侯……</div></td></tr>
  </table>
</td></tr>
</table>
<table border=0 width='100%'>
<tr><td align=center height=50><script language=javascript src='style/forum_label.js'></script></td></tr>
<tr><td align=center height=20>
网站时间格式：<font class=gray>年-月-日 时:分:秒</font>　当前时间：<%response.write now_time%>　&nbsp;论坛显示模式：<a href='?mode=<%
if forum_mode="full" then
  response.write "half'>半屏"
else
  response.write "full'>全屏"
end if
%>模式</a>
</td></tr>
</table>
<%
  response.write kong&admin_bar("",2,"100%")&kong
end sub

sub forum_cast(nh,nj,n_num,c_num)
  dim temp1
  temp1="<script language=javascript src='style/update_forum.js'></script>"
  response.write kong&main_bar(0,"论坛公告（Top "&n_num&"）",temp1,0,"100%","")
end sub

sub forum_new(nh,nj,fid,n_num,c_num,tb)
  dim temp1,njj,topic,tbb:njj="":tbb=""
  if nj<>"" then njj=img_small(nj)
  if tb=1 then tbb=" target=_blank"
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2>"
  sql="select top "&n_num&" id,forum_id,topic,tim,username,re_username from bbs_topic"
  if fid>0 then sql=sql&" where forum_id="&fid
  sql=sql&" order by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    topic=rs("topic")
    temp1=temp1&"<tr><td height="&space_mod&">"&njj&"<a href='forum_view.asp?forum_id="&rs("forum_id")&"&view_id="&rs("id")&"'"&tbb&" title='贴子主题："&objv7.code_html(topic,1,c_num)&"<br>发 贴 人："&rs("username")&"<br>发贴时间："&objv7.time_type(rs("tim"),88)&"<br>最后回复："&rs("re_username")&"'>"&objv7.code_html(topic,1,c_num)&"</a></td></tr>"
    rs.movenext
  loop
  temp1=temp1&"</table>"
  response.write kong&main_bar(0,"论坛新贴（Top "&n_num&"）",temp1,0,"100%","")
end sub
%>