www.gusucode.com > ASP+ACCESS中学网站设计与实现(论文+源代码+开题报告+任务书) > ASP+ACCESS中学网站设计与实现(论文+源代码+开题报告+任务书)\ASP001中学网站设计与实现\zxweb\lyb\singleview.asp
<%@ language=VBScript %> <!--#include file="setup.asp"--> <% on error resume next '找不到留言资料时忽略错误 Set Rs1 = Server.CreateObject("ADODB.Recordset") sql1="select * from admin" Rs1.open sql,conn,3,2 if date <> today_time then Rs1("today_count") = 0 end if Rs1("today_time") = date Rs1.update Rs1.close set Rs1 = nothing sql="select * from gbook where idlock=0 and id=" & request.querystring("link_id") set Rs = Server.CreateObject("ADODB.Recordset") Rs.open sql,conn,1,1 Rs.pagesize=pagesize page=Request("page") if (page-Rs.pagecount) > 0 then page=Rs.pagecount elseif page = "" or page < 1 then page = 1 end if Rs.absolutepage=page %> <html> <head> <title>浏览留言</title> <link rel="stylesheet" href="images/gbook.css"> </head> <!--#include file="inctop.asp"--><body topmargin=0 background="images/bihaibg.jpg" vlink="#000000" link="#000000" alink="#000000" text="#000000"> <div align="center"><img src="images/logo.jpg" width="751" height="110"></div> <table width=754 height="27" border=0 align="center" cellpadding=0 cellspacing=1 background="images/dh.gif" style="border: 1px solid #CCCCCC;"> <tr> <td width="510" height="27"> <img src="images/arrow3.gif" align=absmiddle width="29" height="11"> 您的位置: <a href="../../index.htm"><font color="#6600FF">江苏省铁富高级中学</font></a> >> <a href=index.asp>留言本首页</a></td> <td width="245"> <DIV align=center>【<a href="index.asp"><font color="#FF6600">查看留言</font></a>】 【<a href="write.asp"><font color="#FF6666">签写留言</font></a>】 【<a href="login.asp"><font color="#FF0000">管理员</font></a>】</DIV> </td> </tr> </table> <br> <table width="750" height="73" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#99CCFF" > <tr> <td width="750" valign="top" style="border: 1px solid #CCCCCC;"> <% do while not Rs.eof i = i + 1 if i > Rs.pagesize then exit do end if ips=split(rs("ip"),".") ip=""&ips(0)&"."&ips(1)&".*.*" %> <table width=100% height=183 border=0 align=center cellPadding=3 cellSpacing=1 bgcolor=#99CCFF> <tr> <td height="26" colspan="2" background="images/title.gif" bgcolor=#efefef> <table width="99%" height="18" border="0" align="right" cellpadding="0" cellspacing="0"> <tr> <td width="50%" height="18"><font color="#006600"> 留言主题:</font><%=Rs("zt")%> </td> <td width="50%"> 【<a href="write.asp">签写留言</a>】 发表日期<img src="images/posttime.gif" border="0" align=absmiddle>:<%=Rs("addtime")%> </td> </tr> </table></td> <tr > <td width="20%" height="154" align="center" valign='top' bgcolor=#FFFFF0><img src=<%=Rs("face")%> ><br> <br> 【留言者名字】<br> <%=Rs("username")%> </td> <td width="80%" valign='top' bgcolor=#f7f7f7><table width="100%" height="148" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="53" valign="top" background="images/bg2.gif" bgcolor="#FFFFFF"> <table width=100% border=0 cellspacing=0 cellpadding=0 align=center> <tr> <td height=20 background=images/tdbg_left2.gif><%=Rs("username")%>说:<img src=<%=Rs("brow")%> align=absmiddle></td> </tr> </table> <%=Rs("body")%> </td> </tr> <tr> <td height="20" background="images/bg2.gif" bgcolor="#FFFFFF"> <% sql = "select * from reply where replyid="& Rs("id") &" order by id desc" set Rss = Server.CreateObject("ADODB.Recordset") Rss.open sql,conn,1,1 do while not Rss.eof %> <font color=#006633> <hr align="center" width="99%" color="#B4C9E7" size="1"> [管理员回复:] <br> <%=Rss("reply")%> (<%=Rss("replytime")%>) </font> <% Rss.movenext loop Rss.close set Rss = nothing %> </td> </tr> <tr> <td height="20" valign="bottom"><a href='mailto:<%=Rs("email")%>' title=给<%=Rs("username")%>发信> </a> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="1" bgcolor="#bbbbbb"></td> </tr> <tr> <td height="20" bgcolor="#FFFFf0"> <div align="right"><a href='mailto:<%=Rs("email")%>' title=给<%=Rs("username")%>发信> <img border=0 src=images/mail.gif> </a> <a href=<%=Rs("homeurl")%> target=_blank title=访问<%=Rs("username")%>的主页><img border=0 src=images/home.gif> </a> <img alt=<%=Rs("username")%>的QQ号码:<%=Rs("qq")%> src=images/qq.gif> <img align=absmiddle alt=<%=Rs("username")%>的IP地址是:<%=ip%> border=0 src=images/ip.gif > <a href=reply.asp?replyid=<%=Rs("id")%> title=回复该留言> <img border=0 src=images/reply.gif align=absmiddle> </a> <a href=del.asp?id=<%=Rs("id")%> title=删除该留言> <img border=0 src=images/del.gif align=absmiddle ></a></div></td> </tr> </table></td> </tr> </table></td> </tr> </table> <table width=100% height="13" border=0 align=center cellpadding=0 cellspacing=0> <tr> <td height=10 background=images/tdbg_left2.gif></td> </tr> </table> <% Rs.movenext loop %> </td> </tr> </table> <table width="760" border="0" cellspacing="0" cellpadding="0" align="center"> <tr align="center"> <td colspan="2"> <table width=754 height="22" border=0 cellpadding=0 cellspacing=1 background="images/dh.gif" style="border: 1px solid #CCCCCC;"> <tr> <td align="center" background="images/dh.gif" bgcolor="#f7f7f7">总计留言<%=Rs.recordcount%>条 共有<%=page%>/<%=Rs.pagecount%>页 跳到第 <% for go=1 to Rs.pagecount%> <a href=index.asp?page=<%=go%>><%=go%></a> <%next%> 页 <% if page=1 then %> <%else%> <a href=index.asp?page=<%=page-1%>>上一页</a> <%end if%> <% if Rs.pagecount-page <> 0 then %> <a href=index.asp?page=<%=page+1%>>下一页</a> <%else%> <%end if%> </td> </tr></table> <table width=754 height="50" align=center cellpadding=0 cellspacing=1 bgcolor="#99CCFF"> <tbody> <tr> <td width="750" align=center valign="middle" bgcolor="#FFFFf0"> <font size="-1" color="#333333">版权所有 </font></td> </tr> </tbody> </table> </BODY></HTML>