<% ' ------------------------------------------------------------------- ' File: search.asp ' ' Copyright (c) 2003-2004, DPA Software. All rights reserved. ' ------------------------------------------------------------------- ' set the default no. of items per page here PageItems = 10 ' possible values: 5, 10, 20, 30, 0 ( all ) PageIndex = 1 SortOrder = "relv_desc" ' possible values: title, relv_desc QueryType = "bool" ' possible values: bool, exact web_root = "./" web_root_disk = Server.MapPath(web_root) & "\" web_sse = web_root_disk & Replace(web_sse_folder,"/","\") sTarget = "" sExcludeKeywords = "0" sExcludeSB = "1" sExcludeNavBar = "1" sExcludeIncPage = "1" sExcludeSSETag = "1" sExcludeDWTNE = "0" sExcludeDWTE = "" '''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Search page/results customization/localization - Start '''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' message shown when invalid/incorrect search string specified sMsgSearchStringError = "No search string specified or contains common words which are ignored." ' message shown when SSE data file error occurs sMsgDataError = "Could not open search area set file. Please contact web administrator." ' message shown when search page open for the first time sMsgStartup = "Type in a search string" ' message shown when no pages matched search criteria sMsgNoMatches = "No Matches Found" ' message shown as a part of header to search results ' %S, %E and %C are substitution markers ' %S - index of the starting result in the result list ' %E - index of the last result in the resule list ' %C - total number of matching pages found sMsgResultHeader = "Showing %S to %E of %C matching page(s)" ' message shown as a part of header to search results, paging controls, go to previous page ' WARNING: Do not leave blank sMsgResultHeaderPrevious = "Previous" ' message shown as a part of header to search results, paging controls, go to next page ' WARNING: Do not leave blank sMsgResultHeaderNext = "Next" ' message shown as a part of search results when search criteria was matched against the page title but not against the contents ' WARNING: Do not leave blank sMsgResultsTitleMatch = "Title match" ' message shown as a part of search results when search criteria was matched against the page keywords but not against the contents ' WARNING: Do not leave blank sMsgResultsKWMatch = "Keyword match" '''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Search page/results customization/localization - end '''''''''''''''''''''''''''''''''''''''''''''''''''''''' AreaFile = Request("area") ' ------------------------------------------------------------------- ' Page Code ' ------------------------------------------------------------------- If Request("ActionType") = "Search" Then PageItems = CInt(Request("PageItems")) SortOrder = Request("SortOrder") QueryType = Request("optQueryType") GenerateSearchResults Request.Form("query") elseif Request("ActionType") = "SearchById" then sets = null set filesys = server.createobject("scripting.FileSystemObject") if filesys.FileExists(web_sse & "sets.inc") then AreaFile = "" 'sets = filesys.openTextfile(web_sse & "sets.inc").readall sets = ReadTextfile(filesys, web_sse & "sets.inc") setsArray = Split(sets, nl) For i = 1 To Ubound(setsArray) If setsArray(i) <> "" Then setsDetail = Split(setsArray(i), "|") if UBound(setsDetail) >= 2 then if setsDetail(2) = request("area") then AreaFile = setsDetail(0) exit for end if end if End If Next GenerateSearchResults Request.Form("query") end if set filesys = Nothing elseif Request("ActionType") = "Paging" then PageItems = CInt(Request("PageItems")) PageIndex = CInt(Request("Page")) SortOrder = Request("SortOrder") QueryType = Request("optQueryType") if IsEmpty(Session("queryMatches")) then GenerateSearchResults Request.Form("query") End If %> Search Abstract Art
<% 'setup search area selection based in set.inc file sets = null set filesys = server.createobject("scripting.FileSystemObject") if filesys.FileExists(web_sse & "sets.inc") then 'sets = filesys.openTextfile(web_sse & "sets.inc").readall sets = ReadTextfile(filesys, web_sse & "sets.inc") end if set filesys = Nothing if IsNull(sets) = false then %>
 

Search My Web

 

Search for ">     Search Area:
>Boolean   >Exact match   Help

Items per page:     Sort by
 
<% call ShowSearchResults(PageItems,PageIndex,(len(trim(Request.Form("query"))) > 0)) %>
<% else %>
Could not open search area set file. Please contact web administrator.
<% end if %>
<%If 0 Then%>

This page must reside on a ASP-enabled server
<%End If%>  

FrontLook Search