stylehub/pages/global/account.php
2024-02-01 09:10:55 +01:00

25 lines
561 B
PHP

<?php
require_once "lib/router.php";
function get_parameters():array
{
return ["minimal_permission_level" => 0, "secret" => 0, "page_title" => "Domov"];
}
function render(): string
{
global $routerConfig;
ob_start();
if ($_SESSION["ID"] > 0) {
$account_template = file_get_contents($routerConfig["template_dir"] . "account.html");
echo $account_template;
} else {
$login_template = file_get_contents($routerConfig["template_dir"] . "login.html");
echo $login_template;
}
return ob_get_clean();
}