<!--#include file="conn.asp" -->
<%
call FTBBS_HTML_MB
if request.cookies("ftbbstype")="" then
   Response.Cookies("ftbbstype")=1
   Response.Cookies("ftbbstype").Expires=date+7
end if
sql="select sum(BBS_Cate_Topic) as k1,sum(BBS_Cate_Reply) as k2 from BBS_Cate where BBS_Cate_PID<>'0'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
titletotal=rs("k1")
retotal=rs("k2")
rs.close
sql="select top 1 clubuser_id,clubuser_name from clubuser order by clubuser_id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
clubuser_id=rs("clubuser_id")
newmember=rs("clubuser_name")
rs.close

datestr=formatdatetime(now(),2)
NewDate = DateAdd("d", -1, datestr)
myarray=split(formatdatetime(now(),2),"-",-1,1)
yy=myarray(0)
mm=myarray(1)
dd=myarray(2)
sqlstr="select count(id) as daytotal from bbstitle where year(dateh)='"&yy&"' and month(dateh)='"&mm&"' and day(dateh)='"&dd&"'"
set rs=conn.execute(sqlstr)
daytotal=rs("daytotal")
rs.close
sqlstr="select count(id) as daytotal from bbstitle where dateh<#"&datestr&"# and dateh>#"&NewDate&"#"
set rs=conn.execute(sqlstr)
zttotal=rs("daytotal")
rs.close
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<title><%=Application("FTBBSMB")(11,0)%></title>
<script language=javascript src="inc/cookies.js"></script>
<script>
var stylecook = getCookie("STYLESHOW");
var style;
var strstyle;
if(stylecook=="")
{
 stylecook=1;
}
else
{
 stylecook++;
}
style="main0"+stylecook+".css";
strstyle="<link href=\"css/"+style+"\"  rel=\"stylesheet\" type=\"text/css\"> ";
document.write(strstyle);
</script>
<style type="text/css">
<!--
a:link {
	font-size: 12px;
	font-style: normal;
	line-height: 22px;
	text-decoration: none;
}
a:visited {
	font-size: 12px;
	font-style: normal;
	line-height: 22px;
	text-decoration: none;
}
a:hover {
	font-size: 12px;
	font-style: normal;
	line-height: 22px;
	color: #FF0000;
	text-decoration: underline;
}
-->
</style>
</head>
<script language="javascript">
<!--
	function check_search(form)
		{
		if (form.searchcontent.value=="")
			{
			alert("请输入搜索内容！");
			form.searchcontent.focus();
			return false;
			}
			return true;
		}
//-->
</script>
<body>
<center>
  <table cellspacing=0 cellpadding=0 width="99%" align=center border=0>
    <tbody>
      <tr> 
        <td width="13%" height=60> <div align="left"><img src="images/tmlogo.gif" width="112" height="50"></div></td>
        <td width="87%"><div align="right"> 
       <script language="JavaScript" src="sitead.js"></script>
          </div></td>
      </tr>
    </tbody>
  </table>
  <table cellspacing=0 cellpadding=0 width="99%" align=center border=0>
    <tbody>
      <tr> 
        <td height=1></td>
      </tr>
    </tbody>
  </table>
  <table cellspacing=0 cellpadding=0 width="99%" align=center border=0>
    <tbody>
      <tr> 
        <td class="maintbtr1" height=2></td>
      </tr>
      <tr> 
        <td height=1></td>
      </tr>
    </tbody>
  </table>
  <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td height="18" class="maintbtr3"><script src="inc/defaultlist_login.asp"></script></td>
    </tr>
  </table>
  <table cellspacing=0 cellpadding=0 width="99%" align=center border=0>
    <tbody>
      <tr> 
        <td class="maintbtr1" height=2></td>
      </tr>
      <tr> 
        <td height=1></td>
      </tr>
      <tr> 
        <td><script src="listad.js"></script></td>
      </tr>
    </tbody>
  </table>
  <table width="99%" cellspacing="0" cellpadding="1" class="default_list">
    <tr> 
      <td> <table width="100%" align="center" cellpadding="0" cellspacing="1">
          <tr class="f12bg" align="center"> 
            <td height="25" colspan="3" align="right">欢迎新会员：<a href="home.asp?userid=<%=clubuser_id%>"><%=newmember%></a> 
              今日发贴：<%=daytotal%> 昨日：<%=zttotal%> <a href="main.asp?order_key=dateh">最新发布主题</a> 
              <a href="main.asp">最新回复主题</a> <a href="main.asp?order_key=hit">热门话题</a>&nbsp;</td>
          </tr>
          <tr> 
            <td width="5%" height="25" class="maintbtr1"> <div align="center"><img src="images/anc.gif"> 
              </div>
            </td>
            <td width="46%" class="maintbtr1">
              <script src="df_listad.js"></script>
            </td>
            <td height="25" class="maintbtr1"> <FORM METHOD=POST ACTION="search.asp" onSubmit="return check_search(this)" style="MARGIN-BOTTOM: 0px">
                论坛搜索 
                <input type="hidden" name="layer_1" value="<%=layer_1%>">
                <input type=text name="searchcontent" size=40 value="" class="">
                <select name="searchkind" style="background-color:#ffffff;FONT-FAMILY: Arial; FONT-SIZE: 9pt; FONT-STYLE: normal; WIDTH: 65px">
                  <option value="title" selected>按主题</option>
                  <option value="user_id" >按作者</option>
				  <option value="menu" >按内容</option>
                </select>
                <input name="search" src="images/d_search.gif" type="image" value="Submit" width="37" height="21" border="0" align="absmiddle">
              </form></td>
          </tr>
        </table></td>
    </tr>
  </table>
  <table width="99%" cellspacing="0" cellpadding="1" class="default_list">
    <tr>
    <td>
<table width="100%" align="center" cellpadding="0" cellspacing="1">
      <tr class="f12bg" align="center"> 
        <td width="5%" height="27">&nbsp;</td>
            <td width="46%">论坛分类 ( 
              <%if request.cookies("ftbbstype")=1 then%>
              <a href="default.asp?a=<%=layer_1%>&b=<%=layer_2%>&qs=<%=qs%>&ft=0" target="_top"><font color="#FF0000">框架结构浏览</font></a> 
              <%else%>
              <a href="default.asp?a=<%=layer_1%>&b=<%=layer_2%>&qs=<%=qs%>&ft=1" target="_top"><font color="#FF0000">平板结构浏览</font></a> 
              <%end if%>
              ) </td>
        <td width="7%">主题</td>
        <td width="7%">帖数</td>
        <!--<td width="5%">今日</td>-->
        <td width="15%">最后发表</td>
        <td width="15%">版主</td>
      </tr>
<%
sql="select BBS_Cate_Name,BBS_Cate_ID,BBS_Cate_PID,BBS_Cate_Qs,BBS_Cate_Note,BBS_Cate_Topic,BBS_Cate_Reply,BBS_Cate_Manager_Name from BBS_Cate where BBS_Cate_PID='0' and deleted=0 order by totop asc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
%>
      <tr> 
            <td height="28" colspan="7" class="maintbtr1">&nbsp; <a href="main.asp?layer_1=<%=rs("bbs_cate_id")%>&qs=<%=rs("BBS_Cate_Qs")%>"><b><font color="#000000">≡<%=rs("BBS_Cate_Name")%>≡</font></b></a> 
            </td>
      </tr>
      <tbody id="category_30" style="">
<%
sql15="select BBS_Cate_Name,BBS_Cate_ID,BBS_Cate_PID,BBS_Cate_Qs,BBS_Cate_Note,BBS_Cate_Topic,BBS_Cate_Reply,BBS_Cate_Manager_Name from BBS_Cate where BBS_Cate_PID='"&rs("BBS_Cate_ID")&"' and deleted=0"
set rs15=server.createobject("adodb.recordset")
rs15.open sql15,conn,1,1
do while not rs15.eof
if rs15("BBS_Cate_Qs")=1 then
   ft="ft4.gif"
elseif rs15("BBS_Cate_Qs")=2 then
   ft="ft3.gif"
elseif rs15("BBS_Cate_Qs")=3 then
   ft="ft2.gif"
'elseif rs15("BBS_Cate_Qs")=4 then
   'ft="ft5.gif"
else
   ft="ft1.gif"
end if
    'myarray=split(formatdatetime(now(),2),"-",-1,1)
    'yy=myarray(0)
    'mm=myarray(1)
    'dd=myarray(2)
	sqlstr="select count(id) as k from bbstitle where BoardID_2='"&rs15("BBS_Cate_ID")&"' and year(dateh)='"&yy&"' and month(dateh)='"&mm&"' and day(dateh)='"&dd&"'"
	set rsd=conn.execute(sqlstr)
	k=rsd("k")
	rsd.close		  
%>
        <tr> 
          
              <td height="60" align="center" class="maintbtr1"><img src="images/<%=ft%>" alt="" width="25" height="32" /></td>
              <td class="maintbtr3" align="left" onMouseOver="this.className='maintbtr1'" onMouseOut="this.className='maintbtr3'" style="line-height: 20px;"> 
                <a href="main.asp?layer_1=<%=rs15("BBS_Cate_PID")%>&layer_2=<%=rs15("BBS_Cate_ID")%>&qs=<%=rs15("BBS_Cate_Qs")%>"><font color="#000000"><strong>◇ 
                -<%=rs15("BBS_Cate_Name")%></strong></font></a> <font color=#336699>(今日:<%=k%>)</font><br>
            <%=rs15("BBS_Cate_Note")%></td>
        <td class="maintbtr1" align="center"><%=rs15("BBS_Cate_Topic")%></td>
        <td class="maintbtr1" align="center"><%=rs15("BBS_Cate_Reply")%></td>
              <td class="maintbtr3" align="right" title="" nowrap> 
    <%
	dim bzname,bz,rsbzid,bz_id
	bzname=rs15("BBS_Cate_Manager_Name")
    str="select top 1 name,dateh,htmfilename from bbstitle where BoardID_2='"&rs15("BBS_Cate_ID")&"' order by id desc"
	set rs0=server.createobject("adodb.recordset")
    rs0.open str,conn,1,3
	if not rs0.eof then
	   sql="select clubuser_id from clubuser where clubuser_name='"&rs0("name")&"'"
	   set rsbz=conn.execute(sql)
	   bzid=rsbz("clubuser_id")
	   rsbz.close
	   if instr(bzname,"|")>0 then
	      bzname=replace(bzname,"|",",")
		  bz=split(bzname,",")
		  bzname=""
          for p=0 to UBound(bz)
		      sql="select clubuser_id from clubuser where clubuser_name='"&bz(p)&"'"
	          set rsbz=server.createobject("adodb.recordset")
              rsbz.open sql,conn,1,3
              if not rsbz.eof then
			  rsbzid=rsbz("clubuser_id")
			  end if
			  rsbz.close
		      if p=UBound(bz) then
			  bzname=bzname&"<a href=home.asp?userid="&rsbzid&" target=""_blank"">"&bz(p)&"</a>"
			  else
              bzname=bzname&"<a href=home.asp?userid="&rsbzid&" target=""_blank"">"&bz(p)&"</a>,"
			  end if
          next
	   else
	      sql="select clubuser_id from clubuser where clubuser_name='"&bzname&"'"
	      set rsbz=server.createobject("adodb.recordset")
          rsbz.open sql,conn,1,3
          if not rsbz.eof then
	      bz_id=rsbz("clubuser_id")
		  end if
	      rsbz.close
	      bzname="<a href=home.asp?userid="&bz_id&" target=""_blank"">"&bzname&"</a>"
	   end if
	%>
                <a href="<%=rs0("htmfilename")%>" target="_blank"><%=rs0("dateh")%></a><br>
                by <a href="home.asp?userid=<%=bzid%>" target="_blank"><%=rs0("name")%></a>&nbsp; 
    <%
	else
	      sql="select clubuser_id from clubuser where clubuser_name='"&bzname&"'"
	      set rsbz=server.createobject("adodb.recordset")
          rsbz.open sql,conn,1,3
          if not rsbz.eof then
	      bz_id=rsbz("clubuser_id")
		  end if
	      rsbz.close
	      bzname="<a href=home.asp?userid="&bz_id&" target=""_blank"">"&bzname&"</a>"
	end if
	%>
              </td>
              <td class="maintbtr1" align="center"><%=bzname%></td>
        </tr>
<%
rs15.movenext
loop
rs15.close
set rs15=nothing		  
%>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
    </table>
	</td>
  </tr>
</table>
<table width="99%" cellspacing="0" cellpadding="1" class="default_list">
    <tr>
    <td>
        <table width="100%" align="center" cellpadding="0" cellspacing="1">
          <tr class="f12bg" align="center"> 
            <td height="25"><div align="left">&nbsp;<strong>论坛及来访信息</strong></div></td>
          </tr>
          <tr> 
            <td height="25" class="maintbtr1">&nbsp;你的系统:&nbsp;<%=GetOpInfo(Request.ServerVariables("HTTP_USER_AGENT"),1)%>&nbsp;<%=GetOpInfo(Request.ServerVariables("HTTP_USER_AGENT"),2)%> 
              你的IP地址:<%=Request.ServerVariables("REMOTE_ADDR")%> </td>
          </tr>
          <tr> 
            <td height="25" class="maintbtr1">&nbsp;在线情况: 
              <script language="JavaScript" src="online.asp?dis=yes&stats=论坛首页"></script></td>
          </tr>
          <tbody id="category_30" style="">
        </table>
	</td>
  </tr>
</table>
  <table width="99%" cellspacing="0" cellpadding="1" class="default_list">
    <tr> 
      <td> <table width="100%" align="center" cellpadding="0" cellspacing="1">
          <tr class="f12bg" align="center"> 
            <td height="25" colspan="5"><div align="left">&nbsp;<strong>论坛图例</strong></div></td>
          </tr>
          <tr> 
            <td width="20%" height="50" class="maintbtr1" align="center"><img src="images/ft1.gif" width="25" height="32" align="absmiddle">允许所有用户访问</td>
            <td width="20%" class="maintbtr1" align="center"><img src="images/ft2.gif" width="25" height="32" align="absmiddle">允许版主管理员访问</td>
            <td width="20%" class="maintbtr1" align="center"><img src="images/ft3.gif" width="25" height="32" align="absmiddle">允许认证用户访问</td>
            <td width="20%" class="maintbtr1" align="center"><img src="images/ft4.gif" width="25" height="32" align="absmiddle">允许注册用户访问</td>
            <td width="20%" class="maintbtr1" align="center"><img src="images/ft5.gif" width="25" height="32" align="absmiddle">论坛被关闭</td>
          </tr>
        </table></td>
    </tr>
  </table>
  <table width="99%" cellspacing="0" cellpadding="1" class="default_list">
    <tr> 
      <td> <table width="100%" align="center" cellpadding="0" cellspacing="1">
          <tr class="f12bg" align="center"> 
            <td height="25"><div align="left">&nbsp;<strong>友情链接</strong></div></td>
          </tr>
          <tr> 
            <td height="25" class="maintbtr1"><table width="100%" border="0" cellspacing="6" cellpadding="0">
                <tr> 
                  <td class="maintbtr3"><script language="JavaScript" src="ftlink.js"></script></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
  </table>
  <!--#include file="inc/bbstail.htm"-->
</center>
</body>
</html>
<%closedb%>