'If' esperado
/sitedozanelati/login2/signupprocess3.asp, line 226
End Function
----^
a linha 226 é esta <%
rsUser.close
set rsUser = nothing
conn.close
set conn = nothing
%>
<%
end if
End Function%>
<%
Function getstarsign()
exatamente neste end if
End Function%>
o codigo inteiro é este
<% Option Explicit Dim sql, rsUser, username, password, passwordconfirm, firstname, surname, email, dob, sex, notfilled(7), badflag, count, passwordLength, calltype, icon, starsign, dobmonth, dobday, sendemail 'Assign form values to variables username = Request.Form("username") 'Make sure they've not put any quotation marks in their username If InStr(username,chr(34)) <> 0 or InStr(username,chr(39)) <> 0 then errorfunction("invalidchars") end if firstname = Request.Form("firstname") surname = Request.Form("surname") email = Request.Form("email") sex = Request.Form("sex") 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 called badflag = 0 'nofilled() is an array that will store the fields which are not filled in if firstname = "" then notfilled(0) = "First Name" badflag = 1 end if if surname = "" then notfilled(1) = "Surname" badflag = 1 end if if email = "" then notfilled(2) = "Email" badflag = 1 end if if username = "" then notfilled(3) = "Username" badflag = 1 end if if password = "" then notfilled(4) = "Password" badflag = 1 end if if sex = "" then notfilled(5) = "Sex" badflag = 1 end if if IsDate(dob) = "False" then notfilled(6) = "Date of Birth" badflag = 1 end if if icon = "" then notfilled(7) = "Your choice of icon" badflag = 1 end if if badflag = 1 then signuperror() end if 'Check password length is between 5 and 15 characters long passwordLength = Len(password) if passwordLength < 5 or passwordLength > 15 then errorfunction("length") end if 'Check password and confirmed password are the same if password <> passwordconfirm then errorfunction("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 sign getstarsign() '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 page UserUpdate() Function UserUpdate() On Error Resume Next Set rsUser = Server.CreateObject("ADODB.Recordset") rsUser.open "users", conn, 3, 3 rsUser.AddNew rsUser("username") = username rsUser("password") = password rsUser("firstname") = firstname rsUser("surname") = surname rsUser("email") = email rsUser("dob") = dob rsUser("starsign") = starsign rsUser("sex") = sex rsUser("icon") = icon rsUser("sendemail") = sendemail rsUser.Update if Err.Number = -2147217887 then Err.clear errorfunction("badusername") else 'Set username cookie to sign them in now Response.Cookies("username") = username %> <html> <head> <title>Site do Zanelati</title> </head> <font face="Verdana" size=1> <p align="center"><b>Obrigado por se cadastrar <%=firstname%> <%=surname%> </b></p> <p align="center"><b><%=username%> Agora você é um membro do Site do Zanelati e esta logado no Sistema </b></p> <p> <p> </font> <font face="Verdana" size=1> <p><b>Você esqueceu de preencher os seguintes Dados:</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)">Tente Novamente</a></p> </font> <font face="Verdana" size=1> <%if calltype = "confirm" then%> <p><b>Sua confirmação de Senha Tem que ser igual a sua Senha</b></p> <p><a href="javascript:self.history.go(-1)">Tente Novamente</a></p> </font> <font face="Verdana" size=1> <p><b>Sua senha deve ter entre 5 e 15 caracteres</b></p> <p><a href="javascript:self.history.go(-1)">Tente Novamente</a></p> <p><b>Já temos cadastrado <%=username%> em nosso sistema</b></p> <p><a href="javascript:self.history.go(-1)">Tente Novamente</a></p> <p><b>Seu username não pode conter caracteres especiais</b></p> <p><a href="javascript:self.history.go(-1)">Tente Novamente</a></p> </html> <% rsUser.close set rsUser = nothing conn.close set conn = nothing %> <% end if End Function%> <% Function getstarsign() dobmonth = Request.Form("birth_month") dobday = Request.Form("birth_day") Select Case dobmonth Case 1 if dobday < 21 then starsign = "Capricorn" else starsign = "Aquarius" end if Case 2 if dobday < 20 then starsign = "Aquarius" else starsign = "Pisces" end if Case 3 if dobday < 21 then starsign = "Pisces" else starsign = "Aries" end if Case 4 if dobday < 21 then starsign = "Aries" else starsign = "Taurus" end if Case 5 if dobday < 22 then starsign = "Taurus" else starsign = "Gemini" end if Case 6 if dobday < 22 then starsign = "Gemini" else starsign = "Cancer" end if Case 7 if dobday < 24 then starsign = "Cancer" else starsign = "Leo" end if Case 8 if dobday < 24 then starsign = "Leo" else starsign = "Virgo" end if Case 9 if dobday < 24 then starsign = "Virgo" else starsign = "Libra" end if Case 10 if dobday < 24 then starsign = "Libra" else starsign = "Scorpio" end if Case 11 if dobday < 23 then starsign = "Scorpio" else starsign = "Sagittarius" end if Case 12 if dobday < 22 then starsign = "Sagittarius" else starsign = "Capricorn" end if End Select End Function %> <%Function signuperror()%> <%Response.end End Function%> <%Function errorfunction(calltype)%> <%Response.end%> <%elseif calltype = "length" then%> <%Response.end%> <%elseif calltype = "badusername" then%> <% rsUser.close set rsUser = nothing conn.close set conn = nothing Response.end %> <%elseif calltype = "invalidchars" then%> <%Response.end%> <%end if End Function%>alguem pode me ajudar com isto