From 073a56a62844f2e3e0815ff42b35a588f5aea722 Mon Sep 17 00:00:00 2001 From: AkisYTB3 Date: Tue, 23 Jan 2024 13:01:56 +0100 Subject: [PATCH] admin should work now --- index.php | 2 +- templates/navigation.html | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index bb2525d..3c87d44 100644 --- a/index.php +++ b/index.php @@ -38,7 +38,7 @@ if(empty($page)){ // Check if user is logged in if (isset($_SESSION['user_id'])) { - if ($user['isAdmin'] == 1) { + if ($_SESSION['user_isAdmin'] == 1) { $paths_to_check[] = "pages/admin"; } diff --git a/templates/navigation.html b/templates/navigation.html index 107fc7e..34204f0 100644 --- a/templates/navigation.html +++ b/templates/navigation.html @@ -5,6 +5,9 @@
  • Home
  • + + ako urobím aby admin nav bol iný ako non-admin nav, a ešte aby global bol iný (login, register, atď) + \ No newline at end of file