📄 book.asp
字号:
<!--#include file="include/dbopenbd.asp"-->
<HTML><HEAD>
<TITLE>网站留言-<%=sitename%>-<%=siteurl%></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="description" content="<%=sitename%>,<%=sitedescription%>">
<meta name="keywords" content="<%=sitename%>,<%=sitekeywords%>,在线留言,网站留言,客户留言,意见建议,意见反馈,问题咨询,疑难解答,售后服务,客户服务,在线咨询,技术支持,用户评论,用户意见,用户反馈,投诉建议">
<link rel="stylesheet" href="include/css.css" type="text/css">
</HEAD>
<center>
<%
%>
<!--#include file="a_top.asp"-->
<table width="760" border=0 cellspacing=0 cellpadding=0 align=center bgcolor="#FFFFFF" class="grayline">
<td height=30> 目前位置:<a href=main.asp>首页</a> > 在线留言 </td></tr>
<tr><td width="98%" align="center" height="1" background="images/small/bgline.gif"></td></tr>
<tr><td align=center height=80>
<a href=book_write.asp><img border=0 src=images/small/write.gif title="我要写留言"></a> <a href=book.asp><img border=0 src=images/small/read.gif title="我要看留言"></a>
</td></tr>
<tr><td>
<%
set rs=conn.execute("select * from s_setup")
pages=clng(rs("pages"))
html=clng(rs("html"))
book_jianju=clng(rs("book_jianju"))
bad=cstr(rs("bad"))
huifutishi=cstr(rs("huifutishi"))
huifucolor=cstr(rs("huifucolor"))
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from s_book where online='1'"
keywords=request("keywords")
if keywords<>"" then sql=sql+ " and Comments like '%"&keywords&"%' "
sql=sql + "order by [top] desc,Postdate desc"
rs.open sql,conn,1
if not (rs.eof and rs.bof) then '如果有留言时,就显示留言。此行的if与倒数第6行的end if相对应
pages=1 '每页留言条数
rs.pageSize = pages '每页记录数
allPages = rs.pageCount '总页数
page = Request("page") '从浏览器取得当前页
'if是基本的出错处理
If not isNumeric(page) then page=1
if isEmpty(page) or clng(page) < 1 then
page = 1
elseif clng(page) >= allPages then
page = allPages
end if
rs.AbsolutePage = page '转到某页头部
Do While Not rs.eof and pages>0
UserName=rs("UserName") '用户名
pic=rs("pic") '头像
face=rs("face") '表情
Comments=rs("Comments") '内容
bad1=split(bad,"/") '过滤脏话
for t=0 to ubound(bad1)
Comments=replace(Comments,bad1(t),"***")
next
Replay=rs("Replay") '回复
Usermail=rs("Usermail") '邮件
url=rs("url") '主页
I=I+1 '序号
temp=RS.RecordCount-(page-1)*rs.pageSize-I+1
%>
<table cellSpacing="1" cellPadding="3" width="680" align="center" bgColor="#000000" border="0" style="word-break:break-all">
<tr>
<td vAlign="top" width="25%" bgColor="#f7f7f7" rowSpan="2" align=center>
<table border=0 width=80%><tr><td align=center><img src=images/face/pic<%=pic%>.gif border=0></td></tr>
<tr><td>姓名:<%=UserName%><br>
来自:<%=rs("IP")%><br>
邮件:<a href=mailto:<%=Usermail%>><img src=images/small/mail.gif border=0> 邮件</a><br>
主页:<a href="<%=URL%>" target='_blank'><img src=images/small/home.gif border=0> 主页</a></td></tr></table>
</td>
<td width="75%" height="20" bgColor="#ffffff">[NO.<%=temp%>] <img border=0 src=images/face/face<%=face%>.gif> 发表于:<%=rs("Postdate")%></td>
</tr>
<tr>
<td vAlign="top" bgColor="#ebebeb" width='75%' height=120 onMouseOver="bgColor='#FFffff'" onMouseOut="bgColor='#ebebeb'">
<%
if html=0 then
response.write replace(server.htmlencode(Comments),vbCRLF,"<BR>")
else
response.write replace(Comments,vbCRLF,"<BR>")
end if
%>
<br><br>
<%if rs("Replay")<>"" then%>
<table cellSpacing="1" cellPadding="3" width="90%" align="center" bgColor="darkgray" border="0">
<tr><td vAlign="top" bgColor="#f7f7f7">
<font color=<%=huifucolor%>><%=huifutishi%>:<br><%=Replay%></font>
</td></tr></table><br>
<%end if%>
</td>
</tr>
</table>
<table cellSpacing="0" cellPadding="0" width="680" align="center" bgColor="#FFFFFF" border="0">
<TR><TD height=<%=book_jianju%>> </TD></TR></TABLE>
<%
pages = pages - 1
rs.movenext
if rs.eof then exit do
loop
response.write "<table border=0 width=680 align=center><tr><td><form action='book.asp' method='post'>总计留言"&RS.RecordCount&"条 "
'翻页函数
mPage "book.asp?keywords="&keywords,page,allpages
response.write "</td><form action='book.asp' method='post'><td align=right><input title='想查找什么内容' type=text name=keywords value='"&keywords&"' size=10 maxlength=20><input type=submit value='搜索' title='给我搜'></td></form></tr></table>"
else
response.write "<table cellSpacing=0 cellPadding=0 width=680 align=center bgColor=#FFFFFF border=0><TR><TD height=120 align=center>"
if keywords="" then response.write "暂时没有留言" else response.write "抱歉,没有找到您要查到的内容<br><br><a href='javascript:history.go(-1)'>返回上一页</a>" end if
response.write "</TD></TR></TABLE>"
end if
%>
</td></tr>
</table>
</td></tr>
</table>
<!--#include file="a_bottom.asp"-->
</body></center>
</html>
<%
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -