set rs=server.createobject("adodb.recordset")
sql="SELECT * FROM jiudian WHERE (((jiudian.level)='电脑|军事|政治')) order by id desc;"
rs.open sql,conn,1,1
%>
if rs.eof and rs.bof then str="没有任何文章"
if str="" then
rs.pagesize=10
pages=rs.pagecount
records=rs.recordcount
currentpage=request("currentpage")
if currentpage="" or currentpage currentpage=cint(currentpage)
if currentpage>pages then currentpage=pages
rs.absolutepage=currentpage
else
currentpage=1
records=0
pages=1
end if
%>
.
第页 共编 共页
ii=currentpage-5
iii=currentpage+5
if ii < 1 then
ii=1
end if
if iii > pages then
iii=pages
end if
if currentpage > 6 then
%>1 ... end if
for i=ii to iii
If icurrentpage then
%> else
%> end if
next
if pages > currentpage+5 then
%>... end if
%>
笑口常开
社区首页
网站首页
rs.close
set rs=nothing
conn.close
set conn=nothing
%>