<?php
// includes/head.php
if (!isset($site_settings) && isset($pdo)) {
    $site_settings = get_site_settings($pdo);
}
$_favicon  = $site_settings['site_favicon'] ?? 'assets/images/favicon.png';
$_siteName = $site_settings['site_name']    ?? 'SonicPesa';
?>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?= isset($pageTitle) ? htmlspecialchars($pageTitle) : htmlspecialchars($_siteName) . ' Dashboard' ?></title>
    <link rel="icon" type="image/png" href="<?= SITE_URL ?>/<?= htmlspecialchars($_favicon) ?>" sizes="16x16">
    <!-- remix icon font css  -->
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/remixicon.css">
    <!-- BootStrap css -->
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/lib/bootstrap.min.css">
    <!-- Apex Chart css -->
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/lib/apexcharts.css">
    <!-- Data Table css -->
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/lib/dataTables.min.css">
    <!-- Text Editor css -->
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/lib/editor-katex.min.css">
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/lib/editor.atom-one-dark.min.css">
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/lib/editor.quill.snow.css">
    <!-- Date picker css -->
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/lib/flatpickr.min.css">
    <!-- Calendar css -->
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/lib/full-calendar.css">
    <!-- Vector Map css -->
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/lib/jquery-jvectormap-2.0.5.css">
    <!-- Popup css -->
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/lib/magnific-popup.css">
    <!-- Slick Slider css -->
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/lib/slick.css">
    <!-- prism css -->
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/lib/prism.css">
    <!-- file upload css -->
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/lib/file-upload.css">
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/lib/audioplayer.css">
    <!-- main css -->
    <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/style.css?v=<?= time() ?>">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>

