我现在用的是总搜索代码,在网上找人改了一下,但是现在只能搜索文章不能搜索软件,我想改成文章和软件都能搜索得到的代码,改好后我给您支付10元辛苦费,现在代码如下:
Dim ShCls:Set ShCls=New RefreshSearchCls
Class RefreshSearchCls
Private KS
Private Sub Class_Initialize()
Set KS=New PublicCls
End Sub
Private Sub Class_Terminate()
Set KS=Nothing
Set ShCls=Nothing
End Sub
'替换网站的所有搜索
Sub Run(ByRef FileContent)
FileContent = Replace(FileContent, "{$GetSearchByDate}", GetSearchByDate())
FileContent = Replace(FileContent, "{$GetSearch}", GetSearch())
Dim rs:set rs=conn.execute("select modelename from ks_channel where channelstatus=1 order by channelid")
dim k,sql:sql=rs.getrows(-1)
for k=0 to ubound(sql,2)
if instr(filecontent,"{$Get" & sql(0,k) & "Search}")>0 then
FileContent = Replace(FileContent, "{$Get" & sql(0,k) & "Search}", "<script src=""{$GetSiteUrl}" & KS.Setting(93) & "S_" & sql(0,k) & ".js""></script>")
end if
next
End Sub
'取得高级日历搜索
Function GetSearchByDate()
GetSearchByDate="<IFRAME id=gToday:normal:agenda.js style=""BORDER-RIGHT: 0px ridge; BORDER-TOP: 0px ridge; BORDER-LEFT: 0px ridge; BORDER-BOTTOM: 0px ridge"" name=gToday:normal:agenda.js src=""{$GetSiteUrl}" & "KS_Inc/iflateng.htm?../plus/Search.asp?ChannelID=1&SearchType=100"" frameBorder=0 width=160 scrolling=no height=170></IFRAME>"
End Function
'取得总搜索
Function GetSearch()
GetSearch = "<div class=""searchsd"">" & vbCrLf
GetSearch = GetSearch & "<form id=""SearchForm"" name=""SearchForm"" method=""post"" action=""{$GetSiteUrl}plus/Search.asp"">" & vbCrLf
GetSearch = GetSearch & " 快速查找资料: <input name=""KeyWord"" type=""text"" class=""textbox"" value=""""this.select();""/>" & vbCrLf
dim rs:set rs=conn.execute("select channelid,itemname from ks_channel where channelstatus=1 and channelid<>9 and BasicType=1 order by channelid")
if not rs.eof then
dim k,sql:sql=rs.getrows(-1)
rs.close:set rs=nothing
GetSearch = GetSearch & "<input name=""ChannelID"" type=""hidden"" value="""& sql(0,k) &""">"
end if
GetSearch = GetSearch & "<input type=""submit"" class=""inputButton"" name=""Submit1"" value=""立即查找"" />" & vbCrLf
GetSearch = GetSearch & "</form>" & vbCrLf
GetSearch = GetSearch & "</div>" & vbCrLf
End Function
End Class
%>