/** * * 修改一个管理员组对应的菜单权限表单页面 */ public function modifyByGroupAction() { /** * 记录日志 */ $log = "修改一个管理员组对应的菜单权限表单页面\n\nServerIp:\n" . $this->request->getServer('SERVER_ADDR') . "\n\nGET:\n" . var_export($_GET, true) . "\n\nPOST:\n" . var_export($_POST, true); $this->oLogManager->push('log', $log); $this->manager->checkMenuPermission($this->sign, Widget_Manager::MENU_PURVIEW_DELETE); $group_id = intval($this->request->group_id); $Widget_Group = new Widget_Group(); $group = $Widget_Group->get($group_id); $Widget_Menu = new Widget_Menu(); $menus = $this->getChildMenu(0); $menu = $this->MenuLink($menus); $Widget_Menu_Permission = new Widget_Menu_Permission(); $permission_detail = $Widget_Menu_Permission->getPermissionByGroup($group_id); foreach ($permission_detail as $row) { if (isset($menu[$row['menu_id']]['permission_detail'][$row['permission']])) { $menu[$row['menu_id']]['permission_detail'][$row['permission']]['selected'] = 1; } } include $this->tpl('Menu_purview_modifybygroup'); }
public function deleteAction() { /** * 记录日志 */ $log = "数据用户组删除\n\nServerIp:\n" . $this->request->getServer('SERVER_ADDR') . "\n\nGET:\n" . var_export($_GET, true) . "\n\nPOST:\n" . var_export($_POST, true); $this->oLogManager->push('log', $log); //检查权限 $this->manager->checkMenuPermission($this->sign, Widget_Manager::MENU_PURVIEW_DELETE); $group_id = intval($this->request->group_id); $oGroup = new Widget_Group(); $res = $oGroup->delete($group_id); if ($res) { $Widget_Menu_Permission = new Widget_Menu_Permission(); $Widget_Menu_Permission->deleteByGroup($group_id); } $this->response->goBack(); }
/** * 修改管理员表单页面 * @author 陈晓东 */ public function modifyAction() { /** * 记录日志 */ $log = "修改管理员表单页面\n\nServerIp:\n" . $this->request->getServer('SERVER_ADDR') . "\n\nGET:\n" . var_export($_GET, true) . "\n\nPOST:\n" . var_export($_POST, true); $this->oLogManager->push('log', $log); $PermissionCheck = $this->manager->checkMenuPermission("UpdateManager"); if ($PermissionCheck['return']) { $id = $this->request->id; $Widget_Group = new Widget_Group(); $menuGroup = $Widget_Group->getClass('1'); $dataGroup = $Widget_Group->getClass('2'); $Widget_Manager = new Widget_Manager(); $admin = $Widget_Manager->get($id); $admin['data_groups'] = explode(',', $admin['data_groups']); include $this->tpl('manager_modify'); } else { $home = $this->sign; include $this->tpl('403'); } }