function pageaddrights($inPath) { if (!$_POST['group_name']) { return $this->render('system/addrights.html', $this->params); } else { $item = array(); $item['group_name'] = base_Utils::shtmlspecialchars($_POST['group_name']); if ($item['group_name']) { $groupObj = new m_group(); $res = $groupObj->selectOne("group_name='{$item['group_name']}'", 'gid'); if ($res) { $this->ShowMsg('用户组名称已经存在!'); } $item['action_code'] = $this->creatRights($_POST); $rs = $groupObj->insert($item); if ($rs) { $this->ShowMsg('添加成功', $this->createUrl('/system/rights'), '', 1); } else { $this->ShowMsg('添加失败,请重试!错误原因:' . $groupObj->getError()); } } $this->ShowMsg('用户组名称不能够为空!'); } }