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