📄 gly.asp
字号:
<!--#include file=admin_conn.asp-->
<!--#include file=admin/titleb.asp-->
<!--#include file=include/config.asp -->
<!--#include file = Include/ubb_code.asp -->
<%
if request("keywords")<>"" then
if checktxt(request("keywords"))<>request("keywords") then
response.write "<script language='javascript'>"
response.write "alert('您输入的搜索关键中含有非法字符,请检查后重新输入!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
end if
%>
<HTML><HEAD><TITLE>留言本-<%=title%></TITLE>
<META content= name=description>
<META content= name=keywords>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="images/gbook/style.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<style type="text/css">
<!--
.h10 {LINE-HEIGHT: 10px
}
-->
</style>
</HEAD>
<BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<TABLE id=__01 cellSpacing=0 cellPadding=0 width=585 align=center
border=0>
<TBODY>
<TR>
<TD width="1%"><IMG id=in_01 height=7 alt="" src="images/gbook/in_01.jpg" width=7></TD>
<TD width="57%" background=images/gbook/in_02.jpg><IMG id=in_02 height=7 alt="" src="images/gbook/in_02.jpg" width=185></TD>
<TD width="42%"><IMG id=in_03 height=7 alt="" src="images/gbook/in_03.jpg" width=8></TD>
</TR>
<TR>
<TD background=images/gbook/in_04.jpg><IMG id=in_04 height=40 alt="" src="images/gbook/in_04.jpg" width=7></TD>
<TD><table width="570" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><table width="95%" height="252" border="0" align="center" cellpadding="00" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td width="517" height="230" valign="top"><div align="center">
<table width="100%" border=0 cellspacing=0 cellpadding=0 align=center class="grayline">
<tr>
<td align=center height=50><a href=gly_w.asp><img src=images/gbook/wly.jpg width="120" height="30" border=0 title="我要写留言"></a> <img src=images/gbook/gly.jpg width="120" height="30" border=0 title="留言本首页"> </td>
</tr>
<tr>
<td class="coolscrollbar">
<%
'wz=trim(request("wz"))
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from gbook 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相对应
if pages=0 or pages="" then pages=4 '每页留言条数
rs.pageSize = pages '每页记录数
allPages = rs.pageCount '总页数
page = Request("page") '从浏览器取得当前页
'if是基本的出错处理
If not isNumeric(page) then page=1
if isEmpty(page) or Cint(page) < 1 then
page = 1
elseif Cint(page) >= allPages then
page = allPages
end if
rs.AbsolutePage = page '转到某页头部
Do While Not rs.eof and pages>0
id=rs("id")
UserName=rs("UserName") '用户名
pic=rs("pic") '头像
face=rs("face") '表情
title=rs("title") '标题
'Comments=rs("Comments") '内容
Comments=ubbcode(dvHTMLEncode(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") '主页
aI=aI+1 '序号
temp=RS.RecordCount-(page-1)*rs.pageSize-aI+1
%>
<table width="530" border="1" align="center" cellPadding="3" cellSpacing="0" borderColorLight=#311600 borderColorDark=#e7e5e2 style="word-break:break-all">
<tr>
<td vAlign="top" width="27%" rowSpan="3" align=center><a name=id_<%=id%>></a><table border=0 width=99%>
<tr>
<td align=center><img src=<%=pic%> border=0></td>
</tr>
<tr>
<td>姓名:<%=UserName%><br>
来自:<%=left(rs("ip"),(len(rs("ip"))-2))+"**"%><br>
邮件:<a href=mailto:<%=Usermail%>><img src=images/lymail.gif border=0 alt="<%=Usermail%>"></a><br>
主页:<a href="<%=URL%>" target='_blank'><img src=images/home.gif border=0 alt="<%=URL%>"></a></td>
</tr>
</table></td>
<td width="73%" height="15"><%if rs("top")<>"1" then response.write "[NO."&temp&"]"%>
<img border=0 src=images/gbook/face/face<%=face%>.gif> <%=title%></td>
</tr>
<tr>
<td width='73%' height=152 vAlign="top"><%
'是否屏蔽留言内容中的html字符
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 borderColorDark=#e7e5e2 borderColorLight=#311600 cellSpacing="1" cellPadding="0" width="90%" align="center" border="1">
<tr>
<td vAlign="top"><font color="<%=huifucolor%>"><%=huifutishi%><br>
<%=Replay%></font> </td>
</tr>
</table>
<br>
<%end if%>
</td>
</tr>
<tr>
<td width="73%" height="20" vAlign="top"><img src="images/gbook/ip.gif" width="13" height="15"> <%=cstr(rs("Postdate"))%></td>
</tr>
</table>
<table cellSpacing="0" cellPadding="0" width="95%" align="center" 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 align=center><tr><td><form action='gly.asp' method='post'>总计留言"&RS.RecordCount&"条 "
if page = 1 then
response.write "首页 前页"
else
response.write "<a href=gly.asp?page=1>首页</a> <a href=gly.asp?keywords="&keywords&"&page="&page-1&">前页</a>"
end if
if page = allpages then
response.write " 下页 末页"
else
response.write " <a href=gly.asp?keywords="&keywords&"&page="&page+1&">下页</a> <a href=gly.asp?keywords="&keywords&"&page="&allpages&">末页</a>"
end if
response.write " 第"&page&"页 共"&allpages&"页 转到第 "
response.write "<select name='page'>"
for i=1 to allpages
response.write "<option value="&i&">"&i&"</option>"
next
response.write "</select> 页 <input type=submit name=go value='Go'><input type=hidden name=keywords value='"&keywords&"'></form></td><td align=right>"
response.write "</td></tr></table>"
else
response.write "<table cellSpacing=0 cellPadding=0 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>
</div></td>
</tr>
<tr>
<td height="22" valign="top"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></TD>
<TD background=images/gbook/in_06.jpg><IMG id=in_06
height=40 alt="" src="images/gbook/in_06.jpg" width=8></TD>
</TR>
<TR>
<TD><IMG id=in_07 height=7 alt=""
src="images/gbook/in_07.jpg" width=7></TD>
<TD background=images/gbook/in_08.jpg><IMG id=in_08 height=7
alt="" src="images/gbook/in_08.jpg" width=185></TD>
<TD><IMG id=in_09 height=7 alt=""
src="images/gbook/in_09.jpg" width=8></TD>
</TR>
</TBODY>
</TABLE>
</BODY></HTML>
<% call CloseConn() %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -