<% On Error Resume Next %> Your search results page <% ' Copyright © 2001 Axon Search, Inc. mypage=request("whichpage") If mypage="" then mypage=1 end if mypagesize=request("pagesize") If mypagesize="" then mypagesize=15 end if Dim objConn Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ Server.MapPath("fpdb/resultsindex.mdb") mySQL=Session("strSQL") IF mySQL="" THEN Response.Redirect("searchform.htm") END IF mySQL = "Select * From tblIndex WHERE " & mySQL objConn.Open Dim rstemp Set rstemp = Server.CreateObject("ADODB.Recordset") rstemp.open mySQL, objConn, adOpenKeySet Response.Write "" & rstemp.RecordCount & "" & " matches were found. " & _ "" & " New Search" & "" Response.Write "
" 'Do until rstemp.EOF rstemp.pagesize=mypagesize maxpages=cint(rstemp.pagecount) maxrecs=cint(rstemp.pagesize) rstemp.absolutepage=mypage howmanyrecs=0 howmanyfields=rstemp.fields.count -1 'Loop response.write "You are on page " & mypage & " of " & maxpages & "
" DO UNTIL rstemp.eof OR howmanyrecs >= maxrecs%>
"> <%Response.Write rstemp("Title")%>
<%Response.Write rstemp("Description")%>
<% rstemp.movenext howmanyrecs=howmanyrecs+1 LOOP rstemp.close set rstemp=nothing objConn.close set objConn=nothing PageNavBar Function PageNavBar() pad="" scriptname=request.servervariables("script_name") response.write "" response.write "" response.write "
" response.write "" if (mypage mod 10) = 0 then counterstart = mypage - 9 else counterstart = mypage - (mypage mod 10) + 1 end if counterend = counterstart + 9 if counterend > maxpages then counterend = maxpages if counterstart <> 1 then ref="First : " Response.Write ref ref="Previous " Response.Write ref end if Response.Write "[" for counter=counterstart to counterend If counter>=10 then pad="" end if if cstr(counter) <> mypage then ref="" & pad & counter & "" else ref="" & pad & counter & "" end if response.write ref if counter <> counterend then response.write " " next Response.Write "]" if counterend <> maxpages then ref=" Next" Response.Write ref ref=" : Last" Response.Write ref end if response.write "
" response.write "
" End Function %>