Beispiel #1
0
function topicDropModerators($topic_id, $users)
{
    global $database_cfg;
    $topic_moders = topicGetModeratorsString($topic_id);
    $topic_moders = stringDropTokens($topic_moders, $users);
    databaseQuery("update " . $database_cfg["prefix"] . "topics set moderators='" . $topic_moders . "' where id='" . intval($topic_id) . "'", "Can't set topic moderators");
}
Beispiel #2
0
function groupDropFlags($id, $flags)
{
    $group = groupGetById($id);
    if (is_array($group)) {
        $flags1 = $group["flags"];
        $flags1 = stringDropTokens($flags1, $flags);
        global $database_cfg;
        databaseQuery("update " . $database_cfg["prefix"] . "groups set (flags='" . $flags1 . "'", "Can not add group flags");
    } else {
        return "Group with given id doesn't exists";
    }
}
Beispiel #3
0
function userDropGroups($user_id, $groups)
{
    global $database_cfg;
    $user = userGetById($user_id);
    $user["groups"] = stringDropTokens($user["groups"], $groups);
    databaseQuery("update " . $database_cfg["prefix"] . "users set groups='" . $user["groups"] . "' where id='" . intval($user_id) . "'", "Unable to add user to a group");
}