yet another debug print

This commit is contained in:
Bruno Rybársky 2024-02-01 09:57:45 +01:00
parent efbb04ff0a
commit 2a4d852611
2 changed files with 3 additions and 1 deletions

@ -17,7 +17,6 @@ if(initRouter()) {
session_set_cookie_params(0, '/', "." . $routerRequest["domain"] . "." . $routerRequest["tld"], true, true); session_set_cookie_params(0, '/', "." . $routerRequest["domain"] . "." . $routerRequest["tld"], true, true);
session_start(); session_start();
print_r(isLoggedIn());
if(!isLoggedIn()){ if(!isLoggedIn()){
setDefaultSessionData(); setDefaultSessionData();
} }

@ -97,6 +97,9 @@ function getPage($page_name = null): array|false|string
$is_secret_page = $routerConfig["default_page_secret"]; $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($page_required_permission < $_SESSION["privilegelevel"]){
if($is_secret_page == 1) { if($is_secret_page == 1) {
$page_tmp = file_get_contents($routerConfig["template_dir"] . "404.html"); $page_tmp = file_get_contents($routerConfig["template_dir"] . "404.html");