From e716de272f05832e45597764a3faf849e9cb9ff7 Mon Sep 17 00:00:00 2001 From: Markines16 <80280295+Markines16@users.noreply.github.com> Date: Tue, 13 Apr 2021 21:16:07 +0200 Subject: [PATCH] =?UTF-8?q?Cambios=20a=20la=20estructura=20del=20=C3=ADnde?= =?UTF-8?q?x=20y=20sus=20vistas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- panel_manager/edit_sessions.php | 6 +- panel_manager/hello_panel.php | 5 ++ panel_manager/index.php | 5 +- panel_manager/manage_rooms.php | 6 +- panel_manager/manage_sessions.php | 105 ++++++++++++----------- panel_manager/no_permision_panel.php | 5 ++ panel_manager/panel_manager.php | 10 +-- panel_manager/user_registered_view.php | 8 +- panel_manager/user_unregistered_view.php | 9 +- panel_manager/validateSession.php | 74 ++++++++++++++++ 10 files changed, 160 insertions(+), 73 deletions(-) create mode 100644 panel_manager/hello_panel.php create mode 100644 panel_manager/no_permision_panel.php create mode 100644 panel_manager/validateSession.php diff --git a/panel_manager/edit_sessions.php b/panel_manager/edit_sessions.php index eb970ef..b6a3716 100644 --- a/panel_manager/edit_sessions.php +++ b/panel_manager/edit_sessions.php @@ -18,7 +18,7 @@ if($bd){ $session = ($bd->sessionData($_GET["id"]))->fetch_assoc(); echo "

Editar/Eliminar Sesion

-
+
Datos @@ -61,7 +61,7 @@
- "; foreach($films as $f){ if($f->getId() == $session['idfilm']){ echo ""; @@ -74,7 +74,7 @@ } else{ echo "

Crear Sesion

-
+
Datos diff --git a/panel_manager/hello_panel.php b/panel_manager/hello_panel.php new file mode 100644 index 0000000..2f75ad4 --- /dev/null +++ b/panel_manager/hello_panel.php @@ -0,0 +1,5 @@ +
+

Bienvenido al panel de Gerente

+
+

Espero que este pasando un buen dia

+

\ No newline at end of file diff --git a/panel_manager/index.php b/panel_manager/index.php index 13adcd7..825c4c4 100644 --- a/panel_manager/index.php +++ b/panel_manager/index.php @@ -58,9 +58,8 @@
-
-
- showPanel(); ?> +
+ showPanel(); ?>
diff --git a/panel_manager/manage_rooms.php b/panel_manager/manage_rooms.php index e9c334e..718e8df 100644 --- a/panel_manager/manage_rooms.php +++ b/panel_manager/manage_rooms.php @@ -9,6 +9,7 @@ function drawHalls($ros){ echo " +
@@ -30,8 +31,9 @@ } echo "
\n"; - echo "Añadir"; + echo "Añadir +
"; } drawHalls($rooms); ?> -
+ diff --git a/panel_manager/manage_sessions.php b/panel_manager/manage_sessions.php index be51656..5806155 100644 --- a/panel_manager/manage_sessions.php +++ b/panel_manager/manage_sessions.php @@ -1,34 +1,38 @@ filterList(1,$_POST["hall"],$_POST["date"]); + $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"); } - - $sessions = $sessionList->getArray(); - - $r1 = new HallDTO(1,20,20,30); //Esto se deberia cambiar por una llamada a una lista de salas - $r2 = new HallDTO(2,10,30,30); - $rooms = array($r1, $r2); - echo" - + + echo" + +
-
"; -?> - -
- - - Hora - Pelicula - Formato - Precio - - - "; - foreach($ses as $s){ - $fila = ($bd->FilmData($s->getIdfilm()))->fetch_assoc(); + +
"; + function drawSessions($sessions){ + echo " +
+ + + + + + + + + + "; + foreach($sessions as $s){ echo " - - - - - - "; + + + + + + "; } echo " - -
HoraPeliculaFormatoPrecio
" . $s->getStartTime() . " " .$fila['tittle'] . " ". $s->getSeatPrice() . " getid() ."\"/>
" . $s->getStartTime() . " " . $s->getIdfilm() . " ". $s->getSeatPrice() . " getid() ."\"/>
"; - } - if($filtered){ - $bd = new Film_DAO('complucine'); - if($bd){ - drawSessions($sessions,$bd); - echo " - "; - } + + + +
"; } - echo "
-
"; + if($formSession->getReply() != null){ + drawSessions($formSession->getReply()); + } else { + echo "
+

No hay ninguna session en la sala ". $placeholder_hall . " el dia ". $placeholder_date . "

+ "; + } + echo " + + "; ?> diff --git a/panel_manager/no_permision_panel.php b/panel_manager/no_permision_panel.php new file mode 100644 index 0000000..63c2237 --- /dev/null +++ b/panel_manager/no_permision_panel.php @@ -0,0 +1,5 @@ +
+

Entrada Impedida

+
+

No estas logeado como gerente >.<

+
\ No newline at end of file diff --git a/panel_manager/panel_manager.php b/panel_manager/panel_manager.php index 3c4a62b..11e2387 100644 --- a/panel_manager/panel_manager.php +++ b/panel_manager/panel_manager.php @@ -16,17 +16,11 @@ case 'rooms': require('manage_rooms.php'); break; case 'sessions': require('manage_sessions.php'); break; case 'edit_session': require('edit_sessions.php'); break; - default: echo "

BIENVENIDO AL PANEL DE GERENTE

-
-

Espero que este pasando un buen dia

-
"; break; + default: require('hello_panel.php'); break; } } else{ - echo "

ERROR

-
-

No tiene permiso en esta sección de la pagina web

-
"; + require('no_permisions_panel.php'); } } } diff --git a/panel_manager/user_registered_view.php b/panel_manager/user_registered_view.php index 8aa90e4..40be78c 100644 --- a/panel_manager/user_registered_view.php +++ b/panel_manager/user_registered_view.php @@ -1,4 +1,6 @@ -

Vista de usuario registrado

-
-

Esta vista aun no esta implementada

+
+

Vista de usuario registrado

+
+

Esta vista aun no esta implementada

+
\ No newline at end of file diff --git a/panel_manager/user_unregistered_view.php b/panel_manager/user_unregistered_view.php index 74370f4..9ab2416 100644 --- a/panel_manager/user_unregistered_view.php +++ b/panel_manager/user_unregistered_view.php @@ -1,3 +1,6 @@ -

Vista de usuario no registrado

-
-

Esta vista aun no esta implementada

\ No newline at end of file + +
+

Vista de usuario no registrado

+
+

Esta vista aun no esta implementada

+
\ No newline at end of file diff --git a/panel_manager/validateSession.php b/panel_manager/validateSession.php new file mode 100644 index 0000000..1d55f6d --- /dev/null +++ b/panel_manager/validateSession.php @@ -0,0 +1,74 @@ +processesForm($id, $_POST["film"], $_POST["hall"], $_POST["cinema"],$_POST["date"],$_POST["start"],$_POST["price"],$_POST["format"],$_POST["repeat"], $action); + $reply = $session->getReply(); + +?> + + + + + print_head(); + ?> + + + print_header(); + ?> + + +
+
+
+ + +
+
+
+
+
+ +
+
+
+
+
+ + + print_footer(); + ?> + + + + \ No newline at end of file