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