2024-01-16 19:24:40 +01:00
|
|
|
<?php
|
|
|
|
|
2024-01-18 11:49:38 +01:00
|
|
|
require_once "lib/router.php";
|
2024-01-16 20:43:57 +01:00
|
|
|
|
2024-02-01 09:10:55 +01:00
|
|
|
function get_parameters():array
|
|
|
|
{
|
2024-02-01 10:50:07 +01:00
|
|
|
return ["minimal_permission_level" => 1, "secret" => "no", "page_title" => "Domov"];
|
2024-02-01 09:10:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
function render(): string
|
2024-01-16 20:43:57 +01:00
|
|
|
{
|
|
|
|
global $routerConfig;
|
|
|
|
|
|
|
|
ob_start();
|
|
|
|
|
|
|
|
if ($_SESSION["ID"] > 0) {
|
2024-02-02 12:41:02 +01:00
|
|
|
$account_template = file_get_contents($routerConfig["template_dir"] . "apex.html");
|
2024-01-16 20:43:57 +01:00
|
|
|
echo $account_template;
|
|
|
|
} else {
|
|
|
|
$login_template = file_get_contents($routerConfig["template_dir"] . "login.html");
|
|
|
|
echo $login_template;
|
|
|
|
}
|
|
|
|
|
|
|
|
return ob_get_clean();
|
|
|
|
}
|