protected function ChangePassword() { //Check if is post if (CHelper::IsPost()) { //POST $model = new UserModel("ChangePassword", true); //Error checking if ($model->hasError()) { $model->setPageTitle('User Settings'); $this->ReturnViewByName("settings", $model->view, "layout"); exit; } $this->Redirect('user', 'settings'); } }
protected function Create() { //Check user is logged in if (!CHelper::IsLoggedIn()) { $this->Redirect('account', 'login', 'createevent'); } //Check if is post if (CHelper::IsPost()) { //POST $model = new EventModel("Create", true); //Error checking if ($model->hasError()) { $model->setPageTitle('Create Event'); $this->ReturnViewByName("create", $model->view, "layout"); exit; } $this->Redirect('event', 'detail', $model->view->post['id']); } else { //GET $model = new EventModel("Create"); $model->setPageTitle('New Event'); $this->ReturnView($model->view); } }