stylehub/pages/home/account.php
2024-02-03 16:25:24 +01:00

24 lines
542 B
PHP

<?php
require_once "lib/router.php";
require_once "lib/account.php";
$page_parameters = ["minimal_permission_level" => 1, "secret" => "no", "page_title" => "Account"];
function render(): string
{
global $routerConfig;
ob_start();
if (isLoggedIn()) {
echo file_get_contents($routerConfig["template_dir"] . "dashboard.html");
} else {
echo file_get_contents($routerConfig["template_dir"] . "login.html");
}
return ob_get_clean();
}
return ["output" => render(), "parameters" => $page_parameters];