<?php

namespace PHPMaker2021\rdigital21;

use PHPMaker2021\rdigital21\{UserProfile, Language, AdvancedSecurity, Timer, HttpErrorHandler};
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Container\ContainerInterface;
use DI\Container as Container;
use DI\ContainerBuilder;
use Selective\SameSiteCookie\SameSiteCookieConfiguration;
use Selective\SameSiteCookie\SameSiteCookieMiddleware;
use Selective\SameSiteCookie\SameSiteSessionMiddleware;
use Slim\Factory\AppFactory;
use Slim\Factory\ServerRequestCreatorFactory;
use Slim\Exception\HttpInternalServerErrorException;
use Nyholm\Psr7\Factory\Psr17Factory;
use Nyholm\Psr7Server\ServerRequestCreator;

// Relative path
$RELATIVE_PATH = "";

// Require files
require_once "vendor/autoload.php";
require_once "src/constants.php";
require_once "src/config.php";
require_once "src/phpfn.php";
require_once "src/userfn.php";
?>

<!DOCTYPE html>
<html lang="zxx">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />

    <link rel="icon" href="img/logo.png" type="image/png">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="<?= $basePath ?>assets/css/bootstrap1.min.css" />
    <!-- themefy CSS -->
    <link rel="stylesheet" href="<?= $basePath ?>assets/vendors/themefy_icon/themify-icons.css" />
    <!-- select2 CSS -->
    <link rel="stylesheet" href="<?= $basePath ?>assets/vendors/niceselect/css/nice-select.css" />
    <!-- owl carousel CSS -->
    <link rel="stylesheet" href="<?= $basePath ?>assets/vendors/owl_carousel/css/owl.carousel.css" />
    <!-- gijgo css -->
    <link rel="stylesheet" href="<?= $basePath ?>assets/vendors/gijgo/gijgo.min.css" />
    <!-- font awesome CSS -->
    <link rel="stylesheet" href="<?= $basePath ?>assets/vendors/font_awesome/css/all.min.css" />
    <link rel="stylesheet" href="<?= $basePath ?>assets/vendors/tagsinput/tagsinput.css" />

    <!-- date picker -->
    <link rel="stylesheet" href="<?= $basePath ?>assets/vendors/datepicker/date-picker.css" />
    <!-- scrollabe  -->
    <link rel="stylesheet" href="<?= $basePath ?>assets/vendors/scroll/scrollable.css" />
    <!-- datatable CSS -->
    <link rel="stylesheet" href="<?= $basePath ?>assets/vendors/datatable/css/jquery.dataTables.min.css" />
    <link rel="stylesheet" href="<?= $basePath ?>assets/vendors/datatable/css/responsive.dataTables.min.css" />
    <link rel="stylesheet" href="<?= $basePath ?>assets/vendors/datatable/css/buttons.dataTables.min.css" />
    <!-- text editor css -->
    <link rel="stylesheet" href="<?= $basePath ?>assets/vendors/text_editor/summernote-bs4.css" />
    <!-- morris css -->
    <link rel="stylesheet" href="<?= $basePath ?>assets/vendors/morris/morris.css">
    <!-- metarial icon css -->
    <link rel="stylesheet" href="<?= $basePath ?>assets/vendors/material_icon/material-icons.css" />

    <!-- menu css  -->
    <link rel="stylesheet" href="<?= $basePath ?>assets/css/metisMenu.css">
    <!-- style CSS -->
    <link rel="stylesheet" href="<?= $basePath ?>assets/css/style1.css" />
    <link rel="stylesheet" href="<?= $basePath ?>assets/css/colors/default.css" id="colorSkinCSS">
    <style>
        .modal-backdrop.show.modal-stack {
            display: none !important;
        }

        .main_content .main_content_iner {
            padding: 15px 15px;
        }

        .header_iner {
            padding: 15px;
        }
    </style>
</head>

<body class="crm_body_bg text-dark">



    <!-- main content part here -->

    <!-- sidebar  -->
    <!-- sidebar part here -->
    <nav class="sidebar vertical-scroll  ps-container ps-theme-default ps-active-y">
        <!-- Sidebar -->
        <div class="sidebar" id="sidebar">
            <div class="logo d-flex justify-content-between">
                <a href="index-2.html"><img src="<?= $basePath ?>images/logo2.png" alt=""></a>
                <div class="sidebar_close_icon d-lg-none">
                    <i class="fa fa-times" id="sidebarToggled"></i>
                </div>
            </div>
            <div id="ew-menu"></div>
    </nav>
    <!-- sidebar part end -->
    <!--/ sidebar  -->


    <section class="main_content dashboard_part large_header_bg">

        <!-- menu -->
        <div class="container-fluid g-0">
            <div class="row">
                <div class="col-lg-12 p-0">
                    <div class="header_iner d-flex justify-content-between align-items-center">
                        <div class="sidebar_icon d-lg-none">
                            <i class="fa fa-bars" id="sidebarToggle"></i>
                        </div>
                        <div class="serach_field-area d-flex align-items-center">
                            <div class="search_inner">
                                <form action="#">
                                    <div class="search_field">
                                        <input type="text" placeholder="Search here...">
                                    </div>
                                    <button type="submit">
                                        <img src="<?= $basePath ?>assets/img/icon/icon_search.svg" alt="">
                                    </button>
                                </form>
                            </div>
                        </div>

                        <style>
                            /* Add styles to toggle the sidebar */
                            .sidebar {
                                /* Hide the sidebar initially */
                                transition: left 0.3s;
                            }

                            .sidebar.active {
                                left: 0;
                                /* Show the sidebar */
                            }
                        </style>

                        <script>
                            document.getElementById("sidebarToggle").addEventListener("click", function() {
                                document.getElementById("sidebar").classList.toggle("active");
                            });
                            document.getElementById("sidebarToggled").addEventListener("click", function() {
                                document.getElementById("sidebar").classList.remove("active");
                            });
                        </script>
                        <div class="text-light text-center m-1"><b>
                                <?php
                                $tapel = tapel();
                                echo $sekolah = ExecuteScalar("SELECT nama_sekolah FROM sekolah");
                                echo " - " . $tapel;
                                ?>
                            </b>
                        </div>
                        <div class="header_right d-flex justify-content-between align-items-center">
                            <div class="header_notification_warp d-flex align-items-center">
                                <li>
                                    <a class="bell_notification_clicker nav-link-notify" href="#"> <img src="<?= $basePath ?>assets/img/icon/bell.svg" alt=""> </a>
                                </li>
                            </div>
                            <div class="profile_info">
                                <img src="<?= $basePath ?>assets/img/client_img.png" alt="#">
                                <div class="profile_info_iner">
                                    <div class="profile_author_name">
                                        <div class="text-light">
                                            <?php
                                            if (IsLoggedIn()) {
                                                echo "<h5>" . CurrentUserName() . "</h5>";
                                                echo CurrentUserInfo('nama');
                                            } ?>
                                        </div>
                                    </div>
                                    <div class="profile_info_details">
                                        <center><a class="btb bg-danger" href="logout">Keluar</a></center>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--/ menu  -->
        <div class="main_content_iner ">
            <div class="container-fluid p-0 ">