Register globals

This commit is contained in:
Alan Garcia 2012-08-20 15:44:19 +00:00
parent 6c88dd84bc
commit 107774ca3f
2 changed files with 12 additions and 3 deletions

View File

@ -62,7 +62,7 @@ if (!$mem->user["canpass"]) {
<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 __("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>
</table>
</form>

View File

@ -29,6 +29,15 @@
*/
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)) {
$error=$err->errstr();
} else {
@ -40,10 +49,10 @@ include_once("head.php");
?>
<div align="center"><h3><?php __("Password change"); ?></h3></div>
<?php
if ($error) {
if (isset($error) && $error) {
echo "<font color=red>$error</font>";
include("foot.php");
exit();
}
?>
<?php include_once("foot.php"); ?>
<?php include_once("foot.php"); ?>