HTML; } function html_navbar(string $active = ''): void { $user = current_user(); $pages = [ 'mail' => ['/', 'bi-envelope-fill', 'Courriers'], 'accounts' => ['/admin/accounts.php', 'bi-people-fill', 'Comptes'], 'domain' => ['/admin/domain.php', 'bi-gear-fill', 'Configuration'], 'status' => ['/admin/index.php', 'bi-activity', 'Tableau de bord'], ]; echo ''; } function html_foot(): void { echo << HTML; } function flash(string $type, string $msg): void { $_SESSION['flash'] = ['type' => $type, 'msg' => $msg]; } function flash_render(): void { if (!empty($_SESSION['flash'])) { $f = $_SESSION['flash']; unset($_SESSION['flash']); $icon = $f['type'] === 'success' ? 'check-circle-fill' : 'exclamation-triangle-fill'; echo "
"; echo "{$f['msg']}"; echo '
'; } }