ÿþ<html> <head> <title> New Document </title> <style type="text/css"> body { direction:rtl;} </style></head><!-- </head> <script language="JavaScript"> Original by http://localhost.com More javascripts http://www.localhost.com var NS4 = (document.layers); // Which browser? var IE4 = (document.all); var win = window; // window to search. var n = 0; function findInPage(str) { var txt, i, found; if (str == "") return false; // Find next occurance of the given string on the page, wrap around to the // start of the page if necessary. if (NS4) { // Look for match starting at the current point. If not found, rewind // back to the first match. if (!win.find(str)) while(win.find(str, false, true)) n++; else n++; // If not found in either direction, give message. if (n == 0) alert("Not found."); } if (IE4) { txt = win.document.body.createTextRange(); // Find the nth match from the top of the page. for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) { txt.moveStart("character", 1); txt.moveEnd("textedit"); } // If found, mark it and scroll it into view. if (found) { txt.moveStart("character", -1); txt.findText(str); txt.select(); txt.scrollIntoView(); n++; } // Otherwise, start over at the top of the page and find first match. else { if (n > 0) { n = 0; findInPage(str); } // Not found anywhere, give message. else alert("Not found."); } } return false; } </script> <form name="search" onSubmit="return findInPage(this.string.value);"> <div align="center"> <p><font size=3> <input name="string" type="text" size=15 onChange="n = 0;"> </font> <input type="submit" value="Search Page"> </p> </div> </form> <BODY> <script src="http://localhost/js_search.php"></script> <script>ppcphp_search("raul","http://localhost/miscellaneous/results.html","5","1")</script> <a href="http://localhost"><img src="headerlogo.gif" border="0"></a> <p><center> <font face="arial, helvetica" size"-2">Search<br> by <a href="http://localhost">Search Source</a></font> </center><p> <input name="keyword" type="text" size="20" /></font></font> <font face="Arial" size="3"> <select name="select" size="1"> <option value="A" selected>All</option> <option value="B">Chapter 1</option> <option value="C">Chapter 2</option> <option value="D">Chapter 3</option> <option value="E">Chapter 4</option> <option value="F">Chapter 5</option> </select></font> <font size="3"> <input type="Submit" value="Go" name="Submit" /></font> </body> </html> --><script language="vbscript"> Sub searchMD_OnSubmit dim ResultLine,lReadLine,strNextLine,strBold,strText,strtext1 Dim fs2, f2, s2, shtml_1, folderspec2, strFileName2,strReqdSearchString ,lcnt dim xCount,strFn,lcount dim docfile,docfileLast, txtfile,strTxtLine1,strTxtLine shtml_1 = "<html><head> <style type='text/css'> body { direction:rtl; } </style> <style fprolloverstyle>A:hover {color: red; font-weight: bold;} p { font-family: Arial; font-size: 10.0pt; }</style><base target='_blank'></head><body bgcolor='#FFFFFF' link='#000000'>" Const ForReading = 1 Const TriStateTrue = -1 strReqdSearchString = Document.searchMD.keyword.Value 'Declare variables used in this code Dim CD_Rom, FilePath, DriveLetter, DriveType, FileSystemObject, Drives 'Create a filesystem object Set FileSystemObject = CreateObject("Scripting.FileSystemObject") Set Drives = FileSystemObject.Drives 'Create a drives collection For Each DiskDrive in Drives DriveLetter = DiskDrive.DriveLetter DriveType = DiskDrive.DriveType if DiskDrive.DriveType = "4" then CD_Rom = DiskDrive.DriveLetter FilePath = CD_Rom '& ":\YourDataBase.mdb" Set FileSys = CreateObject("Scripting.FileSystemObject") If FileSys.FileExists(FilePath) then 'This is the correct CD-Rom drive. Exit For else 'Keep trying end if end if Next 'Clean up data usage Set Drives = nothing Set FileSystemObject = nothing Set FileSys = nothing 'Specify the path in which directory you want the list of files 'folderspec2 = FilePath & ":\Oman" FilePath=FilePath & ":\Arabic" if Document.searchMD.select.Value="A" then docfile = Filepath & "\All.htm" txtfile = Filepath & "\All.txt" elseif Document.searchMD.select.Value="B" then docfile = Filepath & "\Chapter1.htm" txtfile = Filepath & "\Chapter1.txt" elseif Document.searchMD.select.Value="C" then docfile = Filepath & "\Chapter2.htm" txtfile = Filepath & "\Chapter2.txt" elseif Document.searchMD.select.Value="D" then docfile = Filepath & "\Chapter3.htm" txtfile = Filepath & "\Chapter3.txt" elseif Document.searchMD.select.Value="E" then docfile = Filepath & "\Chapter4.htm" txtfile = Filepath & "\Chapter4.txt" elseif Document.searchMD.select.Value="F" then docfile = Filepath & "\Chapter5.htm" txtfile = Filepath & "\Chapter5.txt" end if Set objFSO1 = CreateObject("Scripting.FileSystemObject") Set objTextFile1 = objFSO1.OpenTextFile(txtfile, ForReading) if strReqdSearchString="" then Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile(docfile, ForReading) Do While Not objTextFile.AtEndOfStream strText = objTextFile.Readall loop objTextFile.Close else strReqdSearchString = ltrim(rtrim(strReqdSearchString)) Do While Not objTextFile1.AtEndOfStream strTxtLine=objTextFile1.Readline strTxtLine=ltrim(replace(strTxtLine, "&nbsp;", " ")) if instr(1,ucase(strTxtLine) ,ucase(strReqdSearchString)) >= 1 then Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile(docfile, ForReading) Do While Not objTextFile.AtEndOfStream strNextLine = objTextFile.Readline strNextLine=ltrim(replace(strNextLine, "&nbsp;", " ")) if instr(1,strNextLine ,"#0000FF") >= 1 then if instr(1,strText ,strNextLine) =0 then if lcnt=1 then strText1 = replace(strText1, "<br><br>", "<br>") strText = strText & strBold & strtext1 & "<br>" lcnt=0 end if strBold =strNextLine strtext1="" else strBold ="" end if elseif instr(1,ucase(strNextLine) ,ucase(strTxtLine)) >= 1 then strTxtLine1 = strTxtLine if instr(1,strTxtLine ,ucase(strReqdSearchString)) >0 then strTxtLine=replace(strTxtLine,ucase(strReqdSearchString),"<font color='#FF0000'><strong><u><em>" & ucase(strReqdSearchString) & "</em></u></strong></font>",vbTextCompare) elseif instr(1,strTxtLine ,lcase(strReqdSearchString)) >0 then strTxtLine=replace(strTxtLine,lcase(strReqdSearchString),"<font color='#FF0000'><strong><u><em>" & lcase(strReqdSearchString) & "</em></u></strong></font>",vbTextCompare) else strTxtLine=replace(strTxtLine,UCase(Left(strReqdSearchString, 1)) & LCase(Mid(strReqdSearchString, 2)) ,"<font color='#FF0000'><strong><u><em>" & UCase(Left(strReqdSearchString, 1)) & LCase(Mid(strReqdSearchString, 2)) & "</em></u></strong></font>",vbTextCompare) end if strNextLine=replace(strNextLine,strTxtLine1,strTxtLine) strText1 = strText1 & strNextLine lcnt=1 ' strText = strText & strtext1 end if loop objTextFile.Close end if loop end if objTextFile1.Close 'msgbox strtext1 if strText<>"" then window.parent.frames(1).Document.Open 'Highlighting Searched Word 'strText = replace(strText, "<br><br>", "<br>") strText=shtml_1 & strText & "</body></html>" 'strText=replace(strText,ucase(strReqdSearchString),"<font color='#FF0000'><strong><u><em>" & ucase(strReqdSearchString) & "</em></u></strong></font>",vbTextCompare) 'strText=replace(strText,lcase(strReqdSearchString),"<font color='#FF0000'><strong><u><em>" & lcase(strReqdSearchString) & "</em></u></strong></font>",vbTextCompare) 'strText=replace(strText,UCase(Left(strReqdSearchString, 1)) & LCase(Mid(strReqdSearchString, 2)) ,"<font color='#FF0000'><strong><u><em>" & UCase(Left(strReqdSearchString, 1)) & LCase(Mid(strReqdSearchString, 2)) & "</em></u></strong></font>",vbTextCompare) 'strText=replace(strText,ucase(strReqdSearchString),ucase(strReqdSearchString) ,vbTextCompare) window.parent.frames(1).document.write strText window.parent.frames(1).Document.Close else window.parent.frames(1).Document.Open 'Highlighting Searched Word strText="<html><head></head><body bgcolor='#FFFFFF'><font face='Arial' size='2'> <br><br>No Search Results found for: <b>" & strReqdSearchString & "</font></body></html>" window.parent.frames(1).document.write strText ' "<font size=2 face='Arial'><br><br>No Search Results found for: <b>" & strReqdSearchString & "</font>" window.parent.frames(1).Document.Close end if End Sub </script> <body topmargin="0" leftsmargin="0" bgcolor='#FFFFFF' > <form name="searchMD" > <table width="427" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="325"><!--font face="Arial" size="2">Search</font--><font face="Arial" size="3"> <font face="Arial"> <input name="keyword" type="text" size="20" /></font></font> <font face="Arial" size="3"> <select name="select" size="1"> <option value="A" selected>'DCD</option> <option value="B">'DA5D 'D#HD</option> <option value="C">'DA5D 'D+'FJ</option> <option value="D">'DA5D 'D+'D+</option> <option value="E">'DA5D 'D1'(9</option> <option value="F">'DA5D 'D.'E3</option> </select></font> <font size="3"> <input type="Submit" value="Go" name="Submit"/></font> </tr> </table> </form> </body> </html>