<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from bbs order by hfdate desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>
对不起,目前还没有此类信息!
<%
else
dim maxperpage
dim sql
dim r
dim gstbookid
dim totalput
dim currentpage
dim totalpages
filename="bbs.asp"
if not isempty(request("page")) then
currentpage=cint(request("page"))
else
currentpage=1
end if
rs.pagesize=3
totalput=rs.recordcount
totalpage=rs.pagecount
maxperpage=rs.pagesize
if currentpage<1 then
currentpage=1
end if
if currentpage>totalpage then
currentpage=totalpage
end if
if currentpage=1 then
showcontent
showpages1
else
if (currentpage-1)*maxperpage<totalput then
rs.move (currentpage-1)*maxperpage
dim bookmark
bookmark=rs.bookmark
showcontent
showpages1
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
%>
</div>
<%
sub showcontent
dim i,j