<% 'Option Explicit Dim strSection Dim strAdPage 'Specify header image for section strSection = "search" 'Specify site page for ad server/section strAdPage = "search" %> <% Dim SearchString Dim intPageSize Dim NextRecordNumber Dim StopRecord Dim x Dim Q Dim strHTML ' -------------------------------- fFormatForDB() Function fFormatForDB(strInString) Dim strOutString strOutString = strInString If InStr(strOutString, chr(34)) <> 0 Then strOutString = Replace(strOutString, chr(34), """) End If If InStr(strOutString, chr(39)) <> 0 Then strOutString = Replace(strOutString, chr(39), "'") End If fFormatForDB = strOutString End Function ' fFormatForDB() ' -------------------------------- fFormatForSearch() Function fFormatForSearch(strInString) Dim strOutString strOutString = strInString If InStr(strOutString, """) <> 0 Then strOutString = Replace(strOutString, """, chr(34)) End If If InStr(strOutString, "'") <> 0 Then strOutString = Replace(strOutString, "'", chr(39)) End If fFormatForSearch = strOutString End Function ' fFormatForSearch() SearchString = fFormatForDB(Request.Form("SearchString")) 'Response.Write SearchString & "
" 'Response.Flush intPageSize = 10 If Request.Form("nextHit") = "" OR Request.Form("newQuery") = "Y" Then NextRecordNumber = 1 StopRecord = 9 Else NextRecordNumber = CInt(Request.Form("nextHit")) + 1 StopRecord = NextRecordNumber + (intPageSize - 1) End If If Request.ServerVariables("REQUEST_METHOD") = "POST" Then 'SearchString = fFormatForDB(Request.Form("SearchString")) 'SearchString = Request.Form("SearchString") Set Q = Server.CreateObject("ixsso.Query") Set util = Server.CreateObject("ixsso.util") Q.Catalog = "OP_Phoenix_Live" Q.Query = fFormatForSearch(SearchString) Q.MaxRecords = 300 Q.SortBy = "write[d], rank[d]" Q.Columns = "DocTitle, vpath, path, filename, size, write, characterization" util.AddScopeToQuery Q, "/", "deep" Set RS = Q.CreateRecordSet("nonsequential") End If %> Search | Boston Phoenix

Search the Boston Phoenix

Enter your query below:
     


<% If Request.Form("newQuery") = "Y" OR Request.Form("newQuery") = "N" Then %>

Documents <%= NextRecordNumber %> to <%= StopRecord %> of <%= RS.RecordCount %>
<% End If %> <% 'StopRecord = NextRecordNumber + (intPageSize - 1) 'Response.Write "NextRecord: " & NextRecordNumber & "
" 'Response.Write "StopRecord: " & StopRecord & "

" If NextRecordNumber > 1 Then For x = 1 To NextRecordNumber - 1 'For x = NextRecordNumber To StopRecord If NOT RS.EOF Then RS.MoveNext End If Next End If 'If Request.Form("newQuery") <> "" Then Do Until RS.EOF OR NextRecordNumber = StopRecord + 1 %> <% ' This is the detail portion for Title, Abstract, URL, Size, and ' Modification Date. ' If there is a title, display it, otherwise display the virtual path. %>

<%= RS.AbsolutePosition%>. <%if VarType(RS("DocTitle")) = 1 or RS("DocTitle") = "" then%> "><%= Server.HTMLEncode( RS("filename") )%> <%else%> "><%= Server.HTMLEncode(RS("DocTitle"))%> <%end if%>
<%if VarType(RS("characterization")) = 8 and RS("characterization") <> "" then%> <%= Server.HTMLEncode(RS("characterization"))%>
<%end if%> ">http://<%=Request("server_name")%><%=RS("vpath")%>
<% RS.MoveNext NextRecordNumber = NextRecordNumber + 1 Loop %>

<% If StopRecord < 10 Then %> <% Else %> <% End If %> <% If StopRecord >= RS.RecordCount Then %> <% Else %> <% End If %>
<% 'Else %> <% 'End If %>