<?php

if (IS_POST)
{
    /**
     * 批量删除
     */
    $ids = $_POST['ids'];
    is_array($ids) or yun_error('至少选择一项');
    foreach ($ids as $id)
    {
        $id = abs(intval($id));
        if (!isset($conf['sys_teams'][$id]) || $id < 10)
            continue;
        unset($conf['sys_teams'][$id]);
    }
    set_conf('sys_teams', $conf['sys_teams']);
    yun_succeed('删除成功', 'refresh');
}
$id = A;
isset($conf['sys_teams'][$id]) or yun_error('用户组不存在');
$id < 10 && yun_error('系统集成,无法删除');
unset($conf['sys_teams'][$id]);
set_conf('sys_teams', $conf['sys_teams']);
yun_succeed('删除成功', 'refresh');

?>