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/i18n.inc.php"); |
|
23 |
require_once("inc/toolkit.inc.php"); |
|
24 |
|
|
25 |
if($_POST["submit"]) |
|
26 |
{ |
|
27 |
if(strlen($_POST["newpass"]) < 8) |
|
28 |
{ |
|
29 |
error('Password length should be at least 8 characters.'); |
|
30 |
} |
|
31 |
else |
|
32 |
{ |
|
33 |
change_user_pass($_POST["currentpass"], $_POST["newpass"], $_POST["newpass2"]); |
|
34 |
} |
|
35 |
} |
|
36 |
|
|
37 |
include_once("inc/header.inc.php"); |
|
38 |
?> |
|
39 |
<h2>Change password</h2> |
|
40 |
<form method="post" action="change_password.php"> |
|
41 |
<table border="0" CELLSPACING="4"> |
|
42 |
<tr> |
|
43 |
<td class="n"><? echo _('Current password'); ?>:</td> |
|
44 |
<td class="n"><input type="password" class="input" NAME="currentpass" value=""></td> |
|
45 |
</tr> |
|
46 |
<tr> |
|
47 |
<td class="n"><? echo _('New password'); ?>:</td> |
|
48 |
<td class="n"><input type="password" class="input" NAME="newpass" value=""></td> |
|
49 |
</tr> |
|
50 |
<tr> |
|
51 |
<td class="n"><? echo _('New password'); ?>:</td> |
|
52 |
<td class="n"><input type="password" class="input" NAME="newpass2" value=""></td> |
|
53 |
</tr> |
|
54 |
<tr> |
|
55 |
<td class="n"> </td> |
|
56 |
<td class="n"> |
|
57 |
<input type="submit" class="button" NAME="submit" value="<? echo _('Change password'); ?>"> |
|
58 |
</td> |
|
59 |
</tr> |
|
60 |
</table> |
|
61 |
</form> |
|
62 |
|
|
63 |
<? |
|
64 |
include_once("inc/footer.inc.php"); |
|
65 |
?> |