-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_changepass.cfm
47 lines (33 loc) · 1.09 KB
/
_changepass.cfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!---
Copyright (C) Volition, Inc. 2005. All rights reserved.
All source code herein is the property of Volition, Inc. You may not sell
or otherwise commercially exploit the source or things you created based on the
source.
--->
<cfinclude template="variables.cfm">
<cfinclude template="doctop.cfm">
<!--- Page info goes here --->
<cfquery datasource="PXO" name="validate">
SELECT *
FROM Users
WHERE (password = '#FORM.oldpassword#') AND (login = '#FORM.login#')
</cfquery>
<cfif validate.recordcount IS 0>
<cflocation url="changepass.cfm?message=1">
<cfelse>
<cfif form.newpassword IS form.duppassword>
<cfquery datasource="PXO" name="changepass">
Update Users
Set password = '#newpassword#'
WHERE login = '#form.login#'
</cfquery>
<cfelse>
<cflocation url="changepass.cfm?message=2">
</cfif>
<cflocation url="changepass.cfm?message=3">
</cfif>
<!--- End page info --->
<cfinclude template="docmid.cfm">
<cfinclude template="menus/menu_accounts.cfm">
<!--- end menus --->
<cfinclude template="docbot.cfm">