diff --git a/panel_manager/includes/formSession.php b/panel_manager/includes/formSession.php index 90e235d..c27804b 100644 --- a/panel_manager/includes/formSession.php +++ b/panel_manager/includes/formSession.php @@ -37,7 +37,7 @@ class FormSession extends Form { }else if($this->option == "list"){ $this->reply = $this->sessions; } - } else { + } else if($this->correct == false) { $this->reply = "
Ha habido un error en la operacion. Revisa los datos introducidos o ponte en contacto con el administrador de la base de datos.
"; diff --git a/panel_manager/index.php b/panel_manager/index.php index 825c4c4..8957579 100644 --- a/panel_manager/index.php +++ b/panel_manager/index.php @@ -3,9 +3,11 @@ session_start(); require_once('../assets/php/template.php'); - require_once('./panel_manager.php'); - $template = new Template(); + $prefix = $template->get_prefix(); + + include_once('panel_manager.php'); + $login = false; if(isset($_SESSION["login"]) && $_SESSION["nombre"] == "manager") $login = true; diff --git a/panel_manager/manage_sessions.php b/panel_manager/manage_sessions.php index 5806155..7818f25 100644 --- a/panel_manager/manage_sessions.php +++ b/panel_manager/manage_sessions.php @@ -5,30 +5,31 @@ require('./includes/session_dto.php'); require('./includes/formSession.php'); - require('../panel_admin/includes/film_dto.php'); - require('../panel_admin/includes/film_dao.php'); + require_once('../assets/php/template.php'); + $template = new Template(); + $prefix = $template->get_prefix(); + + require($prefix.'panel_admin/includes/film_dto.php'); + require($prefix.'/panel_admin/includes/film_dao.php'); $formSession = new FormSession(); $formHall = new FormHall(); $placeholder_date = date("Y-m-d"); $placeholder_hall = "1"; - $filtered = false; $cinema = "1"; - - $formHall->processesForm(null, $cinema, null, null, "list"); - + if(isset($_POST['filter'])) { $placeholder_date = $_POST["date"]; $placeholder_hall = $_POST["hall"]; - $filtered = true; - - $formSession->processesForm(null, null, $placeholder_hall, $cinema, $placeholder_date, null, null, null, null, "list"); } - + + $formHall->processesForm(null, $cinema, null, null, "list"); + $formSession->processesForm(null, null, $placeholder_hall, $cinema, $placeholder_date, null, null, null, null, "list"); + echo"