<%@ Language=VBScript %> <% option explicit Server.ScriptTimeout = 120 Response.Buffer = true dim link_serv link_serv = "../" dim tipo_pesquisa, praia, link_praia, nome_praia, cidade, tipo_hosp dim tipo_banner, tipo, campos 'Pega variáveis cidade = 2 ' Ilhabela tipo_hosp = request.querystring("tipo") tipo_pesquisa = request.form("tipo_pesquisa") Session.Value("uba_hotel") = request.form("hotel") Session.Value("uba_pousada") = request.form("pousada") Session.Value("uba_chale") = request.form("chale") Session.Value("uba_flat") = request.form("flat") Session.Value("uba_condominio") = request.form("condominio") Session.Value("uba_camping") = request.form("camping") Session.Value("uba_praia_simples") = request.form("praia") Session.Value("uba_praia_avancada") = request.form("praia2") Session.Value("uba_tipo") = request.form("tipo") Session.Value("uba_nome") = request.form("nome") Session.Value("uba_cafe") = request.form("cafe") Session.Value("uba_serv_quarto") = request.form("serv_quarto") Session.Value("uba_tv_aberta") = request.form("tv_aberta") Session.Value("uba_frigobar") = request.form("frigobar") Session.Value("uba_ventilador") = request.form("ventilador") Session.Value("uba_ar") = request.form("ar") Session.Value("uba_cozinha") = request.form("cozinha") Session.Value("uba_cozinha_mae") = request.form("cozinha_mae") Session.Value("uba_estacionamento") = request.form("estacionamento") Session.Value("uba_estacionamento_f") = request.form("estacionamento_f") Session.Value("uba_serv_praia") = request.form("serv_praia") Session.Value("uba_piscina") = request.form("piscina") Session.Value("uba_play_ground") = request.form("play_ground") Session.Value("uba_salao_jogos") = request.form("salao_jogos") Session.Value("uba_esportes") = request.form("esportes") Session.Value("uba_internet_wifi") = request.form("internet_wifi") Session.Value("uba_internet") = request.form("internet") Session.Value("uba_lanchonete") = request.form("lanchonete") Session.Value("uba_restaurante") = request.form("restaurante") Session.Value("uba_refeicao") = request.form("refeicao") Session.Value("uba_tv_fechada") = request.form("tv_fechada") Session.Value("uba_filmes") = request.form("filmes") Session.Value("uba_churrasqueira") = request.form("churrasqueira") Session.Value("uba_frente_mar") = request.form("frente_mar") Session.Value("uba_animais") = request.form("animais") Session.Value("uba_deficientes") = request.form("deficientes") 'Fim pega variáveis Session.Value("uba_nome") = replace(Session.Value("uba_nome"),chr(39),"") Session.Value("uba_nome") = replace(Session.Value("uba_nome"),chr(34),"") select case tipo_hosp case "hoteis" Session.Value("uba_hotel") = "1" case "pousadas" Session.Value("uba_pousada") = "1" case "chales" Session.Value("uba_chale") = "1" case "flats" Session.Value("uba_flat") = "1" case "condominios" Session.Value("uba_condominio") = "1" case "campings" Session.Value("uba_camping") = "1" end select 'Identifica a praia if isnumeric(Session.Value("uba_praia_simples")) = false then Session.Value("uba_praia_simples") = 0 if isnumeric(Session.Value("uba_praia_avancada")) = false then Session.Value("uba_praia_avancada") = 0 'FIM Identifica a praia 'TIPO DE PESQUISA select case tipo_pesquisa case "0" praia = Session.Value("uba_praia_simples") case "1" praia = Session.Value("uba_praia_avancada") case "2" praia = 0 case else praia = 0 end select 'FIM TIPO DE PESQUISA '''' if Session.Value("uba_hotel") <> "" then tipo = Session.Value("uba_hotel") elseif Session.Value("uba_pousada") <> "" then tipo = Session.Value("uba_pousada") elseif Session.Value("uba_chale") <> "" then tipo = Session.Value("uba_chale") elseif Session.Value("uba_flat") <> "" then tipo = Session.Value("uba_flat") elseif Session.Value("uba_condominio") <> "" then tipo = Session.Value("uba_condominio") elseif Session.Value("uba_camping") <> "" then tipo = Session.Value("uba_camping") end if '''' ' PEsquisa para o banner if tipo_pesquisa = 1 then tipo_banner = 1 else tipo_banner = 0 end if 'FIM Pesquisa para o banner if tipo = "" then tipo = 0 ' Campos para o banner campos = "cod_cidade like '"&cidade&"' " if tipo_banner = 0 then campos = campos & "and cod_praia like '"& praia &"' " campos = campos & "and cod_tipo like '"&tipo_banner&"' " campos = campos & "and litoral like '0' " else campos = campos & "and cod_praia like '0' " campos = campos & "and cod_tipo like '"&tipo_banner&"' " campos = campos & "and litoral like '0' " end if 'FIM Campos para o banner dim conexao, consulta_sql, rsquery Set conexao = CreateObject("ADODB.Connection") %><% 'Pega o nome da praia if praia = 0 then nome_praia = "Ilhabela" else consulta_sql = "SELECT praia, link, externo FROM litoralsp_praia Where cod like '"&praia&"'" set rsquery = Conexao.execute(consulta_sql) if rsquery.eof = false then nome_praia = rsquery("praia") if rsquery("externo") = true then link_praia = rsquery("link") else link_praia = link_serv & "praias/" & rsquery("link") end if if isnull(link_praia) = true then link_praia = "" end if set rsquery = nothing end if 'FIM Pega o nome da praia 'Pega os banners Dim cont, cima, baixo, n_banners, banners, cont_banners consulta_sql = "SELECT cod_banner, nome, arquivo, width, height, posicao, ordem FROM view_litoralsp_hospedagem_banners Where "& campos &" order by posicao, ordem, cod_banner DESC" set rsquery = Conexao.execute(consulta_sql) cont = 0 cima = 0 baixo = 0 n_banners = 0 if rsquery.eof = false then redim banners(8,7) cont = 1 do while rsquery.eof = false banners(cont,1) = rsquery("cod_banner") banners(cont,2) = rsquery("nome") banners(cont,3) = replace(rsquery("arquivo"),".swf","") banners(cont,4) = rsquery("width") banners(cont,5) = rsquery("height") banners(cont,6) = rsquery("posicao") banners(cont,7) = rsquery("ordem") if banners(cont,6) = 1 then cima = cima + 1 else baixo = baixo + 1 end if 'response.write banners(cont,6) cont = cont + 1 rsquery.movenext loop end if set rsquery = nothing n_banners = baixo + cima'Quantidade de banners na página cont = 0 'FIM pega os banners ''Banners superiores dim banner1_cor, banner3_cor, banner1, banner2_a, banner2_b, banner3, banner1_w, banner1_h, banner2_a_w, banner2_a_h, banner2_b_w, banner2_b_h, banner3_w, banner3_h if tipo_pesquisa = 1 then 'PESQUISA AVANÇADA banner1 = "bannerfotos" banner1_w = 150 banner1_h = 86 banner1_cor = "FFFFFF" 'banner2_a = "moradadapraia401x88" 'banner2_a_w = 401 'banner2_a_h = 88 banner3 = "imoveis150" banner3_w = 150 banner3_h = 86 banner3_cor = "FFFFFF" elseif tipo_pesquisa = 2 or tipo_hosp <> "" then 'nome ou direta banner1 = "bannerfotos" banner1_w = 150 banner1_h = 86 banner3 = "imoveis150" banner3_w = 150 banner3_h = 86 'FIM DA PESQUISA AVANÇADA else 'CHAMA FUNÇÃO DA PESQUISA SIMPLES call banners_simples end if 'PESQUISA SIMPLES function banners_simples() 'BANNER ESQUERDA (150 X 86) select case praia 'case 23 'Enseada 'banner1 = "areiadomar150x86" 'banner1_w = 150 'banner1_h = 86 'banner1_cor = "FFFFFF" case else banner1 = "bannerfotos" banner1_w = 150 banner1_h = 86 banner1_cor = "FFFFFF" end select 'BANNER CENTRA (401 X 88) 'banner2_a = "wembley401x88" 'banner2_a_w = 401 'banner2_a_h = 88 'BANNER DIREITA (150 X 86) select case praia 'case 45 'Lazaro 'banner3 = "vivenda_150x86" 'banner3_w = 150 'banner3_h = 86 'banner3_cor = "FFFFFF" case else banner3_cor = "FFFFFF" banner3 = "imoveis150" banner3_w = 150 banner3_h = 86 end select end function ''FIM banners superiores %> Ilhabela - Hospedagem <%Response.Flush%>
<%call mostrar_banners2("", "banneranunc/hospedagem/"& banner1, banner1, banner1_w, banner1_h, banner1_cor, 1,"window")%>

<% call mostrar_banners2("", "banneranunc/hospedagem/" & banner3, banner3, banner3_w, banner3_h, banner3_cor, 1,"window") %>

 

" else Response.write "" end if rsquery.movenext if rsquery.eof = false then if falta >= 2 then falta = 1 else falta = falta + 1 end if else if falta = 1 then Response.write "" call fim_tabela() else fim_tabela() end if end if loop vazio = 1 end if set rsquery = nothing end function 'FIM MOSTRAR HOSPEDAGEM NA TELA-------------------------------------- if vazio = 0 then call tabela_naoencontrado() conexao.Close set conexao = nothing '''FUNCÇÕES function tabela_naoencontrado() Response.write "
<% cont_banners = 1 do while cont_banners <= cima Response.Write "" cont_banners = cont_banners + 1 loop %>
 
" call mostrar_banners2(banners(cont_banners,2), "banneranunc/hospedagem/" & banners(cont_banners,3), banners(cont_banners,3), banners(cont_banners,4), banners(cont_banners,5), "FFFFFF",1 ,"transparent") Response.Write "
 

 Voltar

Hospedagem em Ilhabela

 

 

<% if praia <> "0" then Response.write "" else Response.write "" end if%>

<%=nome_praia%>


Hospedagens selecionadas para envio de e-mail: 0/10

" Response.write "" Response.write "" Response.write "Conheça a praia

" Response.write "" Response.write ""& nome_praia &"

CLIQUE SOBRE O ESTABELECIMENTO E VEJA FOTOS E INFORMAÇÕES SOBRE O MESMO.

Envie emails para os estabelecimentos, clicando no box ao lado do nome.
Para efetuar uma reserva no estabelecimento, clique em Reserve
Para verificar as avaliações dos hóspedes, clique em Avaliacao

<% dim vazio, cod, ativo, acao, destaque, destaque_usado, email_ativo, aberta, falta, envia_campos, indiferente, cod_tipo envia_campos = "" vazio = 0 campos = "" '''' 'if Session.Value("uba_hotel") = "1" then campos = campos & "and hotel like '1' " 'if Session.Value("uba_pousada") = "1" then campos = campos & "and pousada like '1' " 'if Session.Value("uba_chale") = "1" then campos = campos & "and chale like '1' " 'if Session.Value("uba_flat") = "1" then campos = campos & "and flat like '1' " 'if Session.Value("uba_condominio") = "1" then campos = campos & "and condominio like '1' " 'if Session.Value("uba_camping") = "1" then campos = campos & "and camping like '1' " 'if Session.Value("uba_nome") = "1" then campos = campos & "and nome like '1' " if Session.Value("uba_cafe") = "1" then campos = campos & "and cafe like '1' " if Session.Value("uba_serv_quarto") = "1" then campos = campos & "and serv_quarto like '1' " if Session.Value("uba_tv_aberta") = "1" then campos = campos & "and tv_aberta like '1' " if Session.Value("uba_frigobar") = "1" then campos = campos & "and frigobar like '1' " if Session.Value("uba_ventilador") = "1" then campos = campos & "and ventilador like '1' " if Session.Value("uba_ar") = "1" then campos = campos & "and ar like '1' " if Session.Value("uba_cozinha") = "1" then campos = campos & "and cozinha like '1' " if Session.Value("uba_cozinha_mae") = "1" then campos = campos & "and cozinha_mae like '1' " if Session.Value("uba_estacionamento") = "1" then campos = campos & "and estacionamento like '1' " if Session.Value("uba_estacionamento_f") = "1" then campos = campos & "and estacionamento_f like '1' " if Session.Value("uba_serv_praia") = "1" then campos = campos & "and serv_praia like '1' " if Session.Value("uba_piscina") = "1" then campos = campos & "and piscina like '1' " if Session.Value("uba_play_ground") = "1" then campos = campos & "and play_ground like '1' " if Session.Value("uba_salao_jogos") = "1" then campos = campos & "and salao_jogos like '1' " if Session.Value("uba_esportes") = "1" then campos = campos & "and esportes like '1' " if Session.Value("uba_internet_wifi") = "1" then campos = campos & "and internet_wifi like '1' " if Session.Value("uba_internet") = "1" then campos = campos & "and internet like '1' " if Session.Value("uba_lanchonete") = "1" then campos = campos & "and lanchonete like '1' " if Session.Value("uba_restaurante") = "1" then campos = campos & "and restaurante like '1' " if Session.Value("uba_refeicao") = "1" then campos = campos & "and refeicao like '1' " if Session.Value("uba_tv_fechada") = "1" then campos = campos & "and tv_fechada like '1' " if Session.Value("uba_filmes") = "1" then campos = campos & "and filmes like '1' " if Session.Value("uba_churrasqueira") = "1" then campos = campos & "and churrasqueira like '1' " if Session.Value("uba_frente_mar") = "1" then campos = campos & "and frente_mar like '1' " if Session.Value("uba_animais") = "1" then campos = campos & "and animais like '1' " if Session.Value("uba_deficientes") = "1" then campos = campos & "and deficientes like '1' " '''' if praia <> "" and praia <> 0 then campos = campos & "and cod_praia like '"& praia &"' " if tipo_pesquisa = "2" then campos = campos & "and nome like '%"& Session.Value("uba_nome") &"%' " campos = campos & "and cod_cidade like '"& cidade &"'" '''''''''''''''''''''''''''''''''''''''''''''''''''' indiferente = 0 if Session.Value("uba_hotel") <> "1" and Session.Value("uba_pousada") <> "1" and Session.Value("uba_chale") <> "1" and Session.Value("uba_flat") <> "1" and Session.Value("uba_condominio") <> "1" and Session.Value("uba_camping") <> "1" then indiferente = 1 end if if Session.Value("uba_hotel") = "1" or indiferente = 1 then cod_tipo = 1 call mostra_hospedagem() end if if Session.Value("uba_pousada") = "1" or indiferente = 1 then cod_tipo = 2 call mostra_hospedagem() end if if Session.Value("uba_chale") = "1" or indiferente = 1 then cod_tipo = 3 call mostra_hospedagem() end if if Session.Value("uba_flat") = "1" or indiferente = 1 then cod_tipo = 4 call mostra_hospedagem() end if if Session.Value("uba_condominio") = "1" or indiferente = 1 then cod_tipo = 5 call mostra_hospedagem() end if if Session.Value("uba_camping") = "1" or indiferente = 1 then cod_tipo = 6 call mostra_hospedagem() end if 'MOSTRAR HOSPEDAGEM NA TELA-------------------------------------- function mostra_hospedagem() 'if tipo = 0 or tipo = 1 then acao = 0 aberta = 0 'SEM DESTAQUE consulta_sql = "SELECT destaque, cod, cod_tipo, mostrar, link, email_ativo, nome, ativo FROM view_litoralsp_hospedagem Where (ativo like '1' or ativo like '2') "&campos&" and cod_tipo like '"& cod_tipo &"' ORDER BY NEWID()" set rsquery = Conexao.execute(consulta_sql) acao = 2 if rsquery.eof = false then falta = 1 call inicio_tabela() do while rsquery.eof = false if falta = 1 then response.write "
" call cria_celula() Response.write "" call cria_celula() response.write "
" call celula_vazia() response.write "
" Response.write "" Response.write "
" Response.write "" Response.write "" Response.write "" Response.write "
" Response.write "

" Response.write "" Response.write "Pesquisa de Hospedagem" Response.write "

" Response.write "

" Response.write " 

" Response.write "" Response.write "
" Response.write "" Response.write "
" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "
" Response.write "

" Response.write ucase("Não foi encontrado nenhum item nessa pesquisa.") Response.write "

" Response.write "
" Response.write "
" end function function inicio_tabela() 'muda de Campings para outros estabelecimentos Response.write "" Response.write "" Response.write "
" Response.write "" Response.write "" Response.write "" Response.write "
" Response.write "

" Response.write "" if rsquery("mostrar") = "Campings" then Response.write "Outros Estabelecimentos (contato p/email)" else Response.write rsquery("mostrar") end if Response.write "

" Response.write "

" Response.write " 

" Response.write "" Response.write "
" Response.write "" Response.write "
" Response.write "" end function function cria_celula() cod = rsquery("cod") email_ativo = rsquery("email_ativo") ativo = rsquery("ativo") 'Insere os campos de checkbox existentes na variável envia_campos Nakamura if envia_campos = "" then envia_campos = "cod_" & cod else envia_campos = envia_campos & "," & "cod_" & cod end if Response.write "
" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "
" if email_ativo = true and ativo = 2 then Response.write "" else Response.write " " end if Response.write "" if email_ativo = true and ativo = 2 then Response.write "" Response.write "Selecionar" else Response.write " " end if Response.write "" if ativo = 2 then Response.write "" Response.write ucase(rsquery("nome")) Response.write "" else response.write " " & ucase(rsquery("nome")) & "" end if Response.write "" if (rsquery("cod")) = "206" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "485" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "748" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "205" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "196" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "241" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "461" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "510" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "505" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "695" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "737" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "240" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "497" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "451" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "456" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "459" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "466" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "643" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "434" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "491" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "734" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "213" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "510" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "755" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "500" then Response.write "" Response.write "Reserve" else Response.write " " end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if Response.write "" if (rsquery("cod")) = "206" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "48599999" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "748" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "205" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "196" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "241" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "505" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "737" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "240" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "497" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "451" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "456" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "740" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "641" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "471" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "450" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "213" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "510" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "755" then Response.write "" Response.write "Reserve" else if (rsquery("cod")) = "500" then Response.write "" Response.write "Reserve" else Response.write " " end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if Response.write "" Response.write "

" Response.write "
" end function function celula_vazia() Response.write "" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "
 " Response.write "" Response.write "  " Response.write "" Response.write "

" Response.write "
" end function function fim_tabela() Response.write "
" Response.write "
" end function '''FIM FUNCÇÕES Response.Write "" %>
   Marcar somente 10 estabelecimentos

 

Como fazer isso?

<% cont_banners = 1 do while cont_banners <= baixo Response.Write "" cont_banners = cont_banners + 1 loop %>
 
" call mostrar_banners2(banners(cima + cont_banners,2), "banneranunc/hospedagem/" & banners(cima + cont_banners,3), banners(cima + cont_banners,3), banners(cima + cont_banners,4), banners(cima + cont_banners,5), "FFFFFF",1 ,"transparent") Response.Write "
 

<% Response.Flush Response.Clear() %>