<?php
//require_once '../config.php';

?>
<!-- Start the session -->
<?php
session_start();
//echo $_SESSION['userType'];
// Additional session-related code if necessary
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Your Church Management System</title>


    <!-- Include DataTables CSS -->
    <link rel="stylesheet" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">
    <!-- Include DataTables Buttons CSS -->
    <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.7.1/css/buttons.dataTables.min.css">
    <!-- Include jQuery -->
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <!-- Include DataTables JS -->
    <script src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/1.7.1/js/dataTables.buttons.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/1.7.1/js/buttons.html5.min.js"></script>

    <style>
      /* Body styles */
      body {
        background-color: #f1f3f6;
        margin: 0;
        padding: 0;
      }

      /* Header styles */
      header {
        background-color: #0e1b70;
        padding: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      /* Logo styles */
      .logo {
        color: white;
        font-size: 24px;
        font-weight: bold;
        padding: 1px;
      }

      /* Navigation styles */
      nav {
        margin-top: 10px;
      }

      ul.menu {
        list-style-type: none;
        padding: 0;
        margin: 0;
        display: flex;
      }

      ul.menu li {
        margin-right: 10px;
      }

      ul.menu li a {
        color: white;
        text-decoration: none;
        padding: 5px 10px;
      }

      ul.menu li a:hover {
        background-color: white;
        color: navy;
      }

      /* Media query for smaller devices */
      @media (max-width: 600px) {
        header {
          flex-direction: column;
          padding: 10px;
        }

        ul.menu {
          flex-direction: column;
          margin-top: 10px;
        }

        ul.menu li {
          margin-right: 0;
          margin-bottom: 5px;
        }
      }

      /* Mobile menu styles */
      .mobile-menu-icon {
        display: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
      }

      .menu {
        display: none;
      }

      /* Media query for smaller devices */
      @media (max-width: 600px) {
        .logo {
          display: none;
        }

        .mobile-menu-icon {
          display: block;
        }

        .menu {
          display: none;
        }

        .menu.active {
          display: block;
        }
      }

    </style>

    <script>
      // JavaScript code for mobile menu functionality
      document.addEventListener("DOMContentLoaded", function() {
        const mobileMenuIcon = document.querySelector(".mobile-menu-icon");
        const menu = document.querySelector(".menu");

        mobileMenuIcon.addEventListener("click", function() {
          menu.classList.toggle("active");
        });
      });
    </script>

    <!-- Initialize DataTables with Export Buttons -->
    <script>
      $(document).ready(function() {
        $('#dataTable').DataTable({
          buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print'
          ]
        });
      });
    </script>

</head>
<body>
    <!-- Add your header content here -->
    <header>
        <!-- Logo, navigation menu, and other common elements -->
        <h1><img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//AABEIADwAdwMBEQACEQEDEQH/xAAcAAACAgMBAQAAAAAAAAAAAAAABQQGAgMHAQj/xAA+EAABAwMBBQQHBAgHAAAAAAABAgMEAAURIQYSEzFRIkFhcQdSgZGhscEUFWKSJDJjcnOC0fAWIzM0QkNE/8QAGgEAAgMBAQAAAAAAAAAAAAAAAAMBAgQFBv/EADERAAICAQMCBAQEBwEAAAAAAAECAAMRITFBBBITUWHBMoHR8AUikbEVIzNCoeHxFP/aAAwDAQACEQMRAD8A7jRCFEIUQhRCRJNzgxc8eW0kju3sn3Ul+oqT4mEYlNj/AAiLHtrLU3+q465+60fris7fiNA5z8poXobjxiQX9vbYz+sy+P3ylP1pX8Tr4U/4+sZ/D35YTFvb2I8AWLfNdB5Fpsr+VMHWk7VtKHowN3Els7XNOHBtF5T4/YF4+V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JoL5QL5SQmHLecdhQKd7IxjOapLzmvpF2nVPiu2a0KJYcG7JkJ5LHehPge89NK0V1cmYL+p/tSc3Zsj77zbDDSnHXFbqEJGqjWg4AmMEk4E7lsNs2nZmyJiqKVSXVcSQscio9w8ANPj31isfuM61NfhrjmWKqRsTXCxpcUp6CpLLpOVIUOws/Q+I91Y7ukWzUaGPrvKaHUSLGuci1/5V0jONsjk6BvIH8w0x54pdb20flsGR5iMdUt1U6x6xIZlNByO6lxB5FJzW1HVxlTmZmVlOGE8jRURwsgqWtZytxZypX99KvKwciockIecKlcPVCCeyDrrjrrRCEWMiMyG0FStSVKUdVqOpJ8SaIQdjIdfZdXvEsklKc6bxGM+YGR7TRCbsUQmDrjbKSt1aUJHNSlYFEgkDeV68bRWlO6nirlbhzwmzhCjoRvHv5UwVMYh+qrXbWVi87RSLkhSHXUsxjzbQcA+Z76etYWYrL3s04mu2bOTbmQWo5aZP/c8N0ewcz8vGhrQIV9M7+kvFi2dhWZJW0niSVDCn1jXyHQf3rWdnLbzoVUrXtHFUjYUQhRCFEJG+wReIXEspQ4ea2+wT5kUs1IT3Y1lw7YxnSZPNPFH6O+ELA04iN8e0ZB+NMGkofSK5H+Jmh+jfdEk/j4jPy36t+WUPfxiLZFx23bzuWC3O/wAObz/Nu1OE85Qm3gCK3rz6RlEhvZeOgdQ+0T8XfpVsVyhPUeQkZaPSVNGFttxge7jtJ+KcmrBqhxKFOobmaU7EbVTV79xuMNJ9YvOPK+IHzqfGUbCU/wDI7fE0bQfRy2jdNwu8h4jmGG0tA+/ePxqpuPEuvRoNzLLbdnLTbCFxITYcHJ1zK1/mVkj2Usux3mhakTYRrVYyFEIUQhRCFEIUQhRCFEIUQhRCFEIUQhRCFEIUQhRCFEIUQn//2Q=="></h1>
        <div class="logo"><img src="https://lifewithpastorjoy.org/wp-content/uploads/2023/01/LOGO.png" width="100px"></div>
        <i class="mobile-menu-icon fas fa-bars"></i>
        <?php
        if ($_SESSION['userType'] == 'member') {
            echo
            "<nav>
            <ul class='menu'>
                <li><a href='home.php'>Home</a></li>
                <li><a href='events.php'>Events</a></li>
                <li><a href='events.php'>Cell System</a></li>
                <li><a href='/member/enrolled_courses.php'>Foundation School</a></li>
                <li><a href='events.php'>Events</a></li>
                <!-- Add additional menu items as needed -->
            </ul>
        </nav>";
    }
    ?>
        <?php
        if ($_SESSION['userType'] == 'admin') {
            echo
            "<nav>
            <ul class='menu'>
                <li><a href='dashboard.php'>Home</a></li>
                <li><a href='view_churches.php'>Church Directory</a></li>
                <li><a href='view_cells.php'>Cell System</a></li>
                <li><a href='/member/enrolled_courses.php'>Foundation School</a></li>
                <li><a href='events.php'>Events</a></li>
                <!-- Add additional menu items as needed -->
            </ul>
            </nav>";
        }
        ?>
        <?php
        if ($_SESSION['userType'] == 'cellleader') {
            echo
            "<nav>
                <ul>
                    <li><a href='/member/cell_report_submit.php'>New Cell Report</a></li>
                    <li><a href='/member/cell_report_list.php'>View Cell Reports</a></li>
                    <li><a href='/member/enrolled_courses.php'>Schedule Virtual Cell Meeting</a></li>
                    <!-- Add additional menu items as needed -->
                </ul>
            </nav>";
        }
        ?>
        <?php
        if ($_SESSION['userType'] == 'pastor') {
            echo
            "<nav>
                <ul>
                    <li><a href='/member/enrolled_courses.php'>New Service Report</a></li>
                    <li><a href='/member/enrolled_courses.php'>View Service Reports</a></li>
                    <li><a href='/member/enrolled_courses.php'>Events</a></li>
                    <li><a href='/member/enrolled_courses.php'>Foundation School</a></li>
                    <li><a href='/member/enrolled_courses.php'>Events</a></li>
                    <!-- Add additional menu items as needed -->
                </ul>
            </nav>";
        }
        ?>
    </header>

    <!-- Rest of the page content will be added in individual pages -->
</body>
</html>
