<% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Guide Internet Search Engine '** '** Copyright 2001 Bruce Corkhill All Rights Reserved. '** '** This program is free software; you can redistribute it and/or modify '** it under the terms of the GNU General Public License as published by '** the Free Software Foundation; either version 2 of the License, or '** any later version. '** '** All copyright notices must remain intacked in the scripts and the '** outputted HTML. '** '** You may not pass the whole or any part of this application off as your own work. '** '** All links to Web Wiz Guide must remain in place and the powered by '** logo with link back to Web Wiz Guide must remain visiable when the pages '** are viewed. '** '** This program is distributed in the hope that it will be useful, '** but WITHOUT ANY WARRANTY; without even the implied warranty of '** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the '** GNU General Public License for more details. '** '** You should have received a copy of the GNU General Public License '** along with this program; if not, write to the Free Software '** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA '** '** '** No official support is available for this program but you may post support questions at: - '** http://www.webwizguide.info/forum '** '** Support questions are NOT answered by e-mail ever! '** '** For correspondence or non support questions contact: - '** info@webwizguide.com '** '** or at: - '** '** Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom '**************************************************************************************** Response.Buffer = True 'Dimension variables Dim rsSearchResults 'database Recordset Variable Dim intRecordPositionPageNum 'Holds the record position Dim intRecordLoopCounter 'Loop counter for displaying the database records Dim lngTotalRecordsFound 'Holds the total number of records in the database Dim lngTotalNumPages 'holds the total number of pages in the database Dim intLinkPageNum 'Holds the page number to be linked to Dim intLoopCounter 'Holds the loop counter number Dim sarySearchWord 'Holds the keywords for the URL Dim strSearchKeywords 'Holds the keywords to be searched Dim intSQLLoopCounter 'Loop counter for the loop for the sql query Dim intSearchWordLength 'Holds the length of the word to be searched Dim blnSearchWordLenthOK 'Boolean set to false if the search word length is not OK Dim intRecordDisplayFrom 'Holds the number of the search result that the page is displayed from Dim intRecordDisplayedTo 'Holds the number of the search result that the page is displayed to 'If this is the first time the page is displayed then the page position is set to page 1 If Request.QueryString("PagePosition") = "" Then intRecordPositionPageNum = 1 'Else the page has been displayed before so the page postion is set to the Record Position number Else intRecordPositionPageNum = CInt(Request.QueryString("PagePosition")) End If 'Read in all the search words into one variable strSearchKeywords = Trim(Request.QueryString("search")) 'If the use has not entered a value then let the search words variable contain a space (chr10) If strSearchKeywords = "" Then strSearchKeywords = chr(10) 'Replace any less than or greater than signs with the HTML equivalent (stops people entering HTML tags) strSearchKeywords = Replace(strSearchKeywords, "<", "<") strSearchKeywords = Replace(strSearchKeywords, ">", ">") strSearchKeywords = Replace(strSearchKeywords, "'", "''") 'Read in the search words to be searched sarySearchWord = Split(Trim(strSearchKeywords), " ") 'Return the tow '' back to one' for displaying on the screen strSearchKeywords = Replace(strSearchKeywords, "''", "'") 'Initalise the word search length variable blnSearchWordLenthOK = True 'Loop round to check that each word to be searched has more than the minimum word length to be searched For intLoopCounter = 0 To UBound(sarySearchWord) 'Initialise the intSearchWordLength variable with the length of the word to be searched intSearchWordLength = Len(sarySearchWord(intLoopCounter)) 'If the word length to be searched is less than or equal to min word length then set the blnWordLegthOK to false If intSearchWordLength <= intMinuiumSearchWordLength Then blnSearchWordLenthOK = False End If Next 'Create a recordset object Set rsSearchResults = Server.CreateObject("ADODB.Recordset") 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT tblWebsites.* FROM tblWebsites " 'Get the mode to decide how we are going to buid the SQL Query Select Case Request.QueryString("mode") 'If the user has selected to search any words then intalise the strSQL statement to search for any words in the database Case "anywords" 'Search for the first search word in the URL titles strSQL = strSQL & "WHERE Title LIKE '%" & sarySearchWord(0) & "%'" 'Loop to search for each search word entered by the user For intSQLLoopCounter = 0 To UBound(sarySearchWord) strSQL = strSQL & " OR Title LIKE '%" & sarySearchWord(intSQLLoopCounter) & "%'" strSQL = strSQL & " OR Keywords LIKE '%" & sarySearchWord(intSQLLoopCounter) & "%'" strSQL = strSQL & " OR Description LIKE '%" & sarySearchWord(intSQLLoopCounter) & "%'" Next 'Order the search results by the number of click through hits decending (most popular sites first) strSQL = strSQL & " ORDER By Rating DESC, No_of_ratings DESC, Hits DESC;" 'If the user has selected to search for all words then intalise the strSQL statement to search for entries containing all the search words Case "allwords" 'Search for the first word in the URL titles strSQL = strSQL & "WHERE (Title LIKE '%" & sarySearchWord(0) & "%'" 'Loop to search the URL titles for each word to be searched For intSQLLoopCounter = 1 To UBound(sarySearchWord) strSQL = strSQL & " AND Title LIKE '%" & sarySearchWord(intSQLLoopCounter) & "%'" Next 'OR if the search words are in the keywords strSQL = strSQL & ") OR (Keywords LIKE '%" & sarySearchWord(0) & "%'" 'Loop to search the URL keywords for each word to be searched For intSQLLoopCounter = 1 To UBound(sarySearchWord) strSQL = strSQL & " AND Keywords LIKE '%" & sarySearchWord(intSQLLoopCounter) & "%'" Next 'Or if the search words are in the title strSQL = strSQL & ") OR (Description LIKE '%" & sarySearchWord(0) & "%'" 'Loop to search the URL description for each word to be searched For intSQLLoopCounter = 1 To UBound(sarySearchWord) strSQL = strSQL & " AND Description LIKE '%" & sarySearchWord(intSQLLoopCounter) & "%'" Next 'Order the search results by the number of click through hits decending (most popular sites first) strSQL = strSQL & ") ORDER By Rating DESC, No_of_ratings DESC, Hits DESC;" 'If the user has selected to see newly enetred URL's then order the search results by date decending Case "new" 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT TOP " & intRecordsPerPage & " tblWebsites.* FROM tblWebsites" strSQL = strSQL & " ORDER By SiteIDNo DESC;" End Select 'Query the database with the strSQL statement rsSearchResults.Open strSQL, strCon, 3 'Count the number of records found lngTotalRecordsFound = CLng(rsSearchResults.RecordCount) 'If this is a random URL then strip all the other URL's and only leave one remaining URL If Request.QueryString("submit") = "Random Search" and NOT rsSearchResults.EOF Then 'Randomise system timer Randomize Timer 'Move to a random record in the recordset rsSearchResults.Move CLng(RND * lngTotalRecordsFound) - 0.5 'Filter out all the other records rsSearchResults.Filter = "SiteIDNo =" & rsSearchResults("SiteIDNO") Else 'Set the number of records to display on each page by the constant set at the top of the script rsSearchResults.PageSize = intRecordsPerPage 'Get the page number record poistion to display from IF NOT rsSearchResults.EOF Then rsSearchResults.AbsolutePage = intRecordPositionPageNum 'Count the number of pages the search results will be displayed on calculated by the PageSize attribute set above lngTotalNumPages = CLng(rsSearchResults.PageCount) 'Calculate the the record number displayed from and to on the page showing intRecordDisplayFrom = (intRecordPositionPageNum - 1) * intRecordsPerPage + 1 intRecordDisplayedTo = (intRecordPositionPageNum - 1) * intRecordsPerPage + intRecordsPerPage If intRecordDisplayedTo > lngTotalRecordsFound Then intRecordDisplayedTo = lngTotalRecordsFound End If %> Risultato della ricerca su Internet con TOP21: <% = strSearchKeywords %>
Top 21 « Portale nazionale »   
    
Segnalazioni
Proponi un sito

Modifiche
Modifica un sito

Nuovi arrivi
Ultimi siti aggiunti

Servizi Internet
Richiedi informazioni

Il sito più visitato
Abiti per spettacolo

Costumi Fantasy e per lo Spettacolo


RISULTATO DELLA RICERCA SU TOP 21
<% If NOT Request.QueryString("mode") = "" Then '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 & "
" Response.Write vbCrLf & " " Response.Write vbCrLf & " " 'Display that the URL is randomly generated If Request.QueryString("submit") = "Random Search" Then Response.Write vbCrLf & " " 'Display that we are showing a page of the latest URL's indexed ElseIf Request.QueryString("mode") = "new" Then Response.Write vbCrLf & " " 'Display that one of the words entered was to short ElseIf blnSearchWordLenthOK = False Then Response.Write vbCrLf & " " 'Display that there where no matching records found ElseIf rsSearchResults.EOF Then Response.Write vbCrLf & " " 'Else Search went OK so display how many records found Else Response.Write vbCrLf & " " End If 'Close the HTML table with the search status Response.Write vbCrLf & " " Response.Write vbCrLf & "
Random Search for " & strSearchKeywords & ". Gli ultimi " & intRecordsPerPage & " link inseriti su TOP 21 Ricercato sul Web " & strSearchKeywords & ".    Uno dei termini cercati è troppo corto. Ricercato sul Web " & strSearchKeywords & ".    Spiacente, nessun risultato trovato. Ricercato sul Web " & strSearchKeywords & ".    Visualizzazione risultati " & intRecordDisplayFrom & " - " & intRecordDisplayedTo & " di " & lngTotalRecordsFound & ".
" 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 & " " 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 & " La tua Ricerca - " & strSearchKeywords & " - contiene una parola con meno di " & intMinuiumSearchWordLength & " lettere." Response.Write vbCrLf & "

" Response.Write vbCrLf & " Suggerimenti:" Response.Write vbCrLf & "
" Response.Write vbCrLf & "
  • Escludi la parola breve.
  • Assicurati della correttezza dei termini.
  • Esempio: siti di Roma, diventa Siti Roma.
" 'If no search results found then show an error message ElseIf rsSearchResults.EOF Then 'Write HTML displaying the error Response.Write vbCrLf & " La tua Ricerca - " & strSearchKeywords & " - non ha rintracciato alcun documento." Response.Write vbCrLf & "

" Response.Write vbCrLf & " Suggerimenti:" Response.Write vbCrLf & "
" Response.Write vbCrLf & "
  • Assicurati della correttezza dei termini.
  • Scrivi termini alternativi.
  • Suggerisci tu il link non trovato
" 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 & " Media calcolata su " & CLng(rsSearchResults("No_of_ratings")) & " voti  -  Vota questo sito  -  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 & "
" '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 & " " 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 & " Pagine trovate:  " End If 'If the page number is higher than page 1 then display a back link If intRecordPositionPageNum > 1 Then Response.Write vbCrLf & " << Precedenti  " 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 & "  Successive >>" End If 'Finsh HTML the table 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 %>

Risultato della Ricerca

Benvenuti nell' area di ricerca di TOP 21.
Se la ricerca non ha soddisfatto la tua richiesta, significa che il link segnalato non è stato inserito nei siti TOP selezionati.

Registrazione gratuita

Proponi un sito utilizzando il modulo di segnalazione; verificheremo la tua proposta per l'inserimento nel Motore di Ricerca.

Servizi Internet

Contattaci per migliorare le prestazioni tecniche del tuo sito, aumentare la visibilità su tutti i motori di ricerca o rinnovare la grafica.
Ti offriamo una presenza professionale su Internet.


Design © 2002 - 2003 World Professional Features