%@ LANGUAGE = VBScript %> <% ' Option Explicit %>
Advanced ASP Sample |
SearchString = <%=SearchString%> DocAuthorRestriction = <%=DocAuthorRestriction%> FSRest = <%=FSRest%> FSRestVal = <%=FSRestVal%> FSRestOther = <%=FSRestOther%> FMMod = <%=FMMod%> FMModDate = <%=FMModDate%> SortBy = <%=SortBy%> Scope = <%=Scope%> NewQuery = <%=CStr(NewQuery)%> UseSavedQuery = <%=CStr(UseSavedQuery)%><%end if%> <% if NewQuery then if UseSessions then set Session("Query") = nothing set Session("Recordset") = nothing end if NextRecordNumber = 1 set Q = Server.CreateObject("ixsso.Query") Composer = "" TheQuery = "" if SearchString <> "" then if Left( SearchSting, 1 ) <> "@" AND Left( SearchString, 1 ) <> "#" AND Left( SearchString, 1 ) <> "$" then TheQuery = "(@Contents " + SearchString + ")" else TheQuery = "(" + SearchString + ")" end if Composer = " & " end if if FSRestVal <> "any" then if FSRestVal <> "other" then TheQuery = "(@Size " + FSRest + FSRestVal + ") " + Composer + TheQuery else TheQuery = "(@Size " + FSRest + FSRestOther + ") " + Composer + TheQuery end if Composer = " & " end if if DocAuthorRestriction <> "" then TheQuery = "(@DocAuthor " + DocAuthorRestriction + ") " + Composer + TheQuery Composer = " & " end if if FMMod <> "" AND FMMod <> "any" then if FMMod <> "since" then TheQuery = "(@Write > " + FMMod + ") " + Composer + TheQuery else TheQuery = "(@Write > " + FMModDate + ") " + Composer + TheQuery end if end if if DebugFlag then Response.Write "TheQuery = " & TheQuery & "
<% LastRecordOnPage = NextRecordNumber + RS.PageSize - 1 CurrentPage = RS.AbsolutePage if RS.RecordCount <> -1 AND RS.RecordCount < LastRecordOnPage then LastRecordOnPage = RS.RecordCount end if Response.Write "Documents " & NextRecordNumber & " to " & LastRecordOnPage if RS.RecordCount <> -1 then Response.Write " of " & RS.RecordCount end if if SearchString <> "" then Response.Write " matching the query " & chr(34) & "" Response.Write SearchString & "" & chr(34) & ".
" end if %> <% if Not RS.EOF and NextRecordNumber <= LastRecordOnPage then%>
<%= NextRecordNumber%>. | <%if VarType(RS("DocTitle")) = 1 or RS("DocTitle") = "" then%> <%=RS("vpath")%>','<%=SearchString%>')" class="RecordTitle"><%= Server.HTMLEncode( RS("filename") )%> <%else%> <%=RS("vpath")%>','<%=SearchString%>')" class="RecordTitle"><%= Server.HTMLEncode(RS("DocTitle"))%> <%end if%> |
<% ' Construct the URL for hit highlighting WebHitsQuery = "CiWebHitsFile=" & Server.URLEncode( RS("vpath") ) WebHitsQuery = WebHitsQuery & "&CiRestriction=" & Server.URLEncode( Q.Query ) WebHitsQuery = WebHitsQuery & "&CiBeginHilite=" & Server.URLEncode( "" ) WebHitsQuery = WebHitsQuery & "&CiEndHilite=" & Server.URLEncode( "" ) WebHitsQuery = WebHitsQuery & "&CiUserParam3=" & QueryForm WebHitsQuery = WebHitsQuery & "&CiLocale=" & Q.LocaleID %> Summary Full |
<%if VarType(RS("characterization")) = 8 and RS("characterization") <> "" then%>
Abstract:
<%= Server.HTMLEncode(RS("characterization"))%>
<%end if%>
<%=RS("vpath")%>','<%=SearchString%>')" class="RecordStats" style="color:blue;">http://<%=Request("server_name")%><%=RS("vpath")%>
|
<%
else ' NOT RS.EOF
if NextRecordNumber = 1 then
Response.Write "No documents matched the query
" else Response.Write "No more documents in the query
" end if end if ' NOT RS.EOF if NOT Q.OutOfDate then ' If the index is current, display the fact %>
The index is up to date.
<%end if
if Q.QueryIncomplete then
' If the query was not executed because it needed to enumerate to
' resolve the query instead of using the index, but AllowEnumeration
' was FALSE, let the user know
%>
The query is too expensive to complete.
<%end if
if Q.QueryTimedOut then
' If the query took too long to execute (for example, if too much work
' was required to resolve the query), let the user know %>
The query took too long to complete.
<%end if%>
<%SaveQuery = UseSessions%> <%end if%> <%if Not RS.EOF then ' This is the "next" button. ' This button retrieves the next page of documents for the query. %> | <%SaveQuery = UseSessions%> <%end if%> |