public function indexAction() { /** * 记录日志 */ $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_SELECT); $oGroup = new Widget_Group(); $groupArr = $oGroup->getClass('2'); include $this->tpl(); }
/** * * 修改一个菜单对应的管理员组的权限表单页面 */ public function modifyByMenuAction() { /** * 记录日志 */ $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_SELECT); $menu_id = intval($this->request->menu_id); $Menu = new Widget_Menu(); $menu = $Menu->get($menu_id); $Widget_Group = new Widget_Group(); $group = $Widget_Group->getClass('1', 'group_id,name'); $Widget_Menu_Permission = new Widget_Menu_Permission(); $permission_list = array(); $M = explode('|', $menu['permission_list']); if (is_array($M)) { foreach ($M as $key => $value) { $P = explode(':', $value); if (is_array($P)) { $permission_list[$P[0]] = $P[1]; } } } $permission_by_menu = $Widget_Menu_Permission->getPermissionByMenu($menu_id); $groupPermission = array(); foreach ($group as $key => $group_info) { foreach ($permission_list as $pn => $p) { $group[$key]['permission_list'][$p] = 0; } //ksort($group[$key]['permission_list']); } foreach ($permission_by_menu as $row) { if (isset($group[$row['group_id']]['permission_list'][$row['permission']])) { $group[$row['group_id']]['permission_list'][$row['permission']] = 1; } //ksort($group[$row['group_id']]['permission_list']); } include $this->tpl('Menu_purview_modifybymenu'); }
/** * 修改管理员表单页面 * @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'); } }