From 2a4d852611a2febe328239d5810e381a523fc518 Mon Sep 17 00:00:00 2001 From: bruno Date: Thu, 1 Feb 2024 09:57:45 +0100 Subject: [PATCH] yet another debug print --- index.php | 1 - lib/page.php | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 42a8261..2c4bfce 100644 --- a/index.php +++ b/index.php @@ -17,7 +17,6 @@ if(initRouter()) { session_set_cookie_params(0, '/', "." . $routerRequest["domain"] . "." . $routerRequest["tld"], true, true); session_start(); - print_r(isLoggedIn()); if(!isLoggedIn()){ setDefaultSessionData(); } diff --git a/lib/page.php b/lib/page.php index e22711a..28528ac 100644 --- a/lib/page.php +++ b/lib/page.php @@ -97,6 +97,9 @@ function getPage($page_name = null): array|false|string $is_secret_page = $routerConfig["default_page_secret"]; } + $curprivlvl = $_SESSION["privilegelevel"]; + echo "Secrecy: $is_secret_page, you need to have $$page_required_permission, you have $curprivlvl"; + if($page_required_permission < $_SESSION["privilegelevel"]){ if($is_secret_page == 1) { $page_tmp = file_get_contents($routerConfig["template_dir"] . "404.html");