Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Newton

Problema com Busca Interna

Recommended Posts

Bom Dia!

 

Estou com um problema com a busca interna em meu site. O site funciona certinho no meu computador, mas quando eu mandei para o servidor aparece esse erro:

 

Server object error 'ASP 0177 : 800401f3'

 

Server.CreateObject Failed

 

/db/buscainterna/site_search.asp, line 445

 

800401f3

 

O servidore é grátis, é o nofeehost, eu acho que deve ser problema lá com eles, vai ver ele não dá suporte, mas como não entendo muito de asp, vim pedir a ajudade vocês.

 

Espero que alguem possa me ajudar!

 

Abraços

Compartilhar este post


Link para o post
Compartilhar em outros sites

o que tem na linha 445 da página site_search.asp?certamente você está querendo criar um objeto que não tem instalado no servidor gratuito. Alugue um espaço pago onde o servidor atenda a todas as necessidades do seu sistema, oferecendo componentes e recursos que a hospedagem gratuita não oferece

Compartilhar este post


Link para o post
Compartilhar em outros sites

Na linha 445 tem <td> mas acho que isso não seje o causador do problema, segue abaixo o que tem nas linhas abaixo:445-<td> 446-<div align="right"><font face="Arial, Helvetica, sans-serif" size="1"><img src="topo_busca.jpg" width="390" height="24"></font></div>447-</td>448-</tr>449-</table>500-<form method="get" name="frmSiteSearch" action="site_search.asp" onSubmit="return CheckForm();">501-<table width="100%" border="0" cellpadding="0" cellspacing="0" background="#efefef">502-<tr>

Compartilhar este post


Link para o post
Compartilhar em outros sites

procure por Server.CreateObjetct , em algum lugar você está tentando chamar um objeto que não está instalado ou registrado no servidor. Normalmente é usado componentes para envio de email, redimensionamento de imagens, envio de imagens(upload) e gráficos. Tem algo de "especial" nessa sua página?

Compartilhar este post


Link para o post
Compartilhar em outros sites

beleza vou colocar, é que uma vez fiz isso me avisaram que não podia e tals...q era uma reagra...

Estou usando um código que estava na net mas fiz minhas alterações.

Já aproveitando, sem querer abusar, como que eu faço nesse código para que quando a pessoa clicar no resultado da busca abra numa janela com as dimensões que eu escolher?

 

 

<% Option Explicit %><% '****************************************************************************************'**  Copyright Notice	'**'**  Web Wiz Guide Site Search Engine'**															  '**  Copyright 2001-2002 Bruce Corkhill All Rights Reserved.								'**'**  This program is free software; you can modify (at your own risk) any part of it '**  under the terms of the License that accompanies this software and use it both '**  privately and commercially.'**'**  All copyright notices must remain in tacked in the scripts and the '**  outputted HTML.'**'**  You may use parts of this program in your own private work, but you may NOT'**  redistribute, repackage, or sell the whole or any part of this program even '**  if it is modified or reverse engineered in whole or in part without express '**  permission from the author.'**'**  You may not pass the whole or any part of this application off as your own work.'**   '**  All links to Web Wiz Guide and powered by logo's must remain unchanged and in place'**  and must remain visible when the pages are viewed unless permission is first granted'**  by the copyright holder.'**'**  This program is distributed in the hope that it will be useful,'**  but WITHOUT ANY WARRANTY; without even the implied warranty of'**  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER '**  WARRANTIES WHETHER EXPRESSED OR IMPLIED.'**'**  You should have received a copy of the License along with this program; '**  if not, write to:- Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom.'**	'**'**  No official support is available for this program but you may post support questions at: -'**  [url=http://www.webwizguide.info/forum]http://www.webwizguide.info/forum[/url]'**'**  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'**'****************************************************************************************'Set the response buffer to trueResponse.Buffer = False'Dimension global variablesDim fsoObject			'File system objectDim fldObject			'Folder object	Dim sarySearchWord		'Array to hold the words to be searched forDim strSearchWords		'Holds the search wordsDim blnIsRoot			'Boolean set to true if it is the root dirctoryDim strFileURL			'Holds the path to the file on the siteDim strServerPath		'Holds the server path to this scriptDim intNumFilesShown		'Holds the number of files shown so farDim intTotalFilesSearched	'Holds the number of files searchedDim intTotalFilesFound		'Holds the total matching files foundDim intFileNum			'Holds the file numberDim intPageLinkLoopCounter	'Loop counter to display links to the other result pagesDim sarySearchResults(1000)	'Array holding the search resultsDim intDisplayResultsLoopCounter 'loop counter to diplay the results of the searchDim intResultsArrayPosition	'Stores the array position of the array storing the resultsDim blnSearchResultsFound	'Set to true if search results are foundDim strFilesTypesToSearch	'Holds the types of files to be searchedDim strBarredFolders		'Holds the folders that you don't want searchedDim strBarredFiles		'Holds the names of the files not to be searchedDim blnEnglishLanguage		'Set to True if the user is using English' -------------------------- Change the following line to the number of results you wish to have on each page ------------------------------------Const intRecordsPerPage = 10 'change this to the number of results to show on each page' --------------------- Place the names of the files types you want searching in the following line sepeararted by commas --------------------------strFilesTypesToSearch = "htm,html,shtml" ' --------------------- Place the names of the folders you don't want searched in the following line spearated by commas --------------------------strBarredFolders = "cgi_bin,_bin" 'cgi_bin and _bin have been put in here as examples, but you can put any folders in here' ---------- Place the names of the files you don't want searched in the following line spearated by commas include the file extension -------------strBarredFiles = "adminstation.htm,no_allowed.asp" 'adminstration.htm and not_allowed.asp have been put in as an examples' -------------------- Set this boolean to False if you are not using an English language web site --------------------------------------------------blnEnglishLanguage = True 'True = HTML Encode best for English sites \ False = no HTML Encoding best for non English sites'-----------------------------------------------------------------------------------------------------------------------------------------------------'Initalise variablesintTotalFilesSearched = 0%><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><!-- The Web Wiz Guide advanced site search engine is written and produced by Bruce Corkhill ©2001	 	If you want your own site search engine then goto [url=http://www.webwizguide.info]http://www.webwizguide.info[/url] --> 	   	   <!-- Check the from is filled in correctly before submitting --><script  language="JavaScript"><!-- Hide from older browsers...//Preload search iconvar search_icon_off = new Image(); search_icon_off.src = "site_search_icon_off.gif";//Check the form before submittingfunction CheckForm () {	//Check for a word to search	if (document.frmSiteSearch.search.value==""){		alert("Você deve digitar uma palavra para efetuar a busca.");		document.frmSiteSearch.search.focus();		return false;	}		return true}// --></script>	   <style type="text/css"><!--.style1 {font-size: 10px;	font-family: verdana;}.style11 {color: #999999}.style12 {font-family: verdana; color: #999999; }.style13 {color: #999999;	font-size: 10px;	font-family: verdana;}.style15 {color: #006699;	}.style16 {color: #006699}.style17 {color: #FF9900;	}.style2 {font-family: verdana}.style3 {font-size: 9px;	font-family: verdana;}.style4 {font-size: 14px; font-family: verdana; color: #006699; }.style6 {font-size: 9px; font-family:  verdana; color: #999999; }body {	background-image: url(../img/bg.jpg);}.style20 {font-family: verdana; font-size: 12px; }.style22 {font-size: 10px; font-family: Verdana, verdana, Helvetica, sans-serif; }a:link {	text-decoration: none;}a:visited {	text-decoration: none;}a:hover {	text-decoration: underline;}a:active {	text-decoration: none;}#Layer4 {position:absolute;	left:852px;	top:13px;	width:122px;	height:368px;	z-index:1;}.style28 {	font-size: 14px;	font-family: Verdana, Arial, Helvetica, sans-serif;}.style29 {font-family: Verdana, Arial, Helvetica, sans-serif; color: #999999; }.style30 {	color: #999999;	font-size: 10px;	font-family: Verdana, Arial, Helvetica, sans-serif;}.style31 {font-family: Verdana, Arial, Helvetica, sans-serif}.style27 {color: #000000}.style32 {	font-size: 9px;	font-family: Verdana, Arial, Helvetica, sans-serif;}.style33 {font-size: 14px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #006699; }.style34 {font-size: 9px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #999999; }.style8 {font-family: Verdana, Arial, Helvetica, sans-serif; color: #006699; }--></style></head><body bgcolor="#FFFFFF" text="#000000" link="#0000CC" vlink="#0000CC" alink="#FF0000"><div id="Layer4">  <table border="0" cellspacing="0" cellpadding="0">	<tr>	  <td bgcolor="#efefef"><table border="0" cellspacing="1" cellpadding="0">		<tr>		  <td bgcolor="#FFFFFF"><div align="center"><img src="../img/anunciantes_lado.jpg" width="120" height="24" /></div></td>		</tr>		<tr>		  <td bgcolor="#FFFFFF"><img src="../imgteste/23.gif" width="120" height="60" /></td>		</tr>		<tr>		  <td bgcolor="#FFFFFF"><img src="../imgteste/2507_angra_b.jpg" width="120" height="60" /></td>		</tr>		<tr>		  <td bgcolor="#FFFFFF"><img src="../imgteste/2539_podium_b.jpg" width="120" height="60" /></td>		</tr>		<tr>		  <td bgcolor="#FFFFFF"><img src="../imgteste/3995_odontogoa_b.jpg" width="120" height="60" /></td>		</tr>		<tr>		  <td bgcolor="#FFFFFF"><img src="../imgteste/3974_ricasa_b.jpg" width="120" height="60" /></td>		</tr>		<tr>		  <td bgcolor="#FFFFFF"><img src="../imgteste/2513_fitipaldi_b.jpg" width="120" height="60" /></td>		</tr>		<tr>		  <td bgcolor="#FFFFFF"><img src="../imgteste/24.gif" width="120" height="60" /></td>		</tr>	  </table></td>	</tr>  </table></div><table width="84%" border="0" cellpadding="0" cellspacing="10" bgcolor="#FFFFFF">  <tr>	<td height="588" valign="top" bgcolor="#FFFFFF"><table height="574" border="0" align="center" cellpadding="0" cellspacing="0">	  <tr>		  <td width="587" height="10" background="../IMG/Bg.jpg" bgcolor="#FFFFFF"><div align="center" class="style30">			  <div align="right"></div>		</div></td>	  </tr>	  <tr>		<td height="95" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">		  <tr>			<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">			  <tr>				<td width="88%" height="83"><table width="100%" border="0" cellspacing="0" cellpadding="0">				  <tr>					<td width="32%" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="222" height="83">					  <param name="movie" value="../img/logo_fla.swf" />					  <param name="quality" value="high" />					  <embed src="../img/logo_fla.swf" width="222" height="83" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>					</object></td>					<td width="68%"><table width="99%" border="0" cellspacing="0" cellpadding="0">					  <tr>						<td width="98%" align="center" valign="middle"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1,">						  <tr>							<td width="3%" rowspan="3"><img src="../img/bannertopoesq.jpg" width="2" height="71" /></td>							<td width="96%"><img src="../img/bannertopo.jpg" width="436" height="2" /></td>							<td width="1%" rowspan="3"><img src="../img/bannertopodir.jpg" width="3" height="71" /></td>						  </tr>						  <tr>							<td height="71"><a href="../anuncie.asp"><img src="../img/banneranuncie.gif" width="435" height="64" border="0" /></a></td>						  </tr>						  <tr>							<td height="4"><img src="../img/bannertopbaixo.jpg" width="436" height="3" /></td>						  </tr>						</table></td>						<td width="2%"><div align="right"><img src="../img/barra_dir.jpg" width="11" height="79" /></div></td>					  </tr>					</table></td>				  </tr>				</table></td>				<td width="12%" align="center" valign="middle"><table width="100%" border="0" cellspacing="1" cellpadding="0">				  <tr>					<td width="21%" valign="middle"><div align="center"><img src="../img/home.jpg" width="11" height="10" /></div></td>					<td width="79%" height="15" valign="middle" bgcolor="#FFFFFF" class="style34"><div align="center"><a href="../index.asp" class="style11">Página Inicial</a> </div></td>				  </tr>				  <tr>					<td valign="middle"><div align="center"><img src="../img/mapa.jpg" width="13" height="10" /></div></td>					<td height="15" valign="middle" class="style34"><div align="left">Mapa do Site </div></td>				  </tr>				  <tr>					<td valign="middle"><div align="center"><img src="../img/favoritos.jpg" width="10" height="10" /></div></td>					<td height="15" valign="middle" class="style34"><div align="left">Favoritos</div></td>				  </tr>				  <tr>					<td valign="middle"><div align="center"><img src="../img/contato.jpg" width="12" height="8" /></div></td>					<td height="15" valign="middle" class="style34"><div align="left"><a href="../faleconosco.asp">Fale Conosco </a></div></td>				  </tr>				  <tr>					<td valign="middle"><div align="center"><img src="../img/recomende.jpg" width="11" height="10" /></div></td>					<td height="12" valign="middle" class="style34"><div align="left"><a href="../indique.asp">Recomende</a></div></td>				  </tr>				  <tr></tr>				</table></td>			  </tr>			</table>									  <table width="100%" border="0" cellpadding="0" cellspacing="0">					<tr> 					  <td background="../img/bg.jpg"> 						<div align="center" class="style22"><span class="style11">Ourinhos, 						  28 de fevereiro de 2006 </span></div>					  </td>					  <td width="1%"> </td>					  <td width="71%" background="../img/bg.jpg"> 						<div align="right" class="style22"><font face="Arial, Helvetica, sans-serif"><font face="Arial, Helvetica, sans-serif"><font size="1"><marquee>-Sesi 						  abre inscrições para o Férias no 						  Parque - 45º FAPI terá inicio dia 10 de 						  maio de 2007 - Shows da FAPI 2007 já estão 						  confirmados</marquee> </font></font></font></div>					  </td>					</tr>				  </table>				</td>		  </tr>		</table></td>	  </tr>	  <tr>		<td height="433" valign="top"><table width="782" border="0" cellpadding="0" cellspacing="0">		  <tr>			<td width="378" height="467" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">			  <tr>				<td height="34"><table width="100%" border="0" cellspacing="0" cellpadding="0">				  <tr>					<td><div align="right"><img src="../img/categorias.jpg" width="348" height="24" /></div></td>					<td width="15"><div align="right" class="style28">					  <div align="left" class="style15">						<div align="center"></div>					  </div>					</div></td>				  </tr>				</table></td>			  </tr>			  <tr>				<td><table width="378" border="0" cellpadding="0" cellspacing="0">				  <tr>					<td width="15" height="5"> </td>					<td width="348" bgcolor="#efefef"><table width="348" border="0" align="center" cellpadding="0" cellspacing="1">					  <tr>						<td width="35" bgcolor="#FFFFFF"><div align="center"><img src="../img/guia-ico_alimentacao.gif" width="32" height="32" /></div></td>						<td width="140" align="center" valign="middle" bgcolor="#FFFFFF" class="style33"><a href="../Alimentacao/alimentacao.html" class="style16">Alimentação</a></td>						<td width="33" align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><div align="center"><img src="../img/guia-ico_animais.gif" width="32" height="32" /></div></td>						<td width="135" align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Animais e Cia. </span></td>					  </tr>					  <tr>						<td height="20" colspan="2" bgcolor="#FFFFFF"><div align="center"><span class="style34">Pizzas - Esfihas - Restaurantes </span></div></td>						<td colspan="2" align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style31"><span class="style34"> Pet Shop - Veterinários </span></span></td>					  </tr>					  <tr>						<td bgcolor="#FFFFFF"><div align="center"><span class="style28"><img src="../img/guia-ico_decoracao.gif" width="32" height="32" /></span></div></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Casa e Decoração </span></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><div align="center"><img src="../img/guia-ico_comercio.gif" width="32" height="32" /></div></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Comércio</span></td>					  </tr>					  <tr>						<td height="20" colspan="2" bgcolor="#FFFFFF" class="style32"><div align="center" class="style11">Cortinas - Móveis </div></td>						<td colspan="2" align="center" valign="middle" bgcolor="#FFFFFF" class="style32"><span class="style29">Floricultura - Supermercado </span></td>					  </tr>					  <tr>						<td bgcolor="#FFFFFF"><div align="center"><img src="../img/guia-ico_educacao.gif" width="32" height="32" /></div></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Educação e Cultura </span></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><div align="center"><img src="../img/guia-ico_esportes.gif" width="32" height="32" /></div></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Esporte e Lazer </span></td>					  </tr>					  <tr>						<td height="20" colspan="2" bgcolor="#FFFFFF"><div align="center" class="style34">Cursos - Escolas </div></td>						<td colspan="2" align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style34">Academias - Parques e Praças </span></td>					  </tr>					  <tr>						<td bgcolor="#FFFFFF"><div align="center"><img src="../img/guia-ico_eventos.gif" width="32" height="32" /></div></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Eventos e Festas </span></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><div align="center"><img src="../img/guia-ico_imoveis.gif" width="32" height="32" /></div></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Imóveis</span></td>					  </tr>					  <tr>						<td height="20" colspan="2" bgcolor="#FFFFFF" class="style32"><div align="center" class="style11">Buffet - Aluguel de Roupas - Bares </div></td>						<td colspan="2" align="center" valign="middle" bgcolor="#FFFFFF" class="style32"><div align="center" class="style11"><span class="style31">Construtoras - Imobiliárias </span></div></td>					  </tr>					  <tr>						<td bgcolor="#FFFFFF"><div align="center"><img src="../img/guia-ico_industria.gif" width="32" height="32" /></div></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Undústria</span></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><div align="center"><img src="../img/guia-ico_informatica.gif" width="32" height="32" /></div></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Informática</span></td>					  </tr>					  <tr>						<td height="20" colspan="2" bgcolor="#FFFFFF" class="style32"><div align="center" class="style11">Alimentação - Metalúrgica </div></td>						<td colspan="2" align="center" valign="middle" bgcolor="#FFFFFF" class="style32"><span class="style29">Assistência Técnica - Lojas </span></td>					  </tr>					  <tr>						<td bgcolor="#FFFFFF"><div align="center"><img src="../img/guia-ico_saude.gif" width="32" height="32" /></div></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Saúde e Beleza </span></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><div align="center"><img src="../img/guia-ico_servicos.gif" width="32" height="32" /></div></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Serviços</span></td>					  </tr>					  <tr>						<td height="20" colspan="2" bgcolor="#FFFFFF" class="style32"><div align="center" class="style11">Cabelereiros - Clínicas </div></td>						<td colspan="2" align="center" valign="middle" bgcolor="#FFFFFF" class="style32"><span class="style29">Agências - Transporte </span></td>					  </tr>					  <tr>						<td bgcolor="#FFFFFF"><div align="center"><img src="../img/guia-ico_sociedade.gif" width="32" height="32" /></div></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Sociedade</span></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><div align="center"><img src="../img/guia-ico_telefones.gif" width="32" height="32" /></div></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Telefones Úteis </span></td>					  </tr>					  <tr>						<td height="20" colspan="2" bgcolor="#FFFFFF" class="style32"><div align="center" class="style11">Associações - Sindicato </div></td>						<td colspan="2" align="center" valign="middle" bgcolor="#FFFFFF" class="style32"><div align="center" class="style11"><span class="style31">Emergência - Governo </span></div></td>					  </tr>					  <tr>						<td bgcolor="#FFFFFF"><div align="center"><img src="../img/guia-ico_utilidadepublica.gif" width="32" height="32" /></div></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Utilidades Publicas </span></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><div align="center"><img src="../img/guia-ico_veiculos.gif" width="32" height="32" /></div></td>						<td align="center" valign="middle" bgcolor="#FFFFFF" class="style28"><span class="style8">Veículos</span></td>					  </tr>					  <tr>						<td height="20" colspan="2" bgcolor="#FFFFFF" class="style32"><div align="center" class="style11">Aeroporto - Prefeitura Municipal </div></td>						<td colspan="2" align="center" valign="middle" bgcolor="#FFFFFF" class="style34">Agências - Oficinas Mecânicas </td>					  </tr>					</table></td>					<td width="15"> </td>				  </tr>				</table></td>			  </tr>			</table></td>			<td valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">			  <tr>				<td height="421" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">				  <tr>					<td width="404" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">					  <tr>						<td height="71"><div align="right"><img src="../img/menu.jpg" width="390" height="58" border="0" usemap="#Map" /></div></td>					  </tr>					</table>								<table width="100%" height="386" border="0" cellpadding="0" cellspacing="0">								  <tr>																	  <td height="386" valign="top"> 									<table width="100%" border="0" cellspacing="0" cellpadding="0">									  <tr> 										<td> 										  <div align="right"><font face="Arial, Helvetica, sans-serif" size="1"><img src="topo_busca.jpg" width="390" height="24"></font></div>										</td>									  </tr>									</table>									<form method="get" name="frmSiteSearch" action="site_search.asp" onSubmit="return CheckForm();">									  <table width="100%" border="0" cellpadding="0" cellspacing="0" background="#efefef">										<tr> 										  <td bgcolor="#efefef"> 											<table cellpadding="0" cellspacing="1" width="100%" align="center">											  <tr> 												<td width="387" height="76" bgcolor="#FFFFFF" class="style3"> 												  <div align="center" class="style20"> 													<font face="Arial, Helvetica, sans-serif" size="2">Para 													localizar mais rápido 													as informações 													que você está 													procurando, use a busca abaixo. 													Você pode digitar o 													nome da empresa, o ramo de 													atividade, serviços 													prestados.</font></div>												</td>											  </tr>											  <tr> 												<td width="387" height="21" valign="top" bgcolor="#FFFFFF" class="style3"> 												  <div align="center" class="style20"> 													<font face="Arial, Helvetica, sans-serif" size="2">													<input type="TEXT" name="search" maxlength="50" size="40" value="<% =Request.QueryString("search") %>">													<input name="submit" type="submit" class="style20" value="Buscar">													</font></div>												</td>											  </tr>											  <tr>												<td width="387" height="21" valign="top" bgcolor="#FFFFFF" class="style3">												  <div align="center"><font face="Arial, Helvetica, sans-serif" size="2"> 													<input type="radio" name="mode" value="allwords" CHECKED>													Todas as Palavras 													<input type="radio" name="mode" value="anywords">													Qualquer Palavra 													<input type="radio" name="mode" value="phrase">													Frase</font></div>												</td>											  </tr>											</table>										  </td>										</tr>									  </table>									</form>									<table width="100%" border="0" cellspacing="0" cellpadding="0">									  <tr> 										<td class="style22"><font face="Arial, Helvetica, sans-serif" size="1"><b> 										  <%'Read in all the search words into one variablestrSearchWords = Trim(Request.QueryString("search"))'If the site is in English then use the server HTML encode methodIf blnEnglishLanguage = True Then	'Replace any HTML tags with the HTML codes for the same characters (stops people entering HTML tags)	strSearchWords = Server.HTMLEncode(strSearchWords)'If the site is not english just change the script tagsElse	'Just replace the script tag <> with HTML encoded < and >	strSearchWords = Replace(strSearchWords, "<", "<", 1, -1, 1)	strSearchWords = Replace(strSearchWords, ">", ">", 1, -1, 1)End If'Slit each word to be searched up and place in an arraysarySearchWord = Split(Trim(strSearchWords), " ")'Read the file number to show fromintFileNum = CInt(Request.QueryString("FileNumPosition"))'Set the number of files shown so far to the file number read in aboveintNumFilesShown = intFileNum'Create the file system objectSet fsoObject = Server.CreateObject("Scripting.FileSystemObject")'If there is no words entered by the user to search for then dont carryout the file search routineIf NOT strSearchWords = "" Then	'Get the path and the root folder to be searched	Set fldObject = fsoObject.GetFolder(Server.MapPath("./"))		'Read in the server path to this ASP script	strServerPath = fldObject.Path & "\"		'Set to true as this is searching the root directory	blnIsRoot = True			'Call the search sub prcedure	Call SearchFile(fldObject)					'Reset server variables	Set fsoObject = Nothing	Set fldObject = Nothing			'Display the HTML table with the results status of the search or what type of search it is	Response.Write vbCrLf & "	<table width=""98%"" border=""0"" cellspacing=""1"" cellpadding=""1"" align=""center"" bgcolor=""#efefef"">"	Response.Write vbCrLf & " 	  <tr>"		'Display that there where no matching records found	If blnSearchResultsFound = False Then 		Response.Write vbCrLf & " 		<td> Sua Busca:<b>" & strSearchWords & "</b>.    Desculpe, nenhum resultado.</td>"   		'Else Search went OK so display how many records found	Else			Response.Write vbCrLf & " 		<td> Busca: <b>" & strSearchWords & "</b>.    Resultados: " & intFileNum + 1 & " - " & intNumFilesShown & " of " & intTotalFilesFound & ".</td>"			End If		'Close the HTML table with the search status	Response.Write vbCrLf & "	  </tr>"	Response.Write vbCrLf & "	</table>"					'HTML table to display the search results or an error if there are no results	Response.Write vbCrLf & "	<table width=""95%"" border=""0"" cellspacing=""1"" cellpadding=""1"" align=""center"">"	Response.Write vbCrLf & "	 <tr>" 	Response.Write vbCrLf & "	  <td>"   		'If no results are found then display an error message	If blnSearchResultsFound = False Then 			'Write HTML displaying the error		Response.Write vbCrLf & "	  <br>"		Response.Write vbCrLf & "	   Você buscou por - <b>" & strSearchWords & "</b> - mas não encontramos nada relacinado."	   	Response.Write vbCrLf & "	   <br><br>"	   	Response.Write vbCrLf & "	   Sugestões:"	   	Response.Write vbCrLf & "	   <br>"	   	Response.Write vbCrLf & "	   <ul><li>Confira se você digitou a palavra corretamente.<li>Tente outra palavra parecida.<li>Tente buscar por outras palavras.</ul>"		'Else display the results	Else				'Loop round to display each result within the search results array		For intDisplayResultsLoopCounter = 1 to (intNumFilesShown - intFileNum)					Response.Write vbCrLf & "	<br>"			Response.Write vbCrLf & "		" & sarySearchResults(intDisplayResultsLoopCounter)			Response.Write vbCrLf & "	<br>"		Next	End If		'Close the HTML table displaying the results	Response.Write vbCrLf & "		</td>"	Response.Write vbCrLf & "	  </tr>"	Response.Write vbCrLf & "	</table>"End If 'Display an HTML table with links to the other search resultsIf intTotalFilesFound > intRecordsPerPage then	'Display an HTML table with links to the other search results	Response.Write vbCrLf & "	<br>"	Response.Write vbCrLf & "	<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">"	Response.Write vbCrLf & " 	  <tr>"	Response.Write vbCrLf & " 		<td>"	Response.Write vbCrLf & "		<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""0"">"	Response.Write vbCrLf & "		  <tr>"	Response.Write vbCrLf & "			<td width=""50%"" align=""center"">"		Response.Write vbCrLf & "		Results Page:  "				'If the page number is higher than page 1 then display a back link			If intNumFilesShown > intRecordsPerPage Then 		Response.Write vbCrLf & "		 <a href=""site_search.asp?FileNumPosition=" &  intFileNum - intRecordsPerPage  & "&search=" & Replace(strSearchWords, " ", "+") & "&mode=" & Request.QueryString("mode") & """ target=""_blank""><< Prev</a> "   		 		End If	 				'If there are more pages to display then display links to all the search results pages	If intTotalFilesFound > intRecordsPerPage Then 				'Loop to diplay a hyper-link to each page in the search results				For intPageLinkLoopCounter = 1 to CInt((intTotalFilesFound / intRecordsPerPage) + 0.5)						'If the page to be linked to is the page displayed then don't make it a hyper-link			If intFileNum = (intPageLinkLoopCounter * intRecordsPerPage) - intRecordsPerPage Then				Response.Write vbCrLf & "			 " & intPageLinkLoopCounter			Else							Response.Write vbCrLf & "			  <a href=""site_search.asp?FileNumPosition=" &  (intPageLinkLoopCounter * intRecordsPerPage) - intRecordsPerPage & "&search=" & Replace(strSearchWords, " ", "+") & "&mode=" & Request.QueryString("mode") & """ target=""_blank"">" & intPageLinkLoopCounter & "</a>  "						End If		Next	End If			'If it is Not the last of the search results than display a next link	 		If intTotalFilesFound > intNumFilesShown then   			Response.Write vbCrLf & "		 <a href=""site_search.asp?FileNumPosition=" &  intNumFilesShown  & "&search=" & Replace(strSearchWords, " ", "+") & "&mode=" & Request.QueryString("mode") & """ target=""_blank"">Next >></a>"	   		End If		  			'Finsh HTML the table		  	Response.Write vbCrLf & "			</td>"		  	Response.Write vbCrLf & "		  </tr>"	Response.Write vbCrLf & "		</table>"			Response.Write vbCrLf & "		</td>"	Response.Write vbCrLf & "	  </tr>"	Response.Write vbCrLf & "	</table>"	 End If %>										  </b></font></td>									  </tr>									</table>									<font face="Arial, Helvetica, sans-serif" size="1"><span class="style26"><br>									</span></font> </td>								  </tr>							  </table></td>				  </tr>				</table></td>			  </tr>			</table>					<table width="100%" height="12" border="0" cellpadding="0" cellspacing="0">					  <tr>						<td height="12" bgcolor="#efefef"><div align="center" class="style32"><span class="style16">Guia.Ourinhos © 2007 - Todos os direitos reservados -<span class="style17"><span class="style27"> Design.Studio.com</span></span></span> </div></td>					  </tr>				  </table></td>		  </tr>		</table></td>	  </tr>	</table></td>  </tr></table><map name="Map" id="Map">  <area shape="rect" coords="12,4,60,55" href="../index.asp" />  <area shape="rect" coords="77,6,129,54" href="#" />  <area shape="rect" coords="142,8,195,55" href="../anuncie.asp" />  <area shape="rect" coords="207,9,254,53" href="../buscainterna/site_search.asp" />  <area shape="rect" coords="264,7,319,56" href="../faleconosco.asp" />  <area shape="rect" coords="331,9,382,55" href="../faq.asp" /></map><p> </p></body></html><%'Sub procedure to do the searchPublic Sub SearchFile(fldObject)	'Dimension local variabales	Dim filObject				'File object	Dim tsObject				'Text stream object	Dim subFldObject			'Sub folder object	Dim RegExpObject			'RegExp Object	Dim strFileContents			'Holds the contents of the file being searched		Dim strPageTitle			'Holds the title of the page	Dim intTitleStartPositionInFile		'Holds the start postion in the file being searched of the title	Dim intTitleEndPositionInFile		'Holds the end postion in the file being searched of the title	Dim strPageDescription			'Holds the description of the page	Dim intDescriptionStartPositionInFile	'Holds the start postion in the file being searched of the description	Dim intDescriptionEndPositionInFile	'Holds the end postion in the file being searched of the description	Dim intSearchLoopCounter		'Loop counter to search all the words in the array	Dim blnSearchFound			'Set to true if the search words are found			'Error handler	On Error Resume Next			'Loop to search each file in the folder	For Each filObject in fldObject.Files								'Check the file extension to make sure the file is of the extension type to be searched		If InStr(1, strFilesTypesToSearch, fsoObject.GetExtensionName(filObject.Name), vbTextCompare) > 0 Then					  'Check to make sure the file about to be searched is not a barred file if it is don't search the file			If NOT InStr(1, strBarredFiles, filObject.Name, vbTextCompare) > 0 Then			  			  				  'Open the file for searching					Set tsObject = filObject.OpenAsTextStream							'Read in the contents of the file			   	strFileContents = tsObject.ReadAll			 					 	'Initalise the search found variable to flase			 	blnSearchFound = False			 				 				 	'If the user has choosen to search by phrase 			 	If Request.QueryString("mode") = "phrase" Then			 					 		'Search the file for the phrase			 		If InStr(1, LCase(strFileContents), LCase(strSearchWords), 1) then			 					 			'If the search is found then set the search found variable to true			 			blnSearchFound = True			 		End If			 				 				 	'Else the search is either by all or any words			 	Else			 			 				 		'If the search is by all words then initialise the search found variable to true				 	If Request.QueryString("mode") = "allwords" then blnSearchFound = True				 					 					 	'Loop round to search for each word to be searched				 	For intSearchLoopCounter = 0 to UBound(sarySearchWord)				 											'Search the file for the search words							If InStr(1, LCase(strFileContents), LCase(sarySearchWord(intSearchLoopCounter)), 1) Then														'If the search word is found and the search is for any words then set the search found variable to true								If Request.QueryString("mode") = "anywords" then blnSearchFound = True															Else								'If the search word is not found and the search is for all words then set the search found variable back to false as one of the words has not been found								If Request.QueryString("mode") = "allwords" then blnSearchFound = False															End If						Next					End If																				'Calculate the total files searched					intTotalFilesSearched = intTotalFilesSearched + 1																											'If the search found variable is true then display the results					If blnSearchFound = True Then																												'Calculate the total files found 					intTotalFilesFound = intTotalFilesFound + 1																										'Check that the file shown is between the the files shown so far and the maximum files to show per page					If  intNumFilesShown < (intRecordsPerPage + intFileNum) and intTotalFilesFound > intNumFilesShown Then							'Calculate the number of results shown						intNumFilesShown = intNumFilesShown + 1															'Read in the title of the file						strPageTitle = GetFileMetaTag("<title>","</title>", strFileContents)														'Read in the description meta tag of the file						strPageDescription = GetFileMetaTag("<meta name=""description"" content=""",""">", strFileContents)			 				 			'If the page contains no title then Page Title variable the appropriate message to display							If strPageTitle = "" Then strPageTitle = ""														'If the page contains no title then Page Description variable the appropriate message to display							If strPageDescription = "" Then strPageDescription = ""					   							   		'Place the search results into the saerch results array					   		'Calculate the array position of the results array					   		intResultsArrayPosition = intResultsArrayPosition + 1					   							   							   		'Set the search results found boolean to true					   		blnSearchResultsFound = True					   						   								'If the file is in the root directory then						If blnIsRoot = True Then													'Place the search results into the search results array							sarySearchResults(intResultsArrayPosition) = "<a href=""./" &  filObject.Name & """ target=""_blank"">" & strPageTitle & "</a><br>" & vbCrLf & "		" & strPageDescription																	   							   		'Else it is not in the root directiory					   		Else					   			'Place the search results into the search results array					   			sarySearchResults(intResultsArrayPosition) = "<a href=""./" & strFileURL  & fldObject.Name & "/" & filObject.Name & """ target=""_blank "">" & strPageTitle & "</a><br>" & vbCrLf & "		  " & strPageDescription			   			   														End If															End If				  					  End If											'Close the text stream object					tsObject.Close			End If		End If	Next	'Loop to search through the sub folders within the site	For Each subFldObject In FldObject.SubFolders												'Check to make sure the folder about to be searched is not a barred folder if it is then don't search		If NOT InStr(1, strBarredFolders, subFldObject.Name, vbTextCompare) > 0 Then						'Set to false as we are searching sub directories			blnIsRoot = False										'Get the server path to the file			strFileURL = fldObject.Path & "\"						'Turn the server path to the file into a URL path to the file			strFileURL = Replace(strFileURL, strServerPath, "")						'Replace the NT backslash with the internet forward slash in the URL to the file			strFileURL = Replace(strFileURL, "\", "/")						'Encode the file name and path into the URL code method			strFileURL = Server.URLEncode(strFileURL)						'Just incase it's encoded any backslashes			strFileURL = Replace(strFileURL, "%2F", "/")													'Call the search sub prcedure to search the web site			Call SearchFile(subFldObject)		End If	Next	'Reset server variables	Set filObject = Nothing	Set tsObject = Nothing	Set subFldObject = NothingEnd Sub'Function to read in the files meta tagsPrivate Function GetFileMetaTag(ByRef strStartValue, ByRef strEndValue, ByVal strFileContents)	'Dimension Variables	Dim intStartPositionInFile	'Holds the start position in the file	Dim intEndPositionInFile	'Holds the end position in the file			'Get the start position in the file of the meta tag	intStartPositionInFile = InStr(1, LCase(strFileContents), strStartValue, 1)			'If no description or keywords are found then you may be using http-equiv= instead of name= in your meta tags	If intStartPositionInFile = 0 And InStr(strStartValue, "name=") Then				'Swap name= for http-equiv= 		strStartValue = Replace(strStartValue, "name=", "http-equiv=")				'Check again for keywords or description		intStartPositionInFile = InStr(1, LCase(strFileContents), strStartValue, 1)			End If								'If there is a description then the position in file will be over 0	If NOT intStartPositionInFile = 0 Then							'Get the end position of the HTML meta tag		intStartPositionInFile = intStartPositionInFile + Len(strStartValue)								'Get the position in file of the closing tag for the meta tag		intEndPositionInFile = InStr(intStartPositionInFile, LCase(strFileContents), strEndValue, 1)			'Read in the meta tag from the file for the function to return		GetFileMetaTag = Trim(Mid(strFileContents, intStartPositionInFile, (intEndPositionInFile - intStartPositionInFile)))						'If the is no meta tag then the GetFileMetaTag function returns a null value	Else		GetFileMetaTag = ""			   			End IfEnd Function%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Muito obrigado, vou procurar um servidor pago pra testar esse script.Então só mais uma perguntinha...Como que eu faço nesse código para que quando a pessoa clicar no resultado da busca ele abra numa janela com as dimensões que eu escolher?

Compartilhar este post


Link para o post
Compartilhar em outros sites

terá que usar javascript, no forum JAVASCRIPT tem algumas duvidas solucionadas mostrando como abrir popup

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.