<%@ LANGUAGE="VBSCRIPT" %> <% '*********************************************************************** ' System : ASPBanner Unlimited ' Author : Christopher Williams of CJWSoft www.CJWSoft.com ' ' COPYRIGHT NOTICE ' ' See attached Software License Agreement ' ' (c) Copyright 2000 - 2003 by CJWSoft. All rights reserved '*********************************************************************** %> <% Response.Buffer = True %> <% If (Request("Username") <> "" And Request("Email") <> "") Then ErrorMessage = ErrorMessage & Server.URLEncode("\nDo not fill out both fields.\n\n") Response.Redirect "email_password.asp?" & "ErrorMessage=" & ErrorMessage Response.End End If %> <% =App_Name %> >

<% ErrorMessage = Request("ErrorMessage") If ErrorMessage <> "" Then %> <% End If %>

Password Retrieval System

<% If Request("Action") <> "SendPassword" or (Request("Username") = "" And Request("Email") = "") Then %>
If you have forgotten your Password the system can Email it to the Email account that you have on file.

For security reasons it is it is recommended that you log in to the admin and change your Password after getting back into the system.


Please enter your Username or Your Email Address.
Do not enter both.

Username
  or
Email

<% Else UsernameCheck = CStr(Replace(Request("Username"),"'","''")) EmailCheck = CStr(Replace(Request("Email"),"'","''")) Set ConnBannerSystem = Server.CreateObject("ADODB.Connection") Set CmdCheckForExisting = Server.CreateObject("ADODB.Recordset") ConnBannerSystem.Open BannerConnectionString If UsernameCheck <> "" Then SQL = "SELECT Banner_Users.* FROM Banner_Users WHERE (Username = '" & UsernameCheck & "')" Else SQL = "SELECT Banner_Users.* FROM Banner_Users WHERE (Email = '" & EmailCheck & "')" End IF CmdCheckForExisting.Open SQL, ConnBannerSystem, 1, 3 If CmdCheckForExisting.EOF Then ErrorMessage = ErrorMessage & Server.URLEncode("This Username or Email does not exist.\n\n") Response.Redirect "email_password.asp?" & "ErrorMessage=" & ErrorMessage End IF If CmdCheckForExisting("Email") <> "" Then If Application("CDONTS_Installed") = true Then CDONTS_strBody = CDONTS_strBody & "FORM submitted at " & Now() & vbCrLf & vbCrLf CDONTS_strBody = CDONTS_strBody & "This is your Username." & vbCrLf & vbCrLf CDONTS_strBody = CDONTS_strBody & CmdCheckForExisting("Username") & vbCrLf & vbCrLf CDONTS_strBody = CDONTS_strBody & "This is your Password as requested." & vbCrLf & vbCrLf CDONTS_strBody = CDONTS_strBody & CmdCheckForExisting("Password") & vbCrLf Set objCDO = Server.CreateObject("CDONTS.NewMail") objCDO.To = CmdCheckForExisting("Email") objCDO.From = Application("EmailNotification") objCDO.Subject = "Password Request from " & App_Name objCDO.Body = CDONTS_strBody objCDO.Send Set objCDO = Nothing End If If Application("SASMTPMAIL_Installed") = true Then SASMTPMAIL_strBody = SASMTPMAIL_strBody & "FORM submitted at " & Now() & vbCrLf & vbCrLf SASMTPMAIL_strBody = SASMTPMAIL_strBody & "

This is your Username." & vbCrLf & vbCrLf SASMTPMAIL_strBody = SASMTPMAIL_strBody & vbCrLf & "

" & CmdCheckForExisting("Username") & vbCrLf & vbCrLf SASMTPMAIL_strBody = SASMTPMAIL_strBody & "

This is your Password as requested." & vbCrLf & vbCrLf SASMTPMAIL_strBody = SASMTPMAIL_strBody & vbCrLf & "

" & CmdCheckForExisting("Password") & vbCrLf If Application("ASPMail_Installed") = true then Set Mailer = Server.CreateObject("SMTPsvg.Mailer") Else Set Mailer = Server.CreateObject("SoftArtisans.SMTPMail") End If Mailer.FromName = Application("EmailNotification") Mailer.FromAddress = Application("EmailNotification") mailer.addrecipient CmdCheckForExisting("First_Name") & " " & CmdCheckForExisting("Last_Name"), CmdCheckForExisting("Email") Mailer.bodytext = SASMTPMAIL_strBody mailer.contenttype = "text/html" mailer.encoding = 2 mailer.subject = "Password Request from " & App_Name mailer.wordwrap = true mailer.wordwraplen = 50 Mailer.RemoteHost = Application("SASMTPMAIL_RemoteHost") mailer.timeout = 120 Mailer.Priority = 3 Mailer.SendMail set Mailer = nothing End IF If Application("JMAIL_Installed") = true Then JMAIL_strBody = JMAIL_strBody & "FORM submitted at " & Now() & vbCrLf & vbCrLf JMAIL_strBody = JMAIL_strBody & "This is your Username." & vbCrLf & vbCrLf JMAIL_strBody = JMAIL_strBody & vbCrLf & CmdCheckForExisting("Username") & vbCrLf & vbCrLf JMAIL_strBody = JMAIL_strBody & "This is your Password as requested." & vbCrLf & vbCrLf JMAIL_strBody = JMAIL_strBody & vbCrLf & CmdCheckForExisting("Password") & vbCrLf Set JMail = Server.CreateObject("JMail.SMTPMail") JMail.ServerAddress = Application("JMAIL_ServerAddress") JMail.Sender = Application("EmailNotification") JMail.Subject = "Password Request from " & App_Name JMail.AddRecipient CmdCheckForExisting("Email") JMail.Body = JMAIL_strBody JMail.Priority = 3 JMail.Execute End IF If Application("AspEmail_Installed") = true Then MAIL_strBody = MAIL_strBody & "FORM submitted at " & Now() & vbCrLf & vbCrLf MAIL_strBody = MAIL_strBody & "This is your Username." & vbCrLf & vbCrLf MAIL_strBody = MAIL_strBody & vbCrLf & CmdCheckForExisting("Username") & vbCrLf & vbCrLf MAIL_strBody = MAIL_strBody & "This is your Password as requested." & vbCrLf & vbCrLf MAIL_strBody = MAIL_strBody & vbCrLf & CmdCheckForExisting("Password") & vbCrLf Set Mail = Server.CreateObject("Persits.MailSender") Mail.Host = Application("AspEmail_MailHost") Mail.From = Application("EmailNotification") Mail.FromName = Application("EmailNotification") Mail.AddAddress CmdCheckForExisting("Email") Mail.Subject = "Password Request from " & App_Name Mail.Body = MAIL_strBody Mail.Send Set Mail = Nothing End If %>

Your Password has been sent to the Email address on file.

You should receive it within an hour.

Once you receive your Password you can then return to the system where you should immediately change your Password for security reasons.





<% Else ErrorMessage = ErrorMessage & Server.URLEncode("There is a problem.\nYour Password cannot be Emailed to you.\nYou will need to contact the site administrator.\n\n") Response.Redirect "email_password.asp?" & "ErrorMessage=" & ErrorMessage Response.End End If End If %>