Register globals
This commit is contained in:
parent
6c88dd84bc
commit
107774ca3f
|
@ -62,7 +62,7 @@ if (!$mem->user["canpass"]) {
|
||||||
<table border="1" cellspacing="0" cellpadding="4">
|
<table border="1" cellspacing="0" cellpadding="4">
|
||||||
<tr><th><?php __("Old password"); ?></th><td><input type="password" class="int" name="oldpass" value="<?php isset($oldpass) ? : $oldpass=""; echo $oldpass; ?>" size="20" maxlength="128" /></td></tr>
|
<tr><th><?php __("Old password"); ?></th><td><input type="password" class="int" name="oldpass" value="<?php isset($oldpass) ? : $oldpass=""; echo $oldpass; ?>" size="20" maxlength="128" /></td></tr>
|
||||||
<tr><th><?php __("New password"); ?> (1)</th><td><input type="password" class="int" name="newpass" value="<?php isset($newpass) ? : $newpass=""; echo $newpass; ?>" size="20" maxlength="60" /></td></tr>
|
<tr><th><?php __("New password"); ?> (1)</th><td><input type="password" class="int" name="newpass" value="<?php isset($newpass) ? : $newpass=""; echo $newpass; ?>" size="20" maxlength="60" /></td></tr>
|
||||||
<tr><th><?php __("New password"); ?> (2)</th><td><input type="password" class="int" name="newpass22" value="<?php isset($newpass2) ? : $newpass2=""; echo $newpass2;?>" size="20" maxlength="61" /></td></tr>
|
<tr><th><?php __("New password"); ?> (2)</th><td><input type="password" class="int" name="newpass2" value="<?php isset($newpass2) ? : $newpass2=""; echo $newpass2;?>" size="20" maxlength="61" /></td></tr>
|
||||||
<tr class="trbtn"><td colspan="3"><input type="submit" class="inb" name="submit" value="<?php __("Change my password"); ?>" /></td></tr>
|
<tr class="trbtn"><td colspan="3"><input type="submit" class="inb" name="submit" value="<?php __("Change my password"); ?>" /></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -29,6 +29,15 @@
|
||||||
*/
|
*/
|
||||||
require_once("../class/config.php");
|
require_once("../class/config.php");
|
||||||
|
|
||||||
|
$fields = array (
|
||||||
|
"oldpass" => array ("post", "string", ""),
|
||||||
|
"newpass" => array ("post", "string", ""),
|
||||||
|
"newpass2" => array ("post", "string", ""),
|
||||||
|
);
|
||||||
|
getFields($fields);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!$mem->passwd($oldpass,$newpass,$newpass2)) {
|
if (!$mem->passwd($oldpass,$newpass,$newpass2)) {
|
||||||
$error=$err->errstr();
|
$error=$err->errstr();
|
||||||
} else {
|
} else {
|
||||||
|
@ -40,7 +49,7 @@ include_once("head.php");
|
||||||
?>
|
?>
|
||||||
<div align="center"><h3><?php __("Password change"); ?></h3></div>
|
<div align="center"><h3><?php __("Password change"); ?></h3></div>
|
||||||
<?php
|
<?php
|
||||||
if ($error) {
|
if (isset($error) && $error) {
|
||||||
echo "<font color=red>$error</font>";
|
echo "<font color=red>$error</font>";
|
||||||
include("foot.php");
|
include("foot.php");
|
||||||
exit();
|
exit();
|
||||||
|
|
Loading…
Reference in New Issue