Ir para conteúdo
Fórum Script Brasil

Legionáriors

Membros
  • Total de itens

    158
  • Registro em

  • Última visita

Tudo que Legionáriors postou

  1. Legionáriors

    Erro na busca

    Boa tarde pessoal, Será que alguém pode me dar uma luz sobre isso? Vou postar o código mas acontece o seguinte: Mesmo com os itens configurados para não serem mostrados ele continua mostrando mas somente quando faço a pesquisa. Tem outros modos de listar todos os itens estes funcionam perfeitamente mas na pesquisa acontece isso. Se alguém poder ajudar agradeço. <% Dim col,colu,lista,cid_id,cid_nome,nome,lista_anunciante,msgnada lista=Request.querystring("lista") cid_id=Request.querystring("cid_id") cid_nome=Request.querystring("cid_nome") nome=Request.querystring("nome") %> <div class="site-section bg-light"> <div class="container"> <div class="row justify-content-center mb-5"> <div class="col-md-7 text-center border-primary"> <h3><font color="green">Anunciantes Ativos</font></h3> </div> </div> <div class="row"> <% Select Case lista Case "cidade" set lista_anunciante = lojaDB.Execute("SELECT * FROM anunciantes WHERE cid_id="& cid_id &" AND disp='S' ORDER BY nome") msgnada = "<h5>No momento não dispomos de nenhum comércio nesta região.</h5>" Case "busca" set lista_anunciante = lojaDB.Execute("SELECT * FROM anunciantes WHERE nome LIKE '%"& nome &"%' OR descricaop LIKE '%"& nome &"%' OR descricaog LIKE '%"& nome &"%' OR imagem LIKE '%"& nome &"%' OR imagem2 LIKE '%"& nome &"%' OR imagem3 LIKE '%"& nome &"%' OR imagem4 LIKE '%"& nome &"%' OR imagem5 LIKE '%"& nome &"%' OR imagem6 LIKE '%"& nome &"%' OR imagem7 LIKE '%"& nome &"%' OR imagem8 LIKE '%"& nome &"%' OR imagem9 LIKE '%"& nome &"%' OR imagem10 LIKE '%"& nome &"%' AND disp='S' ORDER BY nome") msgnada = "<h5>Nenhum comércio localizado com esse nome.</h5>" Case Else %> <script>window.location="./index.asp"</script> <% End Select If lista_anunciante.EOF Then Response.Write "" & msgnada & "" Else %> <% col=1 if not lista_anunciante.eof then colu=2 response.write "" while not lista_anunciante.eof Dim com_cid_id,com_id,com_nome,com_descricaop,com_imagem,com_data,com_mapalink,com_whats while not lista_anunciante.EOF com_cid_id = lista_anunciante("cid_id") com_id = lista_anunciante("id") com_nome = lista_anunciante("nome") com_descricaop = lista_anunciante("descricaop") com_imagem = lista_anunciante("imagem") com_data = lista_anunciante("data") com_mapalink = lista_anunciante("mapalink") com_whats = lista_anunciante("whats") %> <div class="col-md-6 mb-4 mb-lg-4 col-lg-4"> <div class="listing-item"> <div class="listing-image"> <img src="images/<%=com_imagem%>" alt="<%=com_nome%>" class="img-fluid"> </div> <div class="listing-item-content"> <a href="<%=com_mapalink%>" class="bookmark" data-toggle="tooltip" data-placement="left" title="Localização" target="new"><span class="icon-map"></span></a> <h2><a href="http://api.whatsapp.com/send?1=pt_BR&phone=<%=com_whats%>" style="position:absolute; top:-30px;" class="bookmark" target="new"><span class="icon-whatsapp"></span></a></h2> <h2 class="mb-1"><a href="detalheanunciante.asp?com_id=<%=com_id%>&url_comp=<%=Server.UrlEncode(Request.ServerVariables("QUERY_STRING"))%>"><%=left(com_nome ,23) %>...</a></h2> <span class="address"><%=com_descricaop%></span> </div> </div> </div> <% if colu=col then response.write "<tr><td>" colu=1 else response.write "<td>" colu=colu+1 end if lista_anunciante.movenext wend wend response.write "" end if end if lista_anunciante.close set lista_anunciante=nothing %> </div> </div> </div>
  2. Legionáriors

    Mostra Imagem

    Boa noite pessoal, Vou postar o código inteiro da página quem sabe alguém me ajuda... abraço!!! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <% Dim veic_id,veic_nome,veic_tipocambio,veic_tipocombustivel,veic_placa,veic_km,veic_tipomarca,veic_tipoportas,veic_tipocabine,veic_tiposuspensao,veic_tipotracao,veic_comp_valor,veic_obs,veic_anofabricacao,veic_anomodelo,veic_cor,veic_preco,veic_img_01,veic_img_02,veic_img_03,veic_img_04,veic_img_05,veic_img_06,veic_img_07,veic_img_08,veic_img_09,veic_img_10,veic_img_11,veic_img_12,veic_img_13,veic_img_14,veic_img_15,veic_airbag,veic_airbagduplo,veic_alarme,veic_arcondicionado,veic_arquente,veic_bagageiro,veic_bancoseletricos,veic_bancosdecouro,veic_blindado,veic_cameradere,veic_cdplayer,veic_computadordebordo,veic_contagiros,veic_desembacador,veic_direcaohidraulica,veic_disqueteira,veic_faroldeneblina,veic_freiosabs,veic_freiosadisco,veic_interface,veic_kitmultimidia,veic_limpadortraseiro,veic_lonamaritima,veic_mp3player,veic_partidaeletrica,veic_pilotoautomatico,veic_protetordecacamba,veic_radio,veic_retrovisoreseletricos,veic_rodasdeligaleve,veic_sensordechuva,veic_sensordeestacionamento,veic_tetosolar,veic_travaseletricas,veic_turbo,veic_vidroseletricos,veic_vidrosverdes,veic_volanteregulaaltura,veic_deficiente,veic_interclima,veic_intercooler,veic_rodoar,veic_sofacama,veic_detalhe,url_comp veic_id = Request.querystring("veic_id") url_comp = Server.UrlEncode(Request.querystring("url_comp")) set veic_detalhe = lojaDB.Execute("SELECT * FROM veiculos WHERE id="& veic_id &" AND disp='S'") veic_nome = veic_detalhe("nome") veic_anofabricacao = veic_detalhe("anofabricacao") veic_anomodelo = veic_detalhe("anomodelo") veic_cor = veic_detalhe("cor") veic_tipocambio = veic_detalhe("tipocambio") veic_tipocombustivel = veic_detalhe("tipocombustivel") veic_placa = veic_detalhe("placa") veic_km = veic_detalhe("km") veic_tipomarca = veic_detalhe("tipomarca") veic_tipoportas = veic_detalhe("tipoportas") veic_tipocabine = veic_detalhe("tipocabine") veic_tiposuspensao = veic_detalhe("tiposuspensao") veic_tipotracao = veic_detalhe("tipotracao") veic_comp_valor = veic_detalhe("comp_valor") veic_obs = veic_detalhe("obs") veic_preco = veic_detalhe("preco") veic_img_01 = veic_detalhe("img_01") veic_img_02 = veic_detalhe("img_02") veic_img_03 = veic_detalhe("img_03") veic_img_04 = veic_detalhe("img_04") veic_img_05 = veic_detalhe("img_05") veic_img_06 = veic_detalhe("img_06") veic_img_07 = veic_detalhe("img_07") veic_img_08 = veic_detalhe("img_08") veic_img_09 = veic_detalhe("img_09") veic_img_10 = veic_detalhe("img_10") veic_img_11 = veic_detalhe("img_11") veic_img_12 = veic_detalhe("img_12") veic_img_13 = veic_detalhe("img_13") veic_img_14 = veic_detalhe("img_14") veic_img_15 = veic_detalhe("img_15") veic_airbag = veic_detalhe("airbag") veic_airbagduplo = veic_detalhe("airbagduplo") veic_alarme = veic_detalhe("alarme") veic_arcondicionado = veic_detalhe("arcondicionado") veic_arquente = veic_detalhe("arquente") veic_bagageiro = veic_detalhe("bagageiro") veic_bancoseletricos = veic_detalhe("bancoseletricos") veic_bancosdecouro = veic_detalhe("bancosdecouro") veic_blindado = veic_detalhe("blindado") veic_cameradere = veic_detalhe("cameradere") veic_cdplayer = veic_detalhe("cdplayer") veic_computadordebordo = veic_detalhe("computadordebordo") veic_contagiros = veic_detalhe("contagiros") veic_desembacador = veic_detalhe("desembacador") veic_direcaohidraulica = veic_detalhe("direcaohidraulica") veic_disqueteira = veic_detalhe("disqueteira") veic_faroldeneblina = veic_detalhe("faroldeneblina") veic_freiosabs = veic_detalhe("freiosabs") veic_freiosadisco = veic_detalhe("freiosadisco") veic_interface = veic_detalhe("interface") veic_kitmultimidia = veic_detalhe("kitmultimidia") veic_limpadortraseiro = veic_detalhe("limpadortraseiro") veic_lonamaritima = veic_detalhe("lonamaritima") veic_mp3player = veic_detalhe("mp3player") veic_partidaeletrica = veic_detalhe("partidaeletrica") veic_pilotoautomatico = veic_detalhe("pilotoautomatico") veic_protetordecacamba = veic_detalhe("protetordecacamba") veic_radio = veic_detalhe("radio") veic_retrovisoreseletricos = veic_detalhe("retrovisoreseletricos") veic_rodasdeligaleve = veic_detalhe("rodasdeligaleve") veic_sensordechuva = veic_detalhe("sensordechuva") veic_sensordeestacionamento = veic_detalhe("sensordeestacionamento") veic_tetosolar = veic_detalhe("tetosolar") veic_travaseletricas = veic_detalhe("travaseletricas") veic_turbo = veic_detalhe("turbo") veic_vidroseletricos = veic_detalhe("vidroseletricos") veic_vidrosverdes = veic_detalhe("vidrosverdes") veic_volanteregulaaltura = veic_detalhe("volanteregulaaltura") veic_deficiente = veic_detalhe("deficiente") veic_interclima = veic_detalhe("interclima") veic_intercooler = veic_detalhe("intercooler") veic_rodoar = veic_detalhe("rodoar") veic_sofacama = veic_detalhe("sofacama") veic_detalhe.Close set veic_detalhe = Nothing %> <!-- main --> <div id="main2"> <div id="intro2"> <h2><font color=red><%=veic_nome%></font> - <a href="<%=Request.ServerVariables("HTTP_REFERER")%>">Voltar</a></h2> </div> <!-- bits --> <div id="bits"> <div class="bit"> <div class="photo"> <img src="./images/<%=veic_img_01%>" width=680 title="<%=veic_nome%>" /> </div> <p><b>Opcionais e Observações:</b></p> <div class="bit last2"> <%If veic_airbag="Air Bag, " Then Response.Write "Air Bag, " End If%> <%If veic_airbagduplo="Air Bag Duplo, " Then Response.Write "Air Bag Duplo, " End If%> <%If veic_alarme="Alarme, " Then Response.Write "Alarme, " End If%> <%If veic_arcondicionado="Ar Condicionado, " Then Response.Write "Ar Condicionado, " End If%> <%If veic_arquente="Ar Quente, " Then Response.Write "Ar Quente, " End If%> <%If veic_bagageiro="Bagageiro, " Then Response.Write "Bagageiro, " End If%> <%If veic_bancoseletricos="Bancos Elétricos, " Then Response.Write "Bancos Elétricos, " End If%> <%If veic_bancosdecouro="Bancos de Couro, " Then Response.Write "Bancos de Couro, " End If%> <%If veic_blindado="Blindado, " Then Response.Write "Blindado, " End If%> <%If veic_cameradere="Camera de Ré, " Then Response.Write "Camera de Ré, " End If%> <%If veic_cdplayer="CD Player, " Then Response.Write "CD Player, " End If%> <%If veic_computadordebordo="Computador de Bordo, " Then Response.Write "Computador de Bordo, " End If%> <%If veic_contagiros="Contagiros, " Then Response.Write "Contagiros, " End If%> <%If veic_desembacador="Desembaçador, " Then Response.Write "Desembaçador, " End If%> <%If veic_direcaohidraulica="Direcão Hidráulica, " Then Response.Write "Direcão Hidráulica, " End If%> <%If veic_disqueteira="Disqueteira, " Then Response.Write "Disqueteira, " End If%> <%If veic_faroldeneblina="Farol de Neblina, " Then Response.Write "Farol de Neblina, " End If%> <%If veic_freiosabs="Freios ABS, " Then Response.Write "Freios ABS, " End If%> <%If veic_freiosadisco="Freios a Disco, " Then Response.Write "Freios a Disco, " End If%> <%If veic_interface="Interface, " Then Response.Write "Interface, " End If%> <%If veic_kitmultimidia="Kit Multimidia, " Then Response.Write "Kit Multimidia, " End If%> <%If veic_limpadortraseiro="Limpador Traseiro, " Then Response.Write "Limpador Traseiro, " End If%> <%If veic_lonamaritima="Lona Marítima, " Then Response.Write "Lona Marítima, " End If%> <%If veic_mp3player="MP3 Player, " Then Response.Write "MP3 Player, " End If%> <%If veic_partidaeletrica="Partida Elétrica, " Then Response.Write "Partida Elétrica, " End If%> <%If veic_pilotoautomatico="Piloto Automático, " Then Response.Write "Piloto Automático, " End If%> <%If veic_protetordecacamba="Protetor de Caçamba, " Then Response.Write "Protetor de Caçamba, " End If%> <%If veic_radio="Rádio, " Then Response.Write "Rádio, " End If%> <%If veic_retrovisoreseletricos="Retrovisores Elétricos, " Then Response.Write "Retrovisores Elétricos, " End If%> <%If veic_rodasdeligaleve="Rodas de Liga Leve, " Then Response.Write "Rodas de Liga Leve, " End If%> <%If veic_sensordechuva="Sensor de Chuva, " Then Response.Write "Sensor de Chuva, " End If%> <%If veic_sensordeestacionamento="Sensor de Estacionamento, " Then Response.Write "Sensor de Estacionamento, " End If%> <%If veic_tetosolar="Teto Solar, " Then Response.Write "Teto Solar, " End If%> <%If veic_travaseletricas="Travas Elétricas, " Then Response.Write "Travas Elétricas, " End If%> <%If veic_turbo="Turbo, " Then Response.Write "Turbo, " End If%> <%If veic_vidroseletricos="Vidros Elétricos, " Then Response.Write "Vidros Elétricos, " End If%> <%If veic_vidrosverdes="Vidros Verdes, " Then Response.Write "Vidros Verdes, " End If%> <%If veic_volanteregulaaltura="Volante c/ Reg. de Altura, " Then Response.Write "Volante c/ Reg. de Altura, " End If%> <%If veic_deficiente="Adapt. para Deficiente, " Then Response.Write "Adapt. para Deficiente, " End If%> <%If veic_interclima="Inter Clima, " Then Response.Write "Inter Clima, " End If%> <%If veic_intercooler="Inter Cooler, " Then Response.Write "Inter Cooler, " End If%> <%If veic_rodoar="Rodoar, " Then Response.Write "Rodoar, " End If%> <%If veic_sofacama="Sofa-cama, " Then Response.Write "Sofa-cama, " End If%> <br><br><br> Obs.: <%=veic_obs%> </div> </div> <div class="clear"></div> </div> <!-- /bits --> </div> <!-- /main --> <!-- side --> <% Dim lista_veiculos,malha1,temp1,lista_categoria,lista,cat_id,lista_fabricacoes,anofabricacao,lista_modelos,anomodelo,lista_cambios,tipocambio,lista_combustiveis,tipocombustivel,lista_marcas,tipomarca,lista_porta,tipoportas,lista_cabines,tipocabine,lista_suspensoes,tiposuspensao,lista_tracoes,tipotracao set lista_veiculos = lojaDB.Execute("SELECT * FROM veiculos WHERE id="& veic_id &" AND disp='S'") If Not (lista = "nao") Then %> <% While not lista_veiculos.EOF set lista_marcas = lojaDB.Execute("SELECT nome FROM marca WHERE id=" & lista_veiculos("tipomarca")) set lista_cabine = lojaDB.Execute("SELECT nome FROM cabine WHERE id=" & lista_veiculos("tipocabine")) set lista_fabricacoes = lojaDB.Execute("SELECT nome FROM fabricacao WHERE id=" & lista_veiculos("anofabricacao")) set lista_modelos = lojaDB.Execute("SELECT nome FROM modelo WHERE id=" & lista_veiculos("anomodelo")) set lista_cambios = lojaDB.Execute("SELECT nome FROM cambio WHERE id=" & lista_veiculos("tipocambio")) set lista_combustiveis = lojaDB.Execute("SELECT nome FROM combustivel WHERE id=" & lista_veiculos("tipocombustivel")) set lista_porta = lojaDB.Execute("SELECT nome FROM portas WHERE id=" & lista_veiculos("tipoportas")) set lista_suspensoes = lojaDB.Execute("SELECT nome FROM suspensao WHERE id=" & lista_veiculos("tiposuspensao")) set lista_tracoes = lojaDB.Execute("SELECT nome FROM tracao WHERE id=" & lista_veiculos("tipotracao")) %> <div id="side"> <h2>Mais Informações</h2> <div class="news"> <h3>Preço:</h3> <p><font size="5" color="red"><b><%If lista_veiculos("preco")>"R$ 0.00" Then Response.Write lista_veiculos("preco") End If%><%If lista_veiculos("preco")="R$ 0.00" Then Response.Write "(48)3522-1122" End If%></b></font></p> <h3><%=veic_comp_valor%></h3> </div> <div class="news"> <h3>Dados:</h3> <p>Marca: <% If lista_marcas.EOF Then %> <font color=red><font size=1><b>Sem Informação</b></font></font> <% Else Response.Write lista_marcas("nome") End If %> <br> Fabricação/Modelo: <% If lista_fabricacoes.EOF Then %> <font color=red><font size=1><b>Sem Informação</b></font></font> <% Else Response.Write lista_fabricacoes("nome") End If %> / <% If lista_modelos.EOF Then %> <font color=red><font size=1><b>Sem Informação</b></font></font> <% Else Response.Write lista_modelos("nome") End If %> <br> Câmbio: <% If lista_cambios.EOF Then %> <font color=red><font size=1><b>Sem Informação</b></font></font> <% Else Response.Write lista_cambios("nome") End If %> <br> Combustível: <% If lista_combustiveis.EOF Then %> <font color=red><font size=1><b>Sem Informação</b></font></font> <% Else Response.Write lista_combustiveis("nome") End If %> <br> Portas: <% If lista_porta.EOF Then %> <font color=red><font size=1><b>Sem Informação</b></font></font> <% Else Response.Write lista_porta("nome") End If %> <br> Suspensão: <% If lista_suspensoes.EOF Then %> <font color=red><font size=1><b>Sem Informação</b></font></font> <% Else Response.Write lista_suspensoes("nome") End If %> <br> Tração: <% If lista_tracoes.EOF Then %> <font color=red><font size=1><b>Sem Informação</b></font></font> <% Else Response.Write lista_tracoes("nome") End If %> <br> Cabine: <% If lista_cabine.EOF Then %> <font color=red><font size=1><b>Sem Informação</b></font></font> <% Else Response.Write lista_cabine("nome") End If %> <br> Cor: <%=veic_cor%> <br> Placa: <%=veic_placa%> <br> Km: <%=veic_km%> </p> </div> <div class="news"> <h3>Mais fotos:</h3> <p> <a href="./images/<%=veic_img_01%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_01%>" width=71 height=40 title="<%=veic_nome%>" /></a> <a href="./images/<%=veic_img_02%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_02%>" width=71 height=40 title="<%=veic_nome%>" /></a> <a href="./images/<%=veic_img_03%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_03%>" width=71 height=40 title="<%=veic_nome%>" /></a> <a href="./images/<%=veic_img_04%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_04%>" width=71 height=40 title="<%=veic_nome%>" /></a> <a href="./images/<%=veic_img_05%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_05%>" width=71 height=40 title="<%=veic_nome%>" /></a> <a href="./images/<%=veic_img_06%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_06%>" width=71 height=40 title="<%=veic_nome%>" /></a> <a href="./images/<%=veic_img_07%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_07%>" width=71 height=40 title="<%=veic_nome%>" /></a> <a href="./images/<%=veic_img_08%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_08%>" width=71 height=40 title="<%=veic_nome%>" /></a> <a href="./images/<%=veic_img_09%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_09%>" width=71 height=40 title="<%=veic_nome%>" /></a> <a href="./images/<%=veic_img_10%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_10%>" width=71 height=40 title="<%=veic_nome%>" /></a> <a href="./images/<%=veic_img_11%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_11%>" width=71 height=40 title="<%=veic_nome%>" /></a> <a href="./images/<%=veic_img_12%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_12%>" width=71 height=40 title="<%=veic_nome%>" /></a> <a href="./images/<%=veic_img_13%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_13%>" width=71 height=40 title="<%=veic_nome%>" /></a> <a href="./images/<%=veic_img_14%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_14%>" width=71 height=40 title="<%=veic_nome%>" /></a> <a href="./images/<%=veic_img_15%>" rel="lightbox[roadtrip]" title="<%=veic_nome%>"><img src="./images/<%=veic_img_15%>" width=71 height=40 title="<%=veic_nome%>" /></a> </p> </div> <h3>Contato ou visita clique abaixo:</h3> <p> <a href="contato.asp"><img src="./images/solicitar.png" title="Solicitar" width=100 border=0 /></a> </p> </div> <!-- /side --> <% lista_veiculos.MoveNext Wend %> <% End If %> [/code]
  3. Legionáriors

    Mostra Imagem

    Boa tarde pessoal, Tenho a seguinte linha de código: <%If veic_img_01="" Then Response.Write "" End If%><%If veic_img_01 > "" Then Response.Write "<a href=""images/<%=veic_img_01%>"" rel=""lightbox[roadtrip]"" title=""<%=veic_nome%>""><img src=""./images/<%=veic_img_01%>"" width=""71"" height=""40"" title=""<%=veic_nome%>"" /></a>" End If%> Se funcionasse corretamente ela iria mostrar a imagem se houvesse algo registrado no banco se não, não mostraria nada. Ela até faz isso mas não mostra a imagem quando ela está cadastrada fica como se não houvesse imagem mesmo tendo ele dá erro nos itens a seguir: <%=veic_img_01%> - Aparece duas vezes pois uma é a miniatura da imagem e a outra é o lightbox <%=veic_nome%> - Nome da imagem. Se puderem me ajudar ou tiverem alguma solução diferente pra fazer isso agradeço.
  4. Podem fechar o tópico, está resolvido. muito obrigado!
  5. Cara valeu!!! Valeu muito, consegui resolver um problema de 1 mês de incomodação!!! A principio está funcionando como preciso caso de algum problema eu volto a postar!!! Muito obrigado mesmo!!!
  6. Bom dia Rafael, Muito obrigado por responder já havia perdido as esperanças... Eu estou recuperando os dados desta forma: <script> window.onload = function(){ document.getElementById('img_01').value = document.getElementById('upimg_01').value; document.getElementById('img_02').value = document.getElementById('upimg_02').value; document.getElementById('img_03').value = document.getElementById('upimg_03').value; document.getElementById('img_04').value = document.getElementById('upimg_04').value; document.getElementById('img_05').value = document.getElementById('upimg_05').value; document.getElementById('img_06').value = document.getElementById('upimg_06').value; document.getElementById('img_07').value = document.getElementById('upimg_07').value; document.getElementById('img_08').value = document.getElementById('upimg_08').value; document.getElementById('img_09').value = document.getElementById('upimg_09').value; document.getElementById('img_10').value = document.getElementById('upimg_10').value; document.getElementById('img_11').value = document.getElementById('upimg_11').value; document.getElementById('img_12').value = document.getElementById('upimg_12').value; document.getElementById('img_13').value = document.getElementById('upimg_13').value; document.getElementById('img_14').value = document.getElementById('upimg_14').value; document.getElementById('img_15').value = document.getElementById('upimg_15').value; } </script> Como colocar os valores desta forma? Tem como?
  7. Boa tarde pessoal, Tenho o seguinte trecho do cód. <%response.buffer=true Server.ScriptTimeout = 99999999%> <% Set Upload = Server.CreateObject("Persits.Upload.1") Upload.IgnoreNoPost = True Upload.Save "xxx" For Each File in Upload.Files Response.Write "<input type=text size=10 id=upimg_01 value="&File.Filename&">" Next %> Nele eu consigo visualizar nome por nome dos arquivos enviados mas dispostos da seguinte forma: "imagem1.jpg, imagem2.jpg... assim por diante até a imagem 15 pois o upload feito tem 15 imagens no total. Eu preciso que sejam mostrados os nomes das imagens separados pois preciso atribuir uma "id" para cada nome de imagem que será repassado para um novo formulário que ai realiza o cadastro. Só preciso separar o nome de cada imagem em uma input diferente mas não consigo. Se alguém puder ajudar agradeço.
  8. Boa noite pessoal, Ninguém??? Abraço!
  9. Podem fechar o tópico, já resolvi o problema... Obrigado!!!
  10. Boa tarde pessoal, Alguém saberia me dizer porque o script abaixo não mostra o que está no "response.write"? Ele envia os arquivos pra pasta destino mas não mostra o nome do arquivo. Pode ser um erro bobo mas estou tanto tempo emcima disso e de outros scripts que não to vendo o erro... se alguém poder ajudar agradeço muito... Em tempo: o form é tipo multiple... <!--#include file="conexao2.inc"--> <!--#include file="estilo.inc"--> <h3>Arquivos enviados</h3><br> <table width=960> <tr><td> <fieldset><legend>Info</legend>Seus arquivos foram enviados. Verifique se foram estas as fotos enviadas, se estiver tudo correto clique em "Enviar para cadastro" e finalize o cadastramento do veículo.</fieldset></td> </td></tr> </table> <br><br> <form method="post" name="upload" action="cad_veiculos.asp"> <%response.buffer=true Server.ScriptTimeout = 99999999%> <% 'AspUpload Set Upload = Server.CreateObject("Persits.Upload") Upload.ProgressID = Request.QueryString("PID") 'faz parte do carregando Upload.OverwriteFiles = False pasta = Server.MapPath("../images/") Upload.Save pasta Set Fotos = Upload.Files("img_01,img_02,img_03,img_04,img_05,img_06,img_07,img_08,img_09,img_10,img_11,img_12,img_13,img_14,img_15") nome_arquivo1 = Fotos.Filename("img_01") nome_arquivo2 = Fotos.Filename("img_02") nome_arquivo3 = Fotos.Filename("img_03") nome_arquivo4 = Fotos.Filename("img_04") nome_arquivo5 = Fotos.Filename("img_05") nome_arquivo6 = Fotos.Filename("img_06") nome_arquivo7 = Fotos.Filename("img_07") nome_arquivo8 = Fotos.Filename("img_08") nome_arquivo9 = Fotos.Filename("img_09") nome_arquivo10 = Fotos.Filename("img_10") nome_arquivo11 = Fotos.Filename("img_11") nome_arquivo12 = Fotos.Filename("img_12") nome_arquivo13 = Fotos.Filename("img_13") nome_arquivo14 = Fotos.Filename("img_14") nome_arquivo15 = Fotos.Filename("img_15") response.Write"<table border=0>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo2 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo2 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo3 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo4 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo5 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo6 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo7 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo8 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo9 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo10 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo11 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo12 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo13 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo14 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Foto da Capa" response.Write"</legend>" response.Write"<input type=text size=26 name=img_01 value=" response.write nome_arquivo15 response.Write"></fieldset></td>" response.Write"<td><fieldset><legend>Enviar Fotos" response.Write"</legend>" response.Write"<input class=submit-button type=submit value=""&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enviar para cadastro&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"">" response.Write"</form>" response.Write"</fieldset></td></td></tr>" response.Write"</table>" %> <br><br> <br><br> <br>
  11. Boa tarde pessoal, Estou a dias quebrando a cabeça pra descobrir porque o script que vou postar grava no banco mas não retorna os valores atualizados na tela. Se puderem me ajudar agradeço. Segue o código. <h3>Consulta,alteração e exclusão de Veículos</h3><%Dim lista_veiculos,lista_categoria,veic_id,lista_veic,tempcat,acao,lista,lista_marcas,lista_fabricacoes,lista_modelos,lista_cambios,lista_combustiveis,lista_porta,lista_cabines,lista_suspensoes,lista_tracoesacao = Request.QueryString("acao")veic_id = Request.QueryString("veic_id")If IsEmpty(Request.QueryString("veic_id")) Then %><script>window.location='./con_veiculos.asp'</script><%End IfIf Request.Form("cat_id") = "nulo" Then%><h3><font color=red>Selecione a Categoria</font></h3><%acao = "X"End IfIf Request.Form("tipomarca") = "nulo" Then%><h3><font color=red>Selecione a Marca</font></h3><%acao = "X"End IfIf Request.Form("anofabricacao") = "nulo" Then%><h3><font color=red>Selecione o Ano de Fabricação</font></h3><%acao = "X"End IfIf Request.Form("anomodelo") = "nulo" Then%><h3><font color=red>Selecione o ano do Modelo</font></h3><%acao = "X"End IfIf Request.Form("tipocambio") = "nulo" Then%><h3><font color=red>Selecione o Câmbio</font></h3><%acao = "X"End IfIf Request.Form("tipocombustivel") = "nulo" Then%><h3><font color=red>Selecione o Combustível</font></h3><%acao = "X"End IfIf Request.Form("tipoportas") = "nulo" Then%><h3><font color=red>Selecione as Portas</font></h3><%acao = "X"End IfIf Request.Form("tipocabine") = "nulo" Then%><h3><font color=red>Selecione o tipo de Cabine</font></h3><%acao = "X"End IfIf Request.Form("tiposuspensao") = "nulo" Then%><h3><font color=red>Selecione o tipo de Suspensão</font></h3><%acao = "X"End IfIf Request.Form("tipotracao") = "nulo" Then%><h3><font color=red>Selecione o tipo de Tração</font></h3><%acao = "X"End IfSelect Case acaoCase "apagar"lojaDB.Execute("DELETE FROM veiculos WHERE id=" & veic_id)%><h3>Veículo Removido</h3><%lista = "não"Case "atualizar"lojaDB.Execute("UPDATE veiculos set cat_id='" & Request.Form("cat_id") & "',tipomarca='" & Request.Form("tipomarca") & "',anofabricacao='" & Request.Form("anofabricacao") & "',anomodelo='" & Request.Form("anomodelo") & "',tipocambio='" & Request.Form("tipocambio") & "',tipocombustivel='" & Request.Form("tipocombustivel") & "',tipoportas='" & Request.Form("tipoportas") & "',tipocabine='" & Request.Form("tipocabine") & "',tiposuspensao='" & Request.Form("tiposuspensao") & "',tipotracao='" & Request.Form("tipotracao") & "',nome='" & Request.Form("nome") & "',placa='" & Request.Form("placa") & "',km='" & Request.Form("km") & "',cor='" & Request.Form("cor") & "',comp_valor='" & Request.Form("comp_valor") & "',obs='" & Request.Form("obs") & "',preço='" & FormatNumber(Request.Form("preço"),2,-1,0,-1) & "',img_01='" & Request.Form("img_01") & "',img_02='" & Request.Form("img_02") & "',img_03='" & Request.Form("img_03") & "',img_04='" & Request.Form("img_04") & "',img_05='" & Request.Form("img_05") & "',img_06='" & Request.Form("img_06") & "',img_07='" & Request.Form("img_07") & "',img_08='" & Request.Form("img_08") & "',img_09='" & Request.Form("img_09") & "',img_10='" & Request.Form("img_10") & "',img_11='" & Request.Form("img_11") & "',img_12='" & Request.Form("img_12") & "',img_13='" & Request.Form("img_13") & "',img_14='" & Request.Form("img_14") & "',img_15='" & Request.Form("img_15") & "',airbag='" & Request.Form("airbag") & "',airbagduplo='" & Request.Form("airbagduplo") & "',alarme='" & Request.Form("alarme") & "',arcondicionado='" & Request.Form("arcondicionado") & "',arquente='" & Request.Form("arquente") & "',bagageiro='" & Request.Form("bagageiro") & "',bancoseletricos='" & Request.Form("bancoseletricos") & "',bancosdecouro='" & Request.Form("bancosdecouro") & "',blindado='" & Request.Form("blindado") & "',cameradere='" & Request.Form("cameradere") & "',cdplayer='" & Request.Form("cdplayer") & "',computadordebordo='" & Request.Form("computadordebordo") & "',contagiros='" & Request.Form("contagiros") & "',desembacador='" & Request.Form("desembacador") & "',direcaohidraulica='" & Request.Form("direcaohidraulica") & "',disqueteira='" & Request.Form("disqueteira") & "',faroldeneblina='" & Request.Form("faroldeneblina") & "',freiosabs='" & Request.Form("freiosabs") & "',freiosadisco='" & Request.Form("freiosadisco") & "',interface='" & Request.Form("interface") & "',kitmultimidia='" & Request.Form("kitmultimidia") & "',limpadortraseiro='" & Request.Form("limpadortraseiro") & "',lonamaritima='" & Request.Form("lonamaritima") & "',mp3player='" & Request.Form("mp3player") & "',partidaeletrica='" & Request.Form("partidaeletrica") & "',pilotoautomatico='" & Request.Form("pilotoautomatico") & "',protetordecacamba='" & Request.Form("protetordecacamba") & "',radio='" & Request.Form("radio") & "',retrovisoreseletricos='" & Request.Form("retrovisoreseletricos") & "',rodasdeligaleve='" & Request.Form("rodasdeligaleve") & "',sensordechuva='" & Request.Form("sensordechuva") & "',sensordeestacionamento='" & Request.Form("sensordeestacionamento") & "',tetosolar='" & Request.Form("tetosolar") & "',travaseletricas='" & Request.Form("travaseletricas") & "',turbo='" & Request.Form("turbo") & "',vidroseletricos='" & Request.Form("vidroseletricos") & "',vidrosverdes='" & Request.Form("vidrosverdes") & "',volanteregulaaltura='" & Request.Form("volanteregulaaltura") & "',deficiente='" & Request.Form("deficiente") & "',interclima='" & Request.Form("interclima") & "',intercooler='" & Request.Form("intercooler") & "',rodoar='" & Request.Form("rodoar") & "',sofacama='" & Request.Form("sofacama") & "',chcdestaque='" & Request.Form("chcdestaque") & "',disp='" & Request.Form("disp") & "' WHERE id=" & veic_id)%><h3>Veículo Atualizado</h3><%End SelectIf Not (lista = "não") Then'Exibe veiculosset lista_veiculos = lojaDB.Execute("SELECT * FROM veiculos WHERE id=" & veic_id) set lista_categoria = lojaDB.Execute("SELECT * FROM categorias WHERE id=" & lista_veiculos("cat_id"))If Not (lista_categoria.EOF) Then tempcat = lista_categoria("id") End If set lista_marcas = lojaDB.Execute("SELECT * FROM marca WHERE id=" & lista_veiculos("tipomarca"))If Not (lista_marcas.EOF) Then tempcat = lista_marcas("id") End If set lista_fabricacoes = lojaDB.Execute("SELECT * FROM fabricacao WHERE id=" & lista_veiculos("anofabricacao"))If Not (lista_fabricacoes.EOF) Then tempcat = lista_fabricacoes("id") End If set lista_modelos = lojaDB.Execute("SELECT * FROM modelo WHERE id=" & lista_veiculos("anomodelo"))If Not (lista_modelos.EOF) Then tempcat = lista_modelos("id") End If set lista_cambios = lojaDB.Execute("SELECT * FROM cambio WHERE id=" & lista_veiculos("tipocambio"))If Not (lista_cambios.EOF) Then tempcat = lista_cambios("id") End If set lista_combustiveis = lojaDB.Execute("SELECT * FROM combustivel WHERE id=" & lista_veiculos("tipocombustivel"))If Not (lista_combustiveis.EOF) Then tempcat = lista_combustiveis("id") End If set lista_porta = lojaDB.Execute("SELECT * FROM portas WHERE id=" & lista_veiculos("tipoportas"))If Not (lista_porta.EOF) Then tempcat = lista_porta("id") End If set lista_cabines = lojaDB.Execute("SELECT * FROM cabine WHERE id=" & lista_veiculos("tipocabine"))If Not (lista_cabines.EOF) Then tempcat = lista_cabines("id") End If set lista_suspensoes = lojaDB.Execute("SELECT * FROM suspensao WHERE id=" & lista_veiculos("tiposuspensao"))If Not (lista_suspensoes.EOF) Then tempcat = lista_suspensoes("id") End If set lista_tracoes = lojaDB.Execute("SELECT * FROM tracao WHERE id=" & lista_veiculos("tipotracao"))If Not (lista_tracoes.EOF) Then tempcat = lista_tracoes("id") End If If Not (lista_veiculos.EOF) Then %> <!--#include file="estilo.inc"--> <form method=post action="./con_veiculos_detalhes.asp?veic_id=<%=veic_id%>&acao=atualizar"> <table border="0"><td><table><tr><td><fieldset><legend>Veículo Id</legend><center><font size=3><b><%=lista_veiculos("id")%></b></font></center></fieldset></td><td><fieldset><legend>Modelo</legend><input type=text size=39 name=nome value="<%=lista_veiculos("nome")%>"></fieldset></td></td></tr></table><table> <tr><td><fieldset><legend>Categoria</legend><select name=cat_id><option value=nulo>Selecione</option><%set lista_categoria = lojaDB.Execute("SELECT * FROM categorias")While not lista_categoria.EOF%><option value="<%=lista_categoria("id")%>" <%If (lista_categoria("id") = tempcat) Then Response.Write "selected" End If%>><%=lista_categoria("nome")%></option><%lista_categoria.MoveNextWend%></select></fieldset></td> <td><fieldset><legend>Marca</legend><select name=tipomarca><option value=nulo>Selecione</option><%set lista_marcas = lojaDB.Execute("SELECT * FROM marca")While not lista_marcas.EOF%><option value="<%=lista_marcas("id")%>" <%If (lista_marcas("id") = tempcat) Then Response.Write "selected" End If%>><%=lista_marcas("nome")%></option><%lista_marcas.MoveNextWend%></select></fieldset></td></tr> <td><fieldset><legend>Ano Fabricação</legend><select name=anofabricacao><option value=nulo>Selecione</option><%set lista_fabricacoes = lojaDB.Execute("SELECT * FROM fabricacao")While not lista_fabricacoes.EOF%><option value="<%=lista_fabricacoes("id")%>" <%If (lista_fabricacoes("id") = tempcat) Then Response.Write "selected" End If%>><%=lista_fabricacoes("nome")%></option><%lista_fabricacoes.MoveNextWend%></select></fieldset></td> <td><fieldset><legend>Ano Modelo</legend><select name=anomodelo><option value=nulo>Selecione</option><%set lista_modelos = lojaDB.Execute("SELECT * FROM modelo")While not lista_modelos.EOF%><option value="<%=lista_modelos("id")%>" <%If (lista_modelos("id") = tempcat) Then Response.Write "selected" End If%>><%=lista_modelos("nome")%></option><%lista_modelos.MoveNextWend%></select></fieldset></td></tr> <td><fieldset><legend>Câmbio</legend><select name=tipocambio><option value=nulo>Selecione</option><%set lista_cambios = lojaDB.Execute("SELECT * FROM cambio")While not lista_cambios.EOF%><option value="<%=lista_cambios("id")%>" <%If (lista_cambios("id") = tempcat) Then Response.Write "selected" End If%>><%=lista_cambios("nome")%></option><%lista_cambios.MoveNextWend%></select></fieldset></td> <td><fieldset><legend>Combustível</legend><select name=tipocombustivel><option value=nulo>Selecione</option><%set lista_combustiveis = lojaDB.Execute("SELECT * FROM combustivel")While not lista_combustiveis.EOF%><option value="<%=lista_combustiveis("id")%>" <%If (lista_combustiveis("id") = tempcat) Then Response.Write "selected" End If%>><%=lista_combustiveis("nome")%></option><%lista_combustiveis.MoveNextWend%></select></fieldset></td></tr> <td><fieldset><legend>Portas</legend><select name=tipoportas><option value=nulo>Selecione</option><%set lista_porta = lojaDB.Execute("SELECT * FROM portas")While not lista_porta.EOF%><option value="<%=lista_porta("id")%>" <%If (lista_porta("id") = tempcat) Then Response.Write "selected" End If%>><%=lista_porta("nome")%></option><%lista_porta.MoveNextWend%></select></fieldset></td> <td><fieldset><legend>Cabine</legend><select name=tipocabine><option value=nulo>Selecione</option><%set lista_cabines = lojaDB.Execute("SELECT * FROM cabine")While not lista_cabines.EOF%><option value="<%=lista_cabines("id")%>" <%If (lista_cabines("id") = tempcat) Then Response.Write "selected" End If%>><%=lista_cabines("nome")%></option><%lista_cabines.MoveNextWend%></select></fieldset></td></tr> <td><fieldset><legend>Suspensão</legend><select name=tiposuspensao><option value=nulo>Selecione</option><%set lista_suspensoes = lojaDB.Execute("SELECT * FROM suspensao")While not lista_suspensoes.EOF%><option value="<%=lista_suspensoes("id")%>" <%If (lista_suspensoes("id") = tempcat) Then Response.Write "selected" End If%>><%=lista_suspensoes("nome")%></option><%lista_suspensoes.MoveNextWend%></select></fieldset></td> <td><fieldset><legend>Tração</legend><select name=tipotracao><option value=nulo>Selecione</option><%set lista_tracoes = lojaDB.Execute("SELECT * FROM tracao")While not lista_tracoes.EOF%><option value="<%=lista_tracoes("id")%>" <%If (lista_tracoes("id") = tempcat) Then Response.Write "selected" End If%>><%=lista_tracoes("nome")%></option><%lista_tracoes.MoveNextWend%></select></fieldset></td></tr> <td><fieldset><legend>Placa</legend><input type=text size=22 name=placa value="<%=lista_veiculos("placa")%>"></fieldset></td><td><fieldset><legend>Km</legend><input type=text size=22 name=km value="<%=lista_veiculos("km")%>"></fieldset></td></td></tr> <td><fieldset><legend>Cor</legend><input type=text size=22 name=cor value="<%=lista_veiculos("cor")%>"></fieldset></td><td><fieldset><legend>Valor R$</legend><input type=text size=22 name=preço value="<%=FormatNumber(lista_veiculos("preço"),2,-1,0,-1)%>"></fieldset></td></td></tr></table> <table border="0"><tr><td><fieldset><legend>Definições de pagamento</legend><input type=text size=53 name=comp_valor value="<%=lista_veiculos("comp_valor")%>"></fieldset></td></td></tr></table> <table border="0"><tr><td><fieldset><legend>Observações</legend><textarea cols="30" rows="5" name=obs value="obs"><%=lista_veiculos("obs")%></textarea></fieldset></td></td></tr></table> <table border="0"> <td><fieldset><legend>Alterar foto de capa</legend><input type=text size=22 name=img_01 value="<%=lista_veiculos("img_01")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_01")%>" width=186></center></fieldset></td><td><fieldset><legend>Alterar foto 02</legend><input type=text size=23 name=img_02 value="<%=lista_veiculos("img_02")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_02")%>" width=186></center></fieldset></td></td></tr> <td><fieldset><legend>Alterar foto 03</legend><input type=text size=22 name=img_03 value="<%=lista_veiculos("img_03")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_03")%>" width=186></center></fieldset></td><td><fieldset><legend>Alterar foto 04</legend><input type=text size=23 name=img_04 value="<%=lista_veiculos("img_04")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_04")%>" width=186></center></fieldset></td></td></tr> <td><fieldset><legend>Alterar foto 05</legend><input type=text size=22 name=img_05 value="<%=lista_veiculos("img_05")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_05")%>" width=186></center></fieldset></td><td><fieldset><legend>Alterar foto 06</legend><input type=text size=23 name=img_06 value="<%=lista_veiculos("img_06")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_06")%>" width=186></center></fieldset></td></td></tr> <td><fieldset><legend>Alterar foto 07</legend><input type=text size=22 name=img_07 value="<%=lista_veiculos("img_07")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_07")%>" width=186></center></fieldset></td><td><fieldset><legend>Alterar foto 08</legend><input type=text size=23 name=img_08 value="<%=lista_veiculos("img_08")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_08")%>" width=186></center></fieldset></td></td></tr> <td><fieldset><legend>Alterar foto 09</legend><input type=text size=22 name=img_09 value="<%=lista_veiculos("img_09")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_09")%>" width=186></center></fieldset></td><td><fieldset><legend>Alterar foto 10</legend><input type=text size=23 name=img_10 value="<%=lista_veiculos("img_10")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_10")%>" width=186></center></fieldset></td></td></tr> <td><fieldset><legend>Alterar foto 11</legend><input type=text size=22 name=img_11 value="<%=lista_veiculos("img_11")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_11")%>" width=186></center></fieldset></td><td><fieldset><legend>Alterar foto 12</legend><input type=text size=23 name=img_12 value="<%=lista_veiculos("img_12")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_12")%>" width=186></center></fieldset></td></td></tr> <td><fieldset><legend>Alterar foto 13</legend><input type=text size=22 name=img_13 value="<%=lista_veiculos("img_13")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_13")%>" width=186></center></fieldset></td><td><fieldset><legend>Alterar foto 14</legend><input type=text size=23 name=img_14 value="<%=lista_veiculos("img_14")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_14")%>" width=186></center></fieldset></td></td></tr> <td><fieldset><legend>Alterar foto 15</legend><input type=text size=22 name=img_15 value="<%=lista_veiculos("img_15")%>"><br><br><center><img src="../images/<%=lista_veiculos("img_15")%>" width=186></center></fieldset></td></td> <td><fieldset><legend>Mostra no site</legend><select name=disp><option value="S" <%If lista_veiculos("disp")="S" Then Response.Write "selected" End If%>>Sim</option><option value="N" <%If lista_veiculos("disp")="N" Then Response.Write "selected" End If%>>Não</option></select></fieldset></td></tr> </table> </td><td valign=top> <table width="200"><tr><td><fieldset><legend>Opcionais</legend><input name="airbag" type="checkbox" id="airbag" value="ON">&nbsp;Air bag<br><input name="airbagduplo" type="checkbox" id="airbagduplo" value="ON">&nbsp;Air bag duplo<br><input name="alarme" type="checkbox" id="alarme" value="ON">&nbsp;Alarme<br><input name="arcondicionado" type="checkbox" id="arcondicionado" value="ON">&nbsp;Ar condicionado<br><input name="arquente" type="checkbox" id="arquente" value="ON">&nbsp;Ar quente<br><input name="bagageiro" type="checkbox" id="bagageiro" value="ON">&nbsp;Bagageiro<br><input name="bancoseletricos" type="checkbox" id="bancoseletricos" value="ON">&nbsp;Bancos Elétricos<br><input name="bancosdecouro" type="checkbox" id="bancosdecouro" value="ON">&nbsp;Bancos de Couro<br><input name="blindado" type="checkbox" id="blindado" value="ON">&nbsp;Blindado<br><input name="cameradere" type="checkbox" id="cameradere" value="ON">&nbsp;Camera de Ré<br><input name="cdplayer" type="checkbox" id="cdplayer" value="ON">&nbsp;CD Player<br><input name="computadordebordo" type="checkbox" id="computadordebordo" value="ON">&nbsp;Computador de Bordo<br><input name="contagiros" type="checkbox" id="contagiros" value="ON">&nbsp;Contagiros<br><input name="desembacador" type="checkbox" id="desembacador" value="ON">&nbsp;Desembacador<br><input name="direcaohidraulica" type="checkbox" id="direcaohidraulica" value="ON">&nbsp;Direcão Hidráulica<br><input name="disqueteira" type="checkbox" id="disqueteira" value="ON">&nbsp;Disqueteira<br><input name="faroldeneblina" type="checkbox" id="faroldeneblina" value="ON">&nbsp;Farol de Neblina<br><input name="freiosabs" type="checkbox" id="freiosabs" value="ON">&nbsp;Freios ABS<br><input name="freiosadisco" type="checkbox" id="freiosadisco" value="ON">&nbsp;Freios a Disco<br><input name="interface" type="checkbox" id="interface" value="ON">&nbsp;Interface<br><input name="kitmultimidia" type="checkbox" id="kitmultimidia" value="ON">&nbsp;Kit Multimidia<br><input name="limpadortraseiro" type="checkbox" id="limpadortraseiro" value="ON">&nbsp;Limpador Traseiro<br><input name="lonamaritima" type="checkbox" id="lonamaritima" value="ON">&nbsp;Lona Marítima<br><input name="mp3player" type="checkbox" id="mp3player" value="ON">&nbsp;MP3 Player<br><input name="partidaeletrica" type="checkbox" id="partidaeletrica" value="ON">&nbsp;Partida Elétrica<br><input name="pilotoautomatico" type="checkbox" id="pilotoautomatico" value="ON">&nbsp;Piloto Automático<br><input name="protetordecacamba" type="checkbox" id="protetordecacamba" value="ON">&nbsp;Protetor de Caçamba<br><input name="radio" type="checkbox" id="radio" value="ON">&nbsp;Rádio<br><input name="retrovisoreseletricos" type="checkbox" id="retrovisoreseletricos" value="ON">&nbsp;Retrovisores Elétricos<br><input name="rodasdeligaleve" type="checkbox" id="rodasdeligaleve" value="ON">&nbsp;Rodas de Liga Leve<br><input name="sensordechuva" type="checkbox" id="sensordechuva" value="ON">&nbsp;Sensor de Chuva<br><input name="sensordeestacionamento" type="checkbox" id="sensordeestacionamento" value="ON">&nbsp;Sensor de Estacionam.<br><input name="tetosolar" type="checkbox" id="tetosolar" value="ON">&nbsp;Teto Solar<br><input name="travaseletricas" type="checkbox" id="travaseletricas" value="ON">&nbsp;Travas Elétricas<br><input name="turbo" type="checkbox" id="turbo" value="ON">&nbsp;Turbo<br><input name="vidroseletricos" type="checkbox" id="vidroseletricos" value="ON">&nbsp;Vidros Elétricos<br><input name="vidrosverdes" type="checkbox" id="vidrosverdes" value="ON">&nbsp;Vidros Verdes<br><input name="volanteregulaaltura" type="checkbox" id="volanteregulaaltura" value="ON">&nbsp;Volante c/ Reg. de Altura<br><input name="deficiente" type="checkbox" id="deficiente" value="ON">&nbsp;Adapt. para Deficiente<br><input name="interclima" type="checkbox" id="interclima" value="ON">&nbsp;Inter Clima<br><input name="intercooler" type="checkbox" id="intercooler" value="ON">&nbsp;Inter Cooler<br><input name="rodoar" type="checkbox" id="rodoar" value="ON">&nbsp;Rodoar<br><input name="sofacama" type="checkbox" id="sofacama" value="ON">&nbsp;Sofa-cama<br></td></tr></table></table><table border="1"><tr><td><fieldset><legend>Incluir destaque</legend><input type="checkbox" name="chcdestaque" value="ON">Marque para incluir em destaque.</fieldset></td><td><fieldset><legend>Retirar destaque</legend><input type="checkbox" name="chcdestaque" value="OFF">Marque para excluir se não é mais destaque.</fieldset></td></tr><td><fieldset><legend>Status Destaque ON/OFF</legend><%=lista_veiculos ("chcdestaque")%></fieldset></td></td></tr> <td><fieldset><legend>Atualizar</legend><input type=submit value="Atualizar" name=acao onClick="this.value='Aguarde!'"></form></td> <td><fieldset><legend>Deletar</legend><form method=post action="./con_veiculos_detalhes.asp?veic_id=<%=veic_id%>&acao=apagar"><input type=submit value="Apagar" onClick="this.value='Aguarde!'"></form></td></tr> <td><fieldset><legend>Informação</legend>Ao apagar o veículo todos os dados serão perdidos permanentemente. Antes de remover um veículo recomendamos que você anote os dados e tenha certeza do que vai fazer.</td></tr> </table><%End IfEnd If%></table>
  12. Legionáriors

    Formulário

    Boa tarde, Obrigado pela ajuda bareta, gostaria de saber se existe algum script asp pronto para colocar troca de linguagem no site... Att, Legionário
  13. Legionáriors

    Formulário

    Bom dia pessoal, Gostaria de saber se alguém tem um exemplo de um formulário que é tipo um contrato que ao preencher e enviar ele grava no banco e mostra o que foi preenchido em uma outra página para impressão. Obrigado a todos os amigos do fórum Legionário
  14. Boa noite Bareta, Problema resolvido você sem duvidas é fera cara, valeu mesmo pela ajuda me salvou a vida. Só mais uma ajudinha se não for muito abuso. Agor aquando eu faço o cadastro por exemplo 01/05/2010 quando clico em cadastrar a data vem invertida desta forma 05/01/2010 sabe me dizer o que pode ser agora? Valeu irmão!!!
  15. Boa tarde, Erro!!! Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'day(data_nasc) = 4/'. /aniversarios_capa.asp, line 67
  16. Boa tarde, No script abaixo mesmo que tenha um registro no banco para aquela data ele imprime na tela que não há aniversariantes naquele determinado dia. O script não dá erro simplesmente não mostra o que eu preciso que mostre... PRECISO DE AJUDA!!!! <script language="JavaScript"> function abrir(URL) { var width = 400; var height = 300; var left = 99; var top = 99; window.open(URL,'janela', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=yes, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no'); } </script> <% Session.LCID = 1046 'Tratando mês e dia da semana Function ExibeData(data) dia = day(data) Select Case dia Case 1 : dia = "1" Case 2 : dia = "2" Case 3 : dia = "3" Case 4 : dia = "4" Case 5 : dia = "5" Case 6 : dia = "6" Case 7 : dia = "7" Case 8 : dia = "8" Case 9 : dia = "9" Case 10 : dia = "10" Case 11 : dia = "11" Case 12 : dia = "12" Case 13 : dia = "13" Case 14 : dia = "14" Case 15 : dia = "15" Case 16 : dia = "16" Case 17 : dia = "17" Case 18 : dia = "18" Case 19 : dia = "19" Case 20 : dia = "20" Case 21 : dia = "21" Case 22 : dia = "22" Case 23 : dia = "23" Case 24 : dia = "24" Case 25 : dia = "25" Case 26 : dia = "26" Case 27 : dia = "27" Case 28 : dia = "28" Case 29 : dia = "29" Case 30 : dia = "30" Case 31 : dia = "31" End Select ExibeData = dia End Function data_hoje = date() ' Aqui pega a data do dia atual = 07/05/06 dia = right((left((data_hoje),5)),2) ' Aqui pega os valores do mes = 05 'Pegando valores do seu banco e fazendo a consulta. strCon = "DBQ=banco.mdb;Driver={Microsoft Access Driver (*.mdb)};" Set objRS = Server.CreateObject("ADODB.Recordset") objRS.CursorLocation = 3 objRS.CursorType = 0 objRS.LockType = 1 'Consulta no banco de dados strSQL = "Select * from aniversarios WHERE right((left((data_nasc),5)),2) = '" & dia & "' order by ID DESC" objRS.Open strSQL, strCon %> <font face="Comic Sans MS" color="red"><b>Aniversariantes do dia <%Response.Write(ExibeData(now()))%> </b></font><br> <% If not objRS.EOF then objRS.MoveFirst While Not objRS.EOF %> <tr> <% ' tratando valores para exibição das datas %> <td> <font face="Comic Sans MS" color=black><b><a style="text-decoration:none" href="java script:abrir('aniver.asp?id=<%=objRS("id")%>');" title="Ver Mensagem da Escola"><%=Left(objRS("nome"),27)%> - <%=Replace(Left(objRS("data_nasc"),4),"/", ".")%></a><br> </b></font></td> </tr> <% objRS.MoveNext Wend Else %> <font face="Comic Sans MS" color="red">No dia <b><%Response.Write(ExibeData(now()))%></b> não há aniversariantes!</font><br> <% End If %> </table> <%objRS.close%>
  17. Boa tarde! Problema resolvido, podem fechar o tópico. Obrigado.
  18. Bom dia pessoal!!! Ninguém se habilita, to precisando deste script funcionando... Agradeço a quem poder ajudar...
  19. Bom dia pessoal, Tenho o seguinte script que quando atinge o número máximo de ´fotos a serem exibidas ele dá a mensagem "No Records Found" dizendo que não há mais imagens ele lista a quantidade de páginas exemplo 1 2 3 >> Next mas quando mudo para a página 2 ele dá a dita mensagem e não mostra nada, será que alguém pode olhar e me ajudar para resolver isso??? Obrigado a quem poder ajudar. <!--VB ADO Constants file. Needed for the ad... constants we use--> <!-- #include file="Admin/adovbs.inc" --> <% ' BEGIN USER CONSTANTS Dim CONN_STRING Dim CONN_USER Dim CONN_PASS CONN_STRING = "DBQ=" & Server.MapPath("database.mdb") & ";" CONN_STRING = CONN_STRING & "Driver={Microsoft Access Driver (*.mdb)};" ' This DB is unsecured, o/w you'd need to specify something here CONN_USER = "" CONN_PASS = "" ' BEGIN RUNTIME CODE ' Declare our vars Dim iPageSize 'How big our pages are Dim iPageCount 'The number of pages we get back Dim iPageCurrent 'The page we want to show Dim strOrderBy 'A fake parameter used to illustrate passing them Dim rstSimple 'SQL command to execute Dim objPagingConn 'The ADODB connection object Dim objPagingRS 'The ADODB recordset object Dim iRecordsShown 'Loop controller for displaying just iPageSize records Dim I 'Standard looping var ' Get parameters iPageSize = 10 ' You could easily allow users to change this ' Retrieve page to show or default to 1 If Request.QueryString("page") = "" Then iPageCurrent = 1 Else iPageCurrent = CInt(Request.QueryString("page")) End If ' This is where you read in parameters you'll need for your query. ' Read in order or default to id If Request.QueryString("order") = "" Then strOrderBy = "id" Else strOrderBy = Request.QueryString("order") End If strSQL = "SELECT * FROM cats WHERE cat = '" & Request.QueryString("cat") & "' ORDER BY ID;" ' Now we finally get to the DB work... ' Create and open our connection Set objPagingConn = Server.CreateObject("ADODB.Connection") objPagingConn.Open CONN_STRING, CONN_USER, CONN_PASS ' Create recordset and set the page size Set objPagingRS = Server.CreateObject("ADODB.Recordset") objPagingRS.PageSize = iPageSize ' You can change other settings as with any RS 'objPagingRS.CursorLocation = adUseClient objPagingRS.CacheSize = iPageSize ' Open RS objPagingRS.Open strSQL, objPagingConn, adOpenStatic, adLockReadOnly, adCmdText ' Get the count of the pages using the given page size iPageCount = objPagingRS.PageCount ' If the request page falls outside the acceptable range, ' give them the closest match (1 or max) If iPageCurrent > iPageCount Then iPageCurrent = iPageCount If iPageCurrent < 1 Then iPageCurrent = 1 ' Check page count to prevent bombing when zero results are returned! If iPageCount = 0 Then Response.Write "No records found!" Else ' Move to the selected page objPagingRS.AbsolutePage = iPageCurrent ' Start output with a page x of n line %> <head> <STYLE fprolloverstyle>A:hover {color: red} </STYLE> </head> <p> <font face=verdana size=2><b>Página <%= iPageCurrent %> de <%= iPageCount %></font></b> </p> <% For I = 0 To objPagingRS.Fields.Count - 1 Next 'I ' Loop through our records and ouput 1 row per record iRecordsShown = 0 Do While iRecordsShown < iPageSize And Not objPagingRS.EOF %> <table border="0" width="100%" cellpadding="0"> <tr> <td width="100%" bgcolor="Silver"> <table border="0" width="100%" cellspacing="5" cellpadding="5"> <tr> <td width="20%"> <p style="margin: 15"><a href="big.asp?id=<%= objPagingRS.Fields("ID").Value %>"><img border="0" src="<%= objPagingRS.Fields("pic_url").Value %>" height="120"></a></td> <td width="80%"> <p style="margin-left: 15"><font face="Verdana" size="2" color="white"><b><%= objPagingRS.Fields("pic_dis").Value %></b></font></td> </tr> </table> </td> </tr> <tr> <td width="100%" bgcolor="Silver"> <p align="left" style="margin-left: 10; margin-right: 7; margin-top: 2; margin-bottom: 2"><a href="big.asp?id=<%= objPagingRS.Fields("ID").Value %>" style="text-decoration:none"><b><font face="Verdana" color="white" size="2"><%= objPagingRS.Fields("pic_name").Value %></a></font></b></td> </tr> </table> <p align="center"> <% iRecordsShown = iRecordsShown + 1 objPagingRS.MoveNext Loop %> <% End If ' Close DB objects and free variables objPagingRS.Close Set objPagingRS = Nothing objPagingConn.Close Set objPagingConn = Nothing ' Show "previous" and "next" page links which pass the page to view ' and any parameters needed to rebuild the query. You could just as ' easily use a form but you'll need to change the lines that read ' the info back in at the top of the script. If iPageCurrent > 1 Then %> <a href="list.asp?page=<%= iPageCurrent - 1 %>&order=<%= Server.URLEncode(strOrderBy) %>">&lt;&lt; Prev</a> <% End If ' You can also show page numbers: For I = 1 To iPageCount If I = iPageCurrent Then %> <%= I %> <% Else %> <a href="list.asp?page=<%= I %>&order=<%= Server.URLEncode(strOrderBy) %>"><%= I %></a> <% End If Next 'I If iPageCurrent < iPageCount Then %> <a href="list.asp?page=<%= iPageCurrent + 1 %>&order=<%= Server.URLEncode(strOrderBy) %>">Next &gt;&gt;</a> <% End If %>
  20. Legionáriors

    BOF EOF

    beleza fiz algumas modificações pra ver se funcionava ficou assim: Erro: Erro de tempo de execução do Microsoft vb script: <% Dim lista,cat_id,cat_nome,nome,lista_produtos,msgnada,sql_produtos,objConn_produtos,rs_produtos lista=Request.querystring("lista") cat_id=Request.querystring("cat_id") cat_nome=Request.querystring("cat_nome") nome=Request.querystring("nome") %> <table border=0 width=99% cellpadding=10 cellspacing=10><div class="center_title_bar"><%=cat_nome%></div> <% SET objConn_produtos = Server.CreateObject("AdoDB.Connection") objConn_produtos.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=C:\Inetpub\wwwroot\Projetos\Lojas Adri\banco_novo\loja.mdb" sql_produtos = "SELECT * FROM produtos WHERE cat_id = 6 ORDER BY nome" Set rs_produtos = objConn_produtos.Execute(sql_produtos) col=3 if not rs_produtos.eof then colu=1 response.write "<table><tr><td>" while not rs_produtos.eof Select Case lista Case "categoria" set lista_produtos = lojaDB.Execute("SELECT * FROM produtos WHERE cat_id="& cat_id &" AND disp='S' ORDER BY nome") msgnada = "No momento não dispomos de nenhum produto neste departamento." Case "busca" set lista_produtos = lojaDB.Execute("SELECT * FROM produtos WHERE nome LIKE '%"& nome &"%' AND disp='S' ORDER BY nome") msgnada = "Infelizmente não localizamos nenhum produto com esse nome." Case Else %> <script>window.location="./index.asp"</script> <% End Select If lista_produtos.EOF Then Response.Write "<tr><td align=center><h3>" & msgnada & "</h3></td></tr>" Else %> <% Dim prod_cat_id,prod_id,prod_imagem,prod_descricaop,prod_preco,malha1 malha1 = "sim" while not lista_produtos.EOF prod_cat_id = lista_produtos("cat_id") prod_id = lista_produtos("id") prod_imagem = lista_produtos("imagem") prod_descricaop = lista_produtos("descricaop") prod_preco = lista_produtos("preço") %> <div class="details_big_box"> <tr width=100% valign=top class=<%=malha1%>> <td background="imagens/fundo1.jpg" width=20% valign=center align=center> <img src=./imagens/<%=prod_imagem%> width="70" border=0> </td> <td background="imagens/fundo2.jpg" width=60% valign=center> <font size="2"> <b> <%=prod_descricaop%> <td background="imagens/fundo3.jpg"> </td> <td background="imagens/fundo4.jpg" width=20% valign=center align=center> <font color="white"> <b><%=(prod_preco)%> </font> <br><br><p> <b><center> <a href="./detalheprod.asp?prod_id=<%=prod_id%>&url_comp=<%=Server.UrlEncode(Request.ServerVariables("QUERY_STRING"))%>" title="Ver descrição completa"> <br><img src="./imagens/search.gif" border=0 ></a> </b> </td> </tr> </div> <% if colu=col then response.write "</td><tr><td>" colu=1 else response.write "</td><td>" colu=colu+1 end if rs_produtos.movenext wend response.write "</td></tr></table>" end if rs_produtos.close set rs_produtos=nothing lista_produtos.movenext If malha1 = "sim" Then malha1 = "não" Else malha1 = "sim" End If wend End If If lista_produtos.State <> 0 Then lista_produtos.Close set lista_produtos = Nothing End If %> </table> Linha do erro 35 --> If lista_produtos.EOF Then Abraço valeu! Legionario
  21. Legionáriors

    BOF EOF

    Bom dia galera! Erro: ADODB.Recordset (0x800A0BCD) BOF ou EOF são verdadeiros, ou o registro atual foi excluído. A operação solicitada pelo aplicativo requer um registro atual. listaprod.inc, line 80 Script: <% Dim lista,cat_id,cat_nome,nome,lista_produtos,msgnada,sql_produtos,objConn_produtos,rs_produtos lista=Request.querystring("lista") cat_id=Request.querystring("cat_id") cat_nome=Request.querystring("cat_nome") nome=Request.querystring("nome") %> <table border=0 width=99% cellpadding=10 cellspacing=10><div class="center_title_bar"><%=cat_nome%></div> <% SET objConn_produtos = Server.CreateObject("AdoDB.Connection") objConn_produtos.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=C:\Inetpub\wwwroot\Projetos\banco_novo\loja.mdb" sql_produtos = "SELECT * FROM produtos WHERE cat_id = 6 ORDER BY nome" Set rs_produtos = objConn_produtos.Execute(sql_produtos) col=3 if not rs_produtos.eof then colu=1 response.write "<table><tr><td>" while not rs_produtos.eof Select Case lista Case "categoria" set lista_produtos = lojaDB.Execute("SELECT * FROM produtos WHERE cat_id="& cat_id &" AND disp='S' ORDER BY nome") msgnada = "No momento não dispomos de nenhum produto neste departamento." Case "busca" set lista_produtos = lojaDB.Execute("SELECT * FROM produtos WHERE nome LIKE '%"& nome &"%' AND disp='S' ORDER BY nome") msgnada = "Infelizmente não localizamos nenhum produto com esse nome." Case Else %> <script>window.location="./index.asp"</script> <% End Select If lista_produtos.EOF Then Response.Write "<tr><td align=center><h3>" & msgnada & "</h3></td></tr>" Else %> <% Dim prod_cat_id,prod_id,prod_imagem,prod_descricaop,prod_preco,malha1 malha1 = "sim" while not lista_produtos.EOF prod_cat_id = lista_produtos("cat_id") prod_id = lista_produtos("id") prod_imagem = lista_produtos("imagem") prod_descricaop = lista_produtos("descricaop") prod_preco = lista_produtos("preço") %> <div class="details_big_box"> <tr width=100% valign=top class=<%=malha1%>> <td background="imagens/fundo1.jpg" width=20% valign=center align=center> <img src=./imagens/<%=prod_imagem%> width="70" border=0> </td> <td background="imagens/fundo2.jpg" width=60% valign=center> <font size="2"> <b> <%=prod_descricaop%> <td background="imagens/fundo3.jpg"> </td> <td background="imagens/fundo4.jpg" width=20% valign=center align=center> <font color="white"> <b><%=(prod_preco)%> </font> <br><br><p> <b><center> <a href="./detalheprod.asp?prod_id=<%=prod_id%>&url_comp=<%=Server.UrlEncode(Request.ServerVariables("QUERY_STRING"))%>" title="Ver descrição completa"> <br><img src="./imagens/search.gif" border=0 ></a> </b> </td> </tr> </div> <% if colu=col then response.write "</td><tr><td>" colu=1 else response.write "</td><td>" colu=colu+1 end if rs_produtos.movenext wend response.write "</td></tr></table>" end if rs_produtos.close set rs_produtos=nothing lista_produtos.movenext If malha1 = "sim" Then malha1 = "não" Else malha1 = "sim" End If wend End If lista_produtos.Close set lista_produtos = Nothing %> </table> Se alguém puder se habilitar a me ajudar agradeço! Abraço a todos. Legionario
  22. Legionáriors

    Erro no Script

    Boa noite pessoal, Bom verificando melhor todo o contexto verifiquei que o problema é em outro script e fuçando bantante consegui fazer funcionar mas o problema agora é na formatação das tabelas deste código não há erro os produtos estão aparecendo certinho é que está mostrando apenas uma coluna sendo que deveria estar mostrando 4. Se puderem me ajudar agradeço. <% Dim lista,cat_id,cat_nome,nome,lista_produtos,msgnada lista=Request.querystring("lista") cat_id=Request.querystring("cat_id") cat_nome=Request.querystring("cat_nome") nome=Request.querystring("nome") %> <table border=0 width=100% cellspacing="5" cellpadding="0"><tr width=100%><td width=100% valign=top><h3><%=cat_nome%></h3></td></tr> <% Select Case lista Case "categoria" set lista_produtos = lojaDB.Execute("SELECT * FROM produtos WHERE cat_id="& cat_id &" AND disp='S' ORDER BY nome") msgnada = "No momento não dispomos de nenhum produto neste departamento." Case "busca" set lista_produtos = lojaDB.Execute("SELECT * FROM produtos WHERE nome LIKE '%"& nome &"%' OR descricaop LIKE '%"& nome &"%' OR descricaog LIKE '%"& nome &"%' OR preço LIKE '%"& nome &"%' OR imagem LIKE '%"& nome &"%' AND disp='S' ORDER BY nome") msgnada = "Infelizmente não localizamos nenhum produto com esse nome." Case Else %> <script>window.location="./index.asp"</script> <% End Select If lista_produtos.EOF Then Response.Write "<tr><td><h5>" & msgnada & "</h5></td></tr>" Else %> <% Dim prod_cat_id,prod_id,prod_imagem,prod_descricaop,prod_preco,malha1,col,colu malha1 = "sim" col=4 if not lista_produtos.eof then colu=1 response.write "<table><tr><td>" while not lista_produtos.EOF prod_cat_id = lista_produtos("cat_id") prod_id = lista_produtos("id") prod_imagem = lista_produtos("imagem") prod_descricaop = lista_produtos("descricaop") prod_preco = lista_produtos("preço") %> <table valign=top width=100% border="2" cellspacing="3" cellpadding="3"> <tr class=<%=malha1%>> <td align="center"><center><a href="detalhe_produto.asp?id=<%=lista_produtos("id")%>" target="principal"><img src='images/<%response.write lista_produtos ("imagem")%>' height="100" border="0"/></a></tr> <tr> <td align="center"><center><font face="verdana" size="1" color="black"><b><%response.write lista_produtos ("nome")%><b></td></tr> <td align="center"><center><font face="verdana" size="2" color="red"><b>R$ <%response.write formatnumber (lista_produtos("preço"),2)%></b></td></tr> <td align="center"><center><font face="verdana" size="1" color="black"><b><%response.write lista_produtos ("condicoes")%><b></td></tr> </tr> </table> <% if colu=col then response.write "</td><tr><td>" colu=1 response.write "</td><td>" colu=colu+1 end if lista_produtos.movenext If malha1 = "sim" Then malha1 = "não" Else malha1 = "sim" End If wend response.write "</td></tr></table>" End If lista_produtos.Close set lista_produtos = Nothing End if %> </table></td></tr> </table>
  23. Legionáriors

    Erro no Script

    boa noite pessoal do fórum, Tenho o seguinte código: <html> <head> <style> body{ overflow-x: hidden; } </style> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { $("h1#mostra").toggle( function() { $("div#oculto").fadeIn(); // ou slideDown() }, function() { $("div#oculto").fadeOut(); // ou slideUp() } ); }); </script> </script><style type="text/css"> html { font: 12px Arial, Helvetica, sans-serif; text-align: center; } #conteudo, #oculto { background: #e5e5e5; width: 645px; margin: 5; padding: 0px; border: solid 1px #ccc; } #conteudo h1 { font-size: 12px; } #oculto { display: none; margin-top: 10px; } #scroll { width:645px; background-color:white; overflow:no; } </style> </head> <table border=0 width=100% cellspacing="10" cellpadding="10"> <tr valign=top> <% Dim prod_id,prod_nome,prod_descricaog,prod_descricaoh,prod_preco,prod_condicoes,prod_imagem,prod_detalhe,url_comp prod_id = Request.querystring("prod_id") url_comp = Server.UrlEncode(Request.querystring("url_comp")) set prod_detalhe = lojaDB.Execute("SELECT * FROM produtos WHERE id="& prod_id &" AND disp='S'") [b]Esta é a linha do erro --> prod_nome = prod_detalhe("nome")[/b] prod_descricaog = prod_detalhe("descricaog") prod_descricaoh = prod_detalhe("descricaoh") prod_preco = prod_detalhe("preço") prod_condicoes = prod_detalhe("condicoes") prod_imagem = prod_detalhe("imagem") prod_detalhe.Close set prod_detalhe = Nothing %> <td width=60%><h5><%=prod_nome%></h5> <center><img src="./images/<%=prod_imagem%>" width=40% border=0></center> <br><br> <p><font size="1" color="black"><b>Fabricante:</b><%=prod_descricaog%></p> </td> <td> <br><br><br><br><br><br> <p align=left><font size="1" color="black"><b>Pague R$ </font><font size="2" color="red"><%=formatnumber(prod_preco,2)%></font> <font size="1" color="black"> por este produto</font></b> <b><font size="1" color="red"><%=prod_condicoes%></font></b></p> <input type=hidden name=url_comp value="<%=url_comp%>"> </form> </p> <p align=left><a href="<%=Request.ServerVariables("HTTP_REFERER")%>" style="text-decoration:none"><font size="1" color=red><b>Voltar a página anterior...</b></font></a></p> </td> </tr> </table> <body overflow-y: hidden;> <div id="conteudo"> <h1 valign=middle id="mostra"><center>Clique aqui para exibir e ocultar as características deste produto</center></h1> </div> <div id="scroll"> <div id="oculto"> <font size="1" color="black"><%=prod_descricaoh%> <br> </div> </body> </html> Ele refere-se a uma consulta no banco onde existe duas definições produto disponível e produto indisponível sendo marcados por um "S" ou por um "N" quando coloco o produto como indisponível ele além de ainda mostrar o mesmo quando tento acessa-lo retorna o seguinte erro: ADODB.Field error '800a0bcd' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. /detalheprod.inc, line 57 Agradeço se puderem verificar e me ajudar a resolver. Abraço a todos Legionario
  24. Bom Rafael, O motivo de eu querer este script em especial é porque nele consta a formatação ideal para o que eu preciso. Preciso que além de fazer a paginação ainda a formatação seja configuravel como esta é. Encontrei um script de paginação e tentei adaptar a minha necessidade mas estou encontrando algumas dificuldades então acredito que agora que me fiz entender (eu acho) vou postar o código pois ainda existem erros que não consigo sanar para faze-lo funcionar pois não só eu como todos nós além de não sabermos tudo (e eu estou me esforçando) estamos em constante aprendizado. Espero que você ou algum dos amigos do fórum possa me ajudar. Grato a todos. Erro: Tipo de erro: Erro de compilação do Microsoft VBScript (0x800A0400) Instrução esperada paginacao2.asp, line 109 end if <% StringDeConexao = "Driver={Microsoft Access Driver (*.mdb)};DBQ="& server.MapPath("/banco/loja.mdb") Set Conexao = Server.CreateObject("AdoDb.Connection") Conexao.Open StringDeConexao Set RS = Server.CreateObject("AdoDb.RecordSet") nomepagina = "paginacao2.asp" registros = 3 col=3 if not rs.eof then colu=1 response.write "<table><tr><td>" while not rs.eof RS.CacheSize = registros RS.PageSize = registros SQL = "Select * from produtos" RS.Open SQl,Conexao,3,3 If RS.Eof then Response.Write("Nenhum registro encontrado.") else if Request.QueryString("pagina")="" then pagina = 1 elseif cint(Request.QueryString("pagina"))<1 then pagina = 1 elseif cint(Request.QueryString("pagina"))>RS.PageCount then pagina = RS.PageCount else pagina=Request.QueryString("pagina") end if end if RS.AbsolutePage = pagina contador = 0 While contador<registros and not RS.eof %> <table valign=top width=205 border="1" cellspacing="2" cellpadding="7"> <tr> <td background="images/BottomCol1.jpg"><font face="verdana" size="1" color="white"><b><%response.write rs ("nome")%><b></td></tr> <td align="center"><center><a href="detalhe_acervo.asp?id=<%=rs("id")%>" target="_self"><%=imagem%><img src='images/<%response.write rs ("imagem")%>' height="100" border="0" alt="Clique na imagem e veja os detalhes"/></a></tr> <tr> <td background="images/BottomCol1.jpg"><font face="verdana" size="1" color="white"><b>» Locação R$: <%response.write formatnumber (rs("preço"),2)%></b> <br><font face="verdana" size="1" color="white"><b>» Áudio: <%response.write rs ("condicoes")%><b> <br><font face="verdana" size="1" color="white"><b>» Categoria: <%response.write rs ("descricaop")%><b></td></tr> </tr> </table> <% RS.MoveNext contador = contador + 1 If RS.eof then if colu=col then response.write "</td><tr><td>" Response.Write("") colu=1 else response.write "</td><td>" colu=colu+1 end if rs.movenext for i=1 to RS.PageCount response.write "</td></tr></table>" response.Write("<a href="&nomepagina&"?pagina="&i&">"&replace(i,pagina,"<font color=blue><b>"&i&"</b>")&"</a> ") rs.close end if Next %>
×
×
  • Criar Novo...