<% %> <% 'Chama dados do formulario strEmail = request.form("email") strEmaila = request.form("emailantigo") strNome = request.form("nomecompleto") strNascdia = request.form("nascdia") strNascmes = request.form("nascmes") strNascano = request.form("nascano") strCpf = request.form("cpf") strRg = request.form("rg") strEndereco = request.form("endereco") strBairro = request.form("bairro") strCidade = request.form("cidade") strEstado = request.form("estado") strOutropais = request.form("outropais") strCep = request.form("cepzz") strPais = request.form("pais") strFone = request.form("fone") strContato = request.form("contato") 'Tira letras do campo CPF/CNPJ strCpf = SoNumeros(strCPF) 'Tira letras do campo CEP strCep = SoNumeros(strCep) strFone = SoNumeros(strFone) 'Tira letras do campo RG/Inscricao if Ucase(strRG)<>"ISENTO" then strRg = SoNumeros(strRg) End if if strOutropais = "Sim" then strEstado = "-" strCep = "-" end if 'Faz validação do CPF e CNPJ bValido = ValidaCPF_CNPJ(strCPF,len(strCPF)) 'Verifica se o formulario está preenchido if strNome = "" OR strNascdia = "" OR strNascano = "" OR strNascmes = "" OR strRg = "" OR strEndereco = "" OR strBairro = "" OR strCidade = "" OR strCep = "" OR strFone = "" OR strCpf = "" OR bValido = "falso" then 'Valida e retorna o CPF para loja processar ElCpf = request.form("cpf") if bValido = "falso" then strCpf = ElCpf end if ElCPF = SoNumeros(ElCPF) if ElCpf = "" then erro4 = " - " & strLg141 & "" end if bValido = ValidaCPF_CNPJ(ElCPF,len(ElCPF)) if bValido="falso" then erro4 = " - " & strLg143 & "" end if 'Verifica se a pessoa escolheu ou não outro pais if strOutropais = "Sim" then strEstado = "-" strCep = "-" else if strCep = "" then erro9 = "- " & strLg141 & "" else if isnumeric(strCep) = false then erro9 = "- " & strLg144 & "" else erro9 = "" end if end if end if 'Verifica se o email já existe na base de dados Set dados = abredb.Execute("SELECT * FROM clientes WHERE email='"&Cripto(strEmail,true)&"';") if dados.EOF then strEmail = strEmail else if strEmail = strEmaila then strEmail = strEmail else strEmail = "sim@." end if end if dados.close set dados = nothing 'Verifica o telefone if strFone = "" then erro10 = "- " & strLg141 & "" else if isnumeric(strFone) = false then erro10 = "- " & strLg144 & "" else erro10 = "" end if end if 'Verifica o estado if strEstado = "" then strEstado = "-" end if 'Verifica o endereco if strCidade = "" then erro8 = "- " & strLg141 & "" else erro8 = "" end if if strBairro = "" then erro7 = "- " & strLg141 & "" else erro7 = "" end if if strEndereco = "" then erro6 = "- " & strLg141 & "" else erro6 = "" end if 'Verifica o RG if strRg = "" then erro5 = "- " & strLg141 & "" else if isnumeric(strRG) = false then erro5 = "- " & strLg144 & "" else erro5 = "" end if end if 'Verifica os dados pessoais if strNascdia = "" OR strNascmes = "" OR strNascano = "" then erro3 = "- " & strLg141 & "" else if strNascano < "1890" OR strNascano > "2002" then erro3 = "- " & strLg144 & "" else erro3 = "" end if end if if strEmail = "" OR instr(strEmail, "@") = 0 Or instr(strEmail, ".") = 0 then erro = "- " & strLg144 & "" end if if strEmail = "sim@." then erro = "- " & strLg145 & "" strEmail = "" end if if strNome = "" then erro2 = "- " & strLg141 & "" else erro2 = "" end if%>
<%=strLg4%> » <%=strLg9%>

>
<%=strLg104%>
<%=strLg105%>
<%else if strEstado = "" then else%> <%end if%> ;font-size:11px;color:#000000;> Outro País <%end if%>
;font-size:11px;color:#000000;>
<%=strLg106%>
>
;font-size:11px;color:#000000;><%=strLg108%>
;font-size:11px;color:#000000;><%=strEmaila%>   /imagens/mod_es.gif border=0>
;font-size:11px;color:#000000;>
<%=strLg107%>
>
;font-size:11px;color:#000000;><%=strLg118%> ;font-size:11px;color:#000000; value="<%=strNome%>"> <%=erro2%>
;font-size:11px;color:#000000;><%=strLg117%> // <%=erro3%>
;font-size:11px;color:#000000;><%=strLg116%>;font-size:11px;color:#000000; value="<%=strCpf%>"> <%=erro4%>
;font-size:11px;color:#000000;><%=strLg115%>;font-size:11px;color:#000000; value="<%=strRg%>"> <%=erro5%>
;font-size:11px;color:#000000;><%=strLg114%>;font-size:11px;color:#000000; value="<%=strEndereco%>"> <%=erro6%>
;font-size:11px;color:#000000;><%=strLg113%>;font-size:11px;color:#000000; value="<%=strBairro%>"> <%=erro7%>
;font-size:11px;color:#000000;><%=strLg112%>;font-size:11px;color:#000000; value="<%=strCidade%>"> <%=erro8%>
;font-size:11px;color:#000000;><%=strLg111%>;font-size:11px;color:#000000;> Outro País
;font-size:11px;color:#000000;>CEP:;font-size:11px;color:#000000; value="">
;font-size:11px;color:#000000;>País:
;font-size:11px;color:#000000;>CEP:;font-size:11px;color:#000000; value="<%= strCep %>"><%= erro9 %>
;font-size:11px;color:#000000;>País:
;font-size:11px;color:#000000;><%=strLg109%>;font-size:11px;color:#000000; value="<%=strFone%>"> ;font-size:9px;color:#000000;><%=erro10%>
;font-size:11px;color:#000000;><%=strLg291%>*;font-size:11px;color:#000000; value="<%=strContato%>" maxlength="50"> ;font-size:9px;color:#000000;>
>
/imagens/atualiza.gif onMouseOut="window.status='';return true;" onMouseOver="window.status='<%=strLg66%>';return true;">
<%else 'Transformas os mês em numeros if strNascmes = "Jan" then strNascmes = "01" end if if strNascmes = "Fev" then strNascmes = "02" end if if strNascmes = "Mar" then strNascmes = "03" end if if strNascmes = "Abr" then strNascmes = "04" end if if strNascmes = "Mai" then strNascmes = "05" end if if strNascmes = "Jun" then strNascmes = "06" end if if strNascmes = "Jul" then strNascmes = "07" end if if strNascmes = "Ago" then strNascmes = "08" end if if strNascmes = "Set" then strNascmes = "09" end if if strNascmes = "Out" then strNascmes = "10" end if if strNascmes = "Nov" then strNascmes = "11" end if if strNascmes = "Dez" then strNascmes = "12" end if if strPais = "" then strPais = "Brasil" end if 'Atualiza os dados do cliente set atualiza = abredb.Execute("update clientes set nome = '" & Cripto(strNome,true) & "', endereco='" & Cripto(strEndereco,true) & "', tel = '" & Cripto(strFone,true) & "', cep = '" & Cripto(strCep,true) & "', nascimento = '" & Cripto(strNascdia&"/"&strNascmes&"/"&strNascano,true) & "', rg='" & Cripto(strRg,true) & "', " &_ "cpf='"&Cripto(strCpf,true)&"', contato='" & Cripto(strContato,true) & "', estado='"&Cripto(strEstado,true)&"', cidade='"&Cripto(strCidade,true)&"', " &_ "bairro='"&Cripto(strBairro,true)&"', pais='"&Cripto(strPais,true)&"' WHERE email='"&Cripto(strEmaila,true)&"';") %>
<%=strLg4%> » <%=strLg149%>

>

<%=strLg150%>

<%=strLg151%>


>
<%end if%>