<% ' ------------------------------------------------------------------- ' File: search.asp ' ' Copyright (c) 2003 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("_private/_frontlook/","/","\") sTarget = "" 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 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

                                                                                   

 

 

internet.htm

Visit my blog:

Complementary and Alternative Medicine: Fair and Balanced

Search This Site

 

<% '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 end if set filesys = Nothing if IsNull(sets) = false then %>

 
 

 

Search for " style="font-size: 10px">     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%>