From 61d4515ca7227b472ddad9a579f0eeed09cafa27 Mon Sep 17 00:00:00 2001 From: Markines16 <80280295+Markines16@users.noreply.github.com> Date: Fri, 26 Mar 2021 15:45:16 +0100 Subject: [PATCH] Cambiada la estructura de todo el panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cambiada la estructura de index, añadidos archivos php con cada vista del panel principal --- panel_manager/index.php | 116 +++++++---------------- panel_manager/manage_rooms.php | 26 +++++ panel_manager/manage_sessions.php | 59 ++++++++++++ panel_manager/panel_manager.php | 21 ++++ panel_manager/user_registered_view.php | 4 + panel_manager/user_unregistered_view.php | 3 + 6 files changed, 146 insertions(+), 83 deletions(-) create mode 100644 panel_manager/manage_rooms.php create mode 100644 panel_manager/manage_sessions.php create mode 100644 panel_manager/panel_manager.php create mode 100644 panel_manager/user_registered_view.php create mode 100644 panel_manager/user_unregistered_view.php diff --git a/panel_manager/index.php b/panel_manager/index.php index 8aa455c..b38a15c 100644 --- a/panel_manager/index.php +++ b/panel_manager/index.php @@ -3,9 +3,16 @@ session_start(); require_once('../assets/php/template.php'); - $template = new Template(); - require_once('./session_dto.php'); - require_once('./room_dto.php'); + require_once('./panel_manager.php'); + + $template = new Template(); + + if(isset($_REQUEST['state'])) { + $panel = new Panel($_REQUEST['state']); + } + else { + $panel = new Panel(''); + } // IMPORTANTE: // VERIFICAR QUE ES MANAGER(GERENTE), SI NO, MOSTRAR MENSAJE DE "ERROR" ?> @@ -29,89 +36,32 @@ $template->print_main(); ?> - +
- - -

Esto es solo una prueba para poder diseñar la vista de editar y añadir sesiones. hay 98% de probabilidades de que este mal o no sea optimo la forma de haber llegado a este panel

- - - - -

Esto es solo una prueba para poder diseñar la vista de editar y añadir salas. hay 94% de probabilidades de que este mal o no sea optimo la forma de haber llegado a este panel

- - - - - -

- - "; - foreach($ros as $r){ - echo " - - - - "; - } - echo " - - - - \n"; - } - - drawRooms($rooms); - ?> + + - +
-
- "; - foreach($ses as $s){ - echo " - - " . $s->getStartTime() . " - " . $s->getFilm() . " - " . $s->getFormat() . " - ". $s->getSeatPrice() . " - - "; - } - echo " - - - - "; - } - drawSessions($sessions); - ?> - -
-
-
- - +
+ showPanel(); + ?> +
+
+
print_footer(); diff --git a/panel_manager/manage_rooms.php b/panel_manager/manage_rooms.php new file mode 100644 index 0000000..6bca5fb --- /dev/null +++ b/panel_manager/manage_rooms.php @@ -0,0 +1,26 @@ +"; + foreach($ros as $r){ + echo " + + + + "; + } + echo " + + + + \n"; + } + drawRooms($rooms); +?> \ No newline at end of file diff --git a/panel_manager/manage_sessions.php b/panel_manager/manage_sessions.php new file mode 100644 index 0000000..42e1c75 --- /dev/null +++ b/panel_manager/manage_sessions.php @@ -0,0 +1,59 @@ + +
+ + "; + foreach($ros as $r){ + echo " + + + "; + } + echo " + \n"; + } + drawRooms($rooms); + ?> +
+
+ "; + foreach($ses as $s){ + echo " + + " . $s->getStartTime() . " + " . $s->getFilm() . " + " . $s->getFormat() . " + ". $s->getSeatPrice() . " + + "; + } + echo " + + + + "; + } + drawSessions($sessions); + ?> +
\ No newline at end of file diff --git a/panel_manager/panel_manager.php b/panel_manager/panel_manager.php new file mode 100644 index 0000000..b66f319 --- /dev/null +++ b/panel_manager/panel_manager.php @@ -0,0 +1,21 @@ +state = $panel; + } + + function showPanel() { + switch($this->state) { + case 'us_u': require('user_unregistered_view.php'); break; + case 'us_r': require('user_registered_view.php'); break; + case 'rooms': require('manage_rooms.php'); break; + case 'sessions': require('manage_sessions.php'); break; + default: echo "

BIENVENIDO AL PANEL DE GERENTE

+
+

Espero que este pasando un buen dia

\n"; break; + } + } + } +?> \ No newline at end of file diff --git a/panel_manager/user_registered_view.php b/panel_manager/user_registered_view.php new file mode 100644 index 0000000..8aa90e4 --- /dev/null +++ b/panel_manager/user_registered_view.php @@ -0,0 +1,4 @@ +

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 new file mode 100644 index 0000000..74370f4 --- /dev/null +++ b/panel_manager/user_unregistered_view.php @@ -0,0 +1,3 @@ +

Vista de usuario no registrado

+
+

Esta vista aun no esta implementada

\ No newline at end of file