<?php

if (IS_POST)
{
    for ($newid = 10; isset($conf['sys_teams'][$newid]); $newid++)
        ;
    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'][$newid] = array('name' => $_POST['gname'], 'pvs' => $pvs,
        'adminpvs' => $adminpvs);
    set_conf('sys_teams', $conf['sys_teams']);
    yun_succeed('创建成功', 'refresh');
}

?>