<% if request("keywords")<>"" then if checktxt(request("keywords"))<>request("keywords") then response.write "" response.end end if end if %> <%=sitename%>
<% set rs=Server.CreateObject("ADODB.RecordSet") sql="select * from Feedback 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 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 %>
.gif border=0>
<%if rs("top")<>"1" then response.write "[NO."&temp&"]"%> .gif> 发表于:<%=cstr(rs("Postdate"))%>
<% '是否屏蔽留言内容中的html字符 if html=0 then response.write replace(server.htmlencode(Comments),vbCRLF,"
") else response.write replace(Comments,vbCRLF,"
") end if %>

<%if rs("Replay")<>"" then%>

<%end if%>
<% pages = pages - 1 rs.movenext if rs.eof then exit do loop response.write "
总计留言"&RS.RecordCount&"条 " if page = 1 then response.write "首页 前页" else response.write "首页 前页" end if if page = allpages then response.write " 下页 末页" else response.write " 下页 末页" end if response.write " 第"&page&"页 共"&allpages&"页   转到第 " response.write "
" response.write "
" else response.write "
" if keywords="" then response.write "暂时没有留言" else response.write "抱歉,没有找到您要查到的内容

返回上一页" end if response.write "
" end if %>