Ir para conteúdo

POWERED BY:

Arquivado

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

zanelati2002

Alguem pode me r com este codigo

Recommended Posts

Este codigo é de login é a acão signupprocess.asp é gratuito do phinlogin o que eu queri aé mudar os dados em ingles dele a fonte colocar um stiles so que quando eu mudo ele da pau sera que estou alterrando algo e também fiz um sistema de mensagem de agradecimento depois do cadastro para o usuarios mais não esta mandando para o email do cadstro me ajude algume segue o codigo.

 

<%Option ExplicitDim sql, rsUser, username, password, passwordconfirm, firstname, surname, email, dob, ---, notfilled(7), badflag, count, passwordLength, calltype, icon, starsign, dobmonth, dobday, sendemail'Assign form values to variablesusername = Request.Form("username")'Make sure they've not put any quotation marks in their usernameIf InStr(username,chr(34)) <> 0 or InStr(username,chr(39)) <> 0 thenerrorfunction("invalidchars")end iffirstname = Request.Form("firstname")surname = Request.Form("surname")email = Request.Form("email")--- = Request.Form("---")password = Request.Form("password")passwordconfirm = Request.Form("passwordconfirm")dob = Request.Form("birth_day") & "/" & Request.Form("birth_month") & "/" & Request.Form("birth_year")icon = Request.Form("icon")'Only way to set a variable from a checkbox:if Request.Form("sendemail") = "on" then sendemail = True else sendemail = False end if'Check everything's been filled in, badflag determines whether error function is calledbadflag = 0'nofilled() is an array that will store the fields which are not filled inif firstname = "" thennotfilled(0) = "First Name"badflag = 1end ifif surname = "" thennotfilled(1) = "Surname"badflag = 1end ifif email = "" thennotfilled(2) = "Email"badflag = 1end ifif username = "" thennotfilled(3) = "Username"badflag = 1end ifif password = "" thennotfilled(4) = "Password"badflag = 1end ifif --- = "" thennotfilled(5) = "---"badflag = 1end ifif IsDate(dob) = "False" thennotfilled(6) = "Date of Birth"badflag = 1end ifif icon = "" thennotfilled(7) = "Your choice of icon"badflag = 1end ifif badflag = 1 thensignuperror()end if'Check password length is between 5 and 15 characters longpasswordLength = Len(password)if passwordLength < 5 or passwordLength > 15 thenerrorfunction("length")end if'Check password and confirmed password are the sameif password <> passwordconfirm thenerrorfunction("confirm")end if'Open connection and insert user details into the database%><!--#include file="conn.asp"--><%'For a bit of profiling fun, get their star signgetstarsign()'Then add it to the database. It's in a seperate function because we need to error trap to see if there's been a duplicate entry. It's not good form to have On Error Resume Next throughout your whole pageUserUpdate()Function UserUpdate()On Error Resume NextSet rsUser = Server.CreateObject("ADODB.Recordset")rsUser.open "users", conn, 3, 3rsUser.AddNewrsUser("username") = usernamersUser("password") = passwordrsUser("firstname") = firstnamersUser("surname") = surnamersUser("email") = emailrsUser("dob") = dobrsUser("starsign") = starsignrsUser("---") = sexrsUser("icon") = iconrsUser("sendemail") = sendemailrsUser.Updateif Err.Number = -2147217887 thenErr.clearerrorfunction("badusername")else'Set username cookie to sign them in nowResponse.Cookies("username") = username'ENVIA E-MAIL DE AGRADECIMENTO BY SITE DO ZANELATIcorpomsg = "<html><center>Obrigado por cadastrar no <a href='http://www.libihost.net/sitedozanelati/index.asp'>Site do Zanelati</a><br><br>Seu login é: "&username&"<br>Sua senha é:"&password&"<br>OBRIGADO!</html>"                  Set meuMail = CreateObject("CDONTS.NewMail") Mail.FromName = firstname Mail.From = email Mail.AddRecipient "sitedozanelati@ig.com.br " , "Ricardo" Mail.subject = "Cadastro no Site do Zanelati" Mail.Body = corpomsgMail.Send Set Mail = Nothing%><html><head><title>Philweb - Free ASP Applications</title></head><body bgcolor="#FFFFFF" link="#DD0000" vlink="#DD0000" alink="#000000"><font face="Verdana" size=2> <p><b>Obrigado por se cadastrar <%=firstname%>  <%=surname%> </b></p> <p><b>Você agora possui um nome de usuário <%=username%> e está  logado!</b></p> <p><a href=""></a><p> </font> </td></tr></table></body></html><%rsUser.closeset rsUser = nothingconn.closeset conn = nothing%><%end ifEnd Function%><%Function getstarsign()dobmonth = Request.Form("birth_month")dobday = Request.Form("birth_day")Select Case dobmonthCase 1 if dobday < 21 then  starsign = "Capricorn" else  starsign = "Aquarius" end ifCase 2 if dobday < 20 then  starsign = "Aquarius" else  starsign = "Pisces" end ifCase 3 if dobday < 21 then  starsign = "Pisces" else  starsign = "Aries" end ifCase 4 if dobday < 21 then  starsign = "Aries" else  starsign = "Taurus" end ifCase 5 if dobday < 22 then  starsign = "Taurus" else  starsign = "Gemini" end ifCase 6 if dobday < 22 then  starsign = "Gemini" else  starsign = "Cancer" end ifCase 7 if dobday < 24 then  starsign = "Cancer" else  starsign = "Leo" end ifCase 8 if dobday < 24 then  starsign = "Leo" else  starsign = "Virgo" end ifCase 9 if dobday < 24 then  starsign = "Virgo" else  starsign = "Libra" end ifCase 10 if dobday < 24 then  starsign = "Libra" else  starsign = "Scorpio" end ifCase 11 if dobday < 23 then  starsign = "Scorpio" else  starsign = "Sagittarius" end ifCase 12 if dobday < 22 then  starsign = "Sagittarius" else  starsign = "Capricorn" end ifEnd SelectEnd Function%><%Function signuperror()%><html><head><title>Philweb - Free ASP Applications</title></head><body bgcolor="#FFFFFF" link="#DD0000" vlink="#DD0000" alink="#000000"><font face="Verdana" size=2><p><b>You have not filled in the following fields correctly:</b></p><%for count = 0 to 7%><%if notfilled(count) <> "" then%><b><%=notfilled(count)%></b><br><%end if%><%next%><p><a href="javascript:self.history.go(-1)">Please try again</a></p></font></table></body></html><%Response.endEnd Function%><%Function errorfunction(calltype)%><html><head><title>Philweb - Free ASP Applications</title></head><body bgcolor="#FFFFFF" link="#DD0000" vlink="#DD0000" alink="#000000"><font face="Verdana" size=2><%if calltype = "confirm" then%><p><b>Your password and confirmed password were not the same</b></p><p><a href="javascript:self.history.go(-1)">Please try again</a></p></font></body></html><%Response.end%><%elseif calltype = "length" then%><p><b>Your password is not between 5 and 15 characters long</b></p><p><a href="javascript:self.history.go(-1)">Please try again</a></p></font></body></html><%Response.end%><%elseif calltype = "badusername" then%><p><b>Sorry, the username "<%=username%>" already exists.</b></p><p><a href="javascript:self.history.go(-1)">Please try again</a></p></font></body></html><%rsUser.closeset rsUser = nothingconn.closeset conn = nothingResponse.end%><%elseif calltype = "invalidchars" then%><p><b>Sorry, your username cannot contain any quotation marks.</b></p><p><a href="javascript:self.history.go(-1)">Please try again</a></p></font></body></html><%Response.end%><%end ifEnd Function%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Qual erro está dando?

 

Ah e ninguém está aqui para mudar scripts qd alguém pede, e sim para ajudar a resolver/encontrar problemas. Ok?

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.