From e412daff09e16a1606619f4a1d80c98bd26315d4 Mon Sep 17 00:00:00 2001 From: AkisYTB3 Date: Thu, 25 Jan 2024 13:05:51 +0100 Subject: [PATCH] even more php changes --- index.php | 5 +++-- templates/admin_nav.html | 2 +- templates/navigation.html | 2 +- templates/user_nav.html | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 055fa40..585de44 100644 --- a/index.php +++ b/index.php @@ -38,9 +38,10 @@ if (isset($_SESSION['user_id'])) { } } else { $nav = include_ob("$template_dir/navigation.html"); - $nav = replaceTemplateTags($nav); // Apply templating to the navigation } +$nav = replaceTemplateTags($nav); // Apply templating to the navigation + if($page_dir == "global") { if(!file_exists("$page_dir/index.html")) { $page_file = "$page_dir/login.html"; @@ -56,7 +57,7 @@ if(empty($page)){ } } -// Check if user is logged in +// Check if the user is logged in if (isset($_SESSION['user_id'])) { if ($_SESSION['user_isAdmin'] == 1) { $paths_to_check[] = "pages/admin"; diff --git a/templates/admin_nav.html b/templates/admin_nav.html index 4281cf7..97cc9dc 100644 --- a/templates/admin_nav.html +++ b/templates/admin_nav.html @@ -4,7 +4,7 @@