Create Your Personal Account
Business Owners Click Here
<%
'Uses ...
'Session("NewMbrPhoneID")
'Session("NewMbrAcctID")
'Session("NewMbrIID")
'Session("NewMbrRefIID")
'Session("NewMbrRefUID")
'Session("NewMbrRefAcctID")
'Session("NewMbrRefDate")
'Session("NewMbrRefName")
'Session("NewMbrPIN")
'Session("NewMbrAttempts")
'Stages ...
' - Known registered account, redirect to login
' - Existing SaverKey Phone/Account, get/set PIN and Register
' - Show Member Sales/Connector options
if Session("LoggedIn") then
if Session("UserTypeBiz") then
Response.Redirect "/Full/Biz"
else
Response.Redirect "/Full/Index"
end if
end if
Dim cn, rs, qry, NewPIN, RefIID, RefUID, RefAcctID, RefDate
Dim ValidReferral
Const MaxAttempts = 30
ValidReferral = False
VIPGlobalLIfetime = 695
MbrBonusPoints = 500
RefBasePoints = 250
PhoneID = 0
NewPIN = False
if Session("NewMbrAttempts") = "" then
Session("NewMbrAttempts") = 0
Session("NewMbrRefIID") = 0
Session("NewMbrRefUID") = 0
Session("NewMbrRefAcctID") = 0
Session("NewMbrRefDate") = ""
Session("NewMbrRefName") = ""
end if
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open Application("SaverKeyDB")
'debug("RegistrationForm=" & Request.Form("RegistrationForm"))
'--- Get Form data and process
if Request.Form("GetMobilePhone") = "ValidatePromoCode" then
MACode = CLng(Request.Form("ACode"))
RefCode = Trim(Request.Form("RefCode"))
MPhone = FormatPhone(Request.Form("Phone"))
tmpPhoneID = MakePhoneID2(MAcode&MPhone)
call GetReferral(tmpPhoneID, RefCode, RefIID, RefUID, RefAcctID, RefDate, RefName)
if RefUID > 0 then ValidReferral = True
end if
if Request.Form("GetMobilePhone") = "True" then
MACode = CLng(Request.Form("ACode"))
PromoCode = Trim(Request.Form("RefCode"))
MPhone = FormatPhone(Request.Form("Phone"))
FormattedPhone = "(" & MACode & ") " & MPhone
'debug("RefCode="&RefCode&" FormattedPhone="&FormattedPhone&", PhoneID=" & PhoneID)
if MACode > 100 AND MACode < 999 AND Len(MPhone) = 8 then
Session("NewMbrPhoneID") = MakePhoneID2(MAcode&MPhone)
'Before we even worry about referral codes, we need to check if this user has an existing account.
'Do lookup for user.
qry = "EXEC GetUserByPhoneID '" & Session("NewMbrPhoneID") & "'"
set rs = cn.Execute(qry)
'debug("Username="&rs("username"))
'debug("RefIID=" & RefIID)
if rs("username")&"" <> "" then
'This is NOT a login page. This is only to CREATE a new account.
' If a username exists, have them login at the top of the page.
call ShowNotice (True, False, FormattedPhone & " is already associated with a user account. Please login at the top of the page.")
else
'Get known parameters for this phone number. Note that there isn't a uid or they would have been redirected to login
Session("NewMbrIID") = rs("IID")
Session("NewMbrAcctID") = rs("AcctID")
Session("NewMbrPIN") = rs("PIN")&""
set rs = Nothing
'--- Determine Referral from "Promo Code" and PhoneID. Note that UID is 0 if here so self-referrals are not possible.
'--- Note that referrals are determined at the time of the FIRST LEGITIMATE referral, thus the date.
call GetReferral(Session("NewMbrPhoneID"), PromoCode, RefIID, RefUID, RefAcctID, RefDate, RefName)
'Unfortunately, you cannot pass session variables as sub parameters and let it update them.
Session("NewMbrRefIID") = RefIID
Session("NewMbrRefUID") = RefUID
Session("NewMbrRefAcctID") = RefAcctID
Session("NewMbrRefDate") = RefDate
Session("NewMbrRefName") = RefName
'--- End of Referral Code
'--- If PIN is empty, create a new 4 digit PIN
if Len(Session("NewMbrPIN")) <> 4 then
NewPIN = True
Session("NewMbrPIN") = GetRandom2(8999) + 1000
end if
'--- Record a visit to SaverKey and setup the initial relationship(s)
qry = "EXEC GetUserStats_v6 " & Application("SKBizAcctID") & "," & Application("SKMemberID") & ",0,0,''," & TextToDB(Session("NewMbrPhoneID")) & ",0,0,1," & TextToDB(FormattedPhone) & ",Null,'Y','Y','M','Y',0,0"
set rs = cn.Execute(qry)
if NOT rs.EOF then
'debug("results returned AcctID="&rs2("AcctID"))
if rs("AcctID") > 0 then
Session("NewMbrIID") = rs("IID")
Session("NewMbrAcctID") = rs("AcctID")
set rs = Nothing
'--- One way or another, the AcctID should be set now. Update the PIN code if Applicable.
if NewPIN then
qry = "UPDATE Accounts SET PIN=" & TextToDB(Session("NewMbrPIN")) & " WHERE AcctID=" & Session("NewMbrAcctID")
'debug(qry)
cn.Execute(qry)
end if
'--- Send a text message including the PIN code.
if SendTextMessage(Application("SKBizAcctID"),Application("SKMemberID"),PhoneID,Session("NewMbrAcctID"),0,"",1,"Welcome to SaverKey.com. Your Account PIN is " & Session("NewMbrPIN") & " (You may wish to delete this message for your security).") > 0 then
call ShowNotice(True,False,"You have been sent a welcome/disclaimer and PIN Code text message to " & FormattedPhone & ". Please enter your PIN below to confirm your identity. If the number is incorrect, please go back to the previous page.")
%>
<%
else
call ShowNotice(True,False,"Please check your phone number as we could not send a text message to this device.")
end if
else
call ShowNotice(True,False,"Please check your phone number as we could not send a text message to this device.")
end if
else
call ShowNotice(True,False,"Please check your phone number as we could not send a text message to this device.")
end if
end if
else
call ShowNotice(False,False,"Invalid Phone")
end if
elseif Request.Form("GetPIN") = "True" then
PINCode = Trim(Request.Form("PINCode"))
NewPINCode = Trim(Request.Form("NewPINCode"))
'debug("PINCode="&PINCode&" NewPINCode="&NewPINCode&" SPINCode="&Session("NewMbrPIN"))
Session("NewMbrAttempts") = Session("NewMbrAttempts") + 1
if Session("NewMbrAttempts") > MaxAttempts then
call ShowNotice(True,False,"You have exceeded three attempts to validate this mobile phone number. Please try again later.")
elseif PINCode&"" = Session("NewMbrPIN")&"" then
'Phone Number Validated.
if NewPINCode <> "" then
'debug("NPC <>")
NewPINCode = CLng(NewPINCode)
'debug("NPC Numeric="&NewPINCode)
if NewPINCode >= 1000 AND NewPINCode < 10000 then
qry = "UPDATE Accounts SET PIN=" & TextToDB(NewPINCode) & " WHERE AcctID=" & Session("NewMbrAcctID")
'debug(qry)
cn.Execute(qry)
end if
end if
%>
PIN Validated ... Complete the form below to create your FREE SaverKey Membership!
Your Birthday is used for the SaverKey Birthday Club for special gifts.
<% Set rc = New RegisterClass rc.RegisterPage = "/Full/CreateAccountMbr" 'Set the page for the full registration process. rc.SuccessPage = "/Full/GetVIP" 'Set the page after the registration/confirmation is complete. rc.FormType = "P" '(F)ull or (C)oupon or (P)ersonal only or (B)usiness only rc.UseNewCSSModule = True rc.GetSaverKey = False 'Set to False to bypass SaverKey ID request. rc.BypassConfirmation = True rc.iid = Session("NewMbrIID") rc.AcctID = Session("NewMbrAcctID") rc.RefIID = Session("NewMbrRefIID") rc.RefUID = Session("NewMbrRefUID") rc.RefAcctID = Session("NewMbrRefAcctID") rc.RefName = Session("NewMbrRefName") rc.RefDate = Session("NewMbrRefDate") rc.Register() 'Start the process. else call ShowNotice(True,False,"The PIN Code you entered does not match our records. You have " & MaxAttempts-Session("NewMbrAttempts") & " more attempts.") %> <% end if elseif Request.Form("RegistrationForm") = "True" then Set rc = New RegisterClass rc.RegisterPage = "/Full/CreateAccountMbr" 'Set the page for the full registration process. rc.SuccessPage = "/Full/GetVIP" 'Set the page after the registration/confirmation is complete. rc.FormType = "P" '(F)ull or (C)oupon or (P)ersonal only or (B)usiness only rc.UseNewCSSModule = True rc.GetSaverKey = False 'Set to False to bypass SaverKey ID request. rc.BypassConfirmation = True rc.iid = Session("NewMbrIID") rc.AcctID = Session("NewMbrAcctID") rc.RefIID = Session("NewMbrRefIID") rc.RefUID = Session("NewMbrRefUID") rc.RefAcctID = Session("NewMbrRefAcctID") rc.RefDate = Session("NewMbrRefDate") rc.RefName = Session("NewMbrRefName") rc.Register() 'Start the process. else %>Your account information is protected with SaverKey Privacy Controls™!
You will use your Mobile Phone Number as the primary method to check-in at SaverKey Terminals and earn points at your favorite merchants for several reasons.
- You'll never forget your mobile phone number.
- Certain information can be texted to you (with your permission, of course).
- It is unique number that is specifically assigned to you.
- We can simplify check-in procedures by asking for 10 digits.
- You may have already used it to check-in at a SaverKey Merchant and we want to make sure those check-ins are linked to this account.
- You can always reply STOP after any approved merchant communication to stop them from sending further messages.
Your Mobile Number is safe! While we use it as a check-in identifier, it is not visible to any SaverKey Merchant. You will have the ability to set your own Privacy Settings through the SaverKey Privacy Controls page.
<% end if %>