-
Notifications
You must be signed in to change notification settings - Fork 1
/
change-pwd.php
103 lines (83 loc) · 2.94 KB
/
change-pwd.php
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?PHP
require_once("./include/membersite_config.php");
if(!$fgmembersite->CheckLogin())
{
$fgmembersite->RedirectToURL("login.php");
exit;
}
if(isset($_POST['submitted']))
{
if($fgmembersite->ChangePassword())
{
$fgmembersite->RedirectToURL("changed-pwd.html");
}
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<title>Change password</title>
<link rel="STYLESHEET" type="text/css" href="style/fg_membersite.css" />
<script type='text/javascript' src='scripts/gen_validatorv31.js'></script>
<link rel="STYLESHEET" type="text/css" href="style/pwdwidget.css" />
<script src="scripts/pwdwidget.js" type="text/javascript"></script>
</head>
<body>
<!-- Form Code Start -->
<div id='fg_membersite'>
<form id='changepwd' action='<?php echo $fgmembersite->GetSelfScript(); ?>' method='post' accept-charset='UTF-8'>
<fieldset >
<legend>Change Password</legend>
<input type='hidden' name='submitted' id='submitted' value='1'/>
<div class='short_explanation'>* required fields</div>
<div><span class='error'><?php echo $fgmembersite->GetErrorMessage(); ?></span></div>
<div class='container'>
<label for='oldpwd' >Old Password*:</label><br/>
<div class='pwdwidgetdiv' id='oldpwddiv' ></div><br/>
<noscript>
<input type='password' name='oldpwd' id='oldpwd' maxlength="50" />
</noscript>
<span id='changepwd_oldpwd_errorloc' class='error'></span>
</div>
<div class='container'>
<label for='newpwd' >New Password*:</label><br/>
<div class='pwdwidgetdiv' id='newpwddiv' ></div>
<noscript>
<input type='password' name='newpwd' id='newpwd' maxlength="50" /><br/>
</noscript>
<span id='changepwd_newpwd_errorloc' class='error'></span>
</div>
<br/><br/><br/>
<div class='container'>
<input type='submit' name='Submit' value='Submit' />
</div>
</fieldset>
</form>
<!-- client-side Form Validations:
Uses the excellent form validation script from JavaScript-coder.com-->
<script type='text/javascript'>
// <![CDATA[
var pwdwidget = new PasswordWidget('oldpwddiv','oldpwd');
pwdwidget.enableGenerate = false;
pwdwidget.enableShowStrength=false;
pwdwidget.enableShowStrengthStr =false;
pwdwidget.MakePWDWidget();
var pwdwidget = new PasswordWidget('newpwddiv','newpwd');
pwdwidget.MakePWDWidget();
var frmvalidator = new Validator("changepwd");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();
frmvalidator.addValidation("oldpwd","req","Please provide your old password");
frmvalidator.addValidation("newpwd","req","Please provide your new password");
// ]]>
</script>
<p>
<a href='login-home.php'>Home</a>
</p>
</div>
<!--
Form Code End (see html-form-guide.com for more info.)
-->
</body>
</html>