<% Const MaxPerPage=20 if not isempty(request("page")) then currentPage=cint(request("page")) else currentPage=1 end if set rs1=Server.CreateObject("Adodb.Recordset") sql = "select * from xxwj order by fwrq desc" rs1.open sql, conn, 1,1 'if rs1.bof and rs1.eof then 'response.write "没有文件" 'else totalPut=rs1.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*MaxPerPage>totalput then if (totalPut mod MaxPerPage)=0 then currentpage= totalPut \ MaxPerPage else currentpage= totalPut \ MaxPerPage + 1 end if end if if currentPage=1 then showContent showpage totalput,MaxPerPage,"xxwjlist.asp" else if (currentPage-1)*MaxPerPage 关闭本窗口

 

管理类文件归档整理规程

  

 


<% function showpage(totalnumber,maxperpage,filename) response.write "

" dim n if totalnumber mod maxperpage=0 then n= totalnumber \ maxperpage else n= totalnumber \ maxperpage+1 end if response.write "
" if CurrentPage<2 then response.write "共"&totalnumber&"篇 首页 上一页 " else response.write ""&totalnumber&"个 首页 " response.write "上一页 " end if if n-currentpage<1 then response.write "下一页 尾页" else response.write "" response.write "下一页 尾页" end if response.write " 页次:"&CurrentPage&"/"&n&"页 " response.write " "&maxperpage&"篇文章/页 " response.write "

" end function set rs1=nothing %>