HTML;
}
function html_navbar(string $active = ''): void {
$user = current_user();
$isAdmin = is_admin();
$pages = [
'mail' => ['/', 'bi-envelope-fill', 'Courriers'],
];
if ($isAdmin) {
$pages['accounts'] = ['/admin/accounts.php', 'bi-people-fill', 'Comptes'];
$pages['domain'] = ['/admin/domain.php', 'bi-gear-fill', 'Configuration'];
$pages['status'] = ['/admin/index.php', 'bi-activity', 'Tableau de bord'];
$pages['users'] = ['/admin/users.php', 'bi-person-lock', 'Utilisateurs'];
}
$roleBadge = $isAdmin
? 'admin'
: 'user';
echo '';
}
function html_foot(): void {
echo <<