This commit is contained in:
Bruno Rybársky 2024-02-03 16:59:27 +01:00
parent b1792bd29a
commit f380a889e2
2 changed files with 18 additions and 20 deletions

@ -3,17 +3,16 @@
require_once "lib/router.php";
require_once "lib/account.php";
return [
"output" =>
function () {
global $routerConfig;
global $routerConfig;
if (isLoggedIn()) {
return file_get_contents($routerConfig["template_dir"] . "dashboard.html");
} else {
return file_get_contents($routerConfig["template_dir"] . "login.html");
}
},
if (isLoggedIn()) {
$output = file_get_contents($routerConfig["template_dir"] . "dashboard.html");
} else {
$output = file_get_contents($routerConfig["template_dir"] . "login.html");
}
return [
"output" => $output,
"parameters" =>
[
"minimal_permission_level" => 1,

@ -3,17 +3,16 @@
require_once "lib/router.php";
require_once "lib/account.php";
return [
"output" =>
function () {
global $routerConfig;
global $routerConfig;
if (isUserAdmin()) {
return file_get_contents($routerConfig["template_dir"] . "adminActions.html");
} else {
return file_get_contents($routerConfig["template_dir"] . "userActions.html");
}
},
if (isUserAdmin()) {
$output = file_get_contents($routerConfig["template_dir"] . "adminActions.html");
} else {
$output = file_get_contents($routerConfig["template_dir"] . "userActions.html");
}
return [
"output" => $output,
"parameters" =>
[
"minimal_permission_level" => 2,