|
|
 |
 |
| |
|
<%'开始分页
Const MaxPerPage=10
dim totalPut
dim CurrentPage
dim TotalPages
dim j
dim sql
if Not isempty(request("page")) then
currentPage=Cint(request("page"))
else
currentPage=1
end if
set rs=server.CreateObject("adodb.recordset")
action=request.QueryString("action")
id=request.Form("select")
if request.form("name")="" then
rs.open "select * from message order by id desc",conn,1,1
else
rs.open "select * from message where name like '%"&trim(request.form("name"))&"%' " ,conn,1,1
end if
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,"deletemail.asp"
else
if (currentPage-1)*MaxPerPage
|
![]() |
<%
do while not rs.eof
%>
|
<%
if i<10 then
response.Write "0"&i
else
response.Write i
end if
%>
|
|
<%=Rs("name")%> |
<%=Rs("submittime")%> |
<%=Rs("click")%> |
|
<% if Rs("reply")=1 then %>
|
 |
|
Admin |
<%=Rs("submittime")%> |
|
|
<% end if %>
<%i=i+1
if i>=MaxPerPage then Exit Do
rs.movenext
loop
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
| |
<%
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
filename="feedback.asp"
Response.Write " "
End Function
%>
|
|
|
|
|