root/trunk/website/soundings/admin/password.cfm @ 5

Revision 5, 2.1 kB (checked in by DanWilson, 17 years ago)

Initial Commit Of ModelGlue? Website (upgrade to blogcfc 511)

Line 
1<cfsetting enablecfoutputonly=true>
2<!---
3        Name         : password.cfm
4        Author       : Raymond Camden
5        Created      : September 01, 2004
6        Last Updated : October 8, 2005
7        History      : Refresh settings on pword change (10/8/05)
8        Purpose          :
9--->
10<cfimport taglib="../tags/" prefix="tags">
11
12<cfif isDefined("form.cancel")>
13        <cflocation url="index.cfm" addToken="false">
14</cfif>
15
16<cfif isDefined("form.save")>
17        <cfset errors = "">
18        <!---
19        <cfif hash(form.oldpassword) is not application.settings.password>
20                <cfset errors = errors & "The old password did not match.<br>">
21        </cfif>
22        --->
23        <cfif not len(form.newpassword) or form.newpassword neq form.newpassword2>
24                <cfset errors = errors & "Your new password was blank or did not match the confirmation.<br>">
25        </cfif>
26        <cfif not len(errors)>
27                <cftry>
28                        <cfset application.user.updatePassword(getAuthUser(),form.oldpassword,form.newpassword)>
29                        <cfset msg = "Your password has been updated.">
30                        <cfcatch>
31                                <cfset errors = cfcatch.message>
32                        </cfcatch>
33                </cftry>
34        </cfif>
35</cfif>
36
37<tags:layout templatename="admin" title="Set Password">
38
39<cfoutput>
40<p>
41Use the form below to update your password. You must enter the old password first.
42</p>
43
44<cfif isDefined("errors")><ul><b>#errors#</b></ul></cfif>
45<cfif isDefined("msg")>
46        <p><b>#msg#</b></p>
47<cfelse>
48<form action="#cgi.script_name#" method="post">
49<table cellspacing=0 cellpadding=5 class="adminEditTable" width="500">
50        <tr valign="top">
51                <td width="200"><b>(*) Old Password:</b></td>
52                <td><input type="password" name="oldpassword" value="" size="50"></td>
53        </tr>
54        <tr valign="top">
55                <td><b>(*) New Password:</b></td>
56                <td><input type="password" name="newpassword" value="" size="50"></td>
57        </tr>
58        <tr valign="top">
59                <td nowrap="true"><b>(*) Confirm Password:</b></td>
60                <td><input type="password" name="newpassword2" value="" size="50"></td>
61        </tr>
62        <tr>
63                <td>&nbsp;</td>
64                <td><input type="submit" name="save" value="Save"> <input type="submit" name="cancel" value="Cancel"></td>
65        </tr>
66</table>
67</form>
68</p>
69</cfif>
70</cfoutput>
71
72</tags:layout>
73
74<cfsetting enablecfoutputonly=false>
Note: See TracBrowser for help on using the browser.