<% ' Force variable declaration. option explicit ' Declare variables. dim thisPage dim showRows dim target dim navEvent thisPage = "search.asp" showRows = 10 ' Get the request parameters. target = Request("target") navEvent = Request("navEvent") %> Rio Maior Cidade Viva - Procurar - Search (c) 1998-2004 SimpleSearch

Rio Maior Cidade Viva


Search - Procurar
 


Procure aqui o que pretende encontrar dentro do Portal Rio Maior Cidade Viva

Se não encontrou o que procurava na pesquisa, mande-nos um email para
riomaior-cidadeviva@riomaior-cidadeviva.com a solicitar a informação que pretende encontrar
.

 

Procurar

 

<% ' If the navEvent is not blank, then do the search. if navEvent <> "" then call doSearch() end if %> <% ' doSearch(): Performs the search. ' sub doSearch() dim ixQuery ' Index Server query object. dim queryRS ' Query recordset. ' Create the Index Server query object, setting the columns, the sort to ' descending, the max records to 300, and the query string to the given ' target. Note that the query string specifies, with ! (not) and the ' #vpath operators, that any files in the *\_vti path, should be excluded. ' (_vti* directories contain FrontPage Extension files, and we don't want ' users browsing them.) set ixQuery = Server.CreateObject("ixsso.Query") ixQuery.Catalog="riomaior-cidadeviva" ixQuery.Columns = _ "doctitle, vpath, filename, size, write, characterization, rank" ixQuery.SortBy = "rank[d]" ixQuery.MaxRecords = 300 ixQuery.Query = "(! #vpath *\_vti*) & (" & target & ")" ' Run the query (i.e. create the recordset). set queryRS = ixQuery.CreateRecordSet("nonsequential") queryRS.PageSize = showRows ' Check the query result. If it timed out or return no records, then show ' an appropriate message. Otherwise, show the hits. if (ixQuery.QueryTimedOut) then Response.Write ("

Erro: " & timedOut_Text & ".

" & vbCRLF) elseif (queryRS.RecordCount <= 0) then Response.Write ("

Não foram encontrados Artigos referentes a esse assunto.

" & vbCRLF) else call showHits(queryRS) end if end sub ' showHits(): Displays the query hits from the query recordset. ' sub showHits(queryRS) dim recordNumber ' record number dim docTitle ' document title dim firstRow ' first row being displayed dim lastRow ' last row being displayed dim rowCount ' number of rows displayed dim r ' remainder (used to determine if last page is short) ' Get the request parameters. firstRow = Request("firstRow") rowCount = Request("rowCount") ' Set the first row and last row based on the value of navEvent. if (navEvent = "Top") then firstRow = 1 elseif (navEvent = "Prev") then firstRow = firstRow - showRows if (firstRow < 1) then firstRow = 1 end if elseif (navEvent = "Next") then if ((firstRow + showRows) <= queryRS.RecordCount) then firstRow = firstRow + showRows end if elseif (navEvent = "Bottom") then ' Calculate the number of rows that should be shown on the last page, ' which is the remainder of the record count divided by the number of ' rows to show. r = queryRS.RecordCount mod showRows ' If the number of rows on the last page is 0, then set the first row ' to showRows back from the end. Otherwise, set the first row to r rows ' back. if (r = 0) then firstRow = queryRS.RecordCount - showRows + 1 else firstRow = queryRS.RecordCount - r + 1 end if else ' Do nothing. end if ' Set the last row, which will be the first row plus the number of rows ' minus 1. lastRow = firstRow + showRows - 1 ' If the last row is past the end, set it to the end. if (lastRow > queryRS.RecordCount) then lastRow = queryRS.RecordCount end if ' Go to the top of the record set, then move forward to the record that ' corresponds to the first row. queryRS.MoveFirst() if (firstRow > 1) then queryRS.Move(firstRow - 1) end if ' Show the summary info.: # of records found and range showing. Response.Write ("" & vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" " & vbCRLF) ' Show the records. rowCount = 0 do while ((not queryRS.EOF) and (rowCount < showRows)) recordNumber = firstRow + rowCount ' Get the document title. If it's blank, set it to "Untitled". docTitle = queryRS("doctitle") if docTitle = "" then docTitle = "Untitled" end if ' Show the record #, link to the document, URL, and characterization. Response.Write (" " & vbCRLF) Response.Write (" " & _ vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" " & vbCRLF) rowCount = rowCount + 1 queryRS.MoveNext() loop ' Display the navigation form. Response.Write (" " & vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" " & vbCRLF) ' Close the table. Response.Write ("
" & vbCRLF) Response.Write (" Artigos Encontrados: " & queryRS.RecordCount & vbCRLF) Response.Write ("    Listagem: " & _ firstRow & " - " & lastRow & vbCRLF) Response.Write ("
 
" & recordNumber & "." & vbCRLF) Response.Write (" " & _ docTitle & "" & vbCRLF) Response.Write ("
" & vbCRLF) Response.Write(" URL: http://" & _ Request("server_name") & queryRS("vpath") & "" & vbCRLF) Response.Write ("
" & vbCRLF) Response.Write (" " & _ Server.HTMLEncode(queryRS("characterization")) & "" & vbCRLF) Response.Write ("
 
" & vbCRLF) Response.Write ("
" & vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" " & vbCRLF) Response.Write (" " & vbCRLF) Response.Write ("
" & vbCRLF) Response.Write ("
" & vbCRLF) end sub %>
Rio Maior Cidade Viva