public function removeReserva($idReserva) { try { $ctrl = new ReservaController($this->persistenceManager); $ctrl->removeReserva($idReserva); $cm = new CommunicationMensaje(true, SALAS_COMP_ALERT_A_OPERATION_SUCCESS, $this->ID + 59); return $cm; } catch (Exception $e) { return new CommunicationMensaje(false, $e->getMessage(), $this->ID + 60 . "->" . $e->getCode()); } }
<? require '../controller/reservaController.php'; $reserva = new ReservaController(); // salvar dados $reserva->salvarController(); if(isset($_GET['id']) && is_numeric($_GET['id'])) { $reg_id = $_GET['id']; $sala_id = $_GET['sala_id']; $periodo_id = $_GET['periodo_id']; if( $reg_id > 0 ) { $row = $reserva->abrirController($reg_id ); extract($row[0]); } else { $status = 1; // reservado // sugerir data do calendario atual if(isset($_GET['data'])) $hoje = date_create_from_format('d/m/Y',$_GET['data']); else $hoje = new DateTime();