<?php

$id = A;
isset($conf['sys_teams'][$id]) or yun_error('用户组不存在');
if (IS_POST)
{
    strlen($_POST['gname']) < 1 && yun_error('身份名不能为空', 'yun_onfocus("gname");');
    $pvs = is_array($_POST['pvs']) ? $_POST['pvs'] : array();
    $adminpvs = is_array($_POST['adminpvs']) ? $_POST['adminpvs'] : array();
    $conf['sys_teams'][$id] = array('name' => $_POST['gname'], 'pvs' => $pvs,
        'adminpvs' => $adminpvs);
    set_conf('sys_teams', $conf['sys_teams']);
    yun_succeed('编辑成功', 'refresh');
}
arg($id);

?>