/** * View the reservations. * */ public function index() { $this->_auth->redirectIfNotAuthenticated(); $this->_pageData = new stdClass(); $this->_pageData->uri = $this->_request->getUri(); $this->_pageData->loggedIn = $this->_auth->checkLoggedIn(); $this->_pageData->pageTitle = "View Reservations"; $this->_pageData->csrfToken = Csrf::createToken(); $this->_pageData->reservations = $this->_reservation->getAllReservations(); return $this->_view->make('admin/reservations', $this->_pageData); }
/** * Show the view for editing a property. * * @param $id */ public function edit($id) { $this->_auth->redirectIfNotAuthenticated(); try { $this->_property = $this->_property->getProperty($id); } catch (Exception $e) { return header('Location: ' . POST_ADD_PROPERTY_URL); } if (is_null($this->_property)) { return header('Location: ' . POST_ADD_PROPERTY_URL); } $this->_pageData->pageTitle = "Edit Property"; $this->_pageData->loggedIn = $this->_auth->checkLoggedIn(); $this->_pageData->uri = $this->_request->getUri(); $this->_pageData->csrfToken = Csrf::createToken(); $this->_pageData->property = $this->_property; return $this->_view->make('admin/edit-property', $this->_pageData); }
/** * Display the view for updating a user. * */ public function edit() { $this->_pageData->id = $this->_authenticatedUser; $this->_pageData->csrfToken = Csrf::createToken(); $this->_pageData->pageTitle = 'Create User'; $this->_pageData->loggedIn = $this->_auth->checkLoggedIn(); return $this->_view->make('admin/change-password', $this->_pageData); }