/** * 编辑权限点 * * @return boolean */ public function editAction() { if ($this->isPost()) { //修改密码验证 $aCookie = Util_Cookie::get(Yaf_G::getConf('authkey', 'cookie')); $iAdminID = $aCookie['iAdminID']; $aUser = Model_Admin::getDetail($iAdminID); $pwd = $this->getParam('pwd'); if (!isset($pwd) || $pwd == '') { return $this->showMsg('修改密码不可以为空', false); } if ($aUser['sEditPassword'] != md5($pwd)) { return $this->showMsg('修改密码不正确', false); } $aPermission = $this->_checkData(); if (empty($aPermission)) { return null; } $aPermission['iPermissionID'] = intval($this->getParam('iPermissionID')); if (1 == Model_Permission::updData($aPermission)) { return $this->showMsg('权限点信息更新成功!', true); } else { return $this->showMsg('权限点信息更新失败!', false); } } else { $iPermissionID = intval($this->getParam('id')); $aPermission = Model_Permission::getDetail($iPermissionID); $this->assign('aPermission', $aPermission); $this->assign('aMenuTree', Model_Menu::getMenus()); } }