<!--#include file="conn.asp" -->
<!--#include file="ftbbs_nav.asp" -->
<%
'StarTime = Timer()
on error resume next
if request("exit")="yes" then
   Response.Cookies("bbsuser")=""
   Response.Cookies("name")=""
   Response.Cookies("bz")=""
   Response.Cookies("bbsadmin")=""
   Response.Cookies("payuser")=""
   Response.Cookies("bokeer")=""
   Response.Cookies("clubuser_password")=""
   Response.Cookies("clubuser_id")=""
   response.Redirect("default.asp")
end if

layer_1=request("layer_1")'一级类别
layer_2=request("layer_2")'二级类别

call FTBBS_HTML_MB
getcodeoff=Application("FTBBSMB")(30,0)
onlineoff=Application("FTBBSMB")(33,0)
linkoff=Application("FTBBSMB")(34,0)
defaulthome=Application("FTBBSMB")(31,0)
if request.cookies("ftbbstype")="" then
   Response.Cookies("ftbbstype")=0
   Response.Cookies("ftbbstype").Expires=date+7
end if
homepage=ft_home(defaulthome)

if Application("onlineuser")<0 or Application("onlineuser")="" then
   usernum=0
else
  usernum=Application("onlineuser")
end if

if layer_1="" then
	BBS_Cate_Manager_Name="FTBBS" '总版主
	BBS_Cate_Manager_Email="cht21@163.com"
end if

if layer_1<>"" then	
'一级类别名称
str_BBS_Cate="select top 1 BBS_Cate_Name,BBS_Cate_Manager_Name,BBS_Cate_Manager_Email,BBS_Cate_Topic,BBS_Cate_Reply from BBS_Cate where BBS_Cate_ID='"&layer_1&"' and deleted=0"
set rs_BBS_Cate=server.createobject("adodb.recordset")
rs_BBS_Cate.open str_BBS_Cate,conn,1,1
if rs_BBS_Cate.eof then
	response.write "<center><P><P><P>该论坛已经关闭...</center>"
	response.end
end if

BBS_Cate_Name_1=rs_BBS_Cate("BBS_Cate_Name")'一级类别名称
BBS_Cate_Manager_Name=rs_BBS_Cate("BBS_Cate_Manager_Name")'一级类别板主姓名
BBS_Cate_Manager_Email=rs_BBS_Cate("BBS_Cate_Manager_Email")'一级类别板主email
BBS_Cate_Topic=rs_BBS_Cate("BBS_Cate_Topic")'一级类别主题贴子数
BBS_Cate_Reply=rs_BBS_Cate("BBS_Cate_Reply")'一级类别回复贴子数
rs_BBS_Cate.close
end if
IF layer_2<>"" then
str_BBS_Cate="select top 1 BBS_Cate_Name,BBS_Cate_Manager_Name,BBS_Cate_Manager_Email,BBS_Cate_Topic,BBS_Cate_Reply,BBS_Cate_Board from BBS_Cate where BBS_Cate_ID='"&layer_2&"' and deleted=0"
rs_BBS_Cate.open str_BBS_Cate,conn,1,1
if rs_BBS_Cate.eof then
	response.write "<center><P><P><P>该论坛已经关闭...</center>"
	response.end
end if
BBS_Cate_Board=rs_BBS_Cate("BBS_Cate_Board")
BBS_Cate_Name_2=rs_BBS_Cate("BBS_Cate_Name")
BBS_Cate_Manager_Name=rs_BBS_Cate("BBS_Cate_Manager_Name")
BBS_Cate_Manager_Email=rs_BBS_Cate("BBS_Cate_Manager_Email")
BBS_Cate_Topic=rs_BBS_Cate("BBS_Cate_Topic")
BBS_Cate_Reply=rs_BBS_Cate("BBS_Cate_Reply")
rs_BBS_Cate.close
end if
set rs_BBS_Cate=nothing

qs=request("qs")
if qs="" or qs=4 or qs=5 then qs=0
if qs<>0 then
    if qs=1 and request.cookies("name")="" then
      response.write"<SCRIPT language=JavaScript>alert('该版只有注册用户才能访问！');"
      response.write "window.location.href='userlogin.asp';</script>"
      response.end
	elseif (request.cookies("payuser")<>1 or request.cookies("bbsadmin")<>1) and qs=2 then
      response.write"<SCRIPT language=JavaScript>alert('该版只有认证用户才能访问！');"
      response.write "window.location.href='userlogin.asp';</script>"
      response.end
	elseif (request.cookies("bz")=0 and request.cookies("bbsadmin")=0) and qs=3 then
      response.write"<SCRIPT language=JavaScript>alert('该版只有版主或管理员才能访问！');"
      response.write "window.location.href='userlogin.asp';</script>"
      response.end	
	end if
end if

'以下是新增论坛权限访问的功能
if request.cookies("name")="" then
   strqssql="where BBS_Cate_Qs=1 or BBS_Cate_Qs=2 or BBS_Cate_Qs=3"
else
   if request.cookies("payuser")=1 then
      strqssql="where BBS_Cate_Qs=3"
   elseif request.cookies("bz")=1 or request.cookies("bbsadmin")=1 then
      strqssql=""
   else
      strqssql="where BBS_Cate_Qs=2 or BBS_Cate_Qs=3"
   end if
end if

strqs=""
qssqlstr1=""
qssql="select * from BBS_Cate where BBS_ID in(select MIN(BBS_ID) from BBS_Cate "&strqssql&" group by BBS_Cate_ID) order by BBS_ID asc"
set qsrs=server.createobject("adodb.recordset")
qsrs.open qssql,conn,1,1
if not qsrs.eof and strqssql<>"" then
   qsnum=qsrs.recordcount
  if qsnum>1 then
     i=0
    do while not qsrs.eof
      if i=qsnum-1 then
	        qsbbsx1=qsrs("BBS_Cate_ID")
	  else
            qsbbsx1=qsrs("BBS_Cate_ID")&","
	  end if
	  qsbbs1=qsbbs1&qsbbsx1
      qsrs.movenext
	  i=i+1
    loop
     qsarray1=split(qsbbs1,",")
   for k = 0 to UBound(qsarray1)
     if k=UBound(qsarray1) then
	 qssqlstrx = "Boardid_1<>'" & qsarray1(k) &"' and Boardid_2<>'" & qsarray1(k) &"'"
	 else
	 qssqlstrx = "Boardid_1<>'" & qsarray1(k) &"' and Boardid_2<>'" & qsarray1(k) &"' and "
	 end if
	 qssqlstr1 = qssqlstr1&qssqlstrx
   next
    qssqlstr1 = ""&qssqlstr1'&" and "
 else
    qssqlstr1 = "Boardid_1<>'"&qsrs("BBS_Cate_ID") &"' and Boardid_2<>'"&qsrs("BBS_Cate_ID")&"'" ' &"' and "
 end if
  strqs=qssqlstr1&" and "
end if
qsrs.close
'新增结束
jh=request.QueryString("huati")
tj=request.QueryString("sign")
jhtj=""
jhortj=""
order_key=request("order_key")'排序方式
if order_key="" then
	order_key="bbstop1 desc,bbstop desc,redate"
end if
'**************
'分页导航栏函数
'**************
Function pagination(pagecount,wzcount,wzrep)
   Dim wzpage,wzpagecount,pagenum,boardid
       If Len(Request.QueryString("page"))<>0 Then
          wzpage = clng(Request.QueryString("page"))
         Else 
          wzpage =1
       End If
       If wzpage <= 0 Then wzpage =1
       pagenum = (wzpage \ 10)*10+1
       If wzpage mod 10 = 0 Then pagenum = (wzpage \ 10)*10-9
	        Response.Write ("<table border=""0"" cellspacing=""0"" cellpadding=""0""><tr>"& vbCrLf)
            Response.Write ("<td width=""2""></td><td class=""intd"" title=""主题数"">&nbsp;"& wzcount &"&nbsp;</td>"& vbCrLf)
	        Response.Write ("<td width=""2""></td><td class=""intd"" title=""当前页/总页数"">&nbsp;"&wzpage&"/"& pagecount &"&nbsp;</td>"& vbCrLf)
	        Response.Write ("<td width=""2""></td><td class=""intd"" title=""每页主题数"">&nbsp;"& wzrep &"&nbsp;></td>"& vbCrLf)
	   If wzpage > 10 Then '首页，前十页
	        Response.Write ("<td class=""outtd""><font face=""webdings""><a href=""?page=1&layer_1="&layer_1&"&layer_2="&layer_2&"&huati="&jh&"&sign="&tj&"&searchkind="&searchkind&"&searchcontent="&searchcontent&""" title=""首页""><img src=""images/first.gif"" border=""0""></a></font></td><td width=""2""></td>"& vbCrLf)
			Response.Write ("<td class=""outtd""><font face=""webdings""><a href=""?page="& pagenum-1 &"&layer_1="&layer_1&"&layer_2="&layer_2&"&huati="&jh&"&sign="&tj&"&searchkind="&searchkind&"&searchcontent="&searchcontent&""" title=""前十页""><img src=""images/previous.gif"" border=""0""></a></font></td>"& vbCrLf)
       End If
       For pagenum = pagenum To pagenum + 9
	   
           If pagenum = wzpage Then
		          Response.Write ("<td width=""2""></td><td class=""intd"" title=""当前页"">"& pagenum &"</td>"& vbCrLf)
           Else
		          Response.Write (" <td width=""2""></td><td class=""outtd"" onmouseover=""this.className='intd';"" onmouseout=""this.className='outtd';"">")
				  Response.Write (" <a href=""?page="& pagenum &"&layer_1="&layer_1&"&layer_2="&layer_2&"&huati="&jh&"&sign="&tj&"&searchkind="&searchkind&"&searchcontent="&searchcontent&"""><div style=""width:100%"">"& pagenum &"</div></a></td>"& vbCrLf)
           End If
		  
         If pagenum >= pagecount Then Exit For
       Next
	 If wzpage <= (pagecount - (pagecount mod 10)) Then '后十页,末页
			Response.Write ("<td width=""2""></td><td class=""outtd"" onmouseover=""this.className='outtd';"" onmouseout=""this.className='outtd';""><font face=""webdings""><a href=""?page="& pagenum &"&layer_1="&layer_1&"&layer_2="&layer_2&"&huati="&jh&"&sign="&tj&"&searchkind="&searchkind&"&searchcontent="&searchcontent&"""  title=""后十页""><img src=""images/next.gif"" border=""0""></a></font></td>"& vbCrLf)
            Response.Write ("<td width=""2""></td><td class=""outtd"" onmouseover=""this.className='outtd';"" onmouseout=""this.className='outtd';""><font face=""webdings""><a href=""?page="& pagecount &"&layer_1="&layer_1&"&layer_2="&layer_2&"&huati="&jh&"&sign="&tj&"&searchkind="&searchkind&"&searchcontent="&searchcontent&"""  title=""末页""><img src=""images/last.gif"" border=""0""></a></font></td>"& vbCrLf)
     End If
	 Response.Write (" <td width=""2""></td><td><input class=""inputpage"" name=""page"" type=""text"" size=""3"" onKeyDown=""if(event.keyCode==13) {window.location='?layer_1="&layer_1&"&layer_2="&layer_2&"&huati="&jh&"&sign="&tj&"&searchkind="&searchkind&"&searchcontent="&searchcontent&"&page='+this.value; return false;}""></td>"& vbCrLf)
	 Response.Write ("</tr></table>"& vbCrLf)
End Function

searchcontent=Checkstr(trim(request("searchcontent")))'搜索内容
searchkind=request("searchkind")'搜索类别

if jh="1" then
   jhtj="and huati="&jh
   jhortj=" and huati="&jh
end if
if tj="1" then
   jhtj="and sign="&tj
   jhortj=" and sign="&tj
end if

dim rssql,getstring
'******************************************
dim wzcount,wzrep,wzpage,wzpagecount,wzpagerep,boardstr
wzrep = Application("FTBBSMB")(5,0)
if searchkind="" then'正常浏览方式
	search_str=" "
elseif searchkind="name" then '新增
    if userlogin="N" then
       response.write ""
       response.end
	end if
	search_str=" and name= '"&searchcontent&"' "
end if
'========================================
if layer_1="" then'总论坛
	strsql="select id,Boardid_1,Boardid_2,user_id,name,title,hit,rep,dateh,redate,bbs_img,bbs_img_display,huati,img_url_display,P_display,picture,sign,zhiye,htmfilename,bbstop,bbstop1,titlecolor,boardsign,reinfo from bbstitle where "&strqs&" deleted=0 "&search_str&" "&jhortj&" order by "&order_key&" desc"
else
	if layer_2="" then'一级类别论坛
	   strsql="select id,Boardid_1,Boardid_2,user_id,name,title,hit,rep,dateh,redate,bbs_img,bbs_img_display,huati,img_url_display,P_display,picture,sign,zhiye,htmfilename,bbstop,bbstop1,titlecolor,boardsign,reinfo from bbstitle where "&strqs&" deleted=0 and (boardid_1='"&layer_1&"' or bbstop1=1)"&search_str&" "&jhortj&" order by "&order_key&" desc"
	else'二级类别论坛
	   strsql="select id,Boardid_1,Boardid_2,user_id,name,title,hit,rep,dateh,redate,bbs_img,bbs_img_display,huati,img_url_display,P_display,picture,sign,zhiye,htmfilename,bbstop,bbstop1,titlecolor,boardsign,reinfo from bbstitle where "&strqs&" deleted=0 and ((boardid_1='"&layer_1&"' and boardid_2='"&layer_2&"') or bbstop1=1) "&jhortj&" order by "&order_key&" desc"
	end if
end if
set cus=server.createobject("adodb.recordset")
cus.open strsql,conn,1,1
wzpage = clng(request.querystring("page"))
if len(wzpage) = 0 or wzpage = 0 then wzpage = 1
cus.PageSize=wzrep
cus.AbsolutePage=wzpage
wzpagecount=cus.PageCount
wzcount=cus.RecordCount
%>
<HTML><HEAD>
<title></title>
<META http-equiv=Content-Type content=text/html;charset=gb2312>
<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>
</HEAD>
<SCRIPT LANGUAGE="VBScript"> 
<!--
Sub order_key_OnChange
	if document.jump.order_key.value <> "" then
		document.jump.action = "main.asp?layer_1=<%=layer_1%>&layer_2=<%=layer_2%>&order_key="&document.jump.order_key.value&"&Searchkind=<%=Searchkind%>&Searchcontent=<%=Searchcontent%>"
		jump.submit
	end if
End Sub
-->
</SCRIPT>

<script>
function changeCssStyle()
{
	var sCssType = document.all.select3.value;
	setCookie("STYLESHOW", sCssType);
	//window.navigate("default.asp");
    window.location.href='main.asp';
    parent.left.document.location.reload();
}
</script>
</head>
<body>
<script>
var stylecook = getCookie("STYLESHOW");
var style;
var tmpstylecook;
function setcookies()
{
 tmpstylecook = stylecook;
}

function  reloadcook()
{
   var scooks = getCookie("STYLESHOW");
   if(scooks != tmpstylecook)
   {
 	window.location.reload();
   }
}
setcookies();
setInterval('reloadcook()',1000);
</script>
<%if request.cookies("ftbbstype")=1 then%>
<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>
<%end if%>
<table width="99%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td> 
      <table width="100%" border=0 cellpadding=2 cellspacing=1 class="maintbbg">
        <tbody>
          <tr> 
            <td height="25" class="f12bg">&nbsp;<%=userinfo%></td>
          </tr>
          <tr>
            <td height="26" class="maintbtr3"><table width="100%" border=0 cellpadding=0 cellspacing=0>
                <tbody>
                  <tr> 
                    <td width="60%" class=f12><img src="images/bbs_t1.gif" align="absmiddle"> 
                      <%if layer_1<>"" then%>
                      <a href="<%=homepage%>">论坛首页</a>>><a href="main.asp?layer_1=<%=layer_1%>&qs=<%=qs%>"><%=BBS_Cate_Name_1%></a> 
                      <%if layer_2<>"" then%>
                      >> <%=BBS_Cate_Name_2%> 
                      <%end if%>
                      <%else%>
                      <a href="<%=homepage%>">论坛首页</a> 
                      <%end if%>
                      <%
					  if BBS_Cate_Name_1="" then
					     stats="论坛首页"
					  else
					     if BBS_Cate_Name_2="" then
					     stats=BBS_Cate_Name_1
						 else
						 stats=BBS_Cate_Name_2
						 end if
					  end if
					  %>
                    </td>
                    <td width="27%" class=f12><div align="right">版主:<%=BBS_Cate_Manager_Name%> 
                      </div></td>
                    <td width="13%" class=f12>
					  <div align="right"><a href="bz.asp">版主工作评定</a></div></td>
                  </tr>
                </tbody>
              </table></td>
          </tr>
        </tbody>
      </table>
<script src="listad.js"></script>  
<%if BBS_Cate_Board<>"" then%>	  
<table width="100%" border="0" align="center" cellpadding="0">
  <tr> 
    <td height=2><spacer height="2" type="block"></td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="maintbbg">
  <tr> 
    <td class="maintbtr3"><table width="100%" border="0" cellspacing="3" cellpadding="3">
        <tr> 
         <td class="maintbtr2"><font color="#FF3333">版 规 和 导 读:</font></td>
        </tr>
		<tr> 
           <td class="maintbtr3" style=" LINE-HEIGHT: 160%"><%=BBS_Cate_Board%></td>
        </tr>
      </table></td>
  </tr>
</table>
<%end if%>
      <table cellspacing=0 cellpadding=0 width="100%" border=0>
        <tbody> 
        <tr> 
            <td width="30%" height="35"><a href="fbht.asp?layer_1=<%=request("layer_1")%>&layer_2=<%=request("layer_2")%>"><img src="images/btn_post.gif" width="61" height="21" border="0" align="absmiddle"></a>&nbsp;<a href="bbspoll.asp?layer_1=<%=request("layer_1")%>&layer_2=<%=request("layer_2")%>"><img src="images/btn_poll.gif" width="61" height="21" border="0" align="absmiddle"></a>&nbsp;</td>
          <FORM METHOD=POST ACTION="main.asp" onSubmit="return check_search(this)">
              <td width="52%" align=right valign="middle"> 
                <div align="right"> 
                  <div class="f12"><img src="images/jing.gif" width="15" height="13" align="absmiddle"> 
                    <a href="main.asp?layer_1=<%=layer_1%>&layer_2=<%=layer_2%>&huati=1">精华贴</a> 
                    <img src="images/jian.gif" width="15" height="13" align="absmiddle"> 
                    <a href="main.asp?layer_1=<%=layer_1%>&layer_2=<%=layer_2%>&sign=1">推荐贴</a> 
                    <%if request.cookies("ftbbstype")=1 then%>
                    <a href="default.asp?a=<%=layer_1%>&b=<%=layer_2%>&qs=<%=qs%>&ft=0" target="_top">框架结构浏览</a> 
                    <%else%>
                    <a href="default.asp?a=<%=layer_1%>&b=<%=layer_2%>&qs=<%=qs%>&ft=1" target="_top">平板结构浏览</a> 
                    <%end if%>
                    <select name=select3  style="background-color:#ffffff;FONT-FAMILY: Arial; FONT-SIZE: 9pt; FONT-STYLE: normal; WIDTH: 85px" size=1 onChange="javascript:changeCssStyle();">
        <option value="0" style="color:66ABD9">■浅蓝风格</option>
        <option value="4" style="color:#EC8205">■黄色风格</option>
      </select>
	  </div></div></td>
          </form>
          <form name="jump" method="post" action="">     
            <td width="18%" valign="middle" class="f12"> 
              <div align="right">排序:<select name="order_key" style="background-color:#ffffff;FONT-FAMILY: Arial; FONT-SIZE: 9pt; FONT-STYLE: normal; WIDTH: 75px">
                  <option value="dateh" <%if order_key="dateh" then%>selected<%end if%>>发帖时间 
                  <option value="redate" <%if order_key="redate" then%>selected<%end if%> >跟帖时间 
                  <option value="hit" <%if order_key="hit" then%>selected<%end if%>>浏览量 
                  <option value="rep" <%if order_key="rep" then%>selected<%end if%>>跟帖数 
                </select>
                  <input name="layer_2" type="hidden" id="layer_2" value="<%=layer_2%>">
				  <input name="layer_1" type="hidden" id="layer_1" value="<%=layer_1%>">
                </div>
            </td>
          </form>
        </tr>
        </tbody> 
      </table>
      <table width="100%" border=0 cellpadding=2 cellspacing=1 class="maintbbg" align="center">
        <tbody>
          <tr valign="top"> 
            <td colspan="7" class="maintbtr1"> <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr>
				  <td align="left" height="23" class="f12"><%= pagination(wzpagecount,wzcount,wzrep)%></td> 
                  <td align="right" width="200" class="f12">
					  <table cellspacing=1 cellpadding=1 style="font-family: Tahoma, Verdana;BORDER: #8C8E7B 1px solid;background:#FFFFFF;">
                        <tr> 
                          <td style="background:#FF6500;font-size: 7pt;color:#ffffff;">&nbsp;XML&nbsp;</td>
                            <td style="background:#8C8E7B;font-size: 7pt;">&nbsp;<a href="rss.asp?layer_1=<%=layer_1%>&layer_2=<%=layer_2%>" target="_blank" title="订阅本版面最新帖子"><font color='#ffffff'>RSS 
                              2.0</font></a>&nbsp;</td>
                        </tr>
                      </table>
				  </td>
                </tr>
              </table></td>
          </tr>
          <tr align=middle class=f12> 
            <td width="6%" height="25" class="f12bg">状态</td>
            <td width="50%" class="f12bg" >论坛主题</td>
            <td width="9%" class="f12bg" >作者</td>
            <td width="6%" class="f12bg" >回复</td>
            <td width="6%" class="f12bg" >点击</td>
            <td width="25%" class="f12bg" >最后更新</td>
          </tr>
<script src="bbsad.js"></script>
<%
if not cus.eof then
   dim i,bgcolor
  for i = 0 to wzrep-1
    if cus.eof then exit for
    bgColor="#FFFFFF"
    if i mod 2=0 then bgColor="#DFEFFF"	
	indbdate=cus("redate")
	year1=right(year(indbdate),2)
	month1=right("0"&month(indbdate),2)
	day1=right("0"&day(indbdate),2)
	hour1=right("0"&hour(indbdate),2)
	minute1=right("0"&minute(indbdate),2)
	indbdate=year1&"-"&month1&"-"&day1&" "&hour1&":"&minute1
	titlecolor=cus("titlecolor")
	bbstitle=cus("title")
	if titlecolor<>"" then
	title="<font color="&titlecolor&">"&bbstitle&"</font>"
	else
	title=bbstitle
	end if
	reinfo=cus("reinfo")
	if instr(reinfo,"||")>0 then
	rearr=split(reinfo,"||")
	arrnum=UBound(rearr)
	reinfo=rearr(arrnum)
	end if
	if reinfo<>"" and instr(reinfo,",")>0 then
	reinfo=replace(reinfo,"|","")
	rearr=split(reinfo,",")
	replydate=rearr(0)
	replyuser="<font color=red>|</font><a class=map href=ftbbsmyinfo.asp?ftbbsuser="&rearr(1)&">"&rearr(1)&"</a>"
	replydate=right(year(replydate),2)&"-"&month(replydate)&"-"&day(replydate)&" "&hour(replydate)&":"&minute(replydate)
	else
	replydate=indbdate
	replyuser=""
	end if
%>
          <tr align=middle> 
            <td width="4%" height="28" class="maintbtr1"> 
              <%if cus("bbstop1")="1" then
              response.write "<a class=f14 href=""ftbbs.asp?id="&cus("id")&""" target=""_blank""><img src=""images/ding.gif"" alt=""总固顶的主题&#xA;点击开新窗口浏览"" width=""15"" height=""13"" border=""0"" align=""absmiddle"" board=0></a>"
              elseif cus("bbstop")="1" then
              response.write "<a class=f14 href=""ftbbs.asp?id="&cus("id")&""" target=""_blank""><img src=""images/blueding.gif"" width=""15"" height=""13"" align=""absmiddle"" border=""0"" alt=""分论坛固顶的主题&#xA;点击开新窗口浏览""></a>" 
              elseif cus("sign")="1" then
              response.write "<a class=f14 href=""ftbbs.asp?id="&cus("id")&""" target=""_blank""><img src=""images/jian.gif"" width=""15"" height=""13"" align=""absmiddle"" border=""0"" alt=""版主推荐的话题&#xA;点击开新窗口浏览""></a>" 
              elseif cus("huati")="1" then
              response.write "<a class=f14 href=""ftbbs.asp?id="&cus("id")&""" target=""_blank""><img src=""images/jing.gif"" width=""15"" height=""13"" align=""absmiddle"" border=""0"" alt=""版主精选的话题&#xA;点击开新窗口浏览""></a>" 
              elseif cus("P_display")="0" then
              response.write "<a class=f14 href=""ftbbs.asp?id="&cus("id")&""" target=""_blank""><img src=""images/suo.gif"" width=""12"" height=""13"" align=""absmiddle"" border=""0"" alt=""分论坛固顶的主题&#xA;点击开新窗口浏览""></a>" 
              elseif cus("hit")>=500 then
              response.write "<a class=f14 href=""ftbbs.asp?id="&cus("id")&""" target=""_blank""><img src=""images/hotpost.gif"" width=""14"" height=""16"" align=""absmiddle"" border=""0"" alt=""热门的话题&#xA;点击开新窗口浏览""></a>" 
              else
              response.write "<a class=f14 href=""ftbbs.asp?id="&cus("id")&""" target=""_blank""><img src=""images/normal.gif"" width=""14"" height=""16"" align=""absmiddle"" border=""0"" alt=""开放的话题&#xA;点击开新窗口浏览""></a>" 
              end if%>
            </td>
            <td width="52%"  align=left valign="middle" class="maintbtr2"> 
              <%if cus("zhiye")="10" then%>
              <img src="images/rar.gif" width="16" height="16" align="absmiddle"> 
              <%end if%>
              <%if cus("P_display")<>"0" and cus("bbstop")<>1 and cus("sign")<>"1" and cus("huati")<>"1" and cus("zhiye")<>"10" and cus("picture")<>"" then%>
              <img src="images/<%=cus("picture")%>" width="19" height="19" align="absmiddle"> 
              <%end if%>
              <a class=f14 href="ftbbs.asp?id=<%=cus("id")%>" title="<%=cus("title")%>&#xA;作者:<%=cus("user_id")%>&#xA;发表于:<%=indbdate%>" target="_blank"><%=title%></a> 
              <%
			  if cus("bbs_img_display")=1 then
              response.write "<img src=""images/picflag.gif"" width=""13"" height=""13"" align=""absmiddle"" alt=""附带图片"">" 
              end if
			  pagenum=Application("FTBBSMB")(6,0)
              k=cus("rep")/pagenum
			  if int(k)=k then
   			  page=k
			  else
   			  page=int(k)+1
			  end if
			  if page>1 then
			    response.write "["
			    for z=1 to page
				   if z>=4 and page>6 then
				      response.write "..<a href=ftbbs.asp?id="&cus("id")&"&page="&page&"><font color=red>"&page&"</font></a>"    
				      exit for
				   end if
				   if z=1 then
				   response.write "<a href=ftbbs.asp?id="&cus("id")&"&page="&z&"><font color=red>"&z&"</font></a> "
				   else
				   response.write " <a href=ftbbs.asp?id="&cus("id")&"&page="&z&"><font color=red>"&z&"</font></a>"
				   end if
				next
				response.write "]"
			  end if
			  %>
            </td>
            <td width="7%" class="maintbtr1"><a href="ftbbsmyinfo.asp?ftbbsuser=<%=cus("user_id")%>"><%=cus("user_id")%></a></td>
            <td width="5%" class="maintbtr3"> <%=cus("rep")%></td>
            <td width="6%" class="maintbtr3"><%=cus("hit")%></td>
            <td width="25%" class="maintbtr3"><div align="left"><%response.write replydate&replyuser%></div></td>
          </tr>
          <%
cus.movenext
next
%>
          <tr valign="top"> 
            <td colspan="7" class="maintbtr1"> <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr>
				  <td align="left" height="23" class="f12"><%= pagination(wzpagecount,wzcount,wzrep)%></td> 
                  <td align="right" width="200" class="f12"><script src="ftbbsdh.js"></script></td>
                </tr>
              </table></td>
          </tr>
          <%else%>
          <tr class="maintbtr3"> 
            <td colspan=7 align=center height=25 class="f12"> 欢迎到本论坛发表贴子！ </td>
          </tr>
          <%end if%>
        </tbody>
      </table>
    </td>
  </tr>
  <tr> 
    <td height=5><spacer height="5" type="block"></td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" class="maintbbg">
  <tr> 
    <td height=25 class="f12bg">&nbsp;-=&gt; 帖子图例</td>
  </tr>
  <tr> 
    <td height="28" class="maintbtr3"><table width="100%" border="0" cellspacing="6" cellpadding="0">
        <tr> 
          <td width="16%" height="25" class="maintbtr3"><img src="images/normal.gif" width="14" height="16" border="0" align="absmiddle" board=0> 
            开放的话题</td>
          <td width="16%" class="maintbtr3"><img src="images/hotpost.gif" width="14" height="16" border="0" align="absmiddle" board=0> 
            热门的话题</td>
          <td width="16%" class="maintbtr3"><img src="images/suo.gif" width="12" height="13" border="0" align="absmiddle" board=0> 
            锁定的话题</td>
          <td width="16%" class="maintbtr3"><img src="images/jing.gif" width="15" height="13" border="0" align="absmiddle" board=0> 
            精华的话题</td>
          <td width="15%" class="maintbtr3"><img src="images/jian.gif" width="15" height="13" border="0" align="absmiddle" board=0> 
            推荐的话题</td>
          <td class="maintbtr3"><img src="images/ding.gif" width="15" height="13" border="0" align="absmiddle" board=0> 
            <img src="images/blueding.gif" width="15" height="13" border="0" align="absmiddle" board=0> 
            总,版固顶话题 </td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr> 
    <td height=5><spacer height="5" type="block"></td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" class="maintbbg">
<%if onlineoff=0 then%>
  <tr> 
    <td height=25 class="f12bg">&nbsp;在线用户:
<script language="JavaScript" src="online.asp?dis=yes&stats=<%=stats%>"></script>
	  </td>
  </tr>
  <%end if%>
  <%if linkoff=0 then%>
  <tr> 
    <td height="28" class="maintbtr3"><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>
  <%end if%>
</table>
<script>
if(stylecook=='' || stylecook == '0' )
{
stylecook=0;
}
document.all.select3.value=stylecook;
</script>
<!--#include file="inc/bbstail.htm"-->
<%CloseDb%>