<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!--#include file="../inchuayuwebrlzywzhyweb/web_top.asp"-->
<LINK rel=stylesheet type=text/css href="../images/common.css">
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
	background-color:#FFFFFF;
	background-image:none;
}
-->
</style>
<link href="../images/page.css" rel="stylesheet" type="text/css" />
</head>
<body ><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" >
                        <tr>
                          <td><%
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from Feedback where online='1' and tid=0 "
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=6		'每页留言条数
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
	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="100%" align="center" bgcolor="#CCCCCC" border="0" style="word-break:break-all; margin-top:10px;">
                              <tr>
                                <td width="25%"  rowspan="2" align="center" valign="top" bgcolor="#F4F4F4"><table border="0" width="85%">
                                  <tr>
                                    <td><div align="left">姓名：<%=UserName%><br />
                                      来自：<%=left(rs("ip"),(len(rs("ip"))-2))+"**"%><br />
                                      邮件：<a href="mailto:<%=Usermail%>"><img src="../images/mail1.gif" alt="<%=Usermail%>" width="16" height="16" border="0" /></a><br />
                                      电话：<%=left(URL,(len(URL)-4))+"****"%><br />
留言类型:<%=rs("lylx")%></div></td>
                                  </tr>
                                </table></td>
                                <td width="75%" height="20" bgcolor="#F4F4F4" ><%if rs("top")<>"1" then response.write "[NO."&temp&"]"%>
                               &nbsp; <%=rs("lytitle")%>,发表于：<%=cstr(rs("Postdate"))%></td>
                              </tr>
                              <tr>
                                <td  width='75%' height="120" valign="top" bgcolor="#F4F4F4" onMouseOver="bgColor='#eeeeee'" onMouseOut="bgColor='#dddddd'"><div align="left">
                                  <%
	'是否屏蔽留言内容中的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 cellspacing="1" cellpadding="3" width="90%" align="center" bgcolor="#cccccc" border="0">
                                        
                                    <tr>
                                      <td valign="top" bgcolor="#DBDBDB" ><div align="left"><font color="ff0000">管理员回复：<br />
                                        <%=Replay%></font> </div></td>
                                    </tr>
                                  </table>
                                    <br />
                                  <%end if%>
                                </div></td>
                              </tr>
                            </table>
                            <%
pages = pages - 1
rs.movenext
if rs.eof then exit do
loop

response.write "<table border=0 width=100% align=center><tr><td><form action='ly.asp' method='post'>总计留言"&RS.RecordCount&"条 "
if page = 1 then
response.write "<font color=darkgray>首页 前页</font>"
else
response.write "<a href=ly.asp?page=1>首页</a> <a href=ly.asp?keywords="&keywords&"&page="&page-1&">前页</a>"
end if
if page = allpages then
response.write "<font color=darkgray> 下页 末页</font>"
else
response.write " <a href=ly.asp?keywords="&keywords&"&page="&page+1&">下页</a> <a href=ly.asp?keywords="&keywords&"&page="&allpages&">末页</a>"
end if
response.write " 第"&page&"页 共"&allpages&"页 &nbsp; 转到第 "
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 "<form action='ly.asp' method='post'><input title='想查找什么内容' type=text name=keywords value='"&keywords&"' size=10 maxlength=20><input type=submit value='搜索' title='给我搜'></form></td></tr></table>"


else
response.write "<table cellSpacing=0 cellPadding=0 width=100% 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>
</body>
</html>

