[CODE]rs.open sql,conn,1,1
listnum=20
if not rs.eof then
if num=0 then
Rs.pagesize=listnum
ppp=Request("page")
if not isnumeric(ppp) then
ppp=1
end if
if ppp<1 then
ppp=1
end if
page=ppp
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs.absolutepage=page
'编号的实现
j=rs.recordcount
j=j-(page-1)*listnum%>
<%i=0
nn=ppp
if nn="" then
n=0
else
nn=nn-1
n=listnum*nn
end if
do while not rs.eof and i<listNum
……
rs.movenext
i=i+1
loop
filename="?id="&idstr&"&"
str=str&"<div align=center>共<strong><font color=FF6C00>"&rs.recordcount&"</font></strong>条信息 共<strong><font color=FF6C00>"&Rs.pagecount&"</font></strong>页 "
if left(filename,1)<>"?" THEN
filename=filename&"?"
end if
if page=1 then
else
str=str&"<a href="&filename&"><font face=""webdings"">9</font></a>"
str=str&"<a href="&filename&"page="&page-1&"><font face=""webdings"">7</font></a> "
end if
if page-1>0 then
str=str&"<a href="&filename&"page="&(page-1)&">["&(page-1)&"]</a> "
end if
if Rs.pagecount=1 then
else
str=str&"["&page&"] "
end if
if Rs.pagecount-page <> 0 then
str=str&"<a href="&filename&"page="&(page+1)&">["&(page+1)&"]</a> "
str=str&"<a href="&filename&"page="&(page+1)&"><font face=""webdings"">8</font></a> "
str=str&"<a href="&filename&"page="&Rs.pagecount&"><font face=""webdings"">:</font></a> "
end if
str=str&"</div>"
end if[/CODE]