home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / is20.cab / advquery.asp < prev    next >
Text File  |  1997-10-14  |  19KB  |  550 lines

  1. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN" "html.dtd">
  2. <HTML>
  3. <HEAD>
  4.  
  5.     <SCRIPT LANGUAGE="VBScript" RUNAT="Server">
  6.     <!--
  7.         option explicit
  8.       -->
  9.     </SCRIPT>
  10.     <TITLE>Advanced Index Server Search Form</TITLE>
  11.     <LINK REL=STYLESHEET HREF="is2style.css" TYPE="text/css">
  12.     <META NAME="DESCRIPTION" CONTENT="Sample query form for Microsoft Index Server">
  13.     <META NAME="AUTHOR"      CONTENT="Index Server Team">
  14.     <META NAME="KEYWORDS"    CONTENT="query, content, hit">
  15.     <META NAME="SUBJECT"     CONTENT="sample form">
  16.     <META NAME="MS.CATEGORY" CONTENT="Internet">
  17.     <META NAME="MS.LOCALE"   CONTENT="EN-US">
  18.     <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252">
  19. <%
  20.     DebugFlag = FALSE
  21.     NewQuery = FALSE
  22.     UseSavedQuery = FALSE
  23.     SearchString = ""
  24.     QueryForm = Request.ServerVariables("PATH_INFO")
  25.  
  26.     if Request.ServerVariables("REQUEST_METHOD") = "POST" then
  27.         SearchString = Request.Form("SearchString")
  28.         DocAuthorRestriction = Request.Form("DocAuthorRestriction")
  29.         FSRest = Request.Form("FSRest")
  30.         FSRestVal = Request.Form("FSRestVal")
  31.         FSRestOther = Request.Form("FSRestOther")
  32.         FMMod = Request.Form("FMMod")
  33.         FMModDate = Request.Form("FMModDate")
  34.         SortBy = Request.Form("SortBy")
  35.         Colset = Request.Form("ColChoice")
  36.         Scope = Request.Form("Scope")
  37.         RankBase = Request.Form("RankBase")
  38.         ' NOTE: this will be true only if the button is actually pushed.
  39.         if Request.Form("Action") = "Execute" then
  40.             NewQuery = TRUE
  41.         elseif Request.Form("pg") <> "" then
  42.             UseSavedQuery=TRUE
  43.             NextPageNumber = Request.Form("pg")
  44.         end if
  45.     end if
  46.  %>
  47. </HEAD>
  48.  
  49. <BODY background="is2bkgnd.gif" OnLoad="SetAll()" LANGUAGE=JavaScript>
  50.  
  51. <TABLE>
  52.     <TR><TD><A HREF="http://www.microsoft.com/ntserver/search" target="_top"><IMG SRC ="is2logo.gif" border=0 VALIGN=MIDDLE ALIGN=LEFT></a></TD></TR>
  53.     <TR><TD ALIGN="RIGHT"><H3>Advanced ASP Sample</H3></TD></TR>
  54. </TABLE>
  55.  
  56. <SCRIPT LANGUAGE=JavaScript>
  57. <!--
  58. function SetAll()
  59. {
  60.     document.QForm.SearchString.value = "<%=SearchString%>";
  61.  
  62.     <%select case FSRest%>
  63.     <%case " > "%>
  64.         document.QForm.FSRest.selectedIndex = 1;
  65.     <%case else%>
  66.         document.QForm.FSRest.selectedIndex = 0;
  67.     <%end select%>
  68.  
  69.     <%select case FSRestVal%>
  70.     <%case "any"%>
  71.         document.QForm.FSRestVal.selectedIndex = 0;
  72.     <%case "100"%>
  73.         document.QForm.FSRestVal.selectedIndex = 1;
  74.     <%case "1024"%>
  75.         document.QForm.FSRestVal.selectedIndex = 2;
  76.     <%case "10240"%>
  77.         document.QForm.FSRestVal.selectedIndex = 3;
  78.     <%case "102400"%>
  79.         document.QForm.FSRestVal.selectedIndex = 4;
  80.     <%case "1048576"%>
  81.         document.QForm.FSRestVal.selectedIndex = 5;
  82.     <%case "10485760"%>
  83.         document.QForm.FSRestVal.selectedIndex = 6;
  84.     <%case "104857600"%>
  85.         document.QForm.FSRestVal.selectedIndex = 7;
  86.     <%case "other"%>
  87.         document.QForm.FSRestVal.selectedIndex = 8;
  88.     <%case else%>
  89.         document.QForm.FSRestVal.selectedIndex = 0;
  90.     <%end select%>
  91.  
  92.     document.QForm.FSRestOther.value = "<%=FSRestOther%>";
  93.  
  94.     <%select case FMMod%>
  95.     <%case "any"%>
  96.         document.QForm.FMMod.selectedIndex = 0;
  97.     <%case "-10n"%>
  98.         document.QForm.FMMod.selectedIndex = 1;
  99.     <%case "-1h"%>
  100.         document.QForm.FMMod.selectedIndex = 2;
  101.     <%case "-1d"%>
  102.         document.QForm.FMMod.selectedIndex = 3;
  103.     <%case "-1w"%>
  104.         document.QForm.FMMod.selectedIndex = 4;
  105.     <%case "-1m"%>
  106.         document.QForm.FMMod.selectedIndex = 5;
  107.     <%case "-1y"%>
  108.         document.QForm.FMMod.selectedIndex = 6;
  109.     <%case "since"%>
  110.         document.QForm.FMMod.selectedIndex = 7;
  111.     <%case else%>
  112.         document.QForm.FMMod.selectedIndex = 0;
  113.     <%end select%>
  114.  
  115.     document.QForm.FMModDate.value = "<%=FMModDate%>";
  116.  
  117.     document.QForm.DocAuthorRestriction.value = "<%=DocAuthorRestriction%>";
  118. }
  119. //-->
  120. </SCRIPT>
  121.  
  122.  
  123.  
  124. <FORM NAME="QForm" ACTION="<%=QueryForm%>" METHOD=POST>
  125.  
  126. <!--     -->
  127.  
  128. <table width=500>
  129.  
  130.         <tr>
  131.                 <td>Enter your query:</td>
  132.                 <td><INPUT TYPE="TEXT" NAME="SearchString" SIZE="51" MAXLENGTH="100" VALUE=""></td>
  133.         </tr>
  134.  
  135.         <tr>
  136.                 <td align="right" colspan=2>Document author:
  137.                         <INPUT TYPE="TEXT" NAME="DocAuthorRestriction" SIZE="27" MAXLENGTH="100" VALUE="">
  138.                 <td>
  139.         </tr>
  140.  
  141.         <tr>
  142.                 <td align="right" colspan=2>Where File Size is:
  143.                         <SELECT NAME="FSRest">
  144.                    <!-- <OPTION VALUE=" < " <%if FSRest = " < " then%>SELECTED <%end if%>>Less Than
  145.                         <OPTION VALUE=" > " <%if FSRest = " > " then%>SELECTED <%end if%>>Greater Than
  146.                    -->
  147.                    <OPTION VALUE=" < " SELECTED>Less Than
  148.                    <OPTION VALUE=" > " >Greater Than
  149.             </SELECT>
  150.  
  151.             <SELECT NAME="FSRestVal">
  152.                    <OPTION VALUE="any" SELECTED>any size
  153.                    <OPTION VALUE="100" >100 bytes
  154.                    <OPTION VALUE="1024" >1K bytes
  155.                    <OPTION VALUE="10240" >10K bytes
  156.                    <OPTION VALUE="102400" >100K bytes
  157.                    <OPTION VALUE="1048576" >1M byte
  158.                    <OPTION VALUE="10485760" >10M bytes
  159.                    <OPTION VALUE="104857600" >100M bytes
  160.                    <OPTION VALUE="other" >Other
  161.             </SELECT>
  162.  
  163.             <INPUT TYPE="TEXT" NAME="FSRestOther" SIZE="12" MAXLENGTH="9" VALUE="">
  164.                 </td>
  165.         </tr>
  166.  
  167.         <tr>
  168.                 <td align="right" colspan=2>Modified:
  169.                         <SELECT NAME="FMMod">
  170.                 <OPTION VALUE="any" SELECTED >at any time.
  171.                 <OPTION VALUE="-10n">in the last 10 minutes.
  172.                 <OPTION VALUE="-1h">in the last hour.
  173.                 <OPTION VALUE="-1d">in the last day.
  174.                 <OPTION VALUE="-1w">in the last week.
  175.                 <OPTION VALUE="-1m">in the last month.
  176.                 <OPTION VALUE="-1y">in the last year.
  177.                 <OPTION VALUE="since">since GMT (yy/mm/dd)       .
  178.             </SELECT>
  179.             <INPUT TYPE="TEXT" NAME="FMModDate" SIZE="12" MAXLENGTH="9" VALUE="">
  180.                 </td>
  181.     </tr>
  182.  
  183.         <tr>
  184.                 <td align="right"><A HREF="ixtiphlp.htm">Tips for searching</A></td>
  185.                 <td align="right">
  186.                         <INPUT TYPE="SUBMIT" NAME="Action" VALUE="Execute">
  187.             <INPUT TYPE="RESET"  NAME="Clear" VALUE="Clear">
  188.                 </td>
  189.         </tr>
  190. </table>
  191.  
  192.         <INPUT TYPE="HIDDEN" NAME="SortBy" VALUE="rank[d]">
  193.         <INPUT TYPE="HIDDEN" NAME="ColChoice" VALUE="1">
  194.         <INPUT TYPE="HIDDEN" NAME="Scope" VALUE="/">
  195.  
  196. </FORM>
  197.  
  198. <BR>
  199.  
  200. <%if DebugFlag then%>
  201.     <PRE>
  202.     SearchString         = <%=SearchString%>
  203.     DocAuthorRestriction = <%=DocAuthorRestriction%>
  204.     FSRest               = <%=FSRest%>
  205.     FSRestVal            = <%=FSRestVal%>
  206.     FSRestOther          = <%=FSRestOther%>
  207.     FMMod                = <%=FMMod%>
  208.     FMModDate            = <%=FMModDate%>
  209.     SortBy               = <%=SortBy%>
  210.     Colset               = <%=Colset%>
  211.     Scope                = <%=Scope%>
  212.     NewQuery             = <%=CStr(NewQuery)%>
  213.     UseSavedQuery        = <%=CStr(UseSavedQuery)%>
  214.     </PRE>
  215. <%end if%>
  216.  
  217. <%
  218.     if NewQuery then
  219.         set Session("Query") = nothing
  220.         set Session("Recordset") = nothing
  221.         NextRecordNumber = 1
  222.         set Q = Server.CreateObject("ixsso.Query")
  223.  
  224.         Composer = ""
  225.         TheQuery = ""
  226.  
  227.         if SearchString <> "" then
  228.             if Left( SearchSting, 1 ) <> "@" AND Left( SearchString, 1 ) <> "#" AND Left( SearchString, 1 ) <> "$" then
  229.                 TheQuery = "@Contents " + SearchString
  230.             else
  231.                 TheQuery = SearchString
  232.             end if
  233.  
  234.             Composer = " & "
  235.         end if
  236.  
  237.         if FSRestVal <> "any" then
  238.             if FSRestVal <> "other" then
  239.                 TheQuery = "(@Size " + FSRest + FSRestVal + ") " + Composer + TheQuery
  240.             else
  241.                 TheQuery = "(@Size " + FSRest + FSRestOther + ") " + Composer + TheQuery
  242.             end if
  243.  
  244.             Composer = " & "
  245.         end if
  246.  
  247.         if DocAuthorRestriction <> "" then
  248.             TheQuery = "(@DocAuthor " + DocAuthorRestriction + ") " + Composer + TheQuery
  249.  
  250.             Composer = " & "
  251.         end if
  252.  
  253.         if FMMod <> "" AND FMMod <> "any" then
  254.             if FMMod <> "since" then
  255.                 TheQuery = "(@Write > " + FMMod + ") " + Composer + TheQuery
  256.             else
  257.                 TheQuery = "(@Write > " + FMModDate + ") " + Composer + TheQuery
  258.             end if
  259.         end if
  260.  
  261. %> <%if DebugFlag then%> TheQuery = <%=TheQuery%> <%end if%> <%
  262.  
  263.         Q.Query = TheQuery
  264.  
  265.         Q.SortBy = SortBy
  266.         if Scope <> "/" then
  267.             set Util = Server.CreateObject("ixsso.Util")
  268.             Util.AddScopeToQuery Q, Scope, "DEEP"
  269.             set Util = nothing
  270.         end if
  271.         if ColSet = 1 then
  272.             Q.Columns = "DocTitle, vpath, path, filename, size, write, characterization, rank"
  273.             RecordsPerPage = 10
  274.         elseif ColSet = 2 then
  275.             Q.Columns = "vpath, path"
  276.             RecordsPerPage = 200
  277.         elseif ColSet = 3 then
  278.             Q.Columns = "filename, vpath, size, write"
  279.             RecordsPerPage = 25
  280.         end if
  281.  
  282.         set RS = Q.CreateRecordSet("nonsequential")
  283.         RS.PageSize = RecordsPerPage
  284.         ActiveQuery = TRUE
  285.     elseif UseSavedQuery then
  286.         if IsObject( Session("Query") ) And IsObject( Session("RecordSet") ) then
  287.             set Q = Session("Query")
  288.             set RS = Session("RecordSet")
  289.             if RS.RecordCount <> -1 and NextPageNumber <> -1 then
  290.                 RS.AbsolutePage = NextPageNumber
  291.                 NextRecordNumber = RS.AbsolutePosition
  292.             end if
  293.             ActiveQuery = TRUE
  294.         else
  295.             Response.Write "ERROR - No saved query"
  296.         end if
  297.     end if
  298.  
  299.     if ActiveQuery then
  300.         if not RS.EOF then
  301.  %>
  302.  
  303. <p>
  304. <HR WIDTH=80% ALIGN=center SIZE=3>
  305. <p>
  306.  
  307. <%
  308.         LastRecordOnPage = NextRecordNumber + RS.PageSize - 1
  309.         CurrentPage = RS.AbsolutePage
  310.         if RS.RecordCount <> -1 AND RS.RecordCount < LastRecordOnPage then
  311.             LastRecordOnPage = RS.RecordCount
  312.         end if
  313.  
  314.         Response.Write "Documents " & NextRecordNumber & " to " & LastRecordOnPage
  315.         if RS.RecordCount <> -1 then
  316.             Response.Write " of " & RS.RecordCount
  317.         end if
  318.  
  319.         if SearchString <> "" then
  320.             Response.Write " matching the query " & chr(34) & "<I>"
  321.             Response.Write SearchString & "</I>" & chr(34) & ".<P>"
  322.         end if
  323.  %>
  324. </PRE>
  325.  
  326. <table border=0>
  327. <colgroup width=105>
  328. <% Do While Not RS.EOF and NextRecordNumber <= LastRecordOnPage 
  329.  
  330.     ' This is the detail portion for Title, Abstract, URL, Size, and
  331.     ' Modification Date.
  332.     ' If there is a title, display it, otherwise display the filename.
  333.     ' Graphically indicate rank of document with list of stars (*'s).
  334.  
  335.     if NextRecordNumber = 1 then
  336.         RankBase=RS("rank")
  337.     
  338.         if RankBase>1000 then
  339.             RankBase=1000
  340.         elseif RankBase<1 then
  341.             RankBase=1
  342.         end if
  343.     end if
  344.  
  345.     NormRank = RS("rank")/RankBase
  346.  
  347.     if NormRank > 0.80 then
  348.         stars = "rankbtn5.gif"
  349.     elseif NormRank > 0.60 then
  350.         stars = "rankbtn4.gif"
  351.     elseif NormRank > 0.40 then
  352.         stars = "rankbtn3.gif"
  353.     elseif NormRank >.20 then
  354.         stars = "rankbtn2.gif"
  355.     else stars = "rankbtn1.gif"
  356.  
  357.     end if
  358.  
  359. %>
  360.  
  361.     <tr class="RecordTitle">
  362.         <td align="right" valign=top class="RecordTitle">
  363.             <%= NextRecordNumber%>.
  364.         </td>
  365.         <td><b class="RecordTitle"> 
  366.             <%if VarType(RS("DocTitle")) = 1 or RS("DocTitle") = "" then%>
  367.                 <a href="<%=RS("vpath")%>" class="RecordTitle"><%= Server.HTMLEncode( RS("filename") )%></a>
  368.             <%else%>
  369.                 <a href="<%=RS("vpath")%>" class="RecordTitle"><%= Server.HTMLEncode(RS("DocTitle"))%></a>
  370.             <%end if%>
  371.         </b></td>
  372.     </tr>
  373.     <tr>
  374.         <td valign=top align=left>
  375.             <IMG SRC="<%=stars%>">
  376.             <br>
  377. <%
  378.     ' Construct the URL for hit highlighting
  379.             WebHitsQuery = "CiWebHitsFile=" & Server.URLEncode( RS("vpath") )
  380.             WebHitsQuery = WebHitsQuery & "&CiRestriction=" & Server.URLEncode( Q.Query )
  381.             WebHitsQuery = WebHitsQuery & "&CiBeginHilite=" & Server.URLEncode( "<b class=Hit>" )
  382.             WebHitsQuery = WebHitsQuery & "&CiEndHilite=" & Server.URLEncode( "</b>" )
  383.             WebHitsQuery = WebHitsQuery & "&CiUserParam3=" & QueryForm
  384. '            WebHitsQuery = WebHitsQuery & "&CiLocale=" & Q.LocaleID
  385.  %>
  386.             <a href="oop/qsumrhit.htw?<%= WebHitsQuery %>"><IMG src="hilight.gif" align=left alt="Highlight matching terms in document using Summary mode."> Summary</a>
  387.             <br>
  388.             <a href="oop/qfullhit.htw?<%= WebHitsQuery %>&CiHiliteType=Full"><IMG src="hilight.gif" align=left alt="Highlight matching terms in document."> Full</a>
  389.         </td>
  390.         <td valign=top>
  391.             <%if VarType(RS("characterization")) = 8 and RS("characterization") <> "" then%>
  392.                 <b><i>Abstract:  </I></b><%= Server.HTMLEncode(RS("characterization"))%>
  393.             <%end if%>
  394.             <p>
  395.             <i class="RecordStats"><a href="<%=RS("vpath")%>" class="RecordStats" style="color:blue;">http://<%=Request("server_name")%><%=RS("vpath")%></a>
  396.             <br><%if RS("size") = "" then%>(size and time unknown)<%else%>size <%=RS("size")%> bytes - <%=RS("write")%> GMT<%end if%></i>
  397.         </td>
  398.     </tr>
  399.     <tr></tr>
  400. <%
  401.           RS.MoveNext
  402.           NextRecordNumber = NextRecordNumber+1
  403.       Loop
  404.  %>
  405.  
  406. </table>
  407.  
  408. <P><BR>
  409.  
  410. <%
  411.   else   ' NOT RS.EOF
  412.       if NextRecordNumber = 1 then
  413.           Response.Write "No documents matched the query<P>"
  414.       else
  415.           Response.Write "No more documents in the query<P>"
  416.       end if
  417.  
  418.   end if ' NOT RS.EOF
  419.  %>
  420.  
  421. <!-- If the index is out of date, display the fact -->
  422.  
  423. <%if NOT Q.OutOfDate then%>
  424.     <P>
  425.     <I>The index is up-to-date.</I><BR>
  426. <%end if%>
  427.  
  428. <!--
  429.     If the query was not executed because it needed to enumerate to
  430.     resolve the query instead of using the index, but AllowEnumeration
  431.     was FALSE, let the user know
  432. -->
  433.  
  434. <%if Q.QueryIncomplete then%>
  435.     <P>
  436.     <I><B>The query is too expensive to complete.</B></I><BR>
  437. <%end if%>
  438.  
  439. <!--
  440.     If the query took too long to execute (for example, if too much work
  441.     was required to resolve the query), let the user know
  442. -->
  443.  
  444. <%if Q.QueryTimedOut then%>
  445.     <P>
  446.     <I><B>The query took too long to complete.</B></I><BR>
  447. <%end if%>
  448.  
  449.  
  450. <TABLE>
  451.  
  452. <!--
  453.     This is the "previous" button.
  454.     This retrieves the previous page of documents for the query.
  455. -->
  456.  
  457. <%SaveQuery = FALSE%>
  458. <%if CurrentPage > 1 and RS.RecordCount <> -1 then ' BUGBUG - use RS.Supports(adMovePrevious)%>
  459.     <td align=left>
  460.         <form action="<%=QueryForm%>" method="post">
  461.            <INPUT TYPE="HIDDEN" NAME="SearchString" VALUE="<%=SearchString%>">
  462.            <INPUT TYPE="HIDDEN" NAME="DocAuthorRestriction"  VALUE="<%=DocAuthorRestriction%>">
  463.            <INPUT TYPE="HIDDEN" NAME="FSRest" VALUE="<%=FSRest%>">
  464.            <INPUT TYPE="HIDDEN" NAME="FSRestVal" VALUE="<%=FSRestVal%>">
  465.            <INPUT TYPE="HIDDEN" NAME="FSRestOther" VALUE="<%=FSRestOther%>">
  466.            <INPUT TYPE="HIDDEN" NAME="FMMod" VALUE="<%=FMMod%>">
  467.            <INPUT TYPE="HIDDEN" NAME="FMModDate" VALUE="<%=FMModDate%>">
  468.            <INPUT TYPE="HIDDEN" NAME="SortBy" VALUE="<%=SortBy%>">
  469.            <INPUT TYPE="HIDDEN" NAME="Colset" VALUE="<%=ColChoice%>">
  470.            <INPUT TYPE="HIDDEN" NAME="Scope" VALUE="<%=Scope%>">
  471.            <INPUT TYPE="HIDDEN" name="pg" VALUE="<%=CurrentPage-1%>" >
  472.            <INPUT TYPE="HIDDEN" NAME="RankBase" VALUE="<%=RankBase%>">
  473.  
  474.            <input type="submit" value="Previous <%=RS.PageSize%> documents">
  475.         </form>
  476.     </td>
  477.     <%SaveQuery = TRUE%>
  478. <%end if%>
  479.  
  480. <!--
  481.     This is the "next" button.
  482.     This button retrieves the next page of documents for the query.
  483. -->
  484.  
  485. <%if Not RS.EOF then%>
  486.     <td align=right>
  487.         <form action="<%=QueryForm%>" method="post">
  488.  
  489.            <INPUT TYPE="HIDDEN" NAME="SearchString" VALUE="<%=SearchString%>">
  490.            <INPUT TYPE="HIDDEN" NAME="DocAuthorRestriction"  VALUE="<%=DocAuthorRestriction%>">
  491.            <INPUT TYPE="HIDDEN" NAME="FSRest" VALUE="<%=FSRest%>">
  492.            <INPUT TYPE="HIDDEN" NAME="FSRestVal" VALUE="<%=FSRestVal%>">
  493.            <INPUT TYPE="HIDDEN" NAME="FSRestOther" VALUE="<%=FSRestOther%>">
  494.            <INPUT TYPE="HIDDEN" NAME="FMMod" VALUE="<%=FMMod%>">
  495.            <INPUT TYPE="HIDDEN" NAME="FMModDate" VALUE="<%=FMModDate%>">
  496.            <INPUT TYPE="HIDDEN" NAME="SortBy" VALUE="<%=SortBy%>">
  497.            <INPUT TYPE="HIDDEN" NAME="Colset" VALUE="<%=ColChoice%>">
  498.            <INPUT TYPE="HIDDEN" NAME="Scope" VALUE="<%=Scope%>">
  499.            <INPUT TYPE="HIDDEN" name="pg" VALUE="<%=CurrentPage+1%>" >
  500.            <INPUT TYPE="HIDDEN" NAME = "RankBase" VALUE="<%=RankBase%>">
  501.  
  502.             <% NextString = "Next "
  503.                if RS.RecordCount <> -1 then
  504.                    NextSet = (RS.RecordCount - NextRecordNumber) + 1
  505.                    if NextSet > RS.PageSize then
  506.                        NextSet = RS.PageSize
  507.                    end if
  508.                    NextString = NextString & NextSet & " documents"
  509.                else
  510.                    NextString = NextString & " page of documents"
  511.                end if
  512.              %>
  513.             <input type="submit" value="<%=NextString%>">
  514.         </form>
  515.     </td>
  516.     <%SaveQuery = TRUE%>
  517. <%end if%>
  518.  
  519. </TABLE>
  520.  
  521.  
  522. <!-- Display the page number -->
  523.  
  524. Page <%=CurrentPage%>
  525. <%if RS.PageCount <> -1 then
  526.      Response.Write " of " & RS.PageCount
  527.   end if %>
  528.  
  529. <%
  530.     ' If either of the previous or back buttons were displayed, save the query
  531.     ' and the recordset in session variables.
  532.     if SaveQuery then
  533.         set Session("Query") = Q
  534.         set Session("RecordSet") = RS
  535.     else
  536.         RS.close
  537.         Set RS = Nothing
  538.         Set Q = Nothing
  539.         set Session("Query") = Nothing
  540.         set Session("RecordSet") = Nothing
  541.     end if
  542.  %>
  543. <% end if %>
  544.  
  545. <!--#include file ="is2foot.inc"-->
  546.  
  547. </BODY>
  548. </HTML>
  549.  
  550.