Пример #1
0
        } else {
            $dialogBox->error(get_lang('You can\'t remove a group forum. You have to remove the group first'));
        }
    }
    if ('exEmptyForum' == $cmd) {
        if (delete_all_post_in_forum($forumId)) {
            $dialogBox->success(get_lang('Forum emptied'));
        } else {
            $dialogBox->error(get_lang('Unable to empty forum'));
        }
    }
    if ('exMvUpCat' == $cmd) {
        move_up_category($catId);
    }
    if ('exMvDownCat' == $cmd) {
        move_down_category($catId);
    }
    if ('exMvUpForum' == $cmd) {
        move_up_forum($forumId);
    }
    if ('exMvDownForum' == $cmd) {
        move_down_forum($forumId);
    }
}
//end of admin commands
//load category and forum lists
$categories = get_category_list();
$total_categories = count($categories);
$forum_list = get_forum_list();
if (claro_is_user_authenticated()) {
    $userGroupList = get_user_group_list(claro_get_current_user_id());
Пример #2
0
if ($cmd == 'exDelForum') {
    $forumSettingList = get_forum_settings($_REQUEST['forumId']);
    if (is_null($forumSettingList['idGroup'])) {
        if (delete_forum($_REQUEST['forumId'])) {
            $dialogBox->success(get_lang('Forum deleted'));
        } else {
            $dialogBox->error(get_lang('Unable to delete Forum'));
        }
    } else {
        $dialogBox->error(get_lang('You can\'t remove a group forum. You have to remove the group first'));
    }
}
if ($cmd == 'exEmptyForum') {
    if (delete_all_post_in_forum($_REQUEST['forumId'])) {
        $dialogBox->success(get_lang('Forum emptied'));
    } else {
        $dialogBox->error(get_lang('Unable to empty forum'));
    }
}
if ($cmd == 'exMvUpCat') {
    move_up_category($_REQUEST['catId']);
}
if ($cmd == 'exMvDownCat') {
    move_down_category($_REQUEST['catId']);
}
if ($cmd == 'exMvUpForum') {
    move_up_forum($_REQUEST['forumId']);
}
if ($cmd == 'exMvDownForum') {
    move_down_forum($_REQUEST['forumId']);
}