public function insertAction() { if ($this->_getParam("submit")) { if ($this->_getParam("name")) { $topicTbl = new VC_DbTable_Store_Topic(); $data = array(); $data['user_id'] = $this->userId; $data['name'] = $this->_getParam("name"); $data['topic_group_id'] = $this->_getParam("topic_group_id"); $topicId = $topicTbl->insert($data); $this->_helper->flashMessenger->addMessage(array('insert' => "Bạn đã nhập thành công.")); } else { $this->_helper->flashMessenger->addMessage(array('insert' => "Bạn phải nhập tên của chủ đề.")); } } $this->_redirect("topic/index"); }