From ac2b2cfee00b45a08a41fe3e512012e5b63e950c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20M=C3=A9ndez?= <45081533+FerMdez@users.noreply.github.com> Date: Mon, 3 May 2021 16:51:08 +0200 Subject: [PATCH] Add files via upload --- assets/php/template.php | 20 +++++++++++--------- panel_admin/index.php | 2 +- panel_manager/index.php | 2 +- panel_user/index.php | 4 ++-- panel_user/panelUser.php | 2 +- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/assets/php/template.php b/assets/php/template.php index 959fab5..51dbaf4 100644 --- a/assets/php/template.php +++ b/assets/php/template.php @@ -204,15 +204,17 @@ default: $menus = array(); break; } - echo"
- -
\n"; + if($_SESSION["rol"] === $panel){ + echo"
+ +
\n"; + } } } diff --git a/panel_admin/index.php b/panel_admin/index.php index 5f6ab4f..27e4397 100644 --- a/panel_admin/index.php +++ b/panel_admin/index.php @@ -39,7 +39,7 @@
print_panelMenu("admin"); + $template->print_panelMenu($_SESSION["rol"]); ?>
diff --git a/panel_manager/index.php b/panel_manager/index.php index ae40f52..eb84362 100644 --- a/panel_manager/index.php +++ b/panel_manager/index.php @@ -33,7 +33,7 @@
print_panelMenu("manager"); + $template->print_panelMenu($_SESSION["rol"]); ?>
diff --git a/panel_user/index.php b/panel_user/index.php index 8f7a40b..8c53813 100644 --- a/panel_user/index.php +++ b/panel_user/index.php @@ -6,7 +6,7 @@ //Controller file: include_once('panelUser.php'); - if($_SESSION["login"]){ + if($_SESSION["login"] && $_SESSION["rol"] === "user"){ switch($_GET["option"]){ case "manage_profile": $reply = UserPanel::manage(); @@ -63,7 +63,7 @@
print_panelMenu("user"); + $template->print_panelMenu($_SESSION["rol"]); ?>
diff --git a/panel_user/panelUser.php b/panel_user/panelUser.php index 49e5fbd..c80731b 100644 --- a/panel_user/panelUser.php +++ b/panel_user/panelUser.php @@ -1,5 +1,5 @@