public function insertAction() { if ($this->_request->isPost()) { $params = $this->_request->getParams(); if ($params['username'] == "" || $params['email'] == "" || $params['password'] == "") { echo "<script>alert('Xin điền đủ thông tin');</script>"; } else { $m_user = new Default_Model_User(); $status = $m_user->insertUser($params); if ($status) { $this->_redirect(HOST_PATH_PUBLIC . "/user"); } else { echo "<script>alert('Thêm thất bại');</script>"; } } } }