From 779f11d8d041af877cf1b0d0ef4daa09c556c2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20M=C3=A9ndez?= <45081533+FerMdez@users.noreply.github.com> Date: Fri, 30 Apr 2021 21:29:59 +0200 Subject: [PATCH] Update template.php --- assets/php/template.php | 98 +++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/assets/php/template.php b/assets/php/template.php index 318b377..79ec6a2 100644 --- a/assets/php/template.php +++ b/assets/php/template.php @@ -159,59 +159,61 @@ //Print panel menu: function print_panelMenu($panel){ - $prefix = $this->prefix; - $menus = array("
  • Panel Principal
  • "); + if($_SESSION["login"]){ + $prefix = $this->prefix; + $menus = array("
  • Panel Principal
  • "); - switch($panel){ - case "admin": array_push($menus, "
  • Ver como... - -
  • "); - array_push($menus, "
  • Modificar - -
  • "); - break; + switch($panel){ + case "admin": array_push($menus, "
  • Ver como... + +
  • "); + array_push($menus, "
  • Modificar + +
  • "); + break; - case "manager": array_push($menus, "
  • Ver como... - -
  • "); - array_push($menus, "
  • Modificar - -
  • "); - break; + case "manager": array_push($menus, "
  • Ver como... + +
  • "); + array_push($menus, "
  • Modificar + +
  • "); + break; - case "user": array_push($menus, "
  • Historial Compras
  • "); - array_push($menus, "
  • Datos Pago
  • "); - array_push($menus, "
  • Contraseña
  • "); - array_push($menus, "
  • Eliminar Usuario
  • "); - break; + case "user": array_push($menus, "
  • Historial Compras
  • "); + array_push($menus, "
  • Datos Pago
  • "); + array_push($menus, "
  • Contraseña
  • "); + array_push($menus, "
  • Eliminar Usuario
  • "); + break; - default: $menus = array(); break; + default: $menus = array(); break; + } + + echo"
    + +
    \n"; } - - echo"
    - -
    \n"; } //Print session MSG: