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

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Control de accesos</title>
    <link rel="shortcut icon" href="main/assets/img/logo.ico">

    <link rel="stylesheet" href="main/assets/libs/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="main/assets/libs/font-awesome/css/all.css">
    <link rel="stylesheet" href="main/assets/libs/jQuery_ui/css/jquery-ui.min.css">
    <link rel="stylesheet" href="main/assets/libs/sweetalert2/css/sweetalert2.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" />
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.3.0/dist/select2-bootstrap-5-theme.min.css" />
    <link rel="stylesheet" type="text/css" href="main/assets/libs/DataTables/datatables.min.css" />
    <link rel="stylesheet" href="main/assets/css/loader.css?v=1">
    <link rel="stylesheet" href="main/assets/css/style.css?v=2">
</head>

<body>
    <div class="loader">
        <div class="loader-container">
            <div class="lds-ellipsis">
                <div></div>
                <div></div>
                <div></div>
                <div></div>
            </div>
        </div>
    </div>
    <?php
    $page = isset($_GET['page']) ? $_GET['page'] : 'visitas';
    $url = __DIR__ . '/' . $page . '.php';

    !file_exists($url) && $url = __DIR__ . '/404-not-found.php';
    require_once $url;
    ?>

    <script type="text/javascript" src="main/assets/libs/jQuery/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="main/assets/libs/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="main/assets/libs/jQuery_ui/js/jquery-ui.min.js"></script>
    <script type="text/javascript" src="main/assets/libs/jQuery_mask/jquery.mask.min.js"></script>
    <script type="text/javascript" src="main/assets/libs/sweetalert2/js/sweetalert2.min.js"></script>
    <script type="text/javascript" src="main/assets/libs/jQuery-mask/jquery.mask.js"></script>
    <script type="text/javascript" src="main/assets/js/bootstrap-validation.init.js"></script>
    <script type="text/javascript" src="main/assets/js/general-functions.js"></script>
    <script type="text/javascript" src="main/assets/js/fetchActions.js"></script>
    <!-- <script type="text/javascript" src="main/assets/js/main.js"></script> -->
    <!-- Scripts -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>

    <script type="text/javascript" src="main/assets/libs/DataTables/datatables.min.js"></script>
    <?php
    if (isset($jsFiles)) {
        foreach ($jsFiles as $jsFile) {
            echo '<script type="text/javascript" src="main/assets/js/' . $jsFile . '.js?v=3"></script>';
        }
    }
    ?>
</body>

</html>