|
本站公告:
|
|
» 刷新本页 |
<%
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim sql
dim rs
Const MaxPerPage=10
founderr=false
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
set rs = Server.CreateObject("ADODB.Recordset")
sql="Select id,title,u_name,click,time0,istop From bbs where id>0 and look=0 Order By istop DESC , id DESC"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "没有或没有找到任何信息
"
else
totalPut=rs.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,"index.asp"
else
if (currentPage-1)*MaxPerPage
<% end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write ""%>
<%
end function
%>
|