From 3e7378d9d9e5b458b63133fc04ce8a3cc3590599 Mon Sep 17 00:00:00 2001 From: Markines16 <80280295+Markines16@users.noreply.github.com> Date: Wed, 14 Apr 2021 19:59:52 +0200 Subject: [PATCH] Add files via upload --- panel_manager/includes/formSession.php | 2 +- panel_manager/index.php | 6 ++-- panel_manager/manage_sessions.php | 49 ++++++++++++++++---------- panel_manager/panel_manager.php | 1 + 4 files changed, 36 insertions(+), 22 deletions(-) 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"