function pagerights($inPath) { $url = $this->getUrlParams($inPath); $groupObj = new m_group(); $gid = (int) $url['gid']; $this->params['gid'] = $gid; if (!$gid) { $this->params['group'] = $groupObj->select()->items; return $this->render('system/rights.html', $this->params); } else { if (!$_POST) { if ($gid) { $this->params['rights'] = $groupObj->selectOne("gid = {$gid}"); $this->params['action'] = unserialize($this->params['rights']['action_code']); return $this->render('system/rightsshow.html', $this->params); } $this->ShowMsg("用户组不存在!"); } else { $action_code = $this->creatRights($_POST); $groupObj->update("gid = {$gid}", "action_code = '{$action_code}'"); $cacheName = "action_code_group_" . $gid; $cache = SCache::getCacheEngine('file'); $cache->init(array("dir" => SlightPHP::$appDir . "/cache", "depth" => 3)); $rs = $cache->del($cacheName); $this->ShowMsg("编辑成功!", $this->createUrl('/system/rights'), '', 1); } } }