level 1
代码
<!--# include file="conn.asp"-->
<html>
<head>
<title>留言板</title>
</head>
<body>
<h2 align="center">留言板</h2>
<table width="80%" align="center">
<tr>
<td><a href="input.htm">签写新留言</a></td>
</tr>
</table>
<%
dim sql,page,n
page=clng(request.querystring("page"))
sql="select * from tguest order by id desc"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write("没有任何留言。")
response.end()
end if
n=5
rs.pagesize=n
if page<=1 then page=1
if page>rs.pagecount then page=rs.pagecount
rs.absolutepage=page
do while not rs.eof and n>0
%>
<table width="80%" align="center">
<tr>
<td co
lsp
an=3><hr></td></tr>
<tr>
<td width="20%">主题</td>
<td width="50%"><b><%=rs("title")%></b></td>
<td width="30%"><a href="delete.asp? id=<%=rs("id")%>"title="版主专用">管理</a></td></tr>
<tr>
<td>内容</td>
<td colspan=2><%=rs("body")%></td></tr>
<tr>
<td>留言人</td>
<td colspan=2><a href="mailto:<%=rs("email")%>"title="给作者发信"><%=rs("author")%></a></td></tr>
<tr>
<td>时间</td>
<td colspan=2><%=rs("submit_date")%></td></tr>
</table>
<%
rs.movenext
n=n-1
loop
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
<hr width="80%"noshade size="1">
<div align="center"><a href=guestbook.asp? page=<%=page-1%>>上一页</a>
<a href=guestbook.asp? page=<%=page+1%>>下一页</a>
</div>
</body>
</html>
2019年05月15日 14点05分