. */ require_once ROOT . '/php/replace.php'; require_once ROOT . '/php/session.php'; $username = get_username(); if ($username === null) { $account = import(ROOT . '/html/guest.html'); } else { $account = replace(ROOT . '/html/account.html', [ '{{username}}' => htmlspecialchars($username, ENT_QUOTES, 'UTF-8'), '{{profile}}' => rawurlencode($username) ]); } $targets = [ '{{navbar}}' => replace(ROOT . '/html/navbar.html', [ '{{account}}' => $account ]) ]; $html = replace(ROOT . '/html/header.html', $targets); echo $html; ?>