<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<center><P><H3>Search Results</H3></P></center>
<center>You have searched for: <B><%=Request("TextToSearch")%> on <%=Request("Select")%></B></center>
<center><a href="search.asp">Back</a></center>
<hr>
<%
Dim strtextToSearch
Dim strselect
Dim strfile
Dim strcmd
'strtextToSearch = Request("TextToSearch")
strselect = Request("Select")
'Now, we want to search all of the files
Dim fso
Const ForReading = 1
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Dim oWSH
Set oWSH= Server.CreateObject("WScript.Shell")
'Specify the folder path to search.
Dim FolderToSearch
set objNet=Server.CreateObject("WScript.Network")
If strselect = "OICU8120B00BD5A3B8B" then
strtextToSearch = Request("TextToSearch")
FolderToSearch = "C:\bp\sitea\BP2000.log"
strcmd = "%comspec% /Q /C find /I " & Chr(34) & strTexttoSearch & Chr(34) & " " & FolderToSearch & " >C:\bp\sitea\output.txt"
oWSH.Run strcmd, 0, True
strfile = "\bp\sitea\output.txt"
elseif strselect = "OICU8120D0065A9FEE1" then
strtextToSearch = Request("TextToSearch")
FolderToSearch = "C:\bp\siteb\BP2000.log"
strcmd = "%comspec% /Q /C find /I " & Chr(34) & strTexttoSearch & Chr(34) & " " & FolderToSearch & " >C:\bp\siteb\output.txt"
oWSH.Run strcmd, 0, True
strfile = "\bp\siteb\output.txt"
elseif strselect = "OICU8120D0065EFC8FE" then
strtextToSearch = Request("TextToSearch")
FolderToSearch = "C:\bp\sitec\BP2000.log"
strcmd = "%comspec% /Q /C find /I " & Chr(34) & strTexttoSearch & Chr(34) & " " & FolderToSearch & " >C:\bp\sitec\output.txt"
oWSH.Run strcmd, 0, True
strfile = "\bp\sitec\output.txt"
elseif strselect = "OICU8120F00F1732570" then
strtextToSearch = Request("TextToSearch")
FolderToSearch = "C:\bp\sited\BP2000.log"
strcmd = "%comspec% /Q /C find /I " & Chr(34) & strTexttoSearch & Chr(34) & " " & FolderToSearch & " >C:\bp\sited\output.txt"
oWSH.Run strcmd, 0, True
strfile = "\bp\sited\output.txt"
elseif strselect = "OICU8120600B57DABCA" then
strtextToSearch = Request("TextToSearch")
FolderToSearch = "C:\bp\sitee\BP2000.log"
strcmd = "%comspec% /Q /C find /I " & Chr(34) & strTexttoSearch & Chr(34) & " " & FolderToSearch & " >C:\bp\sitee\output.txt"
oWSH.Run strcmd, 0, True
strfile = "\bp\sitee\output.txt"
elseif strselect = "OICU8120D0065B9FBF6" then
strtextToSearch = Request("TextToSearch")
FolderToSearch = "C:\bp\sitef\BP2000.log"
strcmd = "%comspec% /Q /C find /I " & Chr(34) & strTexttoSearch & Chr(34) & " " & FolderToSearch & " >C:\bp\sitef\output.txt"
oWSH.Run strcmd, 0, True
strfile = "\bp\sitef\output.txt"
elseif strselect = "OICU812PCASOB30LY41" then
strtextToSearch = Request("TextToSearch")
FolderToSearch = "C:\bp\siteg\BP2000.log"
strcmd = "%comspec% /Q /C find /I " & Chr(34) & strTexttoSearch & Chr(34) & " " & FolderToSearch & " >C:\bp\siteg\output.txt"
oWSH.Run strcmd, 0, True
strfile = "\bp\siteg\output.txt"
elseif strselect = "OICU8120D00651D79F3" then
strtextToSearch = Request("TextToSearch")
FolderToSearch = "C:\bp\siteh\BP2000.log"
strcmd = "%comspec% /Q /C find /I " & Chr(34) & strTexttoSearch & Chr(34) & " " & FolderToSearch & " >C:\bp\siteh\output.txt"
oWSH.Run strcmd, 0, True
strfile = "\bp\siteh\output.txt"
elseif strselect = "OICU8120D00655D09F2" then
strtextToSearch = Request("TextToSearch")
FolderToSearch = "C:\bp\sitei\BP2000.log"
strcmd = "%comspec% /Q /C find /I " & Chr(34) & strTexttoSearch & Chr(34) & " " & FolderToSearch & " >C:\bp\sitei\output.txt"
oWSH.Run strcmd, 0, True
strfile = "\bp\sitei\output.txt"
elseif strselect = "OICU812PTXWL9MTQY41" then
strtextToSearch = Request("TextToSearch")
FolderToSearch = "C:\bp\sitej\BP2000.log"
strcmd = "%comspec% /Q /C find /I " & Chr(34) & strTexttoSearch & Chr(34) & " " & FolderToSearch & " >C:\bp\sitej\output.txt"
oWSH.Run strcmd, 0, True
strfile = "\bp\sitej\output.txt"
end if
const TristateFalse = 0
dim strSearchThis
dim strline
dim objFile
dim objTS
dim thing
set objFile = FSO.GetFile(Server.MapPath(strfile))
set objTS = objFile.OpenAsTextStream(ForReading, TristateFalse)
thing = objTS.Read(objFile.size)
strSearchThis = Replace(thing,vbcrlf,"<BR><HR>") '(objFile.size)
Response.write "<center>Please wait...this could take a minute.</center>"
Response.write strSearchThis
set objfile = nothing
set objts = nothing
Set fso = Nothing
set strfile = nothing
set oWSH = nothing
%>
<center><a href="search.asp">Back</a></center>
</BODY>
</HTML>