% ' 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") %>
|
|
|
Procure
aqui o que pretende encontrar dentro do Portal Rio Maior Cidade Viva |
|
|
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 (" Artigos Encontrados: " & queryRS.RecordCount & vbCRLF) Response.Write (" Listagem: " & _ firstRow & " - " & lastRow & vbCRLF) Response.Write (" | " & vbCRLF) Response.Write ("|
| " & recordNumber & ". | " & _ vbCRLF) Response.Write ("" & 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 ("|
|
|