예제 #1
0
            inserttable('userlog', array('uid' => $newuid, 'action' => 'add', 'dateline' => $_SGLOBAL['timestamp']), 0, true);
        }
        $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('baseprofile') . " WHERE uid=" . $newuid);
        if ($row = $_SGLOBAL['db']->fetch_array($query)) {
            if (!strcmp($row['usertype'], "校友")) {
                update_usertype($_SGLOBAL['db'], $newuid);
            }
        }
        $q = $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET namestatus='1' WHERE uid='{$newuid}'");
        $_SGLOBAL['db']->fetch_array($q);
        $q = $_SGLOBAL['db']->query("SELECT academy,startyear FROM " . tname('baseprofile') . " WHERE uid='{$newuid}'");
        $academy = $_SGLOBAL['db']->fetch_array($q);
        $startyear = $academy['startyear'];
        $academy = $academy['academy'];
        $gid = tagGrade3($startyear, $academy, $_SGLOBAL['db']);
        jointag($newuid, $gid, $_SGLOBAL['db']);
        //showmessage('registered', $jumpurl);
        showmessage('registered', 'space.php?do=recommendpublic');
    }
    $register_rule = data_get('registerrule');
    include template('do_register');
} elseif ($op == "checkusername") {
    $username = trim($_POST['username']);
    if (empty($username)) {
        showmessage('user_name_is_not_legitimate');
    }
    @(include_once S_ROOT . './uc_client/client.php');
    $ucresult = uc_user_checkname($username);
    if ($ucresult == -1) {
        showmessage('user_name_is_not_legitimate');
    } elseif ($ucresult == -2) {
예제 #2
0
    //找到baseprofile
    //如果是国外校友
    $type = $_GET['type'];
    $q = $_SGLOBAL['db']->query("SELECT * FROM " . tname('baseprofile') . " WHERE uid='{$uid}'");
    $bp = $_SGLOBAL['db']->fetch_array($q);
    if ($bp) {
        //改成认证过的
        $q = $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET namestatus='1' WHERE uid='{$bp['uid']}'");
        $_SGLOBAL['db']->fetch_array($q);
        //拿出来学院跟入学年份
        $academy = $bp['academy'];
        $startyear = $bp['startyear'];
        //加入群组
        if ($academy && $startyear) {
            $gid = tagGrade3($startyear, $academy, $_SGLOBAL['db']);
            jointag($bp['uid'], $gid, $_SGLOBAL['db']);
        }
        showmessage('do_success', "/", 2);
    }
} elseif ($_GET['view'] == 'confirmoverseas') {
    $uid = $_GET['uid'];
    $uid = substr($uid, 2, strlen($uid) - 4);
    //如果是国外校友
    $type = $_GET['type'];
    if ($type == 'overseas') {
        //记录审批时间
        $_SGLOBAL['db']->query("UPDATE " . tname('spaceforeign') . " SET passline='" . time() . "' , pass_uid='" . $_SGLOBAL['supe_uid'] . "' , cer=1  WHERE uid='{$uid}'");
        $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('spaceforeign') . " WHERE uid={$uid}");
        if ($value = $_SGLOBAL['db']->fetch_array($query)) {
            tagGroupOverseas($uid, $value["country"] . $value["school"]);
        }