Ejemplo n.º 1
0
            exit('Channel Error!');
        }
        $uid = Char_Cv('uid');
        $user = API_Info($userid);
        if ($Channel['username'] != $username) {
            exit('-1');
        }
        if (!$db) {
            include_once ONEZ_ROOT . './include/db_mysql.class.php';
            db_local();
            $db = new onez_db();
            $masters = explode(',', $Channel['masters']);
            if (!in_array($username, $masters)) {
                $masters[] = $username;
                $masters = implode(',', $masters);
                $db->update("channel", array('masters' => $masters), "id='{$ChannelId}'");
                Channel($ChannelId, 1);
            }
        }
        AddMsg_Public("5\t{$uid}", $ChannelId);
        exit('1');
        break;
    case 'addfriend':
        $uid = Char_Cv('uid');
        $A = explode(',', API_LsFriend());
        if (in_array($uid, $A)) {
            exit('-1');
        }
        echo API_AddFriend($uid);
        break;
}
Ejemplo n.º 2
0
    API_Logout();
    exit('<script>alert("本群人数已满");
  if(top!==self)top.location.reload();</script>');
}
$today = date('Ymd');
if ($Channel['forumid'] && $Channel['lastday'] != $today) {
    $api = API_Pub($bbsTitle, $bbsContent);
    list($tid, $url) = $api;
    $arr = array('lasttid' => $tid, 'lastday' => $today);
    if (!$db) {
        include_once ONEZ_ROOT . './include/db_mysql.class.php';
        db_local();
        $db = new onez_db();
    }
    $db->reset();
    $db->update("channel", $arr, "id='{$Channel['id']}'");
    if ($Conn) {
        $Conn->reset();
    }
    @unlink('onezdata/cache/channel/' . $Channel['id'] . '.php');
}
if ($Channel['username'] == $username) {
    $grade = 28;
} elseif (in_array($username, explode(',', $Channel['masters']))) {
    $grade = 2;
} elseif ($username) {
    $grade = 1;
} else {
    if ($Channel['allowguest'] == 1) {
        $grade = 0;
    } else {