Ir para conteúdo
Fórum Script Brasil

Caio Rebello

Membros
  • Total de itens

    18
  • Registro em

  • Última visita

Tudo que Caio Rebello postou

  1. Fala galera... Então, desculpa estar fazendo uma eprgunta assim... Mas... Eu já procurei por tudo quato e lugar... Uma galeria de fotos já pronta, com banco de dados e upload de usuários. Eu achei algumas mãs não sei se é garantido... Eu queria a ajuda de voces, se voces conhecem alguma galeria de fotos, onde o usuario se cadastra e pode fazer o upload das imagens para o banco de dados.... Voces recomendam alguma?? Mesmo que não tenha essa parte de upload.... Sendo organizada com banco de dados.... VLWW
  2. Vlw Hipnos.. Mas eu achei um site que faz isso. É em PHP http://www.websiteoptimization.com/services/analyze Ele mede o peso do site, das imagens, dos scripts e ainda calcula o tempo necessario para a página carregar É de boa utilidade para todos webdevelopers.
  3. Fala galera, Não sabia onde postar esta dúvida, então postei aqui no HTML que deve chegar o mais proximo da minha dúvida... Estou fazendo uma nova versão de meu site, e nesta nova versão preciso dele mais leve, e então gostaria de saber como calcular quandos KB a página completa esta pesando junto com todas as imagens... Eu lembro que uma vez vi num fórum (não me lembro qual), um link para uma página em ingles, que media o peso dá página e o tempo levado para carrega-la totalmente. E ainda media qual conexão era ideal para aquela página. Voces conhecem esse site que faz esse serviço?
  4. Fala Galera, Peço que voces falem o que voces acham do site que eu fiz para uma artista plástica... É bem voltado par ao publico feminino, portanto sejam felxíveis. http://www.marciaspassapan.com.br Vejam em termos de tamanhjo, layout, peso etc... E tem o subdomínio que possui o e-comerce.... http://www.shopping.marciaspassapan.com.br Agradeço muito, e sugestões sempre são bem vindas..
  5. Caio Rebello

    Problema Com Asp

    Acho que sei o que pode ser.. A maioria dos servidores ta bloqueando envio de email sem autenticação... Eu tenho hospedagem no IG Empresas, e semana passada todos os meus códigos de envio pararam por causa do script de envio. Então configurei todos para o CDOSYS Olha o codigo ai: É so chamar as variáveis que estão no começo do seu código na config do CDO...
  6. Isso!!! A segunda opção. Tentei mas acho que não fiz direito. Coloquei assim Request.QueryString("pagina") pagina = (((contador - 1) * 6) + 1) E no link eu coloquei Ele carregou a página com as mesmas imagens. Não sei se vai dar certo, tentei fazer o contador = 6, porém ele sempre carrega a primeira imagem da pasta. Será que tem solução pra isso? Eu vi esse tutorial do MXSTUDIO. http://www.mxstudio.com.br/views.tutorial....d=1&aid=851 Eu tava lendo como eles fizeram, porém o deles é muito mais complexo. Lá eles puxam pelo numero da imagem. Ou seja, pra eles puxarem para a proxima página as imagesm terão que estar na ordem 01img.jpg 02img.jpg e assim por diante... So que complica demais... Eu ainda quero tentar a sua maneira.. Se tiver uma forma de puxar a imagem do 6 por diante ou 12 por diante.... Brigadão...
  7. Fala galera, Eu estou montando uma galeria de imagens com este turorial do link abaixo: http://www.imasters.com.br/artigo/3620 O problema desse código é que se temos uma pasta com 90 imagens ele irá abrir 90 imagens. Ai que esta, acho que dá pra fazer multiplas páginas com este código. pensem comigo: O contador de imagens Toda vez que se adiciona uma imagem ele adiciona: E eu no fim do código tem isso: Limitando a carregamento da página a 6 imagens... Ai que está, eu não sou muito bom em asp, mas não teria como colocar quando o contador chegar em 6 ele criar um link para a proxima página?
  8. Fala galera, To aqui pra desabafar e para pedir uma opinião de voces. Eu tenho um site hospedado com o IG EMPRESAS (que por sinal está melhorando, aos poucos, mas melhorando). E com alguns problemas que tive com o IG, decidi migrar pro Terra empresas. assinei o plano e tudo mais, e fui abrir o painel de controle... E por surpresa, cade o painel de controle????? eles não tem painel, apenas um painel simples onde se da pra mexer nas pastas e no DNS... Então liguei para o suporte e perguntei como fazer um subdominio (que eu possuo o diminio e o subdiminio que é um ecomerce). Então eles falaram que deveria se solicitado por email um pedido de cadastro de subdomínio, e com uma resposta de 2 dias úteis :blink: :blink: :blink: Nisso eu já fiquei doido da vida, porque em todos os hospedeiros, inclusive o IG, é so abrir o painel de controle e criar o subdiminio, e pronto, em 3 segundos já esta criado... Enfim, esperei 2 dias uteis (ligando e enxendo o saco deles), e eles criaram o subdomínio. Ai eu mandei um email perguntando qual a pasta que está sendo apontado o subdomínio (achando que teria um ftp.subdominio.dominio.com.br). Eles falaram a seguinte mensagem. Ou seja, já empurraram a buxa pra cima de mim. E eu nem sequer entendi o que eles queriam dizer. Porque pelo que eu saiba, precisa ter uma pasta para onde apontar o domínio e uma outra pasta para apontar o subdomínio (pelo menos é assim que esta funcionando no IG empresas e no Hotel da web, onde tenho hospedagens) Então após horas de briga com a atendente. Ela me ofereceu pela metade do preço pra eu pensar no caso... Mas já estuo muito desanimado com o terra. Eles não tem um painel de controle pra gente poder mexer na hora que bem entende, e tudo que precisamos temos que solicitar por telefone e email, tendo uma demora de 2 dias uteis para solução. Se voces viram o terra, fujam dele e procurem o algo bom como locaweb ou Ig empresas.
  9. Bareta, Se já ta dificil no Inglês imagine no Japonês??? :blink: :blink: Eu fiz o código lá, se voces quiserem colocar no site script brasil.... Coloquei no rapidshare, o endereço é: http://rapidshare.com/files/57094220/esque..._senha.zip.html Abs a Todos. PS: Alias, eu tive que refazer todos os códigos do cdosys porque sei la o que aconteceu com o meu hospedeiro (Eu hospedo no Ig empresas), e todos os scritps do cdo davam erro de conexão com o servidor... Alias, já vi muita gente tendo problemas com isso, até com o Locaweb.
  10. Nossa. Essa dai era nova pra mim. Mas não sabemos de tudo né. Vivendo e aprendendo... Agora deu certo... Havia diversos erros de digitação no codigo, por isso que não ia :unsure: E também o caminho pro Banco de dados não tava legal. Então mudei para ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("banco.mdb") Set conn = Server.CreateObject("ADODB.Connection") conn.open ConnectString Eu vo da uma configurada legal no código e depois se voces quiserem colocar no site esse script... É legal ter um script configurado com o CDOSYS prontinho com usuário e senha. ABS E VLW mesmo
  11. Fala galera, To me matando aqui para conseguir configurar um script de esqueci minha senha, não consigo nem a pau configurar ele. Peguei na internet ele pronto, porém fiz algumas adaptações, mas ele nem consegue se conectar ao banco de dados. Sempre da erro de página não pode ser exibida. Olha página do formulario <html> <head> <title>Esqueci Minha Senha</title> <script language=JavaScript1.2> function valida(){ var email = document.formcontato.email.value; if ( email == '' ){ alert('Campo email em branco.'); document.formcontato.email.focus(); return false; } formcontato.envia.disabled=true; return true; } </SCRIPT> <TABLE align=center width="296"> <TR> <TD class=TD width="274"><p align="center"> <FORM action=teste.asp id=formcontato method=GET name=enviar> <font face="Verdana" size="1">E-mail de Cadastrado:<BR><INPUT class=campo maxLength=100 name=email size=26><BR><BR><INPUT class=botao2 name=envia type=submit value=Enviar> <BR></font></FORM></TD></TR> </TABLE> <p><font color="#FFFFFF" size="1" face="Verdana">1</font></p> </body> </html> A página do Codigo. <% Option Explicit Dim ConnectString, conn, objMessage, objConfig, strBody, login, email, Enviar, rs, pasta pasta = "D:\hshome\jrspassa\pasta\pasta\pasta.mdb" ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&pasta&";" Set conn = Server.CreateObject("ADODB.Connection") conn.open ConnectString email = request.querystring("email") set rs = conn.execute("select * from users where email='"&email&"'") If rs.EOF = True Then Response.Write "Email inválido!" Else Set objConfig = Server.CreateObject("CDO.Configuration") objConfig.Fields.Item(sch & "sendusing") = 2 objConfig.Fields.Item(sch & "smtpauthenticate") = 1 objConfig.Fields.Item(sch & "smtpserver") ) = "mail.provedor.com.br" objConfig.Fields.Item(sch & "smtpserverport") = 25 objConfig.Fields.Item(sch & "smtpconnectiontimeout") = 120 objConfig.Fields.Item(sch & "sendusername") = "email@provedor.com.br" objConfig.Fields.Item(sch & "sendpassword") ) = "senha" objConfig.Fields.Update Set objMessage = Server.CreateObject("CDO.Message") Set objMessage.Configuration = objConfig objMessage.From = "email@provedor.com.br" objMessage.To = rs("email") objMessage.Subject = "teste de email" htmlText = "Seu login é: " & rs("username") & " e sua senha é: " & rs("password") objMessage.HTMLBody = htmlText On Error Resume Next objMessage.Send Set objMessage = Nothing Set objConfig = Nothing response.write ("Email Enviado com Sucesso") End If rs.close set rs = nothing conn.close set conn = nothing %> Alguém me ajuda.
  12. Fala galera, To com um problemão aqui.. Ta acontecendo o seguinte, tenho um sistema virtuastore todo configurado e funcionando perfeitamente com BRPAY e boleto. Porém desde que configurei ele estou tento um problema serio.. Quando uma pessoa acessa meu site vindo de um link de outro site, e tenta fazer as compras, o sistema não registra essa compra... A pessoa entra no site faz as compras, adiciona o produto no carrinho, coloca o frete endereço e etc, esoclhe a forma de pagamento e na hora de finalizar a página aparece com os textos padrão mas sem nenhum número de de pedido, apenas a pagina em branco. e esse pedido não é registrado no sistema. Porém quando a pessoa entra no site digitando ele na barra do navegador, o sistema funciona normal, e faz a compra normalmente.... Porque será que esta ocorrendo este problema??? Será algum erro de cookies? Teria uma forma de limpar os cookies quando a pessoa entra no site??? VLW ABS
  13. Sim amigo, funcionou, valeu mesmo... Mas é importante esta tag?? Eu vi em diverços sityes esta tag, ela influiencia em alguma coisa??? VLW ABS
  14. Fala galera, porque será que não consigo deixar colorida a barra de rolagem do I.E??? já tentei de tudo. Olhem o código: <style type="text/css"> <!-- body { color:#090909; font-family:verdana; font-size:15pt; SCROLLBAR-FACE-COLOR: #090909; SCROLLBAR-HIGHLIGHT-COLOR: #090909; SCROLLBAR-SHADOW-COLOR: #090909; SCROLLBAR-3DLIGHT-COLOR: #090909; SCROLLBAR-ARROW-COLOR: #090909; SCROLLBAR-TRACK-COLOR: #090909; SCROLLBAR-DARKSHADOW-COLOR: #090909; } --> </style> E não fica colorido nem a pau, já vi diverços sites com o scroll colorido, mais eu não consigo, o que devo fazer??? Poruqe isso ta acontecendo??? Eu fiz esta págian para voces verem o teste que eu fiz... http://www.marciaspassapan.com.br/teste90.html Vejam o que pode ser.. VLW.. ABS
  15. Fala galera, Estou configurando o virtuastore aqui no meu servidor, e parei neste problema, os boletos gerados não vem com a tarifa de boleto que o banco cobra. Como eu faço para adicionar esta tarifa? Eu tentei fazer assim e deu quase certo: Esta tag aqui puxa do pagamento.asp o valor total. var_valordocumento = Request.QueryString("valordocumento") Então eu fiz o seguinte: dim v91 v91 = 3 var_valordocumento = Request.QueryString("valordocumento") + v91 Nesta tag eu consegui somar, porém o resultado fica com apenas 1 casa decimal depois da virgula (exemplo: 45,4), sendo que ele deveria ficar com duas casas decimais. Eu fiz dessa vorma porque não consegui fazer o v91 = 2,90... Como eu adiciono o valor de 2,90 junto com o resultado da compra no boleto?
  16. Rapaz. Tive esse mesmo problema que você. Coloca esse código aqui: strbody = replace(strbody, "+"," ") strbody = replace(strbody, "%26%238364%3B","€") strbody = replace(strbody, "%A1","¡") strbody = replace(strbody, "%A3","£") strbody = replace(strbody, "%A8","¨") strbody = replace(strbody, "%AA","ª") strbody = replace(strbody, "%AC","¬") strbody = replace(strbody, "%B4","´") strbody = replace(strbody, "%B7","·") strbody = replace(strbody, "%BA","º") strbody = replace(strbody, "%BF","¿") strbody = replace(strbody, "%C3%87","Ç") strbody = replace(strbody, "%C3%A7","ç") strbody = replace(strbody, "%0D%0A",vbnewline) strbody = replace(strbody, "%21","!") strbody = replace(strbody, "%23","#") strbody = replace(strbody, "%24","$") strbody = replace(strbody, "%25","%") strbody = replace(strbody, "%26","&") strbody = replace(strbody, "%27","'") strbody = replace(strbody, "%28","(") strbody = replace(strbody, "%29",")") strbody = replace(strbody, "%2B","+") strbody = replace(strbody, "%2C",",") strbody = replace(strbody, "%2D","-") strbody = replace(strbody, "%2E",".") strbody = replace(strbody, "%2F","/") strbody = replace(strbody, "%3A",":") strbody = replace(strbody, "%3B",";") strbody = replace(strbody, "%3C","<") strbody = replace(strbody, "%3D","=") strbody = replace(strbody, "%3E",">") strbody = replace(strbody, "%3F","?") strbody = replace(strbody, "%5B","[") strbody = replace(strbody, "%5C","\") strbody = replace(strbody, "%5D","]") strbody = replace(strbody, "%5E","^") strbody = replace(strbody, "%5F","_") strbody = replace(strbody, "%60","`") strbody = replace(strbody, "%7B","{") strbody = replace(strbody, "%7C","|") strbody = replace(strbody, "%7D","}") strbody = replace(strbody, "%7E","~") strbody = replace(strbody, "%C2","´") strbody = replace(strbody, "%C3¡","á") strbody = replace(strbody, "%C3%A9","é") strbody = replace(strbody, "%C3%AD","í") strbody = replace(strbody, "%C3%B3","ó") strbody = replace(strbody, "%C3º","ú") strbody = replace(strbody, "%C3%A0","à") strbody = replace(strbody, "%C3¨","è") strbody = replace(strbody, "%C3¬","ì") strbody = replace(strbody, "%C3%B2","ò") strbody = replace(strbody, "%C3%B9","ù") strbody = replace(strbody, "´%B0","°") strbody = replace(strbody, "%C3%A2","â") strbody = replace(strbody, "%C3ª","ê") strbody = replace(strbody, "%C3´","ô") strbody = replace(strbody, "%C3£","ã") strbody = replace(strbody, "%C3%83","Ã") strbody = replace(strbody, "%C3%B5","õ") strbody = replace(strbody, "%C3%95","Õ") strbody = replace(strbody, "%C3%9C","Ü") strbody = replace(strbody, "%C3%81","Á") strbody = replace(strbody, "%C3%89","É") strbody = replace(strbody, "%C3%8D","Í") strbody = replace(strbody, "%C3%93","Ó") strbody = replace(strbody, "%C3%9A","Ú") strbody = replace(strbody, "%C3%80","À") strbody = replace(strbody, "%C3%88","È") strbody = replace(strbody, "%C3%8C","Ì") strbody = replace(strbody, "%C3%92","Ò") strbody = replace(strbody, "%C3%99","Ù") strbody = replace(strbody, "%C3%82","Â") strbody = replace(strbody, "%C3%8A","Ê") strbody = replace(strbody, "%C3%94","Ô") Agora no seu Mail.Body voce coloca: Mail.Body = strbody Ai você faz a linha strbody. strBody = Request.Form("motivos") & vbnewline & vbnewline & Request.Form("fromemail") & vbnewline & vbnewline & Request.Form("fromnome") vbnewline & vbnewline & Request.Form("cidade") &vbnewline & vbnewline & Request.Form("telefone") & strBody NO fim seu código fica assim: DIM Mail Set Mail = Server.CreateObject("Persits.MailSender") Mail.IsHTML = True Mail.Host = "" Mail.Username = "" Mail.Password = "" Mail.From = "" Mail.FromName = "" Mail.AddAddress "" Mail.AddCC "" Mail.Subject = "" Mail.Body = strbody strbody = replace(strbody, "+"," ") strbody = replace(strbody, "%26%238364%3B","€") strbody = replace(strbody, "%A1","¡") strbody = replace(strbody, "%A3","£") strbody = replace(strbody, "%A8","¨") strbody = replace(strbody, "%AA","ª") strbody = replace(strbody, "%AC","¬") strbody = replace(strbody, "%B4","´") strbody = replace(strbody, "%B7","·") strbody = replace(strbody, "%BA","º") strbody = replace(strbody, "%BF","¿") strbody = replace(strbody, "%C3%87","Ç") strbody = replace(strbody, "%C3%A7","ç") strbody = replace(strbody, "%0D%0A",vbnewline) strbody = replace(strbody, "%21","!") strbody = replace(strbody, "%23","#") strbody = replace(strbody, "%24","$") strbody = replace(strbody, "%25","%") strbody = replace(strbody, "%26","&") strbody = replace(strbody, "%27","'") strbody = replace(strbody, "%28","(") strbody = replace(strbody, "%29",")") strbody = replace(strbody, "%2B","+") strbody = replace(strbody, "%2C",",") strbody = replace(strbody, "%2D","-") strbody = replace(strbody, "%2E",".") strbody = replace(strbody, "%2F","/") strbody = replace(strbody, "%3A",":") strbody = replace(strbody, "%3B",";") strbody = replace(strbody, "%3C","<") strbody = replace(strbody, "%3D","=") strbody = replace(strbody, "%3E",">") strbody = replace(strbody, "%3F","?") strbody = replace(strbody, "%5B","[") strbody = replace(strbody, "%5C","\") strbody = replace(strbody, "%5D","]") strbody = replace(strbody, "%5E","^") strbody = replace(strbody, "%5F","_") strbody = replace(strbody, "%60","`") strbody = replace(strbody, "%7B","{") strbody = replace(strbody, "%7C","|") strbody = replace(strbody, "%7D","}") strbody = replace(strbody, "%7E","~") strbody = replace(strbody, "%C2","´") strbody = replace(strbody, "%C3¡","á") strbody = replace(strbody, "%C3%A9","é") strbody = replace(strbody, "%C3%AD","í") strbody = replace(strbody, "%C3%B3","ó") strbody = replace(strbody, "%C3º","ú") strbody = replace(strbody, "%C3%A0","à") strbody = replace(strbody, "%C3¨","è") strbody = replace(strbody, "%C3¬","ì") strbody = replace(strbody, "%C3%B2","ò") strbody = replace(strbody, "%C3%B9","ù") strbody = replace(strbody, "´%B0","°") strbody = replace(strbody, "%C3%A2","â") strbody = replace(strbody, "%C3ª","ê") strbody = replace(strbody, "%C3´","ô") strbody = replace(strbody, "%C3£","ã") strbody = replace(strbody, "%C3%83","Ã") strbody = replace(strbody, "%C3%B5","õ") strbody = replace(strbody, "%C3%95","Õ") strbody = replace(strbody, "%C3%9C","Ü") strbody = replace(strbody, "%C3%81","Á") strbody = replace(strbody, "%C3%89","É") strbody = replace(strbody, "%C3%8D","Í") strbody = replace(strbody, "%C3%93","Ó") strbody = replace(strbody, "%C3%9A","Ú") strbody = replace(strbody, "%C3%80","À") strbody = replace(strbody, "%C3%88","È") strbody = replace(strbody, "%C3%8C","Ì") strbody = replace(strbody, "%C3%92","Ò") strbody = replace(strbody, "%C3%99","Ù") strbody = replace(strbody, "%C3%82","Â") strbody = replace(strbody, "%C3%8A","Ê") strbody = replace(strbody, "%C3%94","Ô") strBody = Request.Form("motivos") & vbnewline & vbnewline & Request.Form("fromemail") & vbnewline & vbnewline & Request.Form("fromnome") vbnewline & vbnewline & Request.Form("cidade") &vbnewline & vbnewline & Request.Form("telefone") & strBody On Error Resume Next Mail.Send If Err <> 0 Then Response.Write "<H2>Ocorreu um erro: " & Err.Description & "</h2>" End If If Err = 0 Then Response.Write("<H2>Obrigado Sr(a) " & Request.Form("fromnome") & ", seu e-mail foi enviado com sucesso!</H2>") response.Redirect ("mensagem.aspx") End If Set Mail = Nothing %> Testa ai e veja se funciona. ABS
  17. Bareta, obrigado pela ajuda. Eu andei estudando o código e fazendo alguns testes, o problema esta no formmail, quando envio o formulario, o formmail.asp (que é o codigo cdosys) so envias as tags de form. Teria como eu acrescentar no formmail.asp algum código que acresente no email a página cart.asp? Como eu faria isso? Aqui esta o código da formmail.asp PS=eu tentei adicionar um código cart.asp, mas não deu certo. <%@ Language = vbscript%> <%option explicit %> <%server.scripttimeout = 600 %> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <% '------------------------------------------- FORMMAIL V1.3 ------------------------------------------ '---------------------------------------------------------------------------------------------------- 'copyright information '---------------------------------------------------------------------------------------------------- 'Copyright 2002: Sorted Sites http://www.sortedsites.com 'Authors Jonas Tornqvist, David Parkes and Karl Snares 'This script is Freeware, which means you are free to use and modify 'the script for your own use. 'The only condition is this copyright header remain intact and you don't 'try and sell this script for profit without first asking us. 'And of course also ask Matt Wright who wrote the original perl version of Formmail. '---------------------------------------------------------------------------------------------------- 'license agreement - Important '---------------------------------------------------------------------------------------------------- 'By using this script you agree to indeminfy the developers - Sorted Sites of any loss 'or damages that may arise from its use or missue. 'This script is provided as is with all faults - no warranties and no guarantees. 'basically its free - use it at your own risk and cost. 'No warranties and no tech support - if you need help with this don't ask us! 'The documentation is provided as is with all the help we can offer. 'As we develop this script we shall post updates hopefully fix any bugs 'We are not obliged to release any future versions and we might not bother... 'By using this script you accept this license agreement! '---------------------------------------------------------------------------------------------------- 'documentation v1.3 '---------------------------------------------------------------------------------------------------- '#################################################################################################### 'this is where the code starts for real '#################################################################################################### '---------------------------------------------------------------------------------------------------- 'declare variables '---------------------------------------------------------------------------------------------------- Dim strFrom, strTo, strSubject, strBody Dim objMessage, objConfig, strServer, intPort Dim recipient, redirect, subject, nome, email, required, strEmail1, strEmail2 Dim referer, url, url_verified, icounter, query, iloop, query2, query3, i, agree, validation, error0, error0ok, strform, cart '############################## CONFIGURATION VARIABLES #################################### 'These are the only lines you will need to change '---------------------------------------------------------------------------------------------------- strServer = "mail.marciaspassapan.com.br" 'set which smtp server will be used to send the email. enter ip address or domain name. eg: "xxx.xxx.xxx.xxx" or "smtp.your-domain.com" intPort = 25 'set the smtp port to be used when sending mail (by default port 25 is used) 'Referrer's Array is defined here. Enter the valid domains which may use this script. url = Array("www.marciaspassapan.com.br","marciaspassapan.com.br")'Set which urls that will be accepted. http://xxxxx/ 'Seperate multiple domains by commas 'eg: url= Array("www.your-domain.com","your-domain.com","www.my-domain.com") 'computer names can be used instead of domains if this script is being run locally 'eg: url = Array("computername") '######################################### IMPORTANT NOTICE ######################################### 'IMPORTANT: do not modify anything below this line unless you know what you are doing!! '######################################### IMPORTANT NOTICE ######################################### '---------------------------------------------------------------------------------------------------- 'information type and CDOSYS constants '---------------------------------------------------------------------------------------------------- %> <!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Library" --> <!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4" NAME="ADODB Type Library" --> <% '---------------------------------------------------------------------------------------------------- 'retrieved default fields '---------------------------------------------------------------------------------------------------- cart = ("cart.asp") recipient = request("recipient") cart = request("cart.asp") redirect = request("redirect") subject = request("subject") email = request("email") required = request("required") if required = "" then required = "recipient,subject,email,redirect" else required = "recipient,cart,subject,email,redirect," & required end if '---------------------------------------------------------------------------------------------------- 'verify the referer '---------------------------------------------------------------------------------------------------- referer = request.ServerVariables("HTTP_REFERER") referer = split(referer,"/") url_verified = "no" for icounter = Lbound(url) to Ubound(url) ' if referer(2) = url(icounter) then url_verified = "yes" end if next if not url_verified = "yes" then response.write("The url specified is invalid!") response.End end if '---------------------------------------------------------------------------------------------------- 'verify the recipient(not tested) '---------------------------------------------------------------------------------------------------- 'trimed_referer = split(referer(2),".")' 'response.write recipient & "<br>" & referer(2) & "=" & trimed_referer(0) & "<br>" 'if trimed_referer(0) = "www" then ' if InStr(1,recipient,trimed_referer(1),1) = 0 then ' response.write "recipient don't match the referer" ' response.end ' end if 'else ' if InStr(1,recipient,trimed_referer(0),1) = 0 then ' response.write "recipient don't match the referer" ' response.end ' end if 'end if '---------------------------------------------------------------------------------------------------- 'retrieve form contents and create email fields '---------------------------------------------------------------------------------------------------- query = Request.ServerVariables("QUERY_STRING") query = split(query,"&") query3 = split(required,",") For iLoop = Lbound(query) to UBound(query) query2 = split(query(iloop),"=") '---------------------------------------------------------------------------------------------------- 'form validation, checks required fields are not null '---------------------------------------------------------------------------------------------------- for i = LBound(query3) to UBound(query3) if query3(i) = query2(0) then if query2(1) = "" then response.write ("Clique no botão voltar do seu navegador, e preencha os seguintes dados corretamente: ") & query2(0) response.end end if end if 'if query2(0) = "agree" then 'if query2(1) <> "on" or query2(1) = "" then ' response.write("You must agree to terms and conditions to enable Formmailv1.3 to execute!") 'response.end 'end if 'end if '---------------------------------------------------------------------------------------------------- 'form validation, checks a valid email address has been specified '---------------------------------------------------------------------------------------------------- if query2(0) = "email" then trim(query2(0)) if len(query2(1))<8 then response.Write("Você deve entrar com os seguintes dados válidos: ") & query2(0) response.end end if if instr(query2(1),"@")=0 and instr(query2(1),".")=0 then response.write query2(1) response.Write("Clique no botão voltar do seu navegador, e preencha os seguintes dados corretamente: ") & query2(0) response.end end if strEmail1 = split(query2(1),"@") if len(strEmail1(1))<3 then response.Write("Clique no botão voltar do seu navegador, e preencha os seguintes dados corretamente: ") & query2(0) response.end end if strEmail2 = split(strEmail1(1),".") if len(strEmail2(0))<3 then response.Write("Clique no botão voltar do seu navegador, e preencha os seguintes dados corretamente: ") & query2(0) response.end end if if len(strEmail2(1))<2 then response.Write("Clique no botão voltar do seu navegador, e preencha os seguintes dados corretamente: ") & query2(0) response.end end if end if '---------------------------------------------------------------------------------------------------- 'form validation, checks terms and conditions checkbox has been ticked '---------------------------------------------------------------------------------------------------- Next if not query2(0) = "recipient" and not query2(0) = "redirect" and not query2(0) = "subject" and not query2(0) = "Name" and not query2(0) = "email" and not query2(0) = "required" and not query2(0) = "agree" then strBody = strBody & vbnewline & vbnewline & query2(0) &": " & query2(1) end if Next if email = "" then email = "formmail@" & referer(2) end if '---------------------------------------------------------------------------------------------------- 'replaces any special characters parsed through the query string '---------------------------------------------------------------------------------------------------- strbody = replace(strbody, "+"," ") strbody = replace(strbody, "%A1","¡") strbody = replace(strbody, "%A3","£") strbody = replace(strbody, "%A8","¨") strbody = replace(strbody, "%AA","ª") strbody = replace(strbody, "%AC","¬") strbody = replace(strbody, "%B7","·") strbody = replace(strbody, "%BA","º") strbody = replace(strbody, "%BF","¿") strbody = replace(strbody, "%21","!") strbody = replace(strbody, "%23","#") strbody = replace(strbody, "%24","$") strbody = replace(strbody, "%25","%") strbody = replace(strbody, "%26","&") strbody = replace(strbody, "%27","'") strbody = replace(strbody, "%28","(") strbody = replace(strbody, "%29",")") strbody = replace(strbody, "%2B","+") strbody = replace(strbody, "%2C",",") strbody = replace(strbody, "%2D","-") strbody = replace(strbody, "%2E",".") strbody = replace(strbody, "%2F","/") strbody = replace(strbody, "%3A",":") strbody = replace(strbody, "%3B",";") strbody = replace(strbody, "%3C","<") strbody = replace(strbody, "%3D","=") strbody = replace(strbody, "%3E",">") strbody = replace(strbody, "%3F","?") strbody = replace(strbody, "%5B","[") strbody = replace(strbody, "%5C","\") strbody = replace(strbody, "%5D","]") strbody = replace(strbody, "%5E","^") strbody = replace(strbody, "%5F","_") strbody = replace(strbody, "%60","`") strbody = replace(strbody, "%7B","{") strbody = replace(strbody, "%7C","|") strbody = replace(strbody, "%7D","}") strbody = replace(strbody, "%7E","~") strbody = replace(strbody, "%C2","Â") strbody = replace(strbody, "%B4","´") strbody = replace(strbody, "%0D%0A%0D%0A"," ") strbody = replace(strbody, "%B9","¹") strbody = replace(strbody, "%B2","²") strbody = replace(strbody, "%B3","³") strbody = replace(strbody, "%A2","¢") strbody = replace(strbody, "%DA","Ú") strbody = replace(strbody, "%FA","ú") strbody = replace(strbody, "%F9","ù") strbody = replace(strbody, "%D9","Ù") strbody = replace(strbody, "%ED","í") strbody = replace(strbody, "%CD","Í") strbody = replace(strbody, "%CC","Ì") strbody = replace(strbody, "%EC","ì") strbody = replace(strbody, "%F3","ó") strbody = replace(strbody, "%D3","Ó") strbody = replace(strbody, "%E9","é") strbody = replace(strbody, "%C9","É") strbody = replace(strbody, "%C8","È") strbody = replace(strbody, "%E8","è") strbody = replace(strbody, "%D4","Ô") strbody = replace(strbody, "%F4","ô") strbody = replace(strbody, "%CA","Ê") strbody = replace(strbody, "%EA","ê") strbody = replace(strbody, "%E3","ã") strbody = replace(strbody, "%C3","Ã") strbody = replace(strbody, "%E1","á") strbody = replace(strbody, "%C1","Á") strbody = replace(strbody, "%E0","à") strbody = replace(strbody, "%C0","À") strbody = replace(strbody, "%E7","ç") strbody = replace(strbody, "%C7","Ç") strbody = replace(strbody, "%E2","â") strbody = replace(strbody, "%C7","Ç") '---------------------------------------------------------------------------------------------------- 'this creates the body of the mail message, the text in quotes can be modified accordingly '--------------------------------------------------------------------------------------------------- strBody = "Enviaram um Contato pelo Site " & referer(2) & vbnewline & vbnewline & "Email: " & email & cart & strBody '---------------------------------------------------------------------------------------------------- 'checks if a smtp port has been specified, if not it uses the default port 25 '---------------------------------------------------------------------------------------------------- if intport <> 25 then intport = intport else intport = 25 end if '---------------------------------------------------------------------------------------------------- 'send the mail message '---------------------------------------------------------------------------------------------------- set objMessage = CreateObject("CDO.Message") objMessage.To = recipient objMessage.From = email objMessage.Subject = subject objMessage.Sender = email objMessage.Textbody = strBody '---------------------------------------------------------------------------------------------------- 'cdosys configuration setup '---------------------------------------------------------------------------------------------------- set objConfig = CreateObject("CDO.Configuration") objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort objConfig.Fields(cdoSMTPServer) = strServer objConfig.Fields(cdoSMTPServerPort) = intPort objConfig.Fields(cdoSMTPAuthenticate) = cdoAnonymous objConfig.Fields.Update set objMessage.Configuration = objConfig '---------------------------------------------------------------------------------------------------- 'define error handling procedures '---------------------------------------------------------------------------------------------------- On Error Resume Next objMessage.Send If Err.Number = 0 then response.write("Formmail v1.3 processed all operations successfully!") else response.write("Formmail v1.3 detected the following errors:")& "<br>" response.write("error no.: ")&err.number & "<br>" response.write("description: ")&err.description & "<br>" response.end End If On Error Goto 0 '---------------------------------------------------------------------------------------------------- 'send them to the page specified '---------------------------------------------------------------------------------------------------- Response.Redirect redirect Obrigado ai pela ajuda.. ABS.
  18. Fala galera, sou novo aqui no fórum, e novo na arte de programar :unsure: , mas sempre visito o script brasil, porque voces tem um bom banco de dados de scripts, e muito bons tutoriais. O meu problema é o seguinte, peguei um sistema de carrinho de compras pronto, dei uma arrumada nele para poder enviar através do formmail os dados contidos nele. Esse é o código da página do carrinho de compras: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Shop Márcia Spassapan</title> <link rel="STYLESHEET" type="text/css" href="../br/scripts/css_ms.css"> </head> <body bgcolor="#FFEFFF"> <!--#include file='db.asp'--> <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#990066"> <tr> <td height="35" align="center" valign="middle" class="Title_Geral_Maior">Apostilas Para Pintura M&aacute;rcia Spassapan</td> </tr> </table> <br> <div align="center" class="Conteudo">Chegaram as novas edi&ccedil;&otilde;es das Apostilas Para Pintura m&aacute;rcia Spassapan<br /> Escolha abaixo a sua</div> <br /> <br /> <table width="400" border="1" cellpadding="1" cellspacing="1" align="center" bgcolor="#FFFFFF"> <tr> <td align="center" valign="middle"><div align="center"><b class="Artista_Title">Carrinho de Compras</b> <p align="center"> <% ' ***** GET NUMBER OF DISTINCT ITEMS SQL = "SELECT COUNT(id) FROM Item" set rs = conn.execute(SQL) dim quantity() dim unitCost() redim quantity(rs(0)) redim unitCost(rs(0)) ' ***** GET THIS USER'S CART SQL = "SELECT item.id,title,price FROM Item,Cart" SQL = SQL & " WHERE item.id=cart.itemID and cart.custID=" & custID & " ORDER BY item.id" set rs = conn.execute(SQL) ' ***** SET UP VARIABLES: ' subtot = running subtotal of all items ' lastid allows us to know whether new item or not ' indItem tracks number of UNIQUE items in cart subtot = cCur(0) lastid = -1 indItem = 0 ' ***** MAKE SURE THERE ARE ITEMS IN CART if not rs.eof then Response.Write "<table border=1 bordercolor=#cccccc width=300 cellpadding=2 cellspacing=0>" do while not rs.eof id = rs(0) title = rs(1) subtot = cCur(subtot) + cCur(rs(2)) price = formatCurrency(rs(2)) if id = lastid then ' ***** NO NEED TO DRAW NEW ROW, JUST INCREASE QUANTITY OF THIS ITEM quantity(indItem) = quantity(indItem) + 1 else ' ***** NEW ITEM = NEW ROW lastid = id indItem = indItem + 1 quantity(indItem) = 1 unitCost(indItem) = cCur(rs(2)) str = str & "<tr valign=top><td>&nbsp;_Q_" & indItem & "_&nbsp;<b>&nbsp;<a href='#' onClick='showDetail(" & id & ");return false;'>" & title & "</a>" str = str & "</b></td><td align=right>" & price & "</td><td align=right><b>_S_" & indItem & "_</b><td align=right>&nbsp;<a href='#'" str = str & " onClick='removeItem(" & id & ");return false;'>Remover Item</a></td></tr>" end if rs.movenext loop ' ***** REPLACE PLACEHOLDER STRINGS WITH SUBTOTALS for i = 1 to indItem str = replace(str,"_Q_" & i & "_",quantity(i)) str = replace(str,"_S_" & i & "_",formatCurrency(cCur(quantity(i)*unitCost(i)))) next str = str & "<tr><td colspan=2 align=right>&nbsp;<br>Subtotal:</td><td align=right>&nbsp;<br><b>" & formatcurrency(subtot) & "</b></td>" str = str & "<td>&nbsp;</td></tr><tr><td colspan=5><a href='#' onClick='emptyCart();return false;'>Limpar Carrinho</a></td></tr></table>" Response.Write(str) else Response.Write("Seu Carrinho de Compras Está Vazio.<p>") end if %></td> </tr> </table> <br /> <table width="400" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="middle"><!--#include file='foot_cart.asp'--></td> </tr> </table> </body> </html> E também tenho um formmail muito bem configurado, que envia todos os dados do cliente por email: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="STYLESHEET" type="text/css" href="../br/scripts/css_ms.css"> <form name="form1" method="get" action="formmail.asp"> <table width="634" border="0" align="center"> <tr bgcolor="#navyblue"> <th colspan="2" align="center" class="Artista_Title">Cadastro de Pedidos</th> </tr> <tr> <td width="212" height="30" align="right" class="Conteudo"><font face="Verdana,Arial" size="-1">Nome*:</td> <td width="412"><font face="Verdana,Arial" size="-1"> <input name="Nome" type="text" id="Nome" size="62" maxlength="100" /></td> </tr> <tr> <td height="30" align="right" class="Conteudo"><font face="Verdana,Arial" size="-1">Endere&ccedil;o*:</td> <td><font face="Verdana,Arial" size="-1"> <input name="Endereco" type="text" id="Endereco" size="40" maxlength="100" />&nbsp; <span class="Conteudo">N&uacute;mero*:</span> <label> <input name="Numero" type="text" id="Numero" size="4" maxlength="10" /> </label></td> </tr> <tr> <td height="30" align="right" class="Conteudo"><font face="Verdana,Arial" size="-1">Complemento:</td> <td><font face="Verdana,Arial" size="-1"> <input name="Complemento" type="text" id="Complemento" size="25" maxlength="60" /></td> </tr> <tr> <td height="30" align="right" class="Conteudo"><font face="Verdana,Arial" size="-1"> Cidade*:</td> <td><font face="Verdana,Arial" size="-1"> <input name="Cidade" type="text" id="Cidade" size="25" maxlength="40" /> <span class="Conteudo"></span><span class="Conteudo">Estado*:</span> <input name="Estado" type="text" id="Estado" size="4" maxlength="4" /></td> </tr> <tr> <td height="30" align="right" class="Conteudo"><font face="Verdana,Arial" size="-1"> CEP*:</td> <td><font face="Verdana,Arial" size="-1"> <input name="CEP" type="text" id="CEP" size="25" maxlength="30" /></td> </tr> <tr> <td height="30" align="right" class="Conteudo"><font face="Verdana,Arial" size="-1">Telefone*:</td> <td><font face="Verdana,Arial" size="-1"> <input name="DDD" type="text" id="DDD" size="3" maxlength="3" /> <input name="Telefone" type="text" id="Telefone" size="9" maxlength="9" /> </td> </tr> <tr> <td height="30" align="right" class="Conteudo"><font face="Verdana,Arial" size="-1">Celular:</td> <td><font face="Verdana,Arial" size="-1"> <input name="DDDCEL" type="text" id="DDDCEL" size="3" maxlength="3" /> <input name="Celular" type="text" id="Celular" size="9" maxlength="9" /> </td> </tr> <tr> <td height="30" align="right"><font size="-1" face="Verdana,Arial" class="Conteudo">Endere&ccedil;o de Email*:</font></td> <td><font face="Verdana,Arial" size="-1"> <input name="email" size="30" maxlength="40" id="email" /> </font> </td> </tr> <tr> <td height="30" align="right"><font size="-1" face="Verdana,Arial" class="Conteudo">Confirme seu Email*:</font></td> <td><font face="Verdana,Arial" size="-1"> <input name="Confirmar_Email" id="Confirmar Email" size="30" maxlength="40" /> </font> </td> </tr> <tr> <td height="30" align="right" class="Conteudo"><font face="Verdana,Arial" size="-1">Forma de Pagamento*:</td> <td><font face="Verdana,Arial" size="-1"> <input name="Pagamento" id="Pagamento" type="radio" value="Boleto" checked="checked" /> <span class="Conteudo">Boleto Banc&aacute;rio</span> <input type="radio" name="Pagamento" id="Pagamento" value="Transferencia" /> <span class="Conteudo">Transf&ecirc;rencia Banc&aacute;ria</span></td> </tr> <tr> <td align="right"><font size="-1" face="Verdana,Arial" class="Conteudo">Coment&aacute;rio:</font></td> <td><p> <label> <textarea name="Comentario" cols="48" rows="5" id="Comentario"></textarea> </label> </p></td> </tr> </table> <div align="center"><br> <input type="submit" name="Submit" value="Enviar Pedido"> <INPUT TYPE="reset" VALUE="Limpar"> <br /> <br> <input name="recipient" type="hidden" id="recipient" value="vendas@marciaspassapan.com.br"> <input name="subject" type="hidden" id="subject" value="Pedido Web Site"> <input name="redirect" type="hidden" id="redirect" value="http://www.marciaspassapan.com.br/br/contato/obrigado.html"> <input name="required" type="hidden" id="required" value="Nome,Endereco,Numero,Cidade,Estado,CEP,DDD,Telefone,Email,Confirmar_Email,Pagamento"> </div> </form> E esse forma tem o get formmail.asp, que é este aqui: <%@ Language = vbscript%> <%option explicit %> <%server.scripttimeout = 600 %> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <% '------------------------------------------- FORMMAIL V1.3 ------------------------------------------ '---------------------------------------------------------------------------------------------------- 'copyright information '---------------------------------------------------------------------------------------------------- 'Copyright 2002: Sorted Sites http://www.sortedsites.com 'Authors Jonas Tornqvist, David Parkes and Karl Snares 'This script is Freeware, which means you are free to use and modify 'the script for your own use. 'The only condition is this copyright header remain intact and you don't 'try and sell this script for profit without first asking us. 'And of course also ask Matt Wright who wrote the original perl version of Formmail. '---------------------------------------------------------------------------------------------------- 'license agreement - Important '---------------------------------------------------------------------------------------------------- 'By using this script you agree to indeminfy the developers - Sorted Sites of any loss 'or damages that may arise from its use or missue. 'This script is provided as is with all faults - no warranties and no guarantees. 'basically its free - use it at your own risk and cost. 'No warranties and no tech support - if you need help with this don't ask us! 'The documentation is provided as is with all the help we can offer. 'As we develop this script we shall post updates hopefully fix any bugs 'We are not obliged to release any future versions and we might not bother... 'By using this script you accept this license agreement! '---------------------------------------------------------------------------------------------------- 'documentation v1.3 '---------------------------------------------------------------------------------------------------- '#################################################################################################### 'this is where the code starts for real '#################################################################################################### '---------------------------------------------------------------------------------------------------- 'declare variables '---------------------------------------------------------------------------------------------------- Dim strFrom, strTo, strSubject, strBody Dim objMessage, objConfig, strServer, intPort Dim recipient, redirect, subject, nome, email, required, strEmail1, strEmail2 Dim referer, url, url_verified, icounter, query, iloop, query2, query3, i, agree, validation, error0, error0ok, strform '############################## CONFIGURATION VARIABLES #################################### 'These are the only lines you will need to change '---------------------------------------------------------------------------------------------------- strServer = "mail.marciaspassapan.com.br" 'set which smtp server will be used to send the email. enter ip address or domain name. eg: "xxx.xxx.xxx.xxx" or "smtp.your-domain.com" intPort = 25 'set the smtp port to be used when sending mail (by default port 25 is used) 'Referrer's Array is defined here. Enter the valid domains which may use this script. url = Array("www.marciaspassapan.com.br","marciaspassapan.com.br")'Set which urls that will be accepted. http://xxxxx/ 'Seperate multiple domains by commas 'eg: url= Array("www.your-domain.com","your-domain.com","www.my-domain.com") 'computer names can be used instead of domains if this script is being run locally 'eg: url = Array("computername") '######################################### IMPORTANT NOTICE ######################################### 'IMPORTANT: do not modify anything below this line unless you know what you are doing!! '######################################### IMPORTANT NOTICE ######################################### '---------------------------------------------------------------------------------------------------- 'information type and CDOSYS constants '---------------------------------------------------------------------------------------------------- %> <!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Library" --> <!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4" NAME="ADODB Type Library" --> <% '---------------------------------------------------------------------------------------------------- 'retrieved default fields '---------------------------------------------------------------------------------------------------- recipient = request("recipient") redirect = request("redirect") subject = request("subject") email = request("email") required = request("required") if required = "" then required = "recipient,subject,email,redirect" else required = "recipient,subject,email,redirect," & required end if '---------------------------------------------------------------------------------------------------- 'verify the referer '---------------------------------------------------------------------------------------------------- referer = request.ServerVariables("HTTP_REFERER") referer = split(referer,"/") url_verified = "no" for icounter = Lbound(url) to Ubound(url) ' if referer(2) = url(icounter) then url_verified = "yes" end if next if not url_verified = "yes" then response.write("The url specified is invalid!") response.End end if '---------------------------------------------------------------------------------------------------- 'verify the recipient(not tested) '---------------------------------------------------------------------------------------------------- 'trimed_referer = split(referer(2),".")' 'response.write recipient & "<br>" & referer(2) & "=" & trimed_referer(0) & "<br>" 'if trimed_referer(0) = "www" then ' if InStr(1,recipient,trimed_referer(1),1) = 0 then ' response.write "recipient don't match the referer" ' response.end ' end if 'else ' if InStr(1,recipient,trimed_referer(0),1) = 0 then ' response.write "recipient don't match the referer" ' response.end ' end if 'end if '---------------------------------------------------------------------------------------------------- 'retrieve form contents and create email fields '---------------------------------------------------------------------------------------------------- query = Request.ServerVariables("QUERY_STRING") query = split(query,"&") query3 = split(required,",") For iLoop = Lbound(query) to UBound(query) query2 = split(query(iloop),"=") '---------------------------------------------------------------------------------------------------- 'form validation, checks required fields are not null '---------------------------------------------------------------------------------------------------- for i = LBound(query3) to UBound(query3) if query3(i) = query2(0) then if query2(1) = "" then response.write ("Clique no botão voltar do seu navegador, e preencha os seguintes dados corretamente: ") & query2(0) response.end end if end if 'if query2(0) = "agree" then 'if query2(1) <> "on" or query2(1) = "" then ' response.write("You must agree to terms and conditions to enable Formmailv1.3 to execute!") 'response.end 'end if 'end if '---------------------------------------------------------------------------------------------------- 'form validation, checks a valid email address has been specified '---------------------------------------------------------------------------------------------------- if query2(0) = "email" then trim(query2(0)) if len(query2(1))<8 then response.Write("Você deve entrar com os seguintes dados válidos: ") & query2(0) response.end end if if instr(query2(1),"@")=0 and instr(query2(1),".")=0 then response.write query2(1) response.Write("Clique no botão voltar do seu navegador, e preencha os seguintes dados corretamente: ") & query2(0) response.end end if strEmail1 = split(query2(1),"@") if len(strEmail1(1))<3 then response.Write("Clique no botão voltar do seu navegador, e preencha os seguintes dados corretamente: ") & query2(0) response.end end if strEmail2 = split(strEmail1(1),".") if len(strEmail2(0))<3 then response.Write("Clique no botão voltar do seu navegador, e preencha os seguintes dados corretamente: ") & query2(0) response.end end if if len(strEmail2(1))<2 then response.Write("Clique no botão voltar do seu navegador, e preencha os seguintes dados corretamente: ") & query2(0) response.end end if end if '---------------------------------------------------------------------------------------------------- 'form validation, checks terms and conditions checkbox has been ticked '---------------------------------------------------------------------------------------------------- Next if not query2(0) = "recipient" and not query2(0) = "redirect" and not query2(0) = "subject" and not query2(0) = "Name" and not query2(0) = "email" and not query2(0) = "required" and not query2(0) = "agree" then strBody = strBody & vbnewline & vbnewline & query2(0) &": " & query2(1) end if Next if email = "" then email = "formmail@" & referer(2) end if '---------------------------------------------------------------------------------------------------- 'replaces any special characters parsed through the query string '---------------------------------------------------------------------------------------------------- strbody = replace(strbody, "+"," ") strbody = replace(strbody, "%A1","¡") strbody = replace(strbody, "%A3","£") strbody = replace(strbody, "%A8","¨") strbody = replace(strbody, "%AA","ª") strbody = replace(strbody, "%AC","¬") strbody = replace(strbody, "%B7","·") strbody = replace(strbody, "%BA","º") strbody = replace(strbody, "%BF","¿") strbody = replace(strbody, "%21","!") strbody = replace(strbody, "%23","#") strbody = replace(strbody, "%24","$") strbody = replace(strbody, "%25","%") strbody = replace(strbody, "%26","&") strbody = replace(strbody, "%27","'") strbody = replace(strbody, "%28","(") strbody = replace(strbody, "%29",")") strbody = replace(strbody, "%2B","+") strbody = replace(strbody, "%2C",",") strbody = replace(strbody, "%2D","-") strbody = replace(strbody, "%2E",".") strbody = replace(strbody, "%2F","/") strbody = replace(strbody, "%3A",":") strbody = replace(strbody, "%3B",";") strbody = replace(strbody, "%3C","<") strbody = replace(strbody, "%3D","=") strbody = replace(strbody, "%3E",">") strbody = replace(strbody, "%3F","?") strbody = replace(strbody, "%5B","[") strbody = replace(strbody, "%5C","\") strbody = replace(strbody, "%5D","]") strbody = replace(strbody, "%5E","^") strbody = replace(strbody, "%5F","_") strbody = replace(strbody, "%60","`") strbody = replace(strbody, "%7B","{") strbody = replace(strbody, "%7C","|") strbody = replace(strbody, "%7D","}") strbody = replace(strbody, "%7E","~") strbody = replace(strbody, "%C2","Â") strbody = replace(strbody, "%B4","´") strbody = replace(strbody, "%0D%0A%0D%0A"," ") strbody = replace(strbody, "%B9","¹") strbody = replace(strbody, "%B2","²") strbody = replace(strbody, "%B3","³") strbody = replace(strbody, "%A2","¢") strbody = replace(strbody, "%DA","Ú") strbody = replace(strbody, "%FA","ú") strbody = replace(strbody, "%F9","ù") strbody = replace(strbody, "%D9","Ù") strbody = replace(strbody, "%ED","í") strbody = replace(strbody, "%CD","Í") strbody = replace(strbody, "%CC","Ì") strbody = replace(strbody, "%EC","ì") strbody = replace(strbody, "%F3","ó") strbody = replace(strbody, "%D3","Ó") strbody = replace(strbody, "%E9","é") strbody = replace(strbody, "%C9","É") strbody = replace(strbody, "%C8","È") strbody = replace(strbody, "%E8","è") strbody = replace(strbody, "%D4","Ô") strbody = replace(strbody, "%F4","ô") strbody = replace(strbody, "%CA","Ê") strbody = replace(strbody, "%EA","ê") strbody = replace(strbody, "%E3","ã") strbody = replace(strbody, "%C3","Ã") strbody = replace(strbody, "%E1","á") strbody = replace(strbody, "%C1","Á") strbody = replace(strbody, "%E0","à") strbody = replace(strbody, "%C0","À") strbody = replace(strbody, "%E7","ç") strbody = replace(strbody, "%C7","Ç") strbody = replace(strbody, "%E2","â") strbody = replace(strbody, "%C7","Ç") '---------------------------------------------------------------------------------------------------- 'this creates the body of the mail message, the text in quotes can be modified accordingly '--------------------------------------------------------------------------------------------------- strBody = "Enviaram um Contato pelo Site " & referer(2) & vbnewline & vbnewline & "Email: " & email & strBody '---------------------------------------------------------------------------------------------------- 'checks if a smtp port has been specified, if not it uses the default port 25 '---------------------------------------------------------------------------------------------------- if intport <> 25 then intport = intport else intport = 25 end if '---------------------------------------------------------------------------------------------------- 'send the mail message '---------------------------------------------------------------------------------------------------- set objMessage = CreateObject("CDO.Message") objMessage.To = recipient objMessage.From = email objMessage.Subject = subject objMessage.Sender = email objMessage.Textbody = strBody '---------------------------------------------------------------------------------------------------- 'cdosys configuration setup '---------------------------------------------------------------------------------------------------- set objConfig = CreateObject("CDO.Configuration") objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort objConfig.Fields(cdoSMTPServer) = strServer objConfig.Fields(cdoSMTPServerPort) = intPort objConfig.Fields(cdoSMTPAuthenticate) = cdoAnonymous objConfig.Fields.Update set objMessage.Configuration = objConfig '---------------------------------------------------------------------------------------------------- 'define error handling procedures '---------------------------------------------------------------------------------------------------- On Error Resume Next objMessage.Send If Err.Number = 0 then response.write("Formmail v1.3 processed all operations successfully!") else response.write("Formmail v1.3 detected the following errors:")& "<br>" response.write("error no.: ")&err.number & "<br>" response.write("description: ")&err.description & "<br>" response.end End If On Error Goto 0 '---------------------------------------------------------------------------------------------------- 'send them to the page specified '---------------------------------------------------------------------------------------------------- Response.Redirect redirect '#################################################################################################### 'This is where the code ends '#################################################################################################### %> <!-- That's All Folks --> <!-- Happy Surfing --> <!-- Credits --> <!-- David Parkes - Project Planning --> <!-- Jonas Tornqvist - Lead Programmer version 1--> <!-- Karl Snares - Lead Programmer version 1.2 & 1.3 <!-- Matt Wright - Original Formmail CGI Developer --> O problema é que o formmail só envia os dados dentro das Forms que o cliente digita, porém eu gostaria de puxar os dados do carrinho de compra para o form, para que venha além dos dados do cliente, que venha junto os produtos que ele pediu. Na teoria seria assim: No form.asp (formulario de email) eu puxaria as informações do cart.asp (que é a pagina do carrinho de compras). Teria como eu fazer esse procedimento?? valeu galera. PS: Sei que sou novato, e que estou pegando diversos códigos prontos na internet, mas em asp eu sou muito novato, e estou estudando muito, e com esses códigos prontos eu aprendi já muita coisa e consegui remodelar ele de uma forma para meu uso ;) . De algum lugar eu tenho que começar né???? ;)
×
×
  • Criar Novo...