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