当前位置: 首页>>代码示例>>PHP>>正文


PHP GroupManager::unsubscribe_users方法代码示例

本文整理汇总了PHP中GroupManager::unsubscribe_users方法的典型用法代码示例。如果您正苦于以下问题:PHP GroupManager::unsubscribe_users方法的具体用法?PHP GroupManager::unsubscribe_users怎么用?PHP GroupManager::unsubscribe_users使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GroupManager的用法示例。


在下文中一共展示了GroupManager::unsubscribe_users方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: header

                Display::addFlash(Display::return_message(get_lang('ItemUpdated')));
                header("Location: {$currentUrl}");
                exit;
            }
            break;
        case 'self_reg':
            if (GroupManager::is_self_registration_allowed($userId, $my_group_id)) {
                GroupManager::subscribe_users($userId, $my_group_id);
                Display::addFlash(Display::return_message(get_lang('GroupNowMember')));
                header("Location: {$currentUrl}");
                exit;
            }
            break;
        case 'self_unreg':
            if (GroupManager::is_self_unregistration_allowed($userId, $my_group_id)) {
                GroupManager::unsubscribe_users($userId, $my_group_id);
                Display::addFlash(Display::return_message(get_lang('StudentDeletesHimself')));
                header("Location: {$currentUrl}");
                exit;
            }
            break;
    }
}
/*
 * Group-admin functions
 */
if (api_is_allowed_to_edit(false, true)) {
    // Post-actions
    if (isset($_POST['action'])) {
        switch ($_POST['action']) {
            case 'delete_selected':
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:group.php

示例2: if

Display::display_header($nameTools . ' ' . Security::remove_XSS($current_group['name']), 'Group');
/*	Introduction section (editable by course admin) */
Display::display_introduction_section(TOOL_GROUP);
/*	Actions and Action links */
/*
 * User wants to register in this group
 */
if (!empty($_GET['selfReg']) && GroupManager::is_self_registration_allowed($user_id, $current_group['id'])) {
    GroupManager::subscribe_users($user_id, $current_group['id']);
    Display::display_normal_message(get_lang('GroupNowMember'));
}
/*
 * User wants to unregister from this group
 */
if (!empty($_GET['selfUnReg']) && GroupManager::is_self_unregistration_allowed($user_id, $current_group['id'])) {
    GroupManager::unsubscribe_users($user_id, $current_group['id']);
    Display::display_normal_message(get_lang('StudentDeletesHimself'));
}
echo '<div class="actions">';
echo '<a href="group.php">' . Display::return_icon('back.png', get_lang('BackToGroupList'), '', ICON_SIZE_MEDIUM) . '</a>';
/*
 * Register to group
 */
$subscribe_group = '';
if (GroupManager::is_self_registration_allowed($user_id, $current_group['id'])) {
    $subscribe_group = '<a class="btn btn-default" href="' . api_get_self() . '?selfReg=1&group_id=' . $current_group['id'] . '" onclick="javascript: if(!confirm(' . "'" . addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES)) . "'" . ')) return false;">' . get_lang("RegIntoGroup") . '</a>';
}
/*
 * Unregister from group
 */
$unsubscribe_group = '';
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:group_space.php

示例3: isset

$my_msg = isset($_GET['msg']) ? Security::remove_XSS($_GET['msg']) : null;
$my_group = isset($_REQUEST['group']) ? Security::remove_XSS($_REQUEST['group']) : null;
$my_get_id1 = isset($_GET['id1']) ? Security::remove_XSS($_GET['id1']) : null;
$my_get_id2 = isset($_GET['id2']) ? Security::remove_XSS($_GET['id2']) : null;
$my_get_id = isset($_GET['id']) ? Security::remove_XSS($_GET['id']) : null;
if (isset($_GET['action'])) {
    switch ($_GET['action']) {
        case 'self_reg':
            if (GroupManager::is_self_registration_allowed($_SESSION['_user']['user_id'], $my_group_id)) {
                GroupManager::subscribe_users($_SESSION['_user']['user_id'], $my_group_id);
                Display::display_confirmation_message(get_lang('GroupNowMember'));
            }
            break;
        case 'self_unreg':
            if (GroupManager::is_self_unregistration_allowed($_SESSION['_user']['user_id'], $my_group_id)) {
                GroupManager::unsubscribe_users($_SESSION['_user']['user_id'], $my_group_id);
                Display::display_confirmation_message(get_lang('StudentDeletesHimself'));
            }
            break;
        case 'show_msg':
            Display::display_confirmation_message($my_msg);
            break;
        case 'warning_message':
            Display::display_warning_message($my_msg);
            break;
        case 'success_message':
            Display::display_confirmation_message($my_msg);
            break;
    }
}
/*
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:group.php


注:本文中的GroupManager::unsubscribe_users方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。