<% if cstr("" & request.form("btnSubmit")) = "" then call display_change_pswd_form() else call display_pswd_changed() end if %> <% sub display_change_pswd_form() %>

 

Change Password Request
User Name:
Old Password:
New Password:
forgot your password?
<% end sub %> <% sub display_pswd_changed() %> <% strMemberID = request.form("MemberID") strPasswordOld = request.form("Password") strPasswordNew = request.form("Password2") Set objViewer = Server.CreateObject("FireControl.Viewer") if not objViewer.CheckViewerPassword(strMemberID, strPasswordOld) then strMsg = "User Name and Password not found.
Try again." else set adoWrapper = new FCV_ADOWrapper strQuery = "update Viewers set Password = '" & strPasswordNew & "' where ViewerID = '" & strMemberID & "'" if pdebug then response.write "strQuery=" & strQuery & "
" if adoWrapper.UpdateDB(strQuery) < 1 then strMsg = "Database update failed. Try again." else strQuery = "select EmailAddr from Viewers where ViewerID = '" & strMemberID & "'" set rs = adoWrapper.GetStaticRS(strQuery) strEmailAddr = trim(cstr("" & rs.fields("EmailAddr"))) set rs = Nothing if strEmailAddr <> "" then call send_email(strMemberID,strPasswordNew,strEmailAddr) strMsg = "Your password has been changed and an email has been sent to " & strEmailAddr & "" end if end if set adoWrapper = Nothing end if Set objViewer = Nothing %>

 

Password Change Confirmation

<%=strMemberID%>

<%=strMsg%>

<% end sub %> <% sub send_email(id, pswd, email) message = "New Password: " & pswd who_to_name = id who_to_email = email who_from_name = "ABGC - Support Dept" who_from_email = "support@asiabargirlcams.com" subject = "ABGC - Password Change" if send_email_msg(who_to_name, who_to_email, who_from_name, who_from_email, subject, message, 0, 1, "") then if pdebug then response.write "Your email was successfully sent." else if pdebug then response.write "Failed to send email." end if end sub %>