% ' *** Validate request to log in to this site. MM_LoginAction = Request.ServerVariables("URL") If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString MM_valUsername=CStr(Request.Form("Username")) If MM_valUsername <> "" Then MM_fldUserAuthorization="SecurityLevelID" MM_redirectLoginSuccess="/applications/SecureLoginManager/components/processlogin.asp" MM_redirectLoginFailed= "/applications/SecureLoginManager/components/processlogin.asp" MM_flag="ADODB.Recordset" set MM_rsUser = Server.CreateObject(MM_flag) MM_rsUser.ActiveConnection = MM_secureloginmanager_STRING MM_rsUser.Source = "SELECT UserName, Password1" If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization MM_rsUser.Source = MM_rsUser.Source & " FROM tblMM_Members WHERE Activated = 'True' AND UserName='" & Replace(MM_valUsername,"'","''") &"' AND Password1='" & Replace(Request.Form("password"),"'","''") & "'" MM_rsUser.CursorType = 0 MM_rsUser.CursorLocation = 2 MM_rsUser.LockType = 3 MM_rsUser.Open If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then ' username and password match - this is a valid user Session("MM_Username") = MM_valUsername ' START - create remember me cookie IF (Request.Form("rememberme") = "yes") then Response.Cookies("remember")("username") = Request.Form("username") Response.Cookies("remember")("password") = Request.Form("password") Response.Cookies("remember")("rememberme") = "yes" Response.Cookies("remember").Expires = date + 90 Else Response.Cookies("remember").Expires = date -1 End If ' END - create remember me cookie If (MM_fldUserAuthorization <> "") Then Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value) Else Session("MM_UserAuthorization") = "" End If if CStr(Request.QueryString("accessdenied")) <> "" And true Then MM_redirectLoginSuccess = Request.QueryString("accessdenied") End If MM_rsUser.Close Response.Redirect(MM_redirectLoginSuccess) End If MM_rsUser.Close Response.Redirect(MM_redirectLoginFailed) End If %> <% Dim rsPassword__MMColParam rsPassword__MMColParam = "0" If (Request.Form("EmailAddress") <> "") Then rsPassword__MMColParam = Request.Form("EmailAddress") End If %> <% Dim rsPassword__MMColParam1 rsPassword__MMColParam1 = "0" If (Session("MM_Username") <> "") Then rsPassword__MMColParam1 = Session("MM_Username") End If %> <% set rsPassword = Server.CreateObject("ADODB.Recordset") rsPassword.ActiveConnection = MM_secureloginmanager_STRING rsPassword.Source = "SELECT * FROM tblMM_Members WHERE Activated = 'True' AND (EmailAddress = '" + Replace(rsPassword__MMColParam, "'", "''") + "' OR UserName = '" + Replace(rsPassword__MMColParam1, "'", "''") + "')" rsPassword.CursorType = 0 rsPassword.CursorLocation = 2 rsPassword.LockType = 3 rsPassword.Open() rsPassword_numRows = 0 %> <% Dim rsPreferences Dim rsPreferences_numRows Set rsPreferences = Server.CreateObject("ADODB.Recordset") rsPreferences.ActiveConnection = MM_secureloginmanager_STRING rsPreferences.Source = "SELECT * FROM tblSLM_MessagingPreferences" rsPreferences.CursorType = 0 rsPreferences.CursorLocation = 2 rsPreferences.LockType = 1 rsPreferences.Open() rsPreferences_numRows = 0 %> <% If Request.Form("SendPassword") = "SendPassword" Then %> <% ' *** Redirect If Recordset Is Empty ' *** MagicBeat Server Behavior - 2014 - by Jag S. Sidhu - www.magicbeat.com If NOT (rsPassword.EOF) Then 'Create the mail object and send the mail Set objMail = Server.CreateObject("CDONTS.NewMail") 'chenged from CreateObject("CDONTS.NewMail") objMail.From = rsPreferences.fields("AdminEmailAddress").value objMail.To = rsPassword.fields("EmailAddress").value objMail.CC = "" objMail.BCC = "" objMail.Subject = rsPreferences.fields("MessageSubjectVisitor").value objMail.Body = "Dear " & rsPassword.fields("FirstName") & "," & vbCrLf _ & vbCrLf _ & rsPreferences.fields("MessageBodyVisitor").value & vbCrLf _ & vbCrLf _ & "Email Address: " & rsPassword.fields("EmailAddress")& vbCrLf _ & "User Name: " & rsPassword.fields("Username") & vbCrLf _ & "Password: " & rsPassword.fields("Password1") & vbCrLf _ & vbCrLf _ & "Login @ " & Request.ServerVariables("HTTP_REFERER")& vbCrLf _ & vbCrLf _ & vbCrLf _ & rsPreferences.Fields.Item("MessageFooterVisitorLine1").Value & vbCrLf _ & rsPreferences.Fields.Item("MessageFooterVisitorLine2").Value & vbCrLf _ & rsPreferences.Fields.Item("MessageFooterVisitorLine3").Value & vbCrLf objMail.Send() Set objMail = Nothing 'Send them to the page specified if requested Dim rp_redirectpw If Request.QueryString <> "" Then rp_redirectpw = Request.ServerVariables("HTTP_REFERER") & "&sent=true" Else rp_redirectpw = Request.ServerVariables("HTTP_REFERER") & "?sent=true" End If Response.Redirect rp_redirectpw Else 'Send them to the page specified if requested Dim rp_redirectpwn If Request.QueryString <> "" Then rp_redirectpwn = Request.ServerVariables("HTTP_REFERER") & "&sent=false" Else rp_redirectpwn = Request.ServerVariables("HTTP_REFERER") & "?sent=false" End If Response.Redirect rp_redirectpwn End If %> <% end if%>
<% if Session("MM_Username") <> "" AND Request.Querystring("accessdenied") = "" then %>| <% IF (Request.Querystring("accessdenied") <> "") then %> You are not authorized to access this area <% End If %> <% end if%> <% end if%> <% end if%> <% IF (Request.Querystring("valid") = "false") then %> You entered either an incorrect Username or Password - please try again or ?problem=yes <%If Request.QueryString ("mid")<> "" Then %>&mid=<%=request.querystring("mid")%><%end if%> <%If Request.QueryString ("mid2")<> "" Then %>&mid2=<%=request.querystring("mid2")%><%end if%> <%If Request.QueryString ("mid3")<> "" Then %>&mid3=<%=request.querystring("mid3")%><%end if%> <%If Request.QueryString ("incid")<> "" Then %>&incid=<%=request.querystring("incid")%><%end if%> <%If Request.QueryString ("vid")<> "" Then %>&vid=<%=request.querystring("vid")%><%end if%>">Click here for help <% End If %> <% IF (Request.Querystring("problem") = "yes") then %>If you are having problems signing in, ask yourself the following questions: Are you having difficulty accessing your account because of a problem with your password?
Your browser must support cookies, and the option must be enabled to sign in. To enable cookies Internet Explorer 5
Internet Explorer 4.x
Other browsers To see if your browser supports cookies, and for detailed instructions
about how to enable this feature, see the online Help for your browser. If your browser does not support cookies, you can upgrade to a newer browser, such as Internet Explorer 5. <% End If %> <% IF NOT Request.Querystring("sent") <> "" then %> <% IF (Request.Querystring("valid") <> "false") then %> <% IF (Request.Querystring("problem") <> "yes") then %>OOPSSorry but the email address you entered was either spelled
incorrectly or has never been registered. Success!Thank you , your password has been sent....Login <% End If %> |