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 @@