From e70bfdff7a37daeefe5b59781f87c036c4d3e017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mu=C3=B1oz=20Garcia?= <73303506+danimu03@users.noreply.github.com> Date: Fri, 26 Mar 2021 15:08:47 +0100 Subject: [PATCH] New index and panelAdmin class --- panel_admin/index.php | 46 ++++++++++++++++++++++---------------- panel_admin/panelAdmin.php | 20 +++++++++++++++++ 2 files changed, 47 insertions(+), 19 deletions(-) create mode 100644 panel_admin/panelAdmin.php diff --git a/panel_admin/index.php b/panel_admin/index.php index 91ecd82..3ad1eea 100644 --- a/panel_admin/index.php +++ b/panel_admin/index.php @@ -1,12 +1,20 @@ -
- - +
+
+ showPanel(); + ?> +
+
+
- print_footer(); ?> - diff --git a/panel_admin/panelAdmin.php b/panel_admin/panelAdmin.php new file mode 100644 index 0000000..c23ee65 --- /dev/null +++ b/panel_admin/panelAdmin.php @@ -0,0 +1,20 @@ +state = $panel; + } + + function showPanel() { + switch($this->state) { + case 'mc': require('manage_cinemas.php'); break; + case 'mf': require('manage_films.php'); break; + case 'md': require('manage_discounts.php'); break; + case 'mm': require('manage_managers.php'); break; + default: echo "

BIENVENIDO AL PANEL DE ADMINISTRADOR

"; break; + } + } + } +?> +