%
top
if Request.Cookies("username")=empty then error("
您还未登录社区")
if instr(Request.ServerVariables("http_referer"),"http://"&Request.ServerVariables("server_name")&"") = 0 then error("
来源错误")
if Request("menu")="ok" then
search=Request("search")
forumid=Request("forumid")
content=HTMLEncode(Request("content"))
searchxm=Request("searchxm")
searchxm2=Request("searchxm2")
searchxm2=replace(searchxm2,"@","&")
if content=empty then content=Request.Cookies("username")
if isnumeric(""&forumid&"") then forumidor="forumid="&forumid&" and"
if Request("search")="author" then
item=""&searchxm&"='"&content&"'"
elseif Request("search")="key" then
item=""&searchxm2&" like '%"&content&"%'"
end if
if request("TimeLimit")<>"" then TimeLimit="and lasttime>"&SqlNowString&"-"&int(request("TimeLimit"))&""
sql="select top "&MaxSearch&" * from forum where deltopic<>1 and "&forumidor&" "&item&" "&TimeLimit&" order by lasttime Desc "
rs.Open sql,Conn,1
count=rs.recordcount '数据总条数
if Count=0 then error("
对不起,没有找到您要查询的内容")
pagesetup=20 '设定每页的显示数量
rs.pagesize=pagesetup '每页显示条数
TotalPage=rs.pagecount '总页数
PageCount = cint(Request.QueryString("ToPage"))
if PageCount <1 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
if TotalPage>0 then rs.absolutepage=PageCount '跳转到指定页数
%>
<%ClubTree%> → 搜索结果
搜索关键字:<%=content%> 共找到了 <%=Count%> 篇相关帖子
主题
作者
回复
点击
最后更新
<%
i=0
Do While Not RS.EOF and inow() then newtopic=""
%>
<%
RS.MoveNext
loop
RS.Close
%>