SQLStr="select * from [bbs1] where (Solution=1) and (boardID like '"&forum_id&"%') order by DateAndTime DESC"
rs.open SQLStr,conn,1,1
rs.PageSize=10
pagecount=rs.PageCount
cur_page=int(request.QueryString("page"))
if cur_page<=0 then cur_page=1 end if
if request.QueryString("page")="" then cur_page=1 end if
rs.AbsolutePage=cur_page
end if
dim totalput
dim MaxPerPage
dim currentpage
MaxPerPage=10 '这个地方可以改成你想要的每页显示的记录
totalput=rs.recordcount
response.write cstr(totalput)&"篇"
currentpage=0
if (totalput mod MaxPerPage=0) then
currentpage=totalput\MaxPerPage
else
currentpage= totalPut\MaxPerPage + 1
end if
dim i
for i=1 to currentpage
response.write " "
if i=cur_page then
response.write "<font color="&"red"&">"&i&"</font>"
else
response.write "<a href=forum.asp?forum_id="&trim(forum_id)&"&page="&i&" target=_self onclick=javascript:>"&i&"</a>"
end if
next
if rs.eof and rs.bof then
response.write "<tr><td >"
response.write "<font color=red><p align='right'><strong> 还 没 有 任 何 文 章</strong></p></font>"
response.write "</tr></td>"
else
do while not rs.eof
response.write "<a href=tiezi3.asp?ID=<% =trim(rs("AnnounceID"))%>&Solution=<%=rs("Solution")%> target=_blank ><%=rs("Topic")%></a></font><font color="black" size="-1">(<%=trim(rs("Username"))%>)</font></td>"
rs.movenext
loop
SQLStr="select * from [bbs1] where (Solution=1) and (boardID like '"&forum_id&"%') order by DateAndTime DESC"
rs.open SQLStr,conn,1,1
rs.PageSize=10
pagecount=rs.PageCount
cur_page=int(request.QueryString("page"))
if cur_page<=0 then cur_page=1 end if
if request.QueryString("page")="" then cur_page=1 end if
rs.AbsolutePage=cur_page
end if
dim totalput
dim MaxPerPage
dim currentpage
MaxPerPage=10
totalput=rs.recordcount
response.write cstr(totalput)&"篇"
currentpage=0
if (totalput mod MaxPerPage=0) then
currentpage=totalput\MaxPerPage
else
currentpage= totalPut\MaxPerPage + 1
end if
dim i
for i=1 to currentpage
response.write " "
if i=cur_page then
response.write "<font color="&"red"&">"&i&"</font>"
else
response.write "<a href=forum.asp?forum_id="&trim(forum_id)&"&page="&i&" target=_self onclick=javascript:>"&i&"</a>"
end if
next
if rs.eof and rs.bof then
response.write "<tr><td >"
response.write "<font color=red><p align='right'><strong> 还 没 有 任 何 文 章</strong></p></font>"
response.write "</tr></td>"
else
do while not rs.eof
response.write "<a href=tiezi3.asp?ID=<% =trim(rs("AnnounceID"))%>&Solution=<%=rs("Solution")%> target=_blank ><%=rs("Topic")%></a></font><font color="black" size="-1">(<%=trim(rs("Username"))%>)</font></td>"
rs.movenext
loop