<% dim rsLogin, objDb,strSQL,strErr,bShowForm, objMail, agentChecked, assistantChecked bShowForm = 1 if Request("formSubmitted") = 1 then if Request("agentOrAssistant") = "agent" then agentChecked = " checked" assistantChecked = " " else agentChecked = " " assistantChecked = " checked" end if if (Request("notify_whatsnew") = "on") then bWhatsNew = "1" else bWhatsNew = "0" end if set objDb = dbInit("cupcake") ' check if email address exists dim dictUser set dictUser = Server.CreateObject("Scripting.Dictionary") for each key in Request.Form dictUser.Add key, replace(Request(key),"'","''") next dictUser("ssn") = replace(replace(Request("ssn")," ",""),"-","") strSQL = "spUserView 4,'" & dictUser("email_address") & "'" rsUser = objDb.Execute(strSQL) if rsUser("count") < 1 then bShowForm = 0 ' the last number in the SQL string is the default admin privilege level(0) and the default account status(3= requires approval) strSQL = "spUserAdd '" & dictUser("first_name") & "','" & dictUser("last_name") & "','" & dictUser("agency_name") & "','" & dictUser("phone_number") & "','" & dictUser("mail_address") & "','" & dictUser("city") & "','" & dictUser("state") & "','" & dictUser("zip_code") & "','" & dictUser("password") & "','" & dictUser("email_address") & "','3','0','" & bWhatsNew & "','" & dictUser("ssn") & "','0',NULL,'" & dictUser("agentOrAssistant") & "','" & dictUser("agent_name") & "','4'" objDb.Execute(strSQL) ' send email to admin set objMail = Server.CreateObject("CDONTS.NewMail") strBody = "We have received a new login request from " & dictUser("first_name") & " " & dictUser("last_name") & "(" & dictUser("email_address") & ")." &vbcrlf &vbcrlf &_ "Please login to the administrative tools, select User Administration from the menu, select approve from the action menu and any users waiting for approval will be displayed. " objMail.To = EMAIL_APPROVAL_ADMIN objMail.From = EMAIL_APPROVAL_SENDER objMail.Subject = "Bakco.com Website - New Log In Request" objMail.Body = strBody objMail.Send set objMail = nothing 'send email to person who requested login set objMail = Server.CreateObject("CDONTS.NewMail") strBody = "Thank you for submitting your request for access to Baker Associates Agent Resources." &vbcrlf &vbcrlf &_ "Once your account has been reviewed and approved, you will receive an email letting you know that you can now login." &vbcrlf &vbcrlf &_ "Should you have any questions or need additional help, please feel free to call our office at 1-888-899-6599. " &vbcrlf &vbcrlf &_ "Baker Associates " objMail.To = dictUser("email_address") objMail.From = EMAIL_APPROVAL_ADMIN objMail.Subject = "Confirmation of your login request" objMail.Body = strBody objMail.Send set objMail = nothing ' show success page strErr = "" server.execute "success.asp" else strError = "Error: " & Request("email_address") & " is already in use. Please choose a different email or use the forgotten password utility." end if else agentChecked = " checked" assistantChecked = " " end if if (bShowForm = 1) then %>

To sign up for a new account, please complete the information below. Once submitted, your account will be reviewed and when approved, you will receive an email letting you know that your account is now accessible.

Please Note: To take advantage of the many services and tools offered on the Baker Associates website you have to currently be in our active agents database. To become an active agent, please contact Ronnie Baker by email at rbaker@bakco.com or by phone 480-538-1004 to request a form to be completed.

Please note, items with a red asterisk * are required.

<% Response.write strError %>

">
* Required Fields
* First Name ">
* Last Name ">
* I am:
> An active agent with Baker Associates requesting web access.
> An assistant to an active agent with Baker Associates.
Agent Name " <% if agentChecked = " checked" then %>disabled<% end if %>>
* Social Security Number ">
* Agency Name ">
* Phone Number ">
* Mailing Address ">
* City ">
* State
* Zip Code ">
* Email Address ">
* Desired Password ">
* Receive Email Updates? >
Please ensure that the email address that you entered is valid as we will use this address to inform you that your account has been activated.
 
<% 'Response.Write TheMessage %>
<% end if %>