forked from Adleraci/adlerka.top
20 lines
444 B
PHP
20 lines
444 B
PHP
<?php
|
|
|
|
require_once "lib/router.php";
|
|
|
|
function render(): false|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();
|
|
} |