function ConfirmDel()
{
if(confirm("确定要删除此记录吗?"))
return true;
else
return false;
}
留言管理
const MaxPerPage=5 '分页显示的纪录个数
dim sql
dim rs
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
set rs=server.createobject("adodb.recordset")
sql="select * from Feedback order by id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "还没有任何留言!"
else
totalPut=rs.recordcount
if currentpage 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
showpages
showContent
showpages
else
if (currentPage-1)*MaxPerPage rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpages
showContent
showpages
else
currentPage=1
showContent
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
sub showContent
dim i
i=0
do while not (rs.eof or err) %>
[管理员公告]
用户名
删除
response.write "回复"
%>
公司名称
联系人
联系电话
联系传真
E-mail
手机
主 题
[]
内 容
回复内容
if i>=MaxPerPage then exit do
rs.movenext
loop
end sub
sub showpages()
dim n
if (totalPut mod MaxPerPage)=0 then
n= totalPut \ MaxPerPage
else
n= totalPut \ MaxPerPage + 1
end if
if n=1 then
exit sub
end if
dim k
response.write ">> 留言分页 "
for k=1 to n
if k=currentPage then
response.write "["+Cstr(k)+"] "
else
response.write "["+""+Cstr(k)+"] "
end if
next
end sub
%>