|
|
|
<%
dim pagenumber
pagenumber=trim(request("p"))
if pagenumber="" then
pagenumber=1
end if
if not IsNumeric(pagenumber) then
pagenumber=1
end if
if pagenumber < 1 then
pagenumber=1
end if
dim conn,rs,strsql,i
dim fid,ftitle,fpath
set conn=opendb()
set rs=server.CreateObject("adodb.recordset")
strsql="select * from tb_download order by file_id desc"
rs.open strsql,conn,1,1
rs.pagesize=8
if pagenumber > rs.pagecount then
pagenumber=rs.pagecount
end if
if rs.recordcount > 0 then
rs.absolutepage=pagenumber
end if
for i=1 to 8
if not rs.eof then
%>
<%
rs.movenext
else
%>
<%
end if
next
dim prev
prev=pagenumber - 1
if prev < 1 then
prev=1
end if
%>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
|
|
|
|