bbsxp支持多关键字搜索插件

bbsxp支持多关键字搜索插件

By enger at 2007-03-05
0人收藏 • 1426人看过

应该5.6.7代的bbsxp论坛都适用了

search.asp,找到

content=HTMLEncode(Request("content"))

换成

content=ReplaceText(Request("content"),"<[^>]*>|\'|\&|\?|\/|\\","")

找到
if search="author" then
if Len(searchxm)>9 then error("<li>非法操作")
item=""&searchxm&"='"&content&"'"
elseif search="key" then
if Len(searchxm2)>9 then error("<li>非法操作")
item=""&searchxm2&" like '%"&content&"%'"
end if

换成
if search="author" then
if Len(searchxm)>9 then error("<li>非法操作")
item=""&Searchxm&" like '%"&content&"%'"
elseif Search="key" then
str=split(ReplaceText(content," |  "," ")," ")
item="Topic like '%"&str(0)&"%'"
for i = 1 to ubound(str)
item=item&" and Topic like '%"&str(i)&"%'"
next
end if

找到
i=0
Do While Not RS.EOF and i<pagesetup
i=i+1

换成
i=0
Do While Not RS.EOF and i<pagesetup
Topic=ReplaceText(rs("Topic"),"<[^>]*>","")
if Search="key" then
for n=0 to ubound(str)
Topic=Replace(Topic,""&str(n)&"","<font color=red>"&str(n)&"</font>")
next
end if
i=i+1

如果5.16版的再找到
,"<%=rs("topic")%>",

换成
,"<%=topic%>",

1 个回复 | 最后更新于 2007-03-17
admin
2007-03-17
#1

世界级超大突破

感谢楼主!!!


登 录


现在注册

QQ  登 录    Weibo  登 录    GitHub  登 录