adlerka.top/pages/home/account.php

24 lines
542 B
PHP
Raw Normal View History

2024-01-16 19:24:40 +01:00
<?php
2024-01-18 11:49:38 +01:00
require_once "lib/router.php";
2024-02-03 16:08:26 +01:00
require_once "lib/account.php";
2024-01-16 20:43:57 +01:00
$page_parameters = ["minimal_permission_level" => 1, "secret" => "no", "page_title" => "Account"];
2024-02-01 09:10:55 +01:00
function render(): string
2024-01-16 20:43:57 +01:00
{
global $routerConfig;
ob_start();
2024-02-03 16:08:26 +01:00
if (isLoggedIn()) {
echo file_get_contents($routerConfig["template_dir"] . "dashboard.html");
2024-01-16 20:43:57 +01:00
} else {
2024-02-03 16:08:26 +01:00
echo file_get_contents($routerConfig["template_dir"] . "login.html");
2024-01-16 20:43:57 +01:00
}
return ob_get_clean();
2024-02-03 16:24:48 +01:00
}
2024-02-03 16:25:24 +01:00
return ["output" => render(), "parameters" => $page_parameters];