web_password) {
if ($HTTP_POST_VARS["new_pass"] != $HTTP_POST_VARS["new_pass2"]) {
printf(
TABLE2."\n"
."
".DIFFPASS." |
\n"
.""
);
} else {
$query = sprintf("update user set web_password='%s' where id=%d",
$HTTP_POST_VARS["new_pass"], $user->id);
$result = mysql_query($query);
if ($result) {
printf(
TABLE2."\n"
."Password changed successfully. Use your new password to\n"
." login to your account. |
\n"
."\n"
);
} else {
printf(
TABLE2."\n"
."Password was unable to be changed. Continue using your old \n"
."password to login to your account. You can try \n"
."changing your password again later. |
\n"
.""
);
}
}
} else {
printf(
TABLE2."\n"
."".TD2.BADPASS."
\n"
."\n"
);
}
} else {
echo NOLOGIN;
}
page_tail();
?>