<%
sub showonepage(rs)
response.Write("<center><table border=1 width=575>")
response.Write("<tr bgcolor=pink>")
for i = 1 to rs.Fields.Count-1
response.Write("<td width=144>" &
rs.fields(i).name &
"</td>")
next
response.Write("</tr>")
rs.AbsolutePage = page
for iPage = 1 to rs.RecordCount
response.Write("<tr>")
for i = 1 to rs.Fields.Count-1
response.Write ("<td>" &
rs.fields(i).Value &
"</td>")
next
response.Write("</tr>")
rs.MoveNext
if rs.EOF then
exit for
end if
next
response.Write("</table></center>")
end sub
dim rs,exec,conn
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("data/data.mdb")
exec="select * from message"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,3
%>
<html>
<!--#include file=onepage.asp -->
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
</head>
<body>
<!--#include file=top.asp -->
<table width="775" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100" height="404" align="center" valign="top" bgcolor=#ffcf60>
</td>
<td width="575" height="404" align="center" valign="top">
<br>
<strong><font color=#808000 size=4>留言记录</font></strong>
<br><br>
<% if rs.RecordCount = 0 then
%>
<script language="vbscript">
MsgBox"暂时没有留言",48,"confirm"
</script>
<% else
showonepage rs
end if
%>
</td>
<td width="100" height="404" align="center" valign="top" bgcolor=#ffcf60>
</td>
</tr>
<!--#include file=end.
asp -->
<p>&nbsp;
</p>
</body>
</html>