<% Dim FP_LCID Dim FP_CharSet Dim FP_CodePage Dim GoBack Dim qMail Dim errs Dim iMsg Dim eMsg Dim addUrl Set errs = Server.CreateObject("scripting.dictionary") eMsg = "" iMsg = "" qMail = Request("qmail") If qMail = "" Then qMail = Session("loginemail") If Request("btnLogout") <> "" Then Session("loginemail") = "" Else ProcessLogin qMail, Request("qpswd") End If Sub ProcessSend(aMail) Dim rtnPswd Dim objNewMail Dim srvName If aMail = "" Then errs("qmail") = "Required" eMsg = "You must specify an e-mail address." Exit Sub End If rtnPswd = GetPassword(aMail) If rtnPswd = "" Then eMsg = "E-Mail address not found." Exit Sub End If srvName = Request.ServerVariables("SERVER_NAME") Set objNewMail = Server.CreateObject("CDONTS.NewMail") objNewMail.From = "webmaster@manx-modelflyers.org" objNewMail.To = aMail objNewMail.subject = "Your password on " & srvName objNewMail.body = "Your password on " & _ srvName & " is:" & vbCrLf & vbCrLf & _ " " & rtnPswd & vbCrLf & vbCrLf & _ "Please keep this password in a safe place." & _ vbCrLf & vbCrLf & _ "The URL of the login page is:" & vbCrLf & vbCrLf & _ " http://" & srvName & _ Request.ServerVariables("URL") & vbCrLf iMsg = "Password sent to your e-mail address." objNewMail.send Set objNewMail = Nothing End Sub Sub ProcessLogin(aMail, aPswd) If aMail = "" Then errs("qmail") = "Required" If aPswd = "" Then errs("qpswd") = "Required" If errs.Count > 0 Then eMsg = "Please supply all input fields." Exit Sub End If eMsg = CkLoginPwd(aMail, aPswd) If eMsg = "" Then Session("loginemail") = aMail If Session("goback") = "" Then iMsg = "Login successful" Session("loginpswd") = aPswd Response.redirect "secure.asp" Else GoBack = Session("goback") Session("goback") = "" Response.redirect GoBack End If End If End Sub Function CkLoginPwd(aMail, aPswd) Dim rtnPswd rtnPswd = GetPassword(aMail) Select Case rtnPswd Case "" CkLoginPwd = "E-Mail address not found." Case aPswd CkLoginPwd = "" Case Else CkLoginPwd = "Password not matched." End Select End Function Function GetPassword(aMail) Dim cnVis Dim rsVis Dim sql cnVis = "driver={Microsoft Access Driver (*.mdb)};" & _ "dbq=" & Server.MapPath("/_fpdb/mmfmembers.mdb") sql = "SELECT * FROM Table1 WHERE email = '" & aMail & "' ; " Set rsVis = Server.CreateObject("ADODB.Recordset") rsVis.Open sql, cnVis, adOpenDynamic, adLockOptimistic If rsVis.EOF Then GetPassword = "" Else GetPassword = rsVis("passsword") End If rsVis.Close Set rsVis = Nothing End Function %> scurbckup

<%=eMsg%><%=iMsg%>   

    Sorry, but this page is not available yet

 

Back

 

                     

E-Mail Address: <%=errs("qmail")%>
Password <%=errs("qpswd")%>