Exemplo n.º 1
0
 public function roomsAction()
 {
     require_once 'models/homeModel.php';
     $model = new homeModel();
     if ($_POST['send'] == "addroom") {
         $newRoom = $model->insertRoom($_POST);
     }
     if ($_POST['send'] == "editroom") {
         $editRoom = $model->updateRoom($_POST);
     }
     $rooms = $model->getAllRooms();
     $this->_view->title = TITEL_ROOMS;
     $this->_view->rooms = $rooms;
     $this->_view->display('rooms/index.tpl.php');
 }