Ejemplo n.º 1
0
    setcookie("WWWPARAMS", $wwwparameters, 0, "/");
    $currentuser_num = bbs_getcurrentuser($currentuser);
    if (!($currentuser["userlevel"] & BBS_PERM_LOGINOK)) {
        $mainurl = "bbsnew.php";
    }
    $mbids = bbs_bm_get_manageable_bids();
    if ($mbids) {
        setcookie("MANAGEBIDS", $mbids, 0, "/");
    }
    header("Set-KBSRC: " . $data["userid"]);
}
setcookie("UTMPKEY", $data["utmpkey"], 0, "/");
setcookie("UTMPNUM", $num, 0, "/");
setcookie("UTMPUSERID", $data["userid"], 0, "/");
$target = "frames.html";
$data["simplepasswd"] = bbs_simplepasswd($passwd);
if ($data["simplepasswd"]) {
    prompt_changepasswd();
    exit;
}
if ($mainurl != "") {
    if (!strcasecmp(substr($mainurl, 0, "6"), "atomic")) {
        header("Location: " . $mainurl);
    } else {
        header("Location: {$target}?mainurl=" . $mainurl);
    }
} else {
    header("Location: {$target}");
}
function prompt_multilogin()
{
Ejemplo n.º 2
0
require "www2-funcs.php";
login_init();
toolbox_header("密码修改");
assert_login();
if (isset($_GET['do'])) {
    $pass = $_POST['pw2'];
    if (strlen($pass) < 4 || strlen($pass) > 39) {
        html_error_quit("新密码长度应为 4~39");
    }
    if ($pass != $_POST['pw3']) {
        html_error_quit("两次输入的密码不相同");
    }
    if (bbs_checkuserpasswd($currentuser["userid"], $_POST['pw1']) != 0) {
        html_error_quit("密码不正确");
    }
    $simplepasswd = bbs_simplepasswd($pass);
    if ($simplepasswd == -1) {
        html_error_quit("该密码被禁止使用,请重新设置密码");
    } else {
        if ($simplepasswd) {
            prompt_setpasswd();
        }
    }
    if (!bbs_setpassword($currentuser["userid"], $pass)) {
        html_error_quit("系统错误,请联系管理员");
    }
    html_success_quit("密码修改成功,您的新密码已设定");
    exit;
}
?>
<script type="text/javascript">