13
|
1 |
<?php |
47
|
2 |
|
|
3 |
/* PowerAdmin, a friendly web-based admin tool for PowerDNS. |
|
4 |
* See <https://rejo.zenger.nl/poweradmin> for more details. |
|
5 |
* |
|
6 |
* Copyright 2007, 2008 Rejo Zenger <rejo@zenger.nl> |
|
7 |
* |
|
8 |
* This program is free software: you can redistribute it and/or modify |
|
9 |
* it under the terms of the GNU General Public License as published by |
|
10 |
* the Free Software Foundation, either version 3 of the License, or |
|
11 |
* (at your option) any later version. |
|
12 |
* |
|
13 |
* This program is distributed in the hope that it will be useful, |
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
* GNU General Public License for more details. |
|
17 |
* |
|
18 |
* You should have received a copy of the GNU General Public License |
|
19 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
20 |
*/ |
|
21 |
|
13
|
22 |
require_once("inc/toolkit.inc.php"); |
|
23 |
|
79
|
24 |
if(isset($_POST["submit"])) |
13
|
25 |
{ |
79
|
26 |
if((!isset($_POST['newpass'])) || (strlen($_POST["newpass"]) < 8)) |
13
|
27 |
{ |
|
28 |
error('Password length should be at least 8 characters.'); |
|
29 |
} |
|
30 |
else |
|
31 |
{ |
|
32 |
change_user_pass($_POST["currentpass"], $_POST["newpass"], $_POST["newpass2"]); |
|
33 |
} |
|
34 |
} |
|
35 |
|
|
36 |
include_once("inc/header.inc.php"); |
|
37 |
?> |
71
|
38 |
<h2><?php echo _('Change password'); ?></h2> |
13
|
39 |
<form method="post" action="change_password.php"> |
|
40 |
<table border="0" CELLSPACING="4"> |
|
41 |
<tr> |
71
|
42 |
<td class="n"><?php echo _('Current password'); ?>:</td> |
13
|
43 |
<td class="n"><input type="password" class="input" NAME="currentpass" value=""></td> |
|
44 |
</tr> |
|
45 |
<tr> |
71
|
46 |
<td class="n"><?php echo _('New password'); ?>:</td> |
13
|
47 |
<td class="n"><input type="password" class="input" NAME="newpass" value=""></td> |
|
48 |
</tr> |
|
49 |
<tr> |
71
|
50 |
<td class="n"><?php echo _('New password'); ?>:</td> |
13
|
51 |
<td class="n"><input type="password" class="input" NAME="newpass2" value=""></td> |
|
52 |
</tr> |
|
53 |
<tr> |
|
54 |
<td class="n"> </td> |
|
55 |
<td class="n"> |
71
|
56 |
<input type="submit" class="button" NAME="submit" value="<?php echo _('Change password'); ?>"> |
13
|
57 |
</td> |
|
58 |
</tr> |
|
59 |
</table> |
|
60 |
</form> |
|
61 |
|
71
|
62 |
<?php |
13
|
63 |
include_once("inc/footer.inc.php"); |
|
64 |
?> |