/** * 增加模块 */ public function cModuleAdd() { $this->_modelModule = $this->getGlobal('model/Module', 'Model_Module'); if ($this->_modelModule->findById($this->getR('module'))) { $this->error('已有相同模块'); } $insertArr = array('module' => $this->getR('module'), 'name' => $this->getR('name')); if ($this->_modelModule->insert($insertArr)) { $this->success('增加模块成功'); } else { $this->error('增加模块失败'); } }