コード例 #1
0
ファイル: user.php プロジェクト: BGCX261/zjh-dev-svn-to-git
function loginout1($userid, $username, $rnd)
{
    global $empire, $public_r, $equiturl;
    //是否登陆
    $user_r = islogin();
    if ($equiturl) {
        Header("Location:{$equiturl}");
        exit;
    }
    EmptyEcmsCookie();
    $dopr = 1;
    if ($_GET['prtype']) {
        $dopr = 9;
    }
    $gotourl = "../../";
    if (strstr($_SERVER['HTTP_REFERER'], "e/member/iframe")) {
        $gotourl = $public_r['newsurl'] . "e/member/iframe/";
    }
    $gotourl = DoingReturnUrl($gotourl, $_GET['ecmsfrom']);
    printerror("ExitSuccess", $gotourl, $dopr);
}
コード例 #2
0
function ViewCheckLogin($infor)
{
    global $empire, $public_r, $user_tablename, $user_userid, $user_username, $user_userfen, $user_group, $user_groupid, $user_rnd, $user_zgroup, $user_userdate, $user_checked, $eloginurl, $toreturnurl, $gotourl;
    $userid = (int) getcvar('mluserid');
    $rnd = RepPostVar(getcvar('mlrnd'));
    if (!$userid) {
        if (!getcvar('returnurl')) {
            esetcookie("returnurl", $toreturnurl, 0);
        }
        $msg = "您还未登陆,<a href='{$gotourl}'><u>点击这里</u></a>进行登陆操作;注册请<a href='" . $public_r['newsurl'] . "e/member/register/'><u>点击这里</u></a>。";
        ShowViewInfoMsg($infor, $msg);
    }
    $cr = $empire->fetch1("select " . $user_checked . "," . $user_userid . "," . $user_username . "," . $user_group . "," . $user_userfen . "," . $user_userdate . "," . $user_zgroup . " from " . $user_tablename . " where " . $user_userid . "='{$userid}' and " . $user_rnd . "='{$rnd}' limit 1");
    if (!$cr[$user_userid]) {
        EmptyEcmsCookie();
        if (!getcvar('returnurl')) {
            esetcookie("returnurl", $toreturnurl, 0);
        }
        $msg = "同一帐号只能一人在线,<a href='{$gotourl}'><u>点击这里</u></a>重新登陆;注册请<a href='" . $public_r['newsurl'] . "e/member/register/'><u>点击这里</u></a>。";
        ShowViewInfoMsg($infor, $msg);
    }
    if ($cr[$user_checked] == 0) {
        EmptyEcmsCookie();
        if (!getcvar('returnurl')) {
            esetcookie("returnurl", $toreturnurl, 0);
        }
        $msg = "您的帐号还未审核通过,<a href='{$gotourl}'><u>点击这里</u></a>重新登陆;注册请<a href='" . $public_r['newsurl'] . "e/member/register/'><u>点击这里</u></a>。";
        ShowViewInfoMsg($infor, $msg);
    }
    //默认会员组
    if (empty($cr[$user_group])) {
        $usql = $empire->query("update " . $user_tablename . " set " . $user_group . "='{$user_groupid}' where " . $user_userid . "='" . $cr[$user_userid] . "'");
        $cr[$user_group] = $user_groupid;
    }
    //是否过期
    if ($cr[$user_userdate]) {
        if ($cr[$user_userdate] - time() <= 0) {
            OutTimeZGroup($cr[$user_userid], $cr[$user_zgroup]);
            $cr[$user_userdate] = 0;
            if ($cr[$user_zgroup]) {
                $cr[$user_group] = $cr[$user_zgroup];
                $cr[$user_zgroup] = 0;
            }
        }
    }
    $re[userid] = $cr[$user_userid];
    $re[username] = doUtfAndGbk($cr[$user_username], 1);
    $re[userfen] = $cr[$user_userfen];
    $re[groupid] = $cr[$user_group];
    $re[userdate] = $cr[$user_userdate];
    $re[zgroupid] = $cr[$user_zgroup];
    return $re;
}
コード例 #3
0
ファイル: CheckLevel.php プロジェクト: novnan/meiju
function ViewCheckLogin($infor)
{
    global $empire, $public_r, $ecms_config, $toreturnurl, $gotourl;
    $userid = (int) getcvar('mluserid');
    $rnd = RepPostVar(getcvar('mlrnd'));
    if (!$userid) {
        if (!getcvar('returnurl')) {
            esetcookie("returnurl", $toreturnurl, 0);
        }
        $msg = "您还未登陆,<a href='{$gotourl}'><u>点击这里</u></a>进行登陆操作;注册请<a href='" . $public_r['newsurl'] . "e/member/register/'><u>点击这里</u></a>。";
        ShowViewInfoMsg($infor, $msg);
    }
    $cr = $empire->fetch1("select " . eReturnSelectMemberF('checked,userid,username,groupid,userfen,userdate,zgroupid') . " from " . eReturnMemberTable() . " where " . egetmf('userid') . "='{$userid}' and " . egetmf('rnd') . "='{$rnd}' limit 1");
    if (!$cr['userid']) {
        EmptyEcmsCookie();
        if (!getcvar('returnurl')) {
            esetcookie("returnurl", $toreturnurl, 0);
        }
        $msg = "同一帐号只能一人在线,<a href='{$gotourl}'><u>点击这里</u></a>重新登陆;注册请<a href='" . $public_r['newsurl'] . "e/member/register/'><u>点击这里</u></a>。";
        ShowViewInfoMsg($infor, $msg);
    }
    if ($cr['checked'] == 0) {
        EmptyEcmsCookie();
        if (!getcvar('returnurl')) {
            esetcookie("returnurl", $toreturnurl, 0);
        }
        $msg = "您的帐号还未审核通过,<a href='{$gotourl}'><u>点击这里</u></a>重新登陆;注册请<a href='" . $public_r['newsurl'] . "e/member/register/'><u>点击这里</u></a>。";
        ShowViewInfoMsg($infor, $msg);
    }
    //默认会员组
    if (empty($cr['groupid'])) {
        $user_groupid = eReturnMemberDefGroupid();
        $usql = $empire->query("update " . eReturnMemberTable() . " set " . egetmf('groupid') . "='{$user_groupid}' where " . egetmf('userid') . "='" . $cr[userid] . "'");
        $cr['groupid'] = $user_groupid;
    }
    //是否过期
    if ($cr['userdate']) {
        if ($cr['userdate'] - time() <= 0) {
            OutTimeZGroup($cr['userid'], $cr['zgroupid']);
            $cr['userdate'] = 0;
            if ($cr['zgroupid']) {
                $cr['groupid'] = $cr['zgroupid'];
                $cr['zgroupid'] = 0;
            }
        }
    }
    $re[userid] = $cr['userid'];
    $re[username] = $cr['username'];
    $re[userfen] = $cr['userfen'];
    $re[groupid] = $cr['groupid'];
    $re[userdate] = $cr['userdate'];
    $re[zgroupid] = $cr['zgroupid'];
    return $re;
}
コード例 #4
0
ファイル: member_loginfun.php プロジェクト: novnan/meiju
function qloginout($userid, $username, $rnd)
{
    global $empire, $public_r, $ecms_config;
    //是否登陆
    $user_r = islogin();
    if ($ecms_config['member']['quiturl']) {
        Header("Location:" . $ecms_config['member']['quiturl']);
        exit;
    }
    EmptyEcmsCookie();
    $dopr = 1;
    if ($_GET['prtype']) {
        $dopr = 9;
    }
    $gotourl = "../../";
    if (strstr($_SERVER['HTTP_REFERER'], "e/member/iframe")) {
        $gotourl = $public_r['newsurl'] . "e/member/iframe/";
    }
    //易通行系统
    DoEpassport('logout', $user_r['userid'], $user_r['username'], '', '', '', '', '');
    $gotourl = DoingReturnUrl($gotourl, $_GET['ecmsfrom']);
    printerror("ExitSuccess", $gotourl, $dopr);
}
コード例 #5
0
ファイル: index.php プロジェクト: BGCX261/zjh-dev-svn-to-git
}
$myuserid = (int) getcvar('mluserid');
$mhavelogin = 0;
if ($myuserid) {
    include "../../class/db_sql.php";
    include "../../class/user.php";
    include "../../data/dbcache/MemberLevel.php";
    $link = db_connect();
    $empire = new mysqlquery();
    $mhavelogin = 1;
    //数据
    $myusername = RepPostVar(getcvar('mlusername'));
    $myrnd = RepPostVar(getcvar('mlrnd'));
    $r = $empire->fetch1("select " . $user_userid . "," . $user_username . "," . $user_group . "," . $user_userfen . "," . $user_money . "," . $user_userdate . "," . $user_havemsg . "," . $user_checked . " from " . $user_tablename . " where " . $user_userid . "='{$myuserid}' and " . $user_rnd . "='{$myrnd}' limit 1");
    if (empty($r[$user_userid]) || $r[$user_checked] == 0) {
        EmptyEcmsCookie();
        $mhavelogin = 0;
    }
    //会员等级
    if (empty($r[$user_group])) {
        $groupid = $user_groupid;
    } else {
        $groupid = $r[$user_group];
    }
    $groupname = $level_r[$groupid]['groupname'];
    //点数
    $userfen = $r[$user_userfen];
    //余额
    $money = $r[$user_money];
    //天数
    $userdate = 0;
コード例 #6
0
ファイル: user.php プロジェクト: novnan/meiju
function islogin($uid = 0, $uname = '', $urnd = '')
{
    global $empire, $dbtbpre, $public_r, $ecmsreurl, $ecms_config;
    if ($uid) {
        $userid = (int) $uid;
    } else {
        $userid = (int) getcvar('mluserid');
    }
    if ($uname) {
        $username = $uname;
    } else {
        $username = getcvar('mlusername');
    }
    $username = RepPostVar($username);
    if ($urnd) {
        $rnd = $urnd;
    } else {
        $rnd = getcvar('mlrnd');
    }
    if ($ecms_config['member']['loginurl']) {
        $gotourl = $ecms_config['member']['loginurl'];
    } else {
        $gotourl = $public_r['newsurl'] . "e/member/login/";
    }
    $petype = 1;
    $rnd = RepPostVar($rnd);
    if (!$userid || !$username || !$rnd) {
        if (!getcvar('returnurl')) {
            esetcookie("returnurl", RepPostStrUrl($_SERVER['HTTP_REFERER']), 0);
        }
        if ($ecmsreurl == 1) {
            $gotourl = "history.go(-1)";
            $petype = 9;
        } elseif ($ecmsreurl == 2) {
            $phpmyself = urlencode(eReturnSelfPage(1));
            $gotourl = $public_r['newsurl'] . "e/member/login/login.php?prt=1&from=" . $phpmyself;
            $petype = 9;
        }
        printerror("NotLogin", $gotourl, $petype);
    }
    $cr = $empire->fetch1("select " . eReturnSelectMemberF('userid,username,email,groupid,userfen,money,userdate,zgroupid,havemsg,checked,registertime') . " from " . eReturnMemberTable() . " where " . egetmf('userid') . "='{$userid}' and " . egetmf('username') . "='{$username}' and " . egetmf('rnd') . "='{$rnd}' limit 1");
    if (!$cr['userid']) {
        EmptyEcmsCookie();
        if (!getcvar('returnurl')) {
            esetcookie("returnurl", RepPostStrUrl($_SERVER['HTTP_REFERER']), 0);
        }
        if ($ecmsreurl == 1) {
            $gotourl = "history.go(-1)";
            $petype = 9;
        } elseif ($ecmsreurl == 2) {
            $phpmyself = urlencode(eReturnSelfPage(1));
            $gotourl = $public_r['newsurl'] . "e/member/login/login.php?prt=1&from=" . $phpmyself;
            $petype = 9;
        }
        printerror("NotSingleLogin", $gotourl, $petype);
    }
    if ($cr['checked'] == 0) {
        EmptyEcmsCookie();
        if ($ecmsreurl == 1) {
            $gotourl = "history.go(-1)";
            $petype = 9;
        } elseif ($ecmsreurl == 2) {
            $phpmyself = urlencode(eReturnSelfPage(1));
            $gotourl = $public_r['newsurl'] . "e/member/login/login.php?prt=1&from=" . $phpmyself;
            $petype = 9;
        }
        printerror("NotCheckedUser", '', $petype);
    }
    //默认会员组
    if (empty($cr['groupid'])) {
        $user_groupid = eReturnMemberDefGroupid();
        $usql = $empire->query("update " . eReturnMemberTable() . " set " . egetmf('groupid') . "='{$user_groupid}' where " . egetmf('userid') . "='" . $cr[userid] . "'");
        $cr['groupid'] = $user_groupid;
    }
    //是否过期
    if ($cr['userdate']) {
        if ($cr['userdate'] - time() <= 0) {
            OutTimeZGroup($cr['userid'], $cr['zgroupid']);
            $cr['userdate'] = 0;
            if ($cr['zgroupid']) {
                $cr['groupid'] = $cr['zgroupid'];
                $cr['zgroupid'] = 0;
            }
        }
    }
    $re[userid] = $cr['userid'];
    $re[rnd] = $rnd;
    $re[username] = $cr['username'];
    $re[email] = $cr['email'];
    $re[userfen] = $cr['userfen'];
    $re[money] = $cr['money'];
    $re[groupid] = $cr['groupid'];
    $re[userdate] = $cr['userdate'];
    $re[zgroupid] = $cr['zgroupid'];
    $re[havemsg] = $cr['havemsg'];
    $re[registertime] = $cr['registertime'];
    return $re;
}