forked from Adleraci/adlerka.top
test
This commit is contained in:
parent
530c7ca13c
commit
6fdd76de3d
@ -3,22 +3,21 @@
|
|||||||
require_once "lib/router.php";
|
require_once "lib/router.php";
|
||||||
require_once "lib/account.php";
|
require_once "lib/account.php";
|
||||||
|
|
||||||
$page_parameters = ["minimal_permission_level" => 1, "secret" => "no", "page_title" => "Account"];
|
return [
|
||||||
|
"output" =>
|
||||||
|
function () {
|
||||||
function render(): string
|
|
||||||
{
|
|
||||||
global $routerConfig;
|
global $routerConfig;
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
if (isLoggedIn()) {
|
if (isLoggedIn()) {
|
||||||
echo file_get_contents($routerConfig["template_dir"] . "dashboard.html");
|
return file_get_contents($routerConfig["template_dir"] . "dashboard.html");
|
||||||
} else {
|
} else {
|
||||||
echo file_get_contents($routerConfig["template_dir"] . "login.html");
|
return file_get_contents($routerConfig["template_dir"] . "login.html");
|
||||||
}
|
}
|
||||||
|
},
|
||||||
return ob_get_clean();
|
"parameters" =>
|
||||||
}
|
[
|
||||||
|
"minimal_permission_level" => 1,
|
||||||
return ["output" => render(), "parameters" => $page_parameters];
|
"secret" => "no",
|
||||||
|
"page_title" => "Account"
|
||||||
|
]
|
||||||
|
];
|
@ -3,21 +3,21 @@
|
|||||||
require_once "lib/router.php";
|
require_once "lib/router.php";
|
||||||
require_once "lib/account.php";
|
require_once "lib/account.php";
|
||||||
|
|
||||||
$page_parameters = ["minimal_permission_level" => 2, "secret" => "no", "page_title" => "Settings"];
|
return [
|
||||||
|
"output" =>
|
||||||
function render(): string
|
function () {
|
||||||
{
|
|
||||||
global $routerConfig;
|
global $routerConfig;
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
if (isUserAdmin()) {
|
if (isUserAdmin()) {
|
||||||
echo file_get_contents($routerConfig["template_dir"] . "adminActions.html");
|
return file_get_contents($routerConfig["template_dir"] . "adminActions.html");
|
||||||
} else {
|
} else {
|
||||||
echo file_get_contents($routerConfig["template_dir"] . "userActions.html");
|
return file_get_contents($routerConfig["template_dir"] . "userActions.html");
|
||||||
}
|
}
|
||||||
|
},
|
||||||
return ob_get_clean();
|
"parameters" =>
|
||||||
}
|
[
|
||||||
|
"minimal_permission_level" => 2,
|
||||||
return ["output" => render(), "parameters" => $page_parameters];
|
"secret" => "no",
|
||||||
|
"page_title" => "Account"
|
||||||
|
]
|
||||||
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user