function loginout($userid, $username, $rnd)
{
    global $empire, $dbtbpre, $do_ckhloginfile;
    $userid = (int) $userid;
    if (!$userid || !$username) {
        printerror("NotLogin", "history.go(-1)");
    }
    $set1 = esetcookie("loginuserid", "", 0, 1);
    $set2 = esetcookie("loginusername", "", 0, 1);
    $set3 = esetcookie("loginrnd", "", 0, 1);
    $set4 = esetcookie("loginlevel", "", 0, 1);
    //FireWall
    FWEmptyPassword();
    //取得随机密码
    $rnd = make_password(20);
    $sql = $empire->query("update {$dbtbpre}enewsuser set rnd='{$rnd}' where userid='{$userid}'");
    if (empty($do_ckhloginfile)) {
        DoEDelFileRnd($userid);
    }
    //操作日志
    insert_dolog("");
    printerror("ExitSuccess", "index.php");
}
Exemple #2
0
function loginout($userid,$username,$rnd){
	global $empire,$dbtbpre,$ecms_config;
	$userid=(int)$userid;
	if(!$userid||!$username)
	{
		printerror("NotLogin","history.go(-1)");
	}
	$set1=esetcookie("loginuserid","",0,1);
	$set2=esetcookie("loginusername","",0,1);
	$set3=esetcookie("loginrnd","",0,1);
	$set4=esetcookie("loginlevel","",0,1);
	//COOKIERND
	DelECookieRnd();
	DelESessionRnd();
	DelECookieAdminLoginFileInfo();
	//FireWall
	FWEmptyPassword();
	//取得随机密码
	$rnd=make_password(20);
	$sql=$empire->query("update {$dbtbpre}enewsuser set rnd='$rnd' where userid='$userid'");
	DoEDelFileRnd($userid);
	DoEDelAndAuthRnd($userid);
	//操作日志
	insert_dolog("");
	printerror("ExitSuccess","index.php");
}