Beispiel #1
0
function CheckGetPassword($add, $ecms = 1)
{
    global $empire, $dbtbpre, $public_r;
    $r['id'] = (int) $add['id'];
    $r['tt'] = (int) $add['tt'];
    $r['cc'] = RepPostVar($add['cc']);
    if (!$r[id] || !$r[tt] || !$r[cc]) {
        printerror('GPErrorPass', $public_r['newsurl'], 1);
    }
    $ur = $empire->fetch1("select " . eReturnSelectMemberF('userid,username,checked,groupid') . " from " . eReturnMemberTable() . " where " . egetmf('userid') . "='{$r['id']}' limit 1");
    if (empty($ur['userid'])) {
        printerror('GPErrorPass', $public_r['newsurl'], 1);
    }
    $addur = $empire->fetch1("select authstr from {$dbtbpre}enewsmemberpub where userid='{$r['id']}' limit 1");
    if (!$addur['authstr']) {
        printerror('GPErrorPass', $public_r['newsurl'], 1);
    }
    QMReturnCheckThePass($r['id'], $r['cc'], $r['tt'], $addur['authstr'], $ecms);
    $r['username'] = $ur['username'];
    $r['checked'] = $ur['checked'];
    $r['groupid'] = $ur['groupid'];
    return $r;
}
function CheckGetPassword($add, $ecms = 1)
{
    global $empire, $dbtbpre, $public_r, $user_tablename, $user_username, $user_userid, $user_email, $user_checked, $user_group;
    $r['id'] = (int) $add['id'];
    $r['tt'] = (int) $add['tt'];
    $r['cc'] = RepPostVar($add['cc']);
    if (!$r[id] || !$r[tt] || !$r[cc]) {
        printerror('GPErrorPass', $public_r['newsurl'], 1);
    }
    $ur = $empire->fetch1("select " . $user_userid . "," . $user_username . "," . $user_checked . "," . $user_group . " from {$user_tablename} where " . $user_userid . "='{$r['id']}' limit 1");
    if (empty($ur[$user_userid])) {
        printerror('GPErrorPass', $public_r['newsurl'], 1);
    }
    $addur = $empire->fetch1("select authstr from {$dbtbpre}enewsmemberadd where userid='{$r['id']}' limit 1");
    if (!$addur['authstr']) {
        printerror('GPErrorPass', $public_r['newsurl'], 1);
    }
    QMReturnCheckThePass($r['id'], $r['cc'], $r['tt'], $addur['authstr'], $ecms);
    $r['username'] = $ur[$user_username];
    $r['checked'] = $ur[$user_checked];
    $r['groupid'] = $ur[$user_group];
    return $r;
}