%
DIM sql,rs,articleperpage
sql="select top 10 articleid,title,classid,updatetime from pe_article where classid=100 order by articleid desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
articleperpage=10
%>
<%
dim totalart,i,showye,j,page
if not rs.eof then
rs.movefirst
rs.pagesize=articleperpage
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rs.pagecount then
currentpage=rs.pagecount
end if
else
currentpage=1
end if
totalart=rs.recordcount
if currentpage<>1 then
if(currentpage-1)*articleperpage