%
Dim bolCreateAccountContinue
Dim strCreateAccountMsg
bolCreateAccountContinue = True
strCreateAccountMsg = ""
If LCase(request("action")) = "process" then
'Test our Submitted Data
if request("gender") = "" then
strCreateAccountMsg = strCreateAccountMsg & "PLEASE PROVIDE YOUR GENDER
"
bolCreateAccountContinue = False
end if
if request("firstname") = "" then
strCreateAccountMsg = strCreateAccountMsg & "PLEASE PROVIDE YOUR FIRST NAME
"
bolCreateAccountContinue = False
else
if CInt(Len(request("firstname"))) < CInt(Application("ENTRY_FIRST_NAME_MIN_LENGTH")) then
strCreateAccountMsg = strCreateAccountMsg & "Firstname must be at least " & Application("ENTRY_FIRST_NAME_MIN_LENGTH") & " characters
"
bolCreateAccountContinue = False
end if
end if
if request("lastname") = "" then
strCreateAccountMsg = strCreateAccountMsg & "PLEASE PROVIDE YOUR LAST NAME
"
bolCreateAccountContinue = False
else
if CInt(Len(request("lastname"))) < CInt(Application("ENTRY_LAST_NAME_MIN_LENGTH")) then
strCreateAccountMsg = strCreateAccountMsg & "Lastname must be at least " & Application("ENTRY_LAST_NAME_MIN_LENGTH") & " characters
"
bolCreateAccountContinue = False
end if
end if
if request("dob") = "" then
strCreateAccountMsg = strCreateAccountMsg & "PLEASE PROVIDE YOUR DATE OF BIRTH
"
bolCreateAccountContinue = False
else
if IsDate(request("dob")) = False then
strCreateAccountMsg = strCreateAccountMsg & "PLEASE CHECK YOUR DATE OF BIRTH
"
bolCreateAccountContinue = False
end if
end if
if request("email_address") = "" then
strCreateAccountMsg = strCreateAccountMsg & "PLEASE PROVIDE YOUR EMAIL ADDRESS
"
bolCreateAccountContinue = False
else
if CInt(Len(request("email_address"))) < CInt(Application("ENTRY_EMAIL_ADDRESS_MIN_LENGTH")) then
strCreateAccountMsg = strCreateAccountMsg & "Email Address must be at least " & Application("ENTRY_EMAIL_ADDRESS_MIN_LENGTH") & " characters
"
bolCreateAccountContinue = False
end if
end if
if request("company") <> "" then
if CInt(Len(request("company"))) < CInt(Application("ENTRY_COMPANY_MIN_LENGTH")) then
strCreateAccountMsg = strCreateAccountMsg & "Company must be at least " & Application("ENTRY_COMPANY_MIN_LENGTH") & " characters
"
bolCreateAccountContinue = False
end if
end if
if request("street_address") = "" then
strCreateAccountMsg = strCreateAccountMsg & "PLEASE PROVIDE YOUR STREET ADDRESS
"
bolCreateAccountContinue = False
else
if CInt(Len(request("street_address"))) < CInt(Application("ENTRY_STREET_ADDRESS_MIN_LENGTH")) then
strCreateAccountMsg = strCreateAccountMsg & "Street Address must be at least " & Application("ENTRY_STREET_ADDRESS_MIN_LENGTH") & " characters
"
bolCreateAccountContinue = False
end if
end if
if request("city") = "" then
strCreateAccountMsg = strCreateAccountMsg & "PLEASE PROVIDE YOUR TOWN OR CITY NAME
"
bolCreateAccountContinue = False
else
if CInt(Len(request("city"))) < CInt(Application("ENTRY_CITY_MIN_LENGTH")) then
strCreateAccountMsg = strCreateAccountMsg & "City must be at least " & Application("ENTRY_CITY_MIN_LENGTH") & " characters
"
bolCreateAccountContinue = False
end if
end if
if request("county") = "" then
strCreateAccountMsg = strCreateAccountMsg & "PLEASE PROVIDE YOUR COUNTY NAME
"
bolCreateAccountContinue = False
else
if CInt(Len(request("county"))) < CInt(Application("ENTRY_COUNTY_MIN_LENGTH")) then
strCreateAccountMsg = strCreateAccountMsg & "county must be at least " & Application("ENTRY_COUNTY_MIN_LENGTH") & " characters
"
bolCreateAccountContinue = False
end if
end if
if request("postcode") = "" then
strCreateAccountMsg = strCreateAccountMsg & "PLEASE PROVIDE YOUR POSTCODE
"
bolCreateAccountContinue = False
else
if CInt(Len(request("postcode"))) < CInt(Application("ENTRY_POSTCODE_MIN_LENGTH")) then
strCreateAccountMsg = strCreateAccountMsg & "Postcode must be at least " & Application("ENTRY_POSTCODE_MIN_LENGTH") & " characters
"
bolCreateAccountContinue = False
end if
end if
if request("country") = "" then
strCreateAccountMsg = strCreateAccountMsg & "PLEASE PROVIDE YOUR UK AREA
"
bolCreateAccountContinue = False
end if
if request("telephone") = "" then
strCreateAccountMsg = strCreateAccountMsg & "PLEASE PROVIDE YOUR TELEPHONE NUMBER
"
bolCreateAccountContinue = False
else
if CInt(Len(request("telephone"))) < CInt(Application("ENTRY_TELEPHONE_MIN_LENGTH")) then
strCreateAccountMsg = strCreateAccountMsg & "Telephone Number must be at least " & Application("ENTRY_TELEPHONE_MIN_LENGTH") & " characters
"
bolCreateAccountContinue = False
end if
end if
if request("password") = "" then
strCreateAccountMsg = strCreateAccountMsg & "PLEASE PROVIDE A PASSWORD
"
bolCreateAccountContinue = False
else
if CInt(Len(request("password"))) < CInt(Application("ENTRY_PASSWORD_MIN_LENGTH")) then
strCreateAccountMsg = strCreateAccountMsg & "Password must be at least " & Application("ENTRY_PASSWORD_MIN_LENGTH") & " characters
"
bolCreateAccountContinue = False
end if
end if
if request("confirmation") = "" then
strCreateAccountMsg = strCreateAccountMsg & "PLEASE CONFIRM YOUR PASSWORD
"
bolCreateAccountContinue = False
end if
if request("password") <> request("confirmation") then
strCreateAccountMsg = strCreateAccountMsg & "Password and Confirmation Password do not match
"
bolCreateAccountContinue = False
end if
if bolCreateAccountContinue = True then
Dim strPasswordHash
Dim intCustomerID
strPasswordHash = ""
strPasswordHash = calcMD5(CStr(request("password")))
sCreateAccount request("gender"), request("firstname"), request("lastname"), request("dob"), request("email_address"), request("company"), request("street_address"), request("suburb"), request("city"), request("county"), request("postcode"), request("country"), request("telephone"), request("fax"), strPasswordHash, intCustomerID
'Log the new user in
if CInt(intCustomerID) <> 0 then
'Force the user through a login
intCustomerID = fLoginUser( request("email_address"), strPasswordHash)
Session("CustomerID") = CInt(intCustomerID)
if Request("accessdenied") <> "" then
response.Redirect(Request("accessdenied"))
else
response.Redirect(fGenerateLink("account.asp"))
end if
else
'Could not create account, email address is probably already on file
strCreateAccountMsg = strCreateAccountMsg & "That email address is already in our system
"
end if
end if
end if
%>
<% strPageTitle = Application("STORE_NAME") & " Account Creation" %>
<% strPageKeywords = Application("STORE_NAME")%>
|
|