Ir para conteúdo

POWERED BY:

Arquivado

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

Rodrigo F.

Filtros de Busca

Recommended Posts

Estou tentando adicionar um campo select para que o usuário possa selecionar que tipo de busca fará.. Por ator, titulo original e traduzido, diretor e parte da sinopse

 

A consulta

 

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/Cinex.asp" -->
<%
Dim filme__MMColParam
filme__MMColParam = "AAAAZZZZCXCAAJAJA"
if (Request.Form("titulo") <> "") then filme__MMColParam = Request.Form("titulo")
%>
<%
function preparaPalavra(str)
 preparaPalavra = replace(str,"a","[a,á,à,ã,â,ä]")
 preparaPalavra = replace(preparaPalavra,"e","[e,é,è,ê,ë]")
 preparaPalavra = replace(preparaPalavra,"i","[i,í,ì,î,ï]")
 preparaPalavra = replace(preparaPalavra,"o","[o,ó,ò,õ,ô,ö]")
 preparaPalavra = replace(preparaPalavra,"u","[u,ú,ù,û,ü]")
 preparaPalavra = replace(preparaPalavra,"c","[c,ç]")
 preparaPalavra = preparaPalavra
end function


ip = Request.ServerVariables("REMOTE_ADDR")
Dim categoria__MMColParam
categoria__MMColParam = Trim(Request.Form("id_genero"))

set filme = Server.CreateObject("ADODB.Recordset")
filme.ActiveConnection = MM_Cinex_STRING

	if categoria__MMColParam = "" then

		filme.Source = "SELECT *  FROM filme  WHERE titulo LIKE '%" + Replace(preparaPalavra(filme__MMColParam), "'", "''") + "%' OR titulo_original LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR direcao LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores1 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores2 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores3 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores4 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores5 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores6 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores7 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores8 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores9 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores10 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' ORDER BY titulo ASC"
	
	else
	
		filme.Source = "SELECT *  FROM filme  WHERE (titulo LIKE '%" + Replace(preparaPalavra(filme__MMColParam), "'", "''") + "%' OR titulo_original LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR direcao LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores1 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores2 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores3 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores4 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores5 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores6 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores7 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores8 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores9 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores10 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%') AND  id_genero = "&categoria__MMColParam&" ORDER BY titulo ASC"
	
	End if



filme.CursorType = 0
filme.CursorLocation = 2
filme.LockType = 3
filme.Open()
filme_numRows = 0
%>

O campo da busca

 

<td> </td>
						  </tr>
						  <tr> 
							<td height="30"> 
							  <form name="form1" method="get" action="busca_simples.asp">
								<table width="400" border="0" cellspacing="0" cellpadding="0">
								  <tr> 
									<td width="210"> 
									  <input type="text" name="titulo" style="font-family : Verdana;font-size : 12px;width : 206px;">
									</td>
									<td> 
									  <input type="image" border="0" name="Buscar" src="images/buscar.jpg" onClick="FDK_AddNonBlankValidation('form1','document.form1.titulo',true,'\'Digite o título do filme !\'');FDK_Validate('form1',true,false,'Atenção! Club Video Locadora');return document.MM_returnValue">
									</td>
								  </tr>
								</table>
							  </form>
							</td>

Compartilhar este post


Link para o post
Compartilhar em outros sites

detalhe mais sua duvida, para podermos ajudá-lo, você quer um drop-down, com as opções para fazer a busca ?

se for isso dá uma pesquisada no fórum , que existem exemplos.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Ok amigos, peço desculpas...

 

Atualmente a consulta feita (busca) procura o texto digitado nas tabelas titulo / diretor / ator / titulo original eu gostaria de criar um campo select (caixa de seleção) com as opções titulo / diretor / ator / sinopse.

 

Assim eu poderia por o nome de um ator "Daniel" e selecionar a opção ator, caso deixasse em titulo seriam apresentas as respostas pra Titulos que tivessem a palavra "daniel".

 

Agradeço a todos a ajuda, sempre bom estar aprendendo e podendo contar com quem sabe mais para desenvolver ideias

 

vls!!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Agradeço a todos a ajuda, sempre bom estar aprendendo e podendo contar com quem sabe mais para desenvolver ideias

Precisa puxar o saco não, a gente te ajuda de qualquer jeito, hahah.. Brincadeira...

 

Para inserir um select em seu código faça assim:

 

Na pagina do envio

 

<select name="escolhas">
<option selected>Titulo</option>
<option>Ator</option>
<option>Trecho</option>
</select>

<input type="text" name="dado"/>

Na página onde busca do banco

 

<%

if request("escolhas") = "Ator" then
	sql = "select * from tabela where ator = '" & request("dado") & "'"
elseif request("escolhas") = "Titulo" then
	sql = "select * from tabela where titulo = '" & request("dado") & "'"
else
	sql = "select * from tabela where trecho = '" & request("dado") & "'"
end if

%>

Tendo dúvidas poste ai.

Compartilhar este post


Link para o post
Compartilhar em outros sites

usa o operadopr LIKE no SQL, tb...

Compartilhar este post


Link para o post
Compartilhar em outros sites

hehehehe

não é puxa sacquismo não

é que fico surpreso qndo existe algo desse tipo

isso pq sempre navego pelo fóruns e as pessoas ignoram quem ta começando e aqui não foi assim entende?

ashduihasidhiashidas

 

vou fazer as modificações conforme me indicou ;D

vlws mesmo

 

Agora a paginação eu to quase desistindo sabia?

nada funciona :{

tentei de tudo ja, vi todo laboratorio, fiz os testes e sempre da pau

Compartilhar este post


Link para o post
Compartilhar em outros sites

Utilizando o code enviado pelo amigo, fiz o teste e deu um erro

 

Microsoft VBScript compilation  error '800a03f6'

Expected 'End'

/busca_simples_teste.asp, line 804

O code completo modificado ficou assim

 

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/Cinepipoca.asp" -->
<%
Dim filme__MMColParam
filme__MMColParam = "AAAAZZZZCXCAAJAJA"
if (Request.QueryString("dado") <> "") then filme__MMColParam = Request.QueryString("dado")
%>
<%
function preparaPalavra(str)
 preparaPalavra = replace(str,"a","[a,á,à,ã,â,ä]")
 preparaPalavra = replace(preparaPalavra,"e","[e,é,è,ê,ë]")
 preparaPalavra = replace(preparaPalavra,"i","[i,í,ì,î,ï]")
 preparaPalavra = replace(preparaPalavra,"o","[o,ó,ò,õ,ô,ö]")
 preparaPalavra = replace(preparaPalavra,"u","[u,ú,ù,û,ü]")
 preparaPalavra = replace(preparaPalavra,"c","[c,ç]")
 preparaPalavra = preparaPalavra
end function


ip = Request.ServerVariables("REMOTE_ADDR")
Dim categoria__MMColParam
categoria__MMColParam = Trim(Request.QueryString("dado"))

set filme = Server.CreateObject("ADODB.Recordset")
filme.ActiveConnection = MM_Cinepipoca_STRING

	if categoria__MMColParam = "Titulo" then

		filme.Source = "SELECT *  FROM filme  WHERE titulo LIKE '%" + Replace(preparaPalavra(filme__MMColParam), "'", "''") + "%' OR titulo_original LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' ORDER BY titulo ASC"
	
	else
	
	if categoria__MMColParam = "Ator" then

		filme.Source = "SELECT *  FROM filme  WHERE atores1 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores2 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores3 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores4 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores5 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores6 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores7 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores8 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores9 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores10 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' ORDER BY titulo ASC"
	
	else
	
	if categoria__MMColParam = "Diretor" then

		filme.Source = "SELECT *  FROM direcao LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' ORDER BY titulo ASC"
	
	else
	
	if categoria__MMColParam = "Sinopse" then

		filme.Source = "SELECT *  FROM filme  WHERE sinopse LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' ORDER BY titulo ASC"
	
	End if



filme.CursorType = 0
filme.CursorLocation = 2
filme.LockType = 3
filme.Open()
filme_numRows = 0
%>

<%
if categoria__MMColParam <> "" then
set categoria = Server.CreateObject("ADODB.Recordset")
categoria.ActiveConnection = MM_Cinepipoca_STRING
categoria.Source = "SELECT * FROM genero WHERE codigo = "&categoria__MMColParam&""
categoria.CursorType = 0
categoria.CursorLocation = 2
categoria.LockType = 3
categoria.Open()
categoria_numRows = 0
End if
%>
<%
				  
Set msg = Server.CreateObject("CDONTS.NewMail")

Dim msg, HTML
				  
HTML = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">"
HTML = HTML & "<html><head><title>Club Video - Resultado de busca dentro do Site!</title></head>"
HTML = HTML & "<body bgcolor=#FFFFFF text=#000000><font face=Tahoma size=2>"
HTML = HTML & "Data: "&Date&"<Br>"
HTML = HTML & "IP: "&ip&"<Br><br>"

If Session("Aut") = "Ok" Then
	HTML = HTML & "Cliente: Id "&Session("IDCliente")&" - "&Session("IDnome")&"<Br><br>"
End if

HTML = HTML & "Palavra Buscada: <b>"&filme__MMColParam&"</b><Br>"
if categoria__MMColParam <> "" then
HTML = HTML & "Gênero: <b>"&categoria.Fields.Item("genero").Value&"</b><Br>"
End if

If Not filme.EOF Or Not filme.BOF Then
	HTML = HTML & "<br><font color=#0000FF>Busca Encontrada Com Sucesso!</font>"
End if

If filme.EOF And filme.BOF Then
	HTML = HTML & "<br><font color=#FF0000>Busca Não Encontrada!</font>"
End if

HTML = HTML & "</font>"
HTML = HTML & "</body></html>"
				  
msg.From = "contato@cluvideo.com.br"
msg.To = "rodriqo@gmail.com"
msg.Subject = "Club Video - Resultado de busca dentro do Site!"
msg.BodyFormat = 0
msg.MailFormat = 0
msg.Body = HTML
msg.Send
						  
Set msg = Nothing
%>

<%
Dim HLooper1__numRows
HLooper1__numRows = 80
Dim HLooper1__index
HLooper1__index = 0
filme_numRows = filme_numRows + HLooper1__numRows
%>
<html>
<head>
<meta http-equiv="Content-Language" content="pt-br" />
<meta http-equiv="Cache-Control" content="no-cache, no-store" />
<meta http-equiv="Pragma" content="no-cache, no-store" />
<meta name="robots" content="index, follow" />
<meta name="description" content="Club Video - Prazer em atender você!!! Os melhores filmes, promoções, lan-house, Recarga Online e diversos serviços especializados. Tudo ao seu alcance!" />
<meta name="keywords" content="locadora, cinema, dvd, ilhéus, ios, serviços, classificados, compras, entretenimento, animação, filmes, arte, cultura, bahia, crianças, diversão, vhs, trailers, sinopse, suspense, drama, ação, aventura, comédia, animação, romance, terror, policial, ficção, agenda, informação, clima" />
<meta name="URL" content="http://www.clubvideo.com.br">
<meta name="SUBJECT" content="Video Locadora">
<meta name="RATING" content="GENERAL">
<meta name="audience" content="all">
<meta name="LANGUAGE" content="Portuguese">
<meta name="ROBOTS" content="index,follow">
<meta name="GOOGLEBOT" content="index,follow">
<meta name="Dc.title" content="Club Video" />
<meta name="Author" content="Rodrigo F. Santos - wwBR.net" />
<link rel="SHORTCUT ICON" href="http://www.clubvideo.com.br/favicon.ico" />
<link rel="apple-touch-icon" href="http://www.clubvideo.com.br/favicon.jpg" />
<title>Club Video - Prazer em Atender Você!</title>
<link rel="stylesheet" href="estilo.css" type="text/css">
<link rel="stylesheet" href="estilo_cine.css" type="text/css">
<link rel="stylesheet" href="noticias/estilo_noticias.css" type="text/css">
<link href="style.css" rel="stylesheet" type="text/css">
<script language=javascript>
function msg(){
window.status="Club Video - Prazer em Atender você";
return true;
}
</script>

<script language="JavaScript">
<!--
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
	document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
	if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
	obj.visibility=v; }
}
//-->
</script>
<style type="text/css">
<!--
.style1 {
	color: #FF0000;
	font-weight: bold;
}
-->
</style>
<style type="text/css">
.sTitle {
	font-size: 13px;
	font-family: Arial, Helvetica, sans-serif;
}
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" align="center" link="#0176C8" vlink="#0176C8" alink="#0176C8" onLoad="msg()" rightmargin="0" bottommargin="0">
<table class="container" align="center" border="0" cellpadding="0" cellspacing="0">
 <tbody><tr>
  <td width="11"><img src="images/canto_esquerdo_1.gif" width="11" height="11"></td>
  <td width="100%" background="images/centro_top.gif"></td>
  <td width="11"><img src="images/canto_direito_1.gif" width="11" height="11"></td>
 </tr>
 <tr>
  <td background="images/esquerdo_s_1.gif"></td>
  <td><table width="784" border="0" cellpadding="0" cellspacing="0" height="68">
	<tbody><tr>
	 <td valign="top">
				<!--#include file="topo_logo_teste.asp" --></td>
	</tr>
   </tbody></table></td>
  <td background="images/direito_s.gif"></td>
 </tr>
 <tr>
  <td background="images/esquerdo_s_1.gif"> </td>
	 <td class="navTable">
		<iframe name="I1" src="menu.htm" width="778" height="40" scrolling="no" frameborder="no" hspace="0" vspace="0" marginwidth="1" marginheight="1"></iframe>
	</td>

  <td background="images/direito_s.gif"> </td>
 </tr>
 <tr>
  <td background="images/esquerdo_s_1.gif"></td>
	 <td class="navTable">
		 </td>

  <td background="images/direito_s.gif"></td>
 </tr>
 <tr>
  <td background="images/esquerdo_s_1.gif" height="340"></td>
  <td valign="top" align="left">
<!-- Menu //-->
			<% If Not filme.EOF Or Not filme.BOF Then %>
			
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

' set the record count
filme_total = filme.RecordCount

' set the number of rows displayed on this page
If (filme_numRows < 0) Then
  filme_numRows = filme_total
Elseif (filme_numRows = 0) Then
  filme_numRows = 1
End If

' set the first and last displayed record
filme_first = 1
filme_last  = filme_first + filme_numRows - 1

' if we have the correct record count, check the other stats
If (filme_total <> -1) Then
  If (filme_first > filme_total) Then filme_first = filme_total
  If (filme_last > filme_total) Then filme_last = filme_total
  If (filme_numRows > filme_total) Then filme_numRows = filme_total
End If
%>
			<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (filme_total = -1) Then

  ' count the total records by iterating through the recordset
  filme_total=0
  While (Not filme.EOF)
	filme_total = filme_total + 1
	filme.MoveNext
  Wend

  ' reset the cursor to the beginning
  If (filme.CursorType > 0) Then
	filme.MoveFirst
  Else
	filme.Requery
  End If

  ' set the number of rows displayed on this page
  If (filme_numRows < 0 Or filme_numRows > filme_total) Then
	filme_numRows = filme_total
  End If

  ' set the first and last displayed record
  filme_first = 1
  filme_last = filme_first + filme_numRows - 1
  If (filme_first > filme_total) Then filme_first = filme_total
  If (filme_last > filme_total) Then filme_last = filme_total

End If
%>
			<%
' *** Move To Record and Go To Record: declare variables

Set MM_rs	= filme
MM_rsCount   = filme_total
MM_size	  = filme_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
  MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
			<%
' *** Move To Record: handle 'index' or 'offset' parameter

if (Not MM_paramIsDefined And MM_rsCount <> 0) then

  ' use index parameter if defined, otherwise use offset parameter
  r = Request.QueryString("index")
  If r = "" Then r = Request.QueryString("offset")
  If r <> "" Then MM_offset = Int(r)

  ' if we have a record count, check if we are past the end of the recordset
  If (MM_rsCount <> -1) Then
	If (MM_offset >= MM_rsCount Or MM_offset = -1) Then  ' past end or move last
	  If ((MM_rsCount Mod MM_size) > 0) Then		 ' last page not a full repeat region
		MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
	  Else
		MM_offset = MM_rsCount - MM_size
	  End If
	End If
  End If

  ' move the cursor to the selected record
  i = 0
  While ((Not MM_rs.EOF) And (i < MM_offset Or MM_offset = -1))
	MM_rs.MoveNext
	i = i + 1
  Wend
  If (MM_rs.EOF) Then MM_offset = i  ' set MM_offset to the last possible record

End If
%>
			<%
' *** Move To Record: if we dont know the record count, check the display range

If (MM_rsCount = -1) Then

  ' walk to the end of the display range for this page
  i = MM_offset
  While (Not MM_rs.EOF And (MM_size < 0 Or i < MM_offset + MM_size))
	MM_rs.MoveNext
	i = i + 1
  Wend

  ' if we walked off the end of the recordset, set MM_rsCount and MM_size
  If (MM_rs.EOF) Then
	MM_rsCount = i
	If (MM_size < 0 Or MM_size > MM_rsCount) Then MM_size = MM_rsCount
  End If

  ' if we walked off the end, set the offset based on page size
  If (MM_rs.EOF And Not MM_paramIsDefined) Then
	If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
	  If ((MM_rsCount Mod MM_size) > 0) Then
		MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
	  Else
		MM_offset = MM_rsCount - MM_size
	  End If
	End If
  End If

  ' reset the cursor to the beginning
  If (MM_rs.CursorType > 0) Then
	MM_rs.MoveFirst
  Else
	MM_rs.Requery
  End If

  ' move the cursor to the selected record
  i = 0
  While (Not MM_rs.EOF And i < MM_offset)
	MM_rs.MoveNext
	i = i + 1
  Wend
End If
%>
			<%
' *** Move To Record: update recordset stats

' set the first and last displayed record
filme_first = MM_offset + 1
filme_last  = MM_offset + MM_size
If (MM_rsCount <> -1) Then
  If (filme_first > MM_rsCount) Then filme_first = MM_rsCount
  If (filme_last > MM_rsCount) Then filme_last = MM_rsCount
End If

' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
			<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
	MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
  End If
Next

' add the Form variables to the MM_keepForm string
For Each Item In Request.QueryString
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
	MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.QueryString(Item))
  End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> "")  Then MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
	MM_joinChar = "&"
  Else
	MM_joinChar = ""
  End If
End Function
%>
			<%
' *** Move To Record: set the strings for the first, last, next, and previous links

MM_keepMove = MM_keepBoth
MM_moveParam = "index"

' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 0) Then
  MM_moveParam = "offset"
  If (MM_keepMove <> "") Then
	params = Split(MM_keepMove, "&")
	MM_keepMove = ""
	For i = 0 To UBound(params)
	  nextItem = Left(params(i), InStr(params(i),"=") - 1)
	  If (StrComp(nextItem,MM_moveParam,1) <> 0) Then
		MM_keepMove = MM_keepMove & "&" & params(i)
	  End If
	Next
	If (MM_keepMove <> "") Then
	  MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
	End If
  End If
End If

' set the strings for the move to links
If (MM_keepMove <> "") Then MM_keepMove = MM_keepMove & "&"
urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
MM_moveFirst = urlStr & "0"
MM_moveLast  = urlStr & "-1"
MM_moveNext  = urlStr & Cstr(MM_offset + MM_size)
prev = MM_offset - MM_size
If (prev < 0) Then prev = 0
MM_movePrev  = urlStr & Cstr(prev)
%>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr> 
				<td height="18" valign="top"> 
				  <table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr> 
					  <td> 
						<table width="100%" border="0" cellspacing="0" cellpadding="0" height="72" background="title/busca_por_filme.gif">
						  <tr> 
							<td> 
							  <table width="100%" height="72">
								<tr> 
								  <td width="46%"> </td>
								</tr>
							  </table>
							</td>
						  </tr>
						</table>
					  </td>
					</tr>
					<tr> 
					  <td> 
						<table width="96%" align="center" cellpadding="0" cellspacing="0" border="0">
						  <tr> 
							<td><font size="2" face="Tahoma, Verdana">Foram 
							encontrados 
							  <b><%=(filme_total)%></b> filmes com a palavra (<font color="0586E6"> 
							  <b><%= Request.QueryString("titulo") %></b></font> )</font> 
							  <% Response.write busca_filme %>
							</td>
						  </tr>
						  <tr> 
							<td> </td>
						  </tr>
						</table>
					  </td>
					</tr>
					<tr> 
					  <td> 
						<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
						  <tr> 
							<td> 
							  <table width="100%">
								<%
startrw = 0
endrw = HLooper1__index
numberColumns = 5
numrows = 16
while((numrows <> 0) AND (Not filme.EOF))
	startrw = endrw + 1
	endrw = endrw + numberColumns
 %>
								<tr align="center" valign="top"> 
								  <%
While ((startrw <= endrw) AND (Not filme.EOF))
%>
								  <td> 
									<table width="130" border="0" cellspacing="0" cellpadding="0" align="center">
									  <tr align="center"> 
										<td width="16%"><a href="ficha_tecnica.asp?id_filme=<%=(filme.Fields.Item("id_filme").Value)%>" onMouseOver="window.status='<%=(filme.Fields.Item("titulo").Value)%>';return true" onMouseOut="window.status='<%=(filme.Fields.Item("titulo").Value)%>';return true"><img src="dvd/peq/<%=(filme.Fields.Item("id_filme").Value)%>.jpg" width="80" height="115" vspace="10" border="1" style="border-color:#5191D1" alt="<%=(filme.Fields.Item("titulo").Value)%>"></a></td>
									  </tr>
									  <tr valign="top"> 
										<td width="16%" height="28"> 
										  <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
											<tr> 
											  <td align="center"><b><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> 
												<%=(filme.Fields.Item("titulo").Value)%></font></b></td>
											</tr>
										  </table>
										</td>
									  </tr>
									  <tr> 
										<td width="16%" align="center"> 
										  <table width="80" border="0" cellspacing="0" cellpadding="0">
											<tr> 
											  <td align="center" height="18"><img src="images/sinopse.gif" width="10"></td>
											  <td height="18"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="ficha_tecnica.asp?id_filme=<%=(filme.Fields.Item("id_filme").Value)%>"><font color="#000000">
												Sinopse</font></a></font></td>
											</tr>
										  </table>
										</td>
									  </tr>
									</table>
								  </td>
								  <%
	startrw = startrw + 1
	filme.MoveNext()
	Wend
	%>
								</tr>
								<%
 numrows=numrows-1
 Wend
 %>
							  </table>
							</td>
						  </tr>
						</table>
					  </td>
					</tr>
					<tr> 
					  <td height="40" align="center"> 
						<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
						  <tr> 
							<td valign="bottom" height="60"> 
							  <% If Not MM_atTotal Then %>
							  <table border="0" width="12%" align="right">
								<tr> 
								  <td width="25%" align="center"> 
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
									  <tr> 
										<td height="20" align="center" valign="middle"><a href="<%=MM_moveLast%>"><img src="images/ir_fim.png" border=0 alt="Últimos"></a> 
										</td>
									  </tr>
									</table>
								  </td>
								</tr>
							  </table>
							  <% End If ' end Not MM_atTotal %>
							  <% If Not MM_atTotal Then %>
							  <table border="0" width="12%" align="right">
								<tr> 
								  <td width="25%" align="center"> 
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
									  <tr> 
										<td height="20" align="center" valign="middle"><a href="<%=MM_moveNext%>"><img src="images/ir.png" border=0 alt="Próximo"></a></td>
									  </tr>
									</table>
								  </td>
								</tr>
							  </table>
							  <% End If ' end Not MM_atTotal %>
							  <% If MM_offset <> 0 Then %>
							  <table border="0" width="12%" align="right">
								<tr> 
								  <td width="25%" align="center"> 
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
									  <tr> 
										<td height="20" align="center" valign="middle"><a href="<%=MM_movePrev%>"><img src="images/voltar.png" border=0 alt="Anterior"></a></td>
									  </tr>
									</table>
								  </td>
								</tr>
							  </table>
							  <% End If ' end MM_offset <> 0 %>
							  <% If MM_offset <> 0 Then %>
							  <table border="0" width="12%" align="right">
								<tr> 
								  <td width="25%" align="center"> 
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
									  <tr> 
										<td align="center" valign="middle" height="20"><a href="<%=MM_moveFirst%>"><img src="images/voltar_inicio.png" border=0 alt="Primeiros"></a></td>
									  </tr>
									</table>
								  </td>
								</tr>
							  </table>
							  <% End If ' end MM_offset <> 0 %>
							</td>
						  </tr>
						</table>
					  </td>
					</tr>
				  </table>
				</td>
			  </tr>
			  <tr> 
				<td> 
				  <table width="92%" cellpadding="0" cellspacing="0" border="0" align="center">
					<tr> 
					  <td align="right" height="12"><img src="imagens/1x1_transparente.gif" width="1" height="1"></td>
					</tr>
					<tr> 
					  <td align="right"><font size="2" face="Tahoma, Verdana">
						Filme exibidos  <font color="046EBB"><b><%=(filme_first)%></b></font> <font color="#000000"> 
						 até</font><font size="2" face="Tahoma, Verdana">  
						</font><font color="046EBB"><b><%=(filme_last)%></b></font>  Total  <b><%=(filme_total)%></b></font></td>
					</tr>
					<tr> 
					  <td align="right"> </td>
					</tr>
				  </table>
				</td>
			  </tr>
			</table>
			<% End If ' end Not filme.EOF Or NOT filme.BOF %>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr> 
				<td height="18" valign="top"> 
				  <% If filme.EOF And filme.BOF Then %>


				  <table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr> 
					  <td> 
						<table width="100%" border="0" cellspacing="0" cellpadding="0" height="72" background="title/busca_por_filme.gif">
						  <tr> 
							<td> 
							  <table width="100%" height="72">
								<tr> 
								  <td width="46%"> </td>
								</tr>
							  </table>
							</td>
						  </tr>
						</table>
					  </td>
					</tr>
					<tr> 
					  <td> 
						<table width="96%" align="center" cellpadding="0" cellspacing="0" border="0">
						  <tr> 
							<td> </td>
						  </tr>
						  <tr> 
							<td><font size="2" face="Tahoma, Verdana">A palavra 
							utilizada (<font color="0586E6"> <%= Request.QueryString("titulo") %></font> 
							) para buscar o filme desejado não foi encontrada. 
							Você pode ter digitado a palavra de forma incorreta 
							  <% if categoria__MMColParam <> "" then
							  Response.write "e/ou o filme não corresponde à categoria ( "
							  Response.write "<font color=""0586E6"">"
							  Response.write categoria.Fields.Item("genero").Value
							  Response.write "</font>"
							  Response.write " ) em que foi realizado a pesquisa"
							  End if %>
							  .</font>  <font size="2" face="Tahoma"><b>
							Estamos constantemente atualizando nosso acervo de filmes com clássicos e lançamentos do mercado cinematográfico para melhor atender. </b>Qualquer informação entre em <b>
							<a href="contato.asp">contato</a></b>.</font>
							  <p><font size="2" face="Tahoma, Verdana">
							Utilize o campo abaixo para efetuar a pesquisa em 
							todas as categorias.</font></p>
							</td>
						  </tr>
						  <tr> 
							<td> </td>
						  </tr>
						  <tr> 
							<td height="30"> 
							  <form name="dado" method="get" action="busca_simples_teste.asp">
								<table width="313" border="0" cellspacing="0" cellpadding="0">
								  <tr> 
									<td width="210"> 
									  <input type="text" name="dado" style="font-family : Verdana;font-size : 8pt;width : 206px; color:#046EBB; font-weight:bold">
									</td>
									<td width="66"> 
									  <select name="dado" style="font-family: Verdana; font-size: 8pt; color: #046EBB; font-weight: bold">
									  <option value="Ator">Ator</option>
									  <option value="Diretor">Diretor</option>
									  <option selected value="Titulo">Titulo</option>
									  <option value="Trecho">Sinopse</option>
									  </select><td width="37"> 
									  <input type="image" border="0" name="dado" src="images/buscar.jpg" onClick="FDK_AddNonBlankValidation('dado','document.dado.titulo',true,'\'Digite algo para buscar!\'');FDK_Validate('dado',true,false,'Atenção! Club Video Locadora');return document.MM_returnValue">
									</td>
								  </tr>
								</table>
							  </form>
							</td>
						  </tr>
						</table>
						<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
							<p align="left"><font size="2" face="Tahoma, Verdana">Você sabia que pode fazer suas buscas no nosso portal utilizando o nome do 
							<font color="#0176C8"> <b><i>Diretor</i></b></font> ou 
							<font color="#0176C8"> <b><i>Ator</i></b></font>, 
							<font color="#0176C8"> <i><b>Título Original</b></i> 
							</font>ou <font color="#0176C8"> <i><b>Traduzido</b></i></font>?
						   
							</font></p>
						  <tr> 
							<td height="40"> </td>
						  </tr>
						  <tr> 
							<td height="75"><img src="images/title/sugestao.gif" width="776" height="72"></td>
						  </tr>
						  <tr> 
							<td> </td>
						  </tr>
						  <tr> 
							<td> 
							  <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
								<tr> 
								  <td><iframe name="topo" src="dvd_sugestivo.asp" width="100%" height="220" scrolling="no" frameborder="no" hspace="0" vspace="0"></iframe> 
								  </td>
								</tr>
							  </table>
							</td>
						  </tr>
						</table>
					  </td>
					</tr>
					<tr> 
					  <td> </td>
					</tr>
				  </table>
				  <% End If ' end filme.EOF And filme.BOF %>
				</td>
			  </tr>
			</table>
</td>
  <td background="images/direito_s.gif"></td>
 </tr>
 <tr>
  <td background="images/esquerdo_s_1.gif"> </td>
  <td class="copy" align="center" background="images/fio_cinza_topo_grande.gif"> </td>
  <td background="images/direito_s.gif"> </td>
 </tr>
 <tr>
  <td background="images/esquerdo_s_1.gif"></td>
  <td class="copy" align="center">Club Vídeo - Rua Eustáquio Bastos, nº 51, Ilhéus - Bahia<br>
					Copyright ©
								  <% Response.write (Year(now())) %>
					  - Todos os direitos reservados - Denuncie a Pirataria. 
	Disque 0800-113941</td>
  <td background="images/direito_s.gif"></td>
 </tr>
 <tr>
  <td><img src="images/canto_esquerdo_2.gif" width="11" height="11"></td>
  <td background="images/bott_s.gif"></td>
  <td><img src="images/canto_direito_2.gif" width="11" height="11"></td>
 </tr>
</tbody>
</table>
</body>
</html>
<%
filme.Close()
%>
[b]<%
if categoria__MMColParam <> "" then
categoria.Close()
End if
%>[/b]

<%

if categoria__MMColParam <> "" then

categoria.Close()

End if <<<< Linha 804

%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Pela lógica, já que tem uma linha apenas dentro do IF, deveria funcionar...

else

if categoria__MMColParam = "Ator" then

 

Mas altera para a conforma "correta".

elseif categoria__MMColParam = "Ator" then

 

Faça com os demais abaixo.

 

Posta o conteúdo de:

<!--#include file="Connections/Cinepipoca.asp" -->

<!--#include file="topo_logo_teste.asp" -->

Compartilhar este post


Link para o post
Compartilhar em outros sites

Ok, o conteudo:

 

Connections/Cinepipoca.asp

<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO" 
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_Cinepipoca_STRING
'MM_Cinepipoca_STRING = "dsn=cinepipoca"

caminho_banco = Server.MapPath("databases/cine_dados.mdb")
MM_Cinepipoca_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & caminho_banco
%>

E de topo_logo_teste.asp

 

<head>
<meta http-equiv="Content-Language" content="pt-br" />
<meta http-equiv="Cache-Control" content="no-cache, no-store" />
<meta http-equiv="Pragma" content="no-cache, no-store" />
<meta name="robots" content="index, follow" />
<meta name="description" content="Club Video - Prazer em atender você!!! Os melhores filmes, promoções, lan-house, Recarga Online e diversos serviços especializados. Tudo ao seu alcance!" />
<meta name="keywords" content="locadora, cinema, dvd, ilhéus, ios, serviços, classificados, compras, entretenimento, animação, filmes, arte, cultura, bahia, crianças, diversão, vhs, trailers, sinopse, suspense, drama, ação, aventura, comédia, animação, romance, terror, policial, ficção, agenda, informação, clima" />
<meta name="URL" content="http://www.clubvideo.com.br">
<meta name="SUBJECT" content="Video Locadora">
<meta name="RATING" content="GENERAL">
<meta name="audience" content="all">
<meta name="LANGUAGE" content="Portuguese">
<meta name="ROBOTS" content="index,follow">
<meta name="GOOGLEBOT" content="index,follow">
<meta name="Dc.title" content="Club Video" />
<meta name="Author" content="Rodrigo F. Santos - wwBR.net" />
<link rel="SHORTCUT ICON" href="http://www.clubvideo.com.br/favicon.ico" />
<link rel="apple-touch-icon" href="http://www.clubvideo.com.br/favicon.jpg" />
<title>Club Video - Prazer em Atender Você!</title>
<link rel="stylesheet" href="scr/estilo.css" type="text/css">
<link rel="stylesheet" href="scr/estilo_cine.css" type="text/css">
<script language=javascript>
function msg(){
window.status="Club Video - Prazer em Atender você";
return true;
}
</script>
<style type="text/css">
<!--
a {
	font-family: Verdana;
	color: #000000;
	font-size: 11px;
	font-weight: bold;
}
a:hover {
	color: #000000;
	text-decoration: none;
}
body,td,th {
	font-size: 12px;
	font-weight: bold;
}
a:link {
	color: #000000;
	text-decoration: none;
}
a:visited {
	color: #000000;
	text-decoration: none;
}
a:active {
	color: #000000;
	text-decoration: none;
}
-->
</style>
<base target="_top">
</head>

<body bgcolor="#FFFFFF" background="images/bgb.gif" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" align="center" onload="msg()">
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
	<td><table width="100%" height="34" border="0" cellpadding="0" cellspacing="0" background="imagens/linha_topo.gif">
	  <tr>
		<td align="center" height="132"><table width="53" border="0" cellspacing="0" cellpadding="0" align="center">
		  <tr>
			<td height="128" valign="top"><table id="Table_01" width="778" height="128" border="0" cellpadding="0" cellspacing="0">
				<tr>
				  <td>
					<map name="FPMap0">
					<area target="_top" href="default.asp" shape="rect" coords="12, 13, 235, 84">
					</map>
					<img border="0" src="images/topo.jpg" width="778" height="128" usemap="#FPMap0"></td>
				</tr>
			</table></td>
		  </tr>
		  <tr>
			<td height="20" valign="top" bgcolor="#097CCE" style="background-position:bottom; height:9px; font-size:1px;"></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td align="right" background="images/fio_cinza_topo.gif"><table width=778 height="34" border=0 align="center" cellpadding=0 cellspacing=0>
		  <tr>
			<td height="30" align="center"><a href="default.asp" target="_top" onMouseOver="window.status='Home';return true" onMouseOut="window.status='Home';return true">			Home </a></td>
			<td height="30" align="center"><a href="alocadora.asp" target="_top" onMouseOver="window.status='Quem Somos?';return true" onMouseOut="window.status='Quem Somos?';return true">			Quem Somos?</a></td>
			<td height="30" align="center"><a href="comoalugar.asp" target="_top" onMouseOver="window.status='Como Alugar?';return true" onMouseOut="window.status='Como Alugar?';return true">			Como Alugar?</a></td>
			<td height="30" align="center"><a href="filmes_lancamento.asp" target="_top" onMouseOver="window.status='Lançamentos';return true" onMouseOut="window.status='Lançamentos';return true">			Lançamentos</a></td>
			<td height="30" align="center"><a href="acervo.asp" target="_top" onMouseOver="window.status='Acervo';return true" onMouseOut="window.status='Acervo';return true">			Acervo</a></td>
			<td height="30" align="center"><a href="series_box.asp" target="_top" onMouseOver="window.status='Box / Séries';return true" onMouseOut="window.status='Box / Séries';return true">			Box / Séries</a></td>
			<td height="30" align="center"><a href="clubnews_headlines.asp" target="_top" onMouseOver="window.status='ClubNews';return true" onMouseOut="window.status='ClubNews';return true">			ClubNews</a></td>
			<td height="30" align="center"><a href="servicos.asp" target="_top" onMouseOver="window.status='Serviços';return true" onMouseOut="window.status='Serviços';return true">			Serviços</a></td>
			<td height="30" align="center"><a href="#" onclick="window.open('http://www.clubvideo.com.br/indicar_site.asp', 'indicar', 'STATUS=NO, TOOLBAR=NO, LOCATION=NO, DIRECTORIES=NO, RESIZABLE=YES, SCROLLBARS=no, TOP=10, LEFT=10, WIDTH=520, HEIGHT=400');" alt="Indique-nos">			Indique-nos</a></td>
			<td height="30" align="center"><a href="contato.asp" target="_top" onMouseOver="window.status='Contato';return true" onMouseOut="window.status='Contato';return true">			Contato</a></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
</table>
<table width="777" border="0" align="center" cellpadding="0" cellspacing="0" background="imagens/fio_claro_topo_grande.gif">
  <tr>
	<td><table width="777" border="0" align="center" cellpadding="0" cellspacing="0">
	  <tr align="center">
		<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr align="center">
			<td width="32%" valign="top" background="imagens/fio_cinza_topo_grande.gif">
			<form name="busca" method="get" action="busca_simples.asp" style="margin:0px;" target="_parent">
			  <table width="100" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td nowrap>
					</td>
				  <td nowrap><font color="#0176c8" size="2" face="Franklin Gothic Demi">
					Buscar:  </font></td>
				  <td>
					<table border="0" cellspacing="0" cellpadding="0" width="231">
					<tr>
					  <td height="33" align="left"> <input type="text" name="titulo" size="20" style="font-family : Verdana;font-size : 10px;width : 170px;"></td>
					  <td height="33" align="right" valign="middle"><input type="image" border="0" name="imageField2" src="images/ok.gif" width="26" height="21" onClick="FDK_AddNonBlankValidation('busca','document.busca.titulo',true,'\'Digite o título do filme !\'');FDK_Validate('busca',true,false,'Atenção - Club Video');return document.MM_returnValue"> </td>
					  <td height="33" align="right" valign="middle"><font color="#FFFFFF">_</font><a href="#" onclick="window.open('http://www.clubvideo.com.br/pop_interroga.html', 'pop_interroga', 'STATUS=NO, TOOLBAR=NO, LOCATION=NO, DIRECTORIES=NO, RESIZABLE=no, SCROLLBARS=no, TOP=10, LEFT=10, WIDTH=312, HEIGHT=312');" alt="Saiba como pesquisar em nosso portal."><img border="0" src="images/interrogacao.jpg" width="15" height="15"><font color="#FFFFFF">_</font></td>
					</tr>
				  </table></td>
				</tr>
			  </table>
			  <font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font size="1" face="Tahoma, Verdana">
			  <input type="hidden" name="id_genero">
			  </font></b></font></b></font>
			</form></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
</table>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Ainda estou na luta para arrumar a busca avançada.. Se alguém puder me dar mais uma forcinha aqui....

A linha 60 é filme.Open()

 

O Erro

Microsoft JET Database Engine error '80040e0c'

Command text was not set for the command object.

/busca_simples_teste.asp, line 60

A Consulta

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/Cinepipoca.asp" -->
<%
Dim filme__MMColParam
filme__MMColParam = "AAAAZZZZCXCAAJAJA"
if (Request.QueryString("titulo") <> "") then filme__MMColParam = Request.QueryString("titulo")
%>
<%
function preparaPalavra(str)
 preparaPalavra = replace(str,"a","[a,á,à,ã,â,ä]")
 preparaPalavra = replace(preparaPalavra,"e","[e,é,è,ê,ë]")
 preparaPalavra = replace(preparaPalavra,"i","[i,í,ì,î,ï]")
 preparaPalavra = replace(preparaPalavra,"o","[o,ó,ò,õ,ô,ö]")
 preparaPalavra = replace(preparaPalavra,"u","[u,ú,ù,û,ü]")
 preparaPalavra = replace(preparaPalavra,"c","[c,ç]")
 preparaPalavra = preparaPalavra
end function

ip = Request.ServerVariables("REMOTE_ADDR")
Dim categoria__MMColParam
categoria__MMColParam = Trim(Request.QueryString("id_genero"))

set filme = Server.CreateObject("ADODB.Recordset")
filme.ActiveConnection = MM_Cinepipoca_STRING

		if categoria__MMColParam = "titulos" then
		
			filme.Source = "SELECT *  FROM filme  WHERE titulo LIKE '%" + Replace(preparaPalavra(filme__MMColParam), "'", "''") + "%' OR titulo_original LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' ORDER BY titulo ASC"
			
		else if categoria__MMColParam = "diretor" then
		
			filme.Source = "SELECT *  FROM filme  WHERE direcao LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' ORDER BY titulo ASC"
			
		else if categoria__MMColParam = "ator" then
			
			filme.Source = "SELECT *  FROM filme  WHERE atores1 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores2 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores3 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores4 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores5 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores6 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores7 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores8 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores9 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' OR atores10 LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' ORDER BY titulo ASC"
			
		else if categoria__MMColParam = "sinopse" then
		
			filme.Source = "SELECT *  FROM filme  WHERE sinopse LIKE '%" + Replace(filme__MMColParam, "'", "''") + "%' ORDER BY titulo ASC"
   end if
  end if
 end if
end if



filme.CursorType = 0
filme.CursorLocation = 2
filme.LockType = 3
filme.Open()
filme_numRows = 0
%>

<%
if categoria__MMColParam <> "" then
set categoria = Server.CreateObject("ADODB.Recordset")
categoria.ActiveConnection = MM_Cinepipoca_STRING
categoria.Source = "SELECT * FROM genero WHERE codigo = "&categoria__MMColParam&""
categoria.CursorType = 0
categoria.CursorLocation = 2
categoria.LockType = 3
categoria.Open()
categoria_numRows = 0
End if
%>

O Formulário

<tr> 
							<td height="30"> 
							  <form name="buscando" method="GET" action="busca_simples_teste.asp">
								<table width="313" border="0" cellspacing="0" cellpadding="0">
								  <tr>
									<td width="210">
									  <input type="text" style="font-family : Verdana;font-size : 12px;width : 206px;" name="buscando" value="<%= Request.QueryString("buscando") %>">
									</td>
									  <td height="33" align="left" style="font-size: 12px; font-weight: bold" width="77"><select style="font-family : Verdana;font-size : 8pt; color:#046EBB; font-weight:bold" name="selecionado" value="<%= Request.QueryString("selecionado") %>">
									<option value="selecionado" name="ator">Ator</option>
									<option value="selecionado" name="diretor">Diretor</option>
									<option value="selecionado" name="sinopse">Sinopse</option>
									<option value="selecionado" name="titulos" selected>Titulo</option>

									</select></td>
									<td width="26">
									  <input type="image" border="0" name="selecionado" src="images/buscar.jpg" onClick="FDK_AddNonBlankValidation('selecionado','document.selecionado.buscando',true,'\'Digite a informação que deseja procurar !\'');FDK_Validate('selecionado',true,false,'Atenção! Club Video Locadora');return document.MM_returnValue">
									</td>
								  </tr>
								</table>
							  </form>

							</td>
						  </tr>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Provavelmente não está entrando em nenhum dos IF.

 

Coloque acima de filme.CursorType = 0

Response.Write filme.Source
Response.End
Poste o resultado.

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.