From b072147e03975fec0ed30ce2f60502ed12227b40 Mon Sep 17 00:00:00 2001 From: Markines16 <80280295+Markines16@users.noreply.github.com> Date: Sun, 11 Apr 2021 17:58:01 +0200 Subject: [PATCH] Add files via upload --- panel_manager/edit_sessions.php | 40 +++++-- panel_manager/includes/formSession.php | 5 +- panel_manager/includes/listFilms.php | 53 +++++++++ panel_manager/includes/listSessions.php | 28 ++--- panel_manager/index.php | 7 +- panel_manager/manage_sessions.php | 137 +++++++++++++----------- panel_manager/validate.php | 2 +- 7 files changed, 174 insertions(+), 98 deletions(-) create mode 100644 panel_manager/includes/listFilms.php diff --git a/panel_manager/edit_sessions.php b/panel_manager/edit_sessions.php index 1274f17..ebcfaff 100644 --- a/panel_manager/edit_sessions.php +++ b/panel_manager/edit_sessions.php @@ -1,23 +1,39 @@ getArray(); + + if(isset($_REQUEST['option']) && $_REQUEST['option'] == 'edit') { echo "

Este es el panel de editar o eliminar una sesion. Deberia tener el formulario de crear una sesion nueva pero con los datos ya situados y quizas que solo aqui aparezca el boton de eliminar

"; } else{ echo "

Crear Sesion

-
+
Datos +
-
- -
-
+
@@ -26,15 +42,25 @@
+
+ +
-
"; + +
+
+ - filterList(1,$_POST["hall"],$_POST["date"]); + $placeholder_date = $_POST["date"]; + $placeholder_hall = $_POST["hall"]; + $filtered = true; + } + + $sessions = $sessionList->getArray(); - function drawRooms($ros){ - echo ""; - foreach($ros as $r){ - echo " + $r1 = new RoomDTO(1,20,20,30); //Esto se deberia cambiar por una llamada a una lista de salas + $r2 = new RoomDTO(2,10,30,30); + $rooms = array($r1, $r2); + echo" + + + + "; +?> + +
+
- - "; - } - echo " -
\n"; - } - drawRooms($rooms); - ?> -
-
- filterList(); - $sessions = $sessionList->getArray(); - - function drawSessions($ses){ - - echo " - - - - - - - - - - "; - foreach($ses as $s){ - echo " - - - - - - - - - " - ; - } - echo " -
HoraidPelículaFormatoPrecio
" . $s->getStartTime() . "" . $s->getIdfilm() . "" . $s->getFormat() . "". $s->getSeatPrice() . "
\n"; - echo "Añadir"; - } - drawSessions($sessions); - ?> -
+ Hora + Pelicula + Formato + Precio + + + "; + foreach($ses as $s){ + $fila = ($bd->FilmData($s->getIdfilm()))->fetch_assoc(); + echo " + + " . $s->getStartTime() . " + " .$fila['tittle'] . " + " . $s->getFormat() . " + ". $s->getSeatPrice() . " + "; + } + echo " + + "; + } + if($filtered){ + $bd = new Film_DAO('complucine'); + if($bd){ + drawSessions($sessions,$bd); + echo " + \n"; + } + } + echo " +
"; +?> + diff --git a/panel_manager/validate.php b/panel_manager/validate.php index c9b508e..6755457 100644 --- a/panel_manager/validate.php +++ b/panel_manager/validate.php @@ -13,7 +13,7 @@ //Login form validate: require_once('./includes/formSession.php'); $session = new FormSession(); - $session->processesForm($_POST["price"], $_POST["film"], $_POST["format"],$_POST["start"]); + $session->processesForm($_POST["film"], $_POST["hall"], $_POST["cinema"],$_POST["date"],$_POST["start"],$_POST["price"],$_POST["format"]); $reply = $session->getReply(); ?>