<% @LANGUAGE = "VBScript" %> <% Response.Buffer = True %> <% this_err = 0 this_message = "" this_active = "" if request.form("hdFlag_login") = "yes" then str_username = DeQuote(request.form("text_username")) str_password = request.form("text_password") str_remember = request.form("ck_remember") str_submit = request.form("sbSubmit") if len(str_username) = 0 then this_err = 1 err_username = 1 this_massage = this_massage & "
  • Please type the username
  • " end if if len(str_password) = 0 then this_err = 1 err_password = 1 this_massage = this_massage & "
  • Please type the password
  • " end if if this_err = 0 then set rsCheckUser = Server.CreateObject("ADODB.Recordset") mySQL = "SELECT * " & _ "FROM scuba_profile " & _ "WHERE profile_username = '" & str_username & "' AND " & _ " profile_password = '" & str_password & "'" 'response.write mySQL rsCheckUser.Open mySQL, conn, 2, 2 if not rsCheckUser.EOF then if rsCheckUser.fields("profile_active") = 1 then if str_remember = "yes" then response.cookies("TSR_userID") = rsCheckUser.fields("profile_id") response.cookies("TSR_userID").Expires = Now() + 90 response.cookies("TSR_userName") = rsCheckUser.fields("profile_firstname") response.cookies("TSR_userName").Expires = Now() + 90 response.cookies("TSR_userType") = "Diver" response.cookies("TSR_userType").Expires = Now() + 90 else response.cookies("TSR_userID") = rsCheckUser.fields("profile_id") response.cookies("TSR_userName") = rsCheckUser.fields("profile_firstname") response.cookies("TSR_userType") = "Diver" end if Response.Redirect "member_details.asp" else if str_submit = "Submit" then this_err = 1 this_massage = this_massage & "
  • Your account has not been activated. Please click the button below to request a new activation code.
  • " this_active = "Diver" this_user_id = rsCheckUser.fields("profile_id") end if if str_submit = "Get Active Email" then str_user_id = rsCheckUser.fields("profile_id") str_email = rsCheckUser.fields("profile_email") str_username = rsCheckUser.fields("profile_username") str_password = rsCheckUser.fields("profile_password") Set CM = Server.CreateObject("Persits.CryptoManager") Set Context = CM.OpenContext("", True) Set Hash_UN = Context.CreateHash Hash_UN.AddText str_username my_hash_username = Hash_UN Set Hash_PW = Context.CreateHash Hash_PW.AddText str_password my_hash_password = Hash_PW str_link = "http://" & Request.ServerVariables("SERVER_NAME") & "/members/membereActive.asp?id=" & hash_id(str_user_id) & "&u=" & my_hash_username & "&p=" & my_hash_password 'Getting email template--------------------------------------------- Dim objDiverFSO Set objDiverFSO = Server.CreateObject("Scripting.FileSystemObject") Dim objDiverTextStream Set objDiverTextStream = objDiverFSO.OpenTextFile(Server.MapPath("\email_template\accountActivation.htm"), 1) str_email_body = objDiverTextStream.ReadAll str_email_body = replace(str_email_body, "", str_username) str_email_body = replace(str_email_body, "", str_password) str_email_body = replace(str_email_body, "", str_link) EmailSending "info@divecaster.com", str_email, "The DiveCaster.com Account Activation", str_email_body, 0 this_err = 1 this_massage = this_massage & "
  • An email message has been sent to the email address you provided containing your account information and a link you can use to activate your account.
  • " end if end if else set rsCheckShop = Server.CreateObject("ADODB.Recordset") mySQL = "SELECT * " & _ "FROM scuba_shops " & _ "WHERE shop_username = '" & str_username & "' AND " & _ " shop_password = '" & str_password & "'" 'response.write mySQL rsCheckShop.Open mySQL, conn, 2, 2 if not rsCheckShop.EOF then if rsCheckShop.fields("shop_active") = 1 then if str_remember = "yes" then response.cookies("TSR_userID") = rsCheckShop.fields("shop_id") response.cookies("TSR_userID").Expires = Now() + 90 response.cookies("TSR_userName") = rsCheckShop.fields("shop_company") response.cookies("TSR_userName").Expires = Now() + 90 response.cookies("TSR_userType") = "Shop" response.cookies("TSR_userType").Expires = Now() + 90 else response.cookies("TSR_userID") = rsCheckShop.fields("shop_id") response.cookies("TSR_userName") = rsCheckShop.fields("shop_company") response.cookies("TSR_userType") = "Shop" end if Response.Redirect "member_details.asp" else if str_submit = "Submit" then this_err = 1 this_massage = this_massage & "
  • You registered this account in TheScubaRegistry.com, but it has not been activated. To activate your account click here.
  • " this_active = "Shop" this_user_id = rsCheckShop.fields("shop_id") end if end if else set rsCheckInstructor = Server.CreateObject("ADODB.Recordset") mySQL = "SELECT * " & _ "FROM scuba_instructors " & _ "WHERE instructor_username = '" & str_username & "' AND " & _ " instructor_password = '" & str_password & "'" 'response.write mySQL rsCheckInstructor.Open mySQL, conn, 2, 2 if not rsCheckInstructor.EOF then if rsCheckInstructor.fields("instructor_active") = 1 then if str_remember = "yes" then response.cookies("TSR_userID") = rsCheckInstructor.fields("instructor_id") response.cookies("TSR_userID").Expires = Now() + 90 response.cookies("TSR_userName") = rsCheckInstructor.fields("instructor_firstname") response.cookies("TSR_userName").Expires = Now() + 90 response.cookies("TSR_userType") = "Instructor" response.cookies("TSR_userType").Expires = Now() + 90 else response.cookies("TSR_userID") = rsCheckInstructor.fields("instructor_id") response.cookies("TSR_userName") = rsCheckInstructor.fields("instructor_firstname") response.cookies("TSR_userType") = "Instructor" end if Response.Redirect "member_details.asp" else if str_submit = "Submit" then this_err = 1 this_massage = this_massage & "
  • You registered this account in TheScubaRegistry.com, but it has not been activated. To activate your account click here.
  • " this_active = "Instructor" this_user_id = rsCheckInstructor.fields("instructor_id") end if end if else this_err = 1 this_massage = this_massage & "
  • Invalid username or password
  • " end if end if end if end if else str_active = request("active") if str_active = "yes" then this_massage = "Your account has been actived, Please login." end if end if %> Welcome to DiveCaster - Where do you want to dive today?
     
    " method="post"> <%if len(this_massage) > 0 then%> <%end if%>
      <%=this_massage%>
    Username: " <%if err_username = 1 then response.write "class=""formError""" end if%> />
    Password: />
      /> Remember me on this computer
      <%if len(this_active) = 0 then%> <%else%> <%end if%>
    not a member? Register here!
     
    1, Barrier Reef - Austraila  uploaded: 01.01.07 09:35AM 1. Walice North - Austraila -  joined: 01.01.07 02:30PM
    2. Wreck Alley - San Diego CA uploaded: 01.01.07 09:27AM 2. John Simpson - San Diego CA -  joined: 01.01.07 08:46AM
    3. Shore dive - Laguna Beach CA uploaded: 01.01.07 09:35AM 3. Alan Carter - Laguna Beach CA - joined: 01.01.0 07:23AM
    4. Cenotes - Riviera Maya Mexico uploaded: 01.01.07 09:35AM 4. Manuel Herdez- Riviera Maya Mexico -  joined: 12.31.06 11:44PM
    5. Hawksbill Turtles - Bahamas uploaded: 01.01.07 09:35AM 5. Ted Williams - Bahamas -   joined: 12.31.06 10:32PM
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------