<!--#include file="include/config.asp" -->
<TITLE>网站留言-<%=sitename%>-<%=siteurl%></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="description" content="<%=sitedescription%>">
<meta name="keywords" content="<%=sitekeywords%>">
<link rel="stylesheet" href="css.css" type="text/css">
<LINK href="images/news/style.css" type=text/css rel=stylesheet>
</head>
<center>
<%
call aspsql()
%>
  <!--#include file="top.asp"-->
  <TABLE cellSpacing=0 cellPadding=0 width=980 align=center bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
    <TD width=980>&nbsp;</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=980 align=center bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
    <TD width=980><IMG height=10 alt="" src="images/book/com_cash_top.gif" 
      width=980></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=980 align=center bgColor=#ffffff 
background=images/book/com_cash_bg_01gif.gif border=0>
  <TBODY>
  <TR>
    <TD width=20>&nbsp;</TD>
    <TD vAlign=top align=middle width=225>
      <TABLE cellSpacing=0 cellPadding=0 width=200 border=0>
        <TBODY>
        <TR>
          <TD width=200><IMG height=35 alt="" 
            src="images/book/com_serve_06.gif" width=200></TD></TR>
        <TR>
          <TD background=images/book/com_serve_14.gif>
            <TABLE cellSpacing=0 cellPadding=0 width=200 border=0>
                    <TBODY>
                      <TR> 
                        <TD width=80 height=5></TD>
                        <TD width=120></TD>
                      </TR>
                      <TR> 
                        <TD width=80>&nbsp;</TD>
                        <TD width=120 height=30><A 
                  href="book_write.asp"><font color="#FF5B02">发表留言</font></A></TD>
                      </TR>
                      <TR> 
                        <TD>&nbsp;</TD>
                        <TD height=30><A 
                  href="book.asp"><font color="#FF5B02">查看留言</font></A></TD>
                      </TR>
                    </TBODY>
                  </TABLE></TD></TR>
        <TR>
          <TD><IMG height=7 alt="" src="images/book/com_serve_23.gif" 
          width=200></TD></TR></TBODY></TABLE></TD>
    <TD align=middle>
      <TABLE cellSpacing=0 cellPadding=0 width=580 border=0>
        <TBODY>
        <TR>
          <TD width=603><IMG height=6 alt="" src="images/book/com_query_07.gif" 
            width=680></TD></TR>
        <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=0 width=680 border=0>
              <TBODY>
              <TR>
                <TD width=1 bgColor=#cecece></TD>
                <TD align=middle width=678>
                  <TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=0 
                  width=670 align=center>
                    <TBODY>
                    <TR>
                                <TD vAlign=top height=230> 
                                  <TABLE cellSpacing=0 cellPadding=0 width="100%" 
border=0>
                          <TBODY>
                          <TR>
                            <TD width=8></TD>
                                        <TD height="30" align=left>目前位置：<a href=main.asp>首页</a> 
                                          > 在线留言</TD>
                            <TD width=9></TD></TR></TBODY></TABLE>
                                  <TABLE cellSpacing=0 cellPadding=4 width=570 border=0>
                                    <TBODY>
                                      <TR> 
                                        <TD class=td3 width=8><BR> <BR></TD>
                                        <TD class=com_fee_03> 
                                          <%
set rs=conn.execute("select * from bsetup")
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 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相对应

if pages=0 or pages="" then pages=10		'每页留言条数
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="540" align="center" bgColor="#CFCFCF" border="0">
                                            <tr> 
                                              <td vAlign="top" width="25%" bgColor="#FFFFFF" 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> 
                                                发表于：<%=cstr(rs("Postdate"))%></td>
                                            </tr>
                                            <tr> 
                                              <td width='75%' height=120 vAlign="top" bgColor="#FFFFFF"> 
                                                <%
	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="#CFCFCF" border="0">
                                                  <tr> 
                                                    <td vAlign="top" bgColor="#FFFFFF">	
                                                      <font color=<%=huifucolor%>><%=huifutishi%>：<br>
                                                      <%=Replay%></font> </td>
                                                  </tr>
                                                </table>
                                                <%end if%>
                                              </td>
                                            </tr>
                                          </table>
                                          <br>
                                          <%
pages = pages - 1
rs.movenext
if rs.eof then exit do
loop
response.write "<table border=0 width=540 align=center><tr><td><form action='book.asp' method='post'>总计留言"&RS.RecordCount&"条 "
if page = 1 then
response.write "<font color=darkgray>首页 前页</font>"
else
response.write "<a href=book.asp?keywords="&keywords&"&page=1>首页</a> <a href=book.asp?keywords="&keywords&"&page="&page-1&">前页</a>"
end if
if page = allpages then
response.write "<font color=darkgray> 下页 末页</font>"
else
response.write " <a href=book.asp?keywords="&keywords&"&page="&page+1&">下页</a> <a href=book.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='book.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=540 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>
                                        <TD class=td3 width=2>&nbsp;</TD>
                                      </TR>
                                      <!--
                        <TR>
                          <TD class=td3>&nbsp;</TD>
                          <TD class="com_fee_03"><p class="com_text_bold">一<a name="a"></a>、 自行提取</p>
                            <p>适用范围：北京地区顾客，可到公司自行提取。为保证确实有货，请您自行提取前，务必与八佰拜客服联系确认。<br>
  时　　间：周一至周五， 10 ： 00 － 17 ： 00<br>
  配送费用：无需支付<br>
  公司地址：北京海淀区三里河路 21 号甘家口大厦北侧 15 层 1506 室<br>
  乘车路线：电车 101 、 102 、 103 、 114 ，公共汽车 320 、 320 支、 717 、 827 、特 4 等多路车到甘家口商场下车，即可达。 </p>
                            <p align="right"><a href="#" class="com_hover_bold">[Top]</a></p>                            </TD>
                          <TD 
            class=td3>&nbsp;</TD>
                        </TR>
-->
                                    </TBODY>
                                  </TABLE></TD></TR>
                    <TR>
                                <TD vAlign=top>&nbsp; </TD>
                              </TR></TBODY></TABLE></TD>
                <TD width=1 bgColor=#cecece></TD></TR></TBODY></TABLE></TD></TR>
        <TR>
          <TD><IMG height=8 alt="" src="images/book/com_query_11.gif" 
          width=680></TD></TR></TBODY></TABLE></TD>
    <TD width=20>&nbsp;</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=980 align=center border=0>
  <TBODY>
  <TR>
    <TD>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><IMG height=13 alt="" src="images/book/com_cash_bottom.gif" 
            width=980></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=980 align=center bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
        <TD width=980>&nbsp; </TD>
      </TR></TBODY></TABLE>
  <!--#include file="down.asp"-->
</center>
</body>
</html>

<%
set conn=nothing
%>
