<?php
    session_start();
    if(!isset($_SESSION["school_admin"]))
    {
        header("location:./index.php");
    }
    include "./forms.php";

    //fetch school detailss
    $details = mysqli_query($conf,"SELECT * FROM school_admin WHERE username = '".$_SESSION["school_admin"]."'");
    $det = mysqli_fetch_array($details);

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MUCHINGA REGION JETS SYSTEM</title>
    <link rel="stylesheet" href="./css/home.css">
    <link rel="stylesheet" href="./css/schools.css">
    <link rel="stylesheet" href="./css/dashboard.css">
    <link rel="stylesheet" href="./css/participants.css">
    <link rel="icon" href="../images/logo.png">
</head>
<body>
<script type="module" src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.js"></script>
    <div class="container">
        <aside class="sidebar">
            <ul>
                <li><a href="#" class="menu-item" data-content="dashboard.php?page=dashboard"><ion-icon name="grid-outline"></ion-icon> Dashboard</a></li>
                <hr>
                <li><a href="#" class="menu-item" data-content="pupils.php"><ion-icon name="person-outline"></ion-icon> Manage Participants</a></li>
                <hr>
                <li><a href="#" class="menu-item" data-content="material.php"><ion-icon name="albums-outline"></ion-icon> Manage Materials</a></li>
                <hr>
                <li><a href="#" class="menu-item" data-content="reports.php"><ion-icon name="folder-outline"></ion-icon> Manage Reports</a></li>
                <hr>
                <li><a href="#" class="menu-item" data-content="notifications.php"><ion-icon name="megaphone-outline"></ion-icon> Manage Notices</a></li>
                <hr>
                <li><a href="./backend/logout.php" id="menu-item" ><ion-icon name="log-out-outline"></ion-icon> Logout</a></li>
                <hr>
            </ul>
        </aside>
        <main class="content">
            <h1>JETS MANAGEMENT SYSTEM FOR <?php echo $det["school"] ?></h1>
            <div id="dynamicContent">
            </div>
        </main>
    </div>
    <footer class="footer">
        <p>Copyright &copy; <span id="currentYear"></span> Muchinga Region JETS platform. All rights reserved. developed by <a style="color: wheat;" href="https://fb.me/therealsamuelmka">Microlasan Technologies</a></p>
    </footer>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const currentYear = new Date().getFullYear();
            document.getElementById('currentYear').textContent = currentYear;
        });
    </script>
    <script src="./js/home.js"></script>
</body>
</html>