| "
temp = 1
End If
If temp = 1 Then
Response.Write " |
"
End If
If Not IsEmpty(Request.QueryString("ref")) Then
Response.Write "
Top 10 links nesta categoria"
strSQL = "SELECT * From tblWebsites WHERE category = '" & Request.QueryString("ref") & "' ORDER By Rating DESC, No_of_ratings DESC, Hits DESC ;"
set rsSearchResults = adoCon.Execute(strSQL)
Response.Write vbCrLf & "
"
Response.Write vbCrLf & " "
Response.Write vbCrLf & " | "
If rsSearchResults.EOF Then
Response.Write "Nenhum link foi encontrado |
"
End If
For temp = 1 to 5
If rsSearchResults.EOF Then Exit For
'Display the details of the URLs found
Response.Write vbCrLf & "
" & rsSearchResults("Title") & ""
Response.Write vbCrLf & "
"
Response.Write vbCrLf & " " & rsSearchResults("Description")
Response.Write vbCrLf & "
"
Response.Write vbCrLf & "
Avaliação média baseada em " & CLng(rsSearchResults("No_of_ratings")) & " votos - Rate Link - Hits " & CInt(rsSearchResults("Hits")) & " - " & Replace(rsSearchResults("URL"), "http://", "") & ""
Response.Write vbCrLf & "
"
'Move to the next record in the database
rsSearchResults.MoveNext
'Loop back round
Next
'Close the HTML table displaying the results
Response.Write vbCrLf & " "
Response.Write vbCrLf & " "
Response.Write vbCrLf & " "
Response.Write "
"
End If
Else
'Display the HTML table with the results status of the search or what type of search it is
Response.Write vbCrLf & "
"
Response.Write vbCrLf & " "
Response.Write vbCrLf & " "
Response.Write vbCrLf & " "
Response.Write vbCrLf & " "
'Display that the URL is randomly generated
If Request.QueryString("submit") = "Random Search" Then
Response.Write vbCrLf & " | Random Search for " & strSearchKeywords & ". | "
'Display that we are showing a page of the latest URL's indexed
ElseIf Request.QueryString("mode") = "new" Then
Response.Write vbCrLf & " As " & intRecordsPerPage & " últimas URL's Indexadas. | "
'Display that one of the words entered was to short
ElseIf blnSearchWordLenthOK = False Then
Response.Write vbCrLf & " Pesquisado " & strSearchKeywords & ". Uma das palavras procuraradas é muito curta. | "
'Display that there where no matching records found
ElseIf rsSearchResults.EOF Then
Response.Write vbCrLf & " Pesquisado " & strSearchKeywords & ". Desculpe, nenhum resultado achado. | "
'Else Search went OK so display how many records found
Else
Response.Write vbCrLf & " Pesquisado " & strSearchKeywords & ". Exibindo Resultados " & intRecordDisplayFrom & " - " & intRecordDisplayedTo & " of " & lngTotalRecordsFound & ". | "
End If
'Close the HTML table with the search status
Response.Write vbCrLf & " "
Response.Write vbCrLf & " "
Response.Write vbCrLf & " | "
Response.Write vbCrLf & "
"
Response.Write vbCrLf & "
"
'Display the various results
'HTML table to display the search results or an error if there are no results
Response.Write vbCrLf & "
" & vbCrLf
Response.Write vbCrLf & "
"
Response.Write vbCrLf & " "
Response.Write vbCrLf & " "
'Display error message if one of the words is to short
If blnSearchWordLenthOK = False And NOT Request.QueryString("mode") = "new" Then
'Write HTML displaying the error
Response.Write vbCrLf & " Buscando na web por - " & strSearchKeywords & " - Desculpe, não foi encontrado nenhum arquivo."
Response.Write vbCrLf & "
"
Response.Write vbCrLf & " Sugestões:"
Response.Write vbCrLf & " "
Response.Write vbCrLf & " - Tenha certeza todas as palavras são soletradas corretamente.
- Tente palavras chaves diferentes.
- Tente palavras chaves mais gerais.
- Tente menos palavras chaves.
"
'If no search results found then show an error message
ElseIf rsSearchResults.EOF Then
'Write HTML displaying the error
Response.Write vbCrLf & " Buscando na web por - " & strSearchKeywords & " - Desculpe, não foi encontrado nenhum arquivo."
Response.Write vbCrLf & "
"
Response.Write vbCrLf & " Sugestões:"
Response.Write vbCrLf & " "
Response.Write vbCrLf & " - Tenha certeza todas as palavras são soletradas corretamente.
- Tente palavras chaves diferentes.
- Tente palavras chaves mais gerais.
- Tente menos palavras chaves.
"
Else
'For....Next Loop to display the results from the database
For intRecordLoopCounter = 1 to intRecordsPerPage
'If there are no records left to display then exit loop
If rsSearchResults.EOF Then Exit For
'Display the details of the URLs found
Response.Write vbCrLf & " " & rsSearchResults("Title") & ""
Response.Write vbCrLf & " "
Response.Write vbCrLf & " " & rsSearchResults("Description")
Response.Write vbCrLf & " "
Response.Write vbCrLf & " Avaliação média baseada em " & CLng(rsSearchResults("No_of_ratings")) & " votos - Vote no link - Hits " & CInt(rsSearchResults("Hits")) & " - " & Replace(rsSearchResults("URL"), "http://", "") & ""
Response.Write vbCrLf & "
"
'Move to the next record in the database
rsSearchResults.MoveNext
'Loop back round
Next
End If
'Close the HTML table displaying the results
Response.Write vbCrLf & " | "
Response.Write vbCrLf & "
"
Response.Write vbCrLf & "
"
'If there are more pages to display then add a title to the other pages
If intRecordPositionPageNum > 1 OR NOT rsSearchResults.EOF AND blnSearchWordLenthOK = True Then
'Display an HTML table with links to the other search results
Response.Write vbCrLf & "
"
Response.Write vbCrLf & " "
Response.Write vbCrLf & " "
Response.Write vbCrLf & " "
Response.Write vbCrLf & " "
Response.Write vbCrLf & " | "
'If there are more pages to display then add a title to the other pages
If intRecordPositionPageNum > 1 or NOT rsSearchResults.EOF Then
Response.Write vbCrLf & " Resultados de Páginas: "
End If
'If the page number is higher than page 1 then display a back link
If intRecordPositionPageNum > 1 Then
Response.Write vbCrLf & " << Anterior "
End If
'If there are more pages to display then display links to all the search results pages
If intRecordPositionPageNum > 1 or NOT rsSearchResults.EOF Then
'Loop to diplay a hyper-link to each page in the search results
For intLinkPageNum = 1 to lngTotalNumPages
'If the page to be linked to is the page displayed then don't make it a hyper-link
If intLinkPageNum = intRecordPositionPageNum Then
Response.Write vbCrLf & " " & intLinkPageNum
Else
Response.Write vbCrLf & " " & intLinkPageNum & " "
End If
Next
End If
'If it is Not the End of the search results than display a next link
If NOT rsSearchResults.EOF then
Response.Write vbCrLf & " Próxima >>"
End If
'Finsh HTML the table
Response.Write vbCrLf & " | "
Response.Write vbCrLf & " "
Response.Write vbCrLf & " "
Response.Write vbCrLf & " | "
Response.Write vbCrLf & "
"
Response.Write vbCrLf & "
"
Response.Write vbCrLf & "
"
End If
End If
'Close Server Objects
Set rsSearchResults = Nothing
Set strCon = Nothing
Set adoCon = Nothing
%>
| ®
2004 cadastrodailha
– Pesquisando 90,351 paginas na web |