% ' Force variable declaration. option explicit ' Declare variables. $basedir = '/htdocs/'; $baseurl = 'http://www.covingtonhistory.co.uk/'; @files = ('*.html'); $title = "Covington History"; $title_url = 'http://www.covingtonhistory.co.uk/'; $search_url = 'http://www.covingtonhistory.co.uk/search.html'; dim thisPage dim showRows dim target dim navEvent thisPage = "SimpleSearch.asp" showRows = 10 ' Get the request parameters. target = Request("target") navEvent = Request("navEvent") %>
The Covington History Search Engine

Type your query into the box and
click on the grey button to generate a full search of the Covington History
site.
Then simply select from the list of entries that will appear and you will
be
transported to the page that shows all the data you require.
Happy searching! - Don't forget,
if you find any errors please let me know, so I can put them right
Error: " & timedOut_Text & ".
" & vbCRLF) elseif (queryRS.RecordCount <= 0) then Response.Write ("No matches found.
" & vbCRLF) else call showHits(queryRS) end if end sub ' showHits(): Displays the query hits from the query recordset. ' sub showHits(queryRS) dim recordNumber ' record number dim docTitle ' document title dim firstRow ' first row being displayed dim lastRow ' last row being displayed dim rowCount ' number of rows displayed dim r ' remainder (used to determine if last page is short) ' Get the request parameters. firstRow = Request("firstRow") rowCount = Request("rowCount") ' Set the first row and last row based on the value of navEvent. if (navEvent = "Top") then firstRow = 1 elseif (navEvent = "Prev") then firstRow = firstRow - showRows if (firstRow < 1) then firstRow = 1 end if elseif (navEvent = "Next") then if ((firstRow + showRows) <= queryRS.RecordCount) then firstRow = firstRow + showRows end if elseif (navEvent = "Bottom") then ' Calculate the number of rows that should be shown on the last page, ' which is the remainder of the record count divided by the number of ' rows to show. r = queryRS.RecordCount mod showRows ' If the number of rows on the last page is 0, then set the first row ' to showRows back from the end. Otherwise, set the first row to r rows ' back. if (r = 0) then firstRow = queryRS.RecordCount - showRows + 1 else firstRow = queryRS.RecordCount - r + 1 end if else ' Do nothing. end if ' Set the last row, which will be the first row plus the number of rows ' minus 1. lastRow = firstRow + showRows - 1 ' If the last row is past the end, set it to the end. if (lastRow > queryRS.RecordCount) then lastRow = queryRS.RecordCount end if ' Go to the top of the record set, then move forward to the record that ' corresponds to the first row. queryRS.MoveFirst() if (firstRow > 1) then queryRS.Move(firstRow - 1) end if ' Show the summary info.: # of records found and range showing. Response.Write ("| " & vbCRLF) Response.Write (" Found: " & queryRS.RecordCount & vbCRLF) Response.Write (" Showing: " & _ firstRow & " - " & lastRow & vbCRLF) Response.Write (" | " & vbCRLF) Response.Write ("|
| " & recordNumber & ". | " & _ vbCRLF) Response.Write ("" & vbCRLF)
Response.Write (" " & _
docTitle & "" & vbCRLF)
Response.Write (" " & vbCRLF) Response.Write(" URL: http://" & _ Request("server_name") & queryRS("vpath") & "" & vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" " & _ Server.HTMLEncode(queryRS("characterization")) & "" & vbCRLF) Response.Write (" | " & vbCRLF)
Response.Write ("
| " & vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" | " & vbCRLF) Response.Write ("|