<%
const MaxPerPage=5
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim typename
filename="liuyan.asp"
typename="用户信息反馈"
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<p>
<%
dim sql
dim rs
sql="select * from liuyan order by id desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>还没有人来留言!</p>"
else
response.write "<center>"&"<font color=blue>"&"留言列表"&"</font>"&"</center>"
totalPut=rs.recordcount
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
showpage totalput,MaxPerPage,"liuyan.asp"
showContent
showpage totalput,MaxPerPage,"liuyan.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"liuyan.asp"
showContent
showpage totalput,MaxPerPage,"liuyan.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"index.asp"
showContent
showpage totalput,MaxPerPage,"index.asp"
end if
end if
rs.close
end if
<% if ((iRec/40)=Int(iRec/40) then %>
<% Response.write("</table><br><br><br><table border=1 cellspacing=0 cellpadding=3 ><tr ><td width=30>序号</td><td width=50>xx</td><td width=60>xxxx</td><td width=60>xxx</td>...")
end if
%>