<%
dim theact
theact=request("theact")
dim CurrentPage '当前页
dim TotalPages '总页数
MaxPerPage=20
Set rs1= Server.CreateObject ("ADODB.RecordSet")
sql="select * from wsbm order by bm_id desc"
rs1.open sql,conn,1,3
if rs1.eof then
response.Write("")
else
rs1.pagesize=MaxPerPage
If trim(Request("Page"))<>"" then
CurrentPage= CLng(request("Page"))
If CurrentPage> rs1.PageCount then
CurrentPage = rs1.PageCount
End If
Else
CurrentPage= 1
End If
totalPut=rs1.recordcount 'totalput=总记录数
if CurrentPage<>1 then
if (currentPage-1)*MaxPerPage < totalPut then
rs1.move(currentPage-1)*MaxPerPage
end if
end if
do while not rs1.eof and c<20
%>
<%
c=c+1
rs1.movenext
loop
rs1.close
set rs1=nothing
%>