colonymech / docs / www / colonyscout / internal / changepassword.php @ f59acf11
History | View | Annotate | Download (4.26 KB)
1 |
<?php require("includes/internal.php")?> |
---|---|
2 |
|
3 |
|
4 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> |
6 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> |
7 |
<meta name="description" content="FILL IN"/> |
8 |
<meta name="keywords" content="FILL IN"/> |
9 |
<?php include($docRoot."header.php"); ?> |
10 |
<title>Change Password | ColonyScout.com</title> |
11 |
<?php include('includes/querybox.php');?> |
12 |
<style>
|
13 |
#login-box {margin:0px auto;}
|
14 |
input.login {width:200px;font-size:20px;}
|
15 |
input#submitButton {font-size:20px;}
|
16 |
</style>
|
17 |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> |
18 |
<script type="text/javascript" src="js/jquery.jcryption-1.1.js" ></script> |
19 |
<script type="text/javascript"> |
20 |
$(function() {
|
21 |
var $status = $('<div id="status" style="margin-top:15px;"><img src="images/loading.gif" alt="Loading..." title="Loading..." style="margin-right:15px;" /><span>Checking Login Details...</span></div>').hide();
|
22 |
$("#submitButton").parent().append($status);
|
23 |
$("#callbackForm").jCryption({beforeEncryption:function() {$status.show();return true;}});
|
24 |
$(":input").removeAttr("disabled");
|
25 |
});
|
26 |
</script>
|
27 |
</head>
|
28 |
<body bgcolor="#eeeeee"> |
29 |
|
30 |
<div id="general"> |
31 |
<?php include("includes/nav_internal.php"); ?> |
32 |
<div id="body"> |
33 |
<div id="body-boxes"> |
34 |
<div class="box-row" style="margin-top: 7px;"> |
35 |
<div class="white-top"></div> |
36 |
<div class="white-body text-box"> |
37 |
<div id="breadcrumbs">Admin> Change Password</div> |
38 |
<div id="livesearch"><div id="box0"><!-- livesearch--></div></div> |
39 |
<br/> |
40 |
<div class="hr"></div> |
41 |
</div><!--end 'TEMP' collapse--> |
42 |
|
43 |
<div class="white-body text-box"> |
44 |
<?php
|
45 |
$showPasswordForm=true; //only false once password is successfully changed |
46 |
$submitURL = "do_change_password.php"; |
47 |
|
48 |
if (isset($_GET["s"])) { |
49 |
switch ($_GET["s"]) { |
50 |
case "nomatch": //display passwords do not match error |
51 |
?>
|
52 |
<h2 style="color:#CC0000;">Oops! Your new passwords do not match.</h2><br/> |
53 |
<h2 style="color:#00CC00;">Please try again.</h2><br/><br/> |
54 |
<?php
|
55 |
break;
|
56 |
case "notfound": |
57 |
?>
|
58 |
<h2 style="color:#CC0000;">Oops! Your username or password was incorrect.</h2><br/> |
59 |
<h2 style="color:#00CC00;">Please re-try your login.</h2><br/><br/> |
60 |
<?php
|
61 |
break;
|
62 |
case "len": |
63 |
?>
|
64 |
<h2 style="color:#CC0000;">Error: Your password must be at least 6 characters in length</h2><br/> |
65 |
<h2 style="color:#00CC00;">Please try again.</h2><br/><br/> |
66 |
<?php
|
67 |
break;
|
68 |
case "success": |
69 |
$submitURL = "login.php"; |
70 |
$showPasswordForm = false; |
71 |
?>
|
72 |
<h2 style="color:#CC0000;">Success! Your password has been updated.</h2><br/> |
73 |
<h2 style="color:#00CC00;">Please login using your new information.</h2><br/><br/> |
74 |
<?php
|
75 |
break;
|
76 |
} //end error display |
77 |
} |
78 |
?>
|
79 |
<form action="<?php echo $submitURL;?>" method="post" id="callbackForm"> |
80 |
<table>
|
81 |
<tr>
|
82 |
<td>Username</td> |
83 |
<td><input class="login" type="text" id="user" name="muser" size=35/></td> |
84 |
<td></td> |
85 |
</tr>
|
86 |
<tr>
|
87 |
<td>Current Password</td> |
88 |
<td><input class="login" type="password" id="pass" name="mpass" size=35/></td> |
89 |
<td></td> |
90 |
</tr>
|
91 |
<?php
|
92 |
if ($showPasswordForm==true) { |
93 |
?>
|
94 |
<tr><td><br/></td></tr> |
95 |
<tr>
|
96 |
<td>New Password</td> |
97 |
<td><input class="login" type="password" id="pass2" name="mpass_new" size=35/></td> |
98 |
</tr>
|
99 |
<tr>
|
100 |
<td>Confirm Password</td> |
101 |
<td><input class="login" type="password" id="pass2" name="mpass_new_confirm" size=35/></td> |
102 |
</tr>
|
103 |
<?php
|
104 |
} //end show password form |
105 |
?>
|
106 |
<tr>
|
107 |
<td></td> |
108 |
<td><input title="Submit" alt="Submit" name="submitButton" type="submit" value="Submit" class="submit" id="submitButton"/> </td> |
109 |
</tr>
|
110 |
<input type="hidden" name="val" value="<?php echo md5(date('l jS \of F Y h A')); ?>"/> |
111 |
</table>
|
112 |
</form>
|
113 |
</div>
|
114 |
|
115 |
</div>
|
116 |
<div class="white-bottom"></div> |
117 |
</div>
|
118 |
|
119 |
|
120 |
</div>
|
121 |
</div> <!--BODY!--> |
122 |
|
123 |
|
124 |
<?php include($docRoot."footer.php"); ?> |
125 |
|
126 |
</div><!--GENERAL!--> |
127 |
|
128 |
|
129 |
</body></html> |