<%if isnull(lguserid) or lguserid="" then tl=" 操 作 失 败" mes="对不起,该功能只对会员开放。" call sendinfo(tl,mes) call down response.end end if dim action,key,sql,thetime,searchtime,bbs,topicinfo,retopic,reinfo,renum,hot,repage,width,face,n,nn action=request.querystring("action") select case action case"" %>
论坛搜索

搜索关键字:
请输入要搜索的关键字。

 

搜索日期范围:

 

搜索的论坛:

 
<%case"search" key=Replace(request.querystring("key"),"'","") key=Replace(key,"[","[[]") key=Replace(key,"|","│") if key="" or len(key)<2 or instr("face",key) or checkname(key)=false then tl=" 搜 索 失 败" mes="搜索关键字太短,或者关键字含有非法字符。
返回重新填写" call sendinfo(tl,mes) call down response.end end if %> <% searchtime=checknum(request.querystring("searchtime")) bbs=checknum(request.querystring("bbs")) if grade>12 then sql="select*from topic where topicinfo like '%"&key&"%' and type<>3 and bd not in(select id from bdinfo where type=3 or type=4)" else sql="select*from topic where topicinfo like '%"&key&"%' and type<>3" end if if bbs>0 then sql=sql&"and bd="&bbs&" " if searchtime>0 then sql=sql&"and edittime>now()+"×et&"/24-"&searchtime&"" dim wzcount,wzrep,wzpagecount,wzpage,pagestr,urlstr urlstr="action=search&bbs="&bbs&"&key="&key&"&searchtime="&searchtime wzrep=application(prefix&"topiclistpage") set rs = server.createobject("adodb.recordset") rs.Open sql,conn,1 if rs.eof or rs.bof then tl="搜索失败" mes="搜索不到任何相关的帖子。" call sendinfo(tl,mes) call down response.end else wzcount=rs.recordcount wzpagecount = abs(int(-abs(wzcount/wzrep))) wzpage = clng(request.querystring("page")) if len(wzpage) = 0 or wzpage = 0 then wzpage = 1 rs.absoluteposition=rs.absoluteposition+((abs(wzpage)-1)*wzrep) pagestr="每页"&wzrep&"条 共"&wzpagecount&"页 ["&pagination(wzpagecount,urlstr)&"] " response.write"
"&pagestr&"
" %>
表情
主题 (点击表情在新窗口打开)
作者
回复/人气
最后回复
<% for i = 0 to wzrep-1 if rs.eof then exit for topicinfo=rs("topicinfo") topicinfo=split(topicinfo,"|") retopic=rs("retopic") if isnull(retopic) or retopic="" then reinfo="——" retopic="未有人回复。|——|0" retopic=split(retopic,"|") else retopic=split(retopic,"|") reinfo=""&checktitle(retopic(1))&"" end if renum=rs("renum") hot=checknum(application(prefix&"showbbspage")) if renum/hot>(renum\hot) then repage=(renum\hot)+1 else repage=renum\hot end if width=35 face=topicinfo(0) if rs("type")=1 then face="jing" if rs("type")=2 then face="lock" if rs("top")=1 then face="top" if rs("top")=2 then face="alltop" if repage>1 then width=25 response.write"
"&topicinfo(3)&" "&lefttrue(checktitle(topicinfo(1)),width)&"" if repage>1 then response.write" [ " if repage<=4 then for n=1 to repage response.write""&n&" " next else for nn=1 to 3 response.write""&nn&" " next response.write"... "&repage&" " end if response.write" ]" end if response.write"
"&renum&"/"&rs("hits")&"
"&reinfo&"
"&rs("edittime")&"
" rs.movenext next%>
<% end if rs.Close set rs=nothing response.write"
"&pagestr&"
" %> <%end select call down%>