<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->

<%
call head()




dim bbsid
bbsid=trim(request.querystring("bbsid"))
if bbsid="" or IsNumeric(bbsid)=False then
Call Error("<card title=""出错""><p>ID无效!")
End if
dim bbsname
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select name from ydbbs where id="&bbsid,conn,1,1
if rs.eof then
rs.close
set rs=nothing
Call Error("<card title=""出错""><p>论坛不存在!")
End if
bbsname=rs("name")
rs.close
set rs=nothing

Call saycarda("["&bbsname&"]专题")


Response.write "<a href=""board.asp?bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&""">返回本版</a><br/>"&chr(13)
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select id,title from bbszt where bbsid="&bbsid&" order by pid asc",conn,1,1
If Not rs.eof Then
	Dim PageSize,i
	PageSize=10						
	Dim Count,page,pagecount,gopage			
	gopage="bbszt.asp?bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;"
	Count=rs.recordcount	
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1		
	pagecount=(count+pagesize-1)\pagesize	
        if page>pagecount then page=pagecount
	rs.move(pagesize*(page-1))
	For i=1 To PageSize     						
	If rs.eof Then Exit For
   Response.write ""&i+(page-1)*PageSize&"."
   Response.write "<a href=""ztlist.asp?bbsid="&bbsid&"&amp;id="&rs("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">"&ubb(rs("title"))&"</a>"
   if keys=1 or skey=abs(bbsid) or keys=2 then
   Response.write "<br/><a href=""ztedit.asp?bbsid="&bbsid&"&amp;id="&rs("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">编辑</a>"&chr(13)
   Response.write "<a href=""ztdel.asp?bbsid="&bbsid&"&amp;id="&rs("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">删除</a>"
   END IF
   Response.write "<br/>"

	rs.moveNext
 	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下页</a>"
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上页</a>"
	if pagecount>1 then response.write "<br/><b>"&page&"</b>/"&pagecount&"页<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">跳转</a><br/>"
Else
   Response.write "暂无分类专题！<br/>"
end if
rs.close
set rs=nothing
conn.close
set conn=Nothing
Response.write "---------<br/>"
   if keys=1 or skey=abs(bbsid) or adminzone=abs(bbsid) or keys=2 then
Response.write "<a href=""ztadd.asp?bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&""">添加专题</a><br/>"
   END IF
Response.write "<a href=""board.asp?bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&""">返回本版</a>"%>
<!--#include file="fanhui.asp"-->
<%Call headsay()%>