|
<%
set rs = server.createobject("adodb.recordset")
sql ="select * from userinfo order by id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<tr><td align=center>暂无记录!</td></tr>"
else
shownum=30 '每页显示的数
totalrecord=rs.recordcount
rs.pagesize=shownum
maxpage=rs.pagecount
requestpage=clng(request.querystring("page"))
if requestpage="" or requestpage=0 then
requestpage=1
end if
if resquestpage>maxpage then
resquestpage=maxpage
end if
if not requestpage=1 then
rs.move (requestpage-1)*rs.pagesize
end if
for i=1 to rs.pagesize and not rs.bof%>
'这里面放循环内容
<%
rs.movenext
if rs.eof then exit for
next
end if
%>
<%
if requestpage-1 mod 10=0 then
p=(requestpage-1) \ 10
else
p=(requestpage-1) \ 10
end if
if requestpage=1 then
response.write "<font face=webdings color=""#FF0000"">9</font> "
else
response.write "<a href=?page=1 title=首页><font face=webdings>9</font></a> "
end if
if p*10>0 then response.write "<a href=?page="&p*10&" title=上一页><font face=webdings>7</font></a> "
response.write "<b>"
for ii=p*10+1 to P*10+10
if ii=requestpage then
response.write "<font color=""#FF0000"">"&ii&"</font> "
else
response.write "<a href=?page="&ii&">"&ii&"</a> "
end if
if ii=maxpage then exit for
next
response.write "</b>"
if ii<maxpage then response.write "<a href=?page="&ii&" title=下一页><font
face=webdings>8</font></a> "
if requestpage=maxpage then
response.write "<font face=webdings color=""#FF0000"">:</font> "
else
response.write "<a href=?page="&maxpage&" title=尾页><font face=webdings>:</font></a> "
end if
response.write" 共有"&maxpage&"页 共"&totalrecord&"个用户 每页"&shownum&"个用户"
%> |
|