/** * 管理员管理首页 * @author 陈晓东 */ 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); $PermissionCheck = $this->manager->checkMenuPermission(0); if ($PermissionCheck['return']) { $username = $this->request->username; $menu_group_id = $this->request->menu_group_id; $data_group_id = $this->request->data_group_id; $is_partner = $this->request->is_partner; $bind = array('username' => $username, 'menu_group_id' => $menu_group_id, 'data_group_id' => $data_group_id, 'is_partner' => $is_partner); $Widget_Group = new Widget_Group(); $menuGroup = $Widget_Group->getClass('1'); $dataGroup = $Widget_Group->getClass('2'); $Widget_Manager = new Widget_Manager(); $manager = $Widget_Manager->getLikeName($bind); if (!empty($manager)) { foreach ($manager as $k => $v) { if ($v['name'] == $this->manager->name) { $manager[$k]['delete'] = 0; } else { $manager[$k]['delete'] = 1; } $manager[$k]['menu_group_name'] = "暂无分组"; $manager[$k]['data_group_name'] = ""; $manager[$k]['last_login'] = date('Y-m-d H:i:s', $v['last_login']); $manager[$k]['last_active'] = date('Y-m-d H:i:s', $v['last_login']); $manager[$k]['reg_time'] = date('Y-m-d H:i:s', $v['reg_time']); foreach ($menuGroup as $row) { if ($v['menu_group_id'] == $row['group_id']) { $manager[$k]['menu_group_name'] = $row['name']; } } if (!empty($v['data_groups'])) { $datas = explode(',', $v['data_groups']); sort($datas); $data_group_name = array(); foreach ($datas as $ks => $vs) { foreach ($dataGroup as $key => $value) { if ($vs == $value['group_id']) { $data_group_name[] = $value['name']; } } } $manager[$k]['data_group_name'] = implode(',', $data_group_name); } } } include $this->tpl('manager_index'); } else { $home = "?ctl=home"; include $this->tpl('403'); } }