Пример #1
0
            html_display_msg(gettext("Password changed"), gettext("Your password has been changed."), 'index.php', 'get', array('continue' => gettext("Continue")), array(), '_top');
            html_draw_bottom();
            exit;
        } else {
            $error_msg_array[] = gettext("Update failed");
            $valid = false;
        }
    }
}
if (isset($_REQUEST['u']) && isset($_REQUEST['h'])) {
    $uid = $_GET['u'];
    $key = $_GET['h'];
} else {
    html_draw_error(gettext("Required information not found"));
}
if (!($user = user_get_by_passhash($uid, $key))) {
    html_draw_error(gettext("Required information not found"));
}
html_draw_top(array('title' => gettext('Change Password'), 'class' => 'window_title'));
echo "<h1>", gettext("Change Password"), "</h1>";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '450', 'center');
}
echo "<br />\n";
echo "<div align=\"center\">\n";
echo "  <form accept-charset=\"utf-8\" name=\"forgot_pw\" action=\"change_pw.php\" method=\"post\">\n";
echo "  ", form_csrf_token_field(), "\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  ", form_input_hidden("u", htmlentities_array($uid)), "\n";
echo "  ", form_input_hidden("h", htmlentities_array($key)), "\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"450\">\n";
Пример #2
0
}
if (isset($_GET['h']) && is_string($_GET['h'])) {
    $key = $_GET['h'];
}
if (isset($_GET['resend']) && isset($uid)) {
    if (email_send_user_confirmation($uid)) {
        html_draw_top(array('title' => gettext('Email confirmation'), 'class' => 'window_title'));
        html_display_msg(gettext("Email confirmation"), gettext("Confirmation email has been resent."));
        html_draw_bottom();
        exit;
    }
    html_draw_error(gettext("Confirmation email failed to send. Please contact the forum owner to rectify this."));
}
if (!isset($uid) || !isset($key)) {
    html_draw_error(gettext("Required information not found"));
}
$frame_top_target = html_get_top_frame_name();
if (($user = user_get_by_passhash($uid, $key)) !== false) {
    if (perm_user_cancel_email_confirmation($uid)) {
        html_draw_top(array('title' => gettext('Email confirmation'), 'class' => 'window_title'));
        html_display_msg(gettext("Email confirmation"), gettext("Thank you for confirming your email address. You may now login and start posting immediately."), 'index.php', 'post', array('submit' => gettext("Continue")), array(), $frame_top_target, 'center');
        html_draw_bottom();
    } else {
        html_draw_top(array('title' => gettext('Error')));
        html_display_msg(gettext("Email confirmation"), gettext("Email confirmation has failed, please try again later. If you encounter this error multiple times please contact the forum owner or a moderator for assistance."), 'index.php', 'post', array('submit' => gettext("Continue")), array(), $frame_top_target, 'center');
        html_draw_bottom();
    }
    html_draw_bottom();
} else {
    html_draw_error(gettext("Required information not found"));
}