%'Include Data Connection%> <%'Include ADO constants include file for VBScript%> <% 'open data connection OpenConn() %> <%'Include Utility Scripts%> <% dim strReferrer If Request.Form <> "" Then 'begin add/edit (db transactions) 'dim strMode - The strMode variable is defined in the common_utils.asp file. dim intAdminUser dim strUsername dim strOldPassword dim strNewPassword dim bolPasswordSuccessfullyModified dim strUserFeedback 'set the application mode variable to 'edit' strMode = "edit" 'initialize the strUserFeedback variable to an empty string strUserFeedback = "" 'set the intAdminUser variable with the user id session variable intAdminUser = Session("UserId") 'get form elements values strUsername = Request.Form("txtUsername") strNewPassword = Request.Form("txtNewPassword") strOldPassword = Request.Form("txtOldPassword") strReferrer = Request.Form("txtReferrer") 'set the password modification success status into the bolPasswordSuccessfullyModified variable bolPasswordSuccessfullyModified = ModifyUserPassword(intAdminUser, strUsername, strOldPassword, strNewPassword) 'give the user feedback with regards to the success of the modify password transaction Session("FeedbackMode") = LCase(strMode) 'if the password was successfully modified then... If bolPasswordSuccessfullyModified Then 'set the feedback error to 0 Session("FeedbackError") = 0 Else 'set the feedback error to 1 Session("FeedbackError") = 1 End If Session("FeedbackModule") = "password" Session("Referer") = strReferrer Server.Execute("/admin/feedback.asp") 'end add/edit (db transactions) Else 'get the referrer URL into the strReferrer variable strReferrer = Request.QueryString("referrer") 'begin input (add/edit) %>
<% End If 'close data connection CloseConn() %>