<?php 
session_start(); 
if($_SESSION['id_user'] == ''){ header('Location: index.php');} ?>
<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="Andres Camilo Rivera">
    <title>LogiTrack</title>
    <link rel=icon href="img/icon.png" sizes="40x40" type="image/png">
    <!-- Custom fonts for this template-->
    <link href="lib/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
    <link
        href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
        rel="stylesheet">
    <script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script>
    <script src="https://maps.googleapis.com/maps/api/js?libraries=geometry&key=AIzaSyDy0i22lqtG9KvJWgZsEHRewBOz1tl76Ig"></script>



    <!-- Custom styles for this template-->
   
    <link href="lib/css/sb-admin-2.min.css" rel="stylesheet">
    <link href="lib/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">
    <script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
    
    <!--  Leaflet -->
    <script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
   integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
   crossorigin=""/>
	<!-- Make sure you put this AFTER Leaflet's CSS -->
	<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
	integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
	crossorigin=""></script>
	
	<script type="text/javascript" src="lib/js/demo/moment.js"></script>
    <script type="text/javascript" src="lib/js/demo/daterangepicker.js"></script>
    <link rel="stylesheet" type="text/css" media="all" href="lib/js/demo/daterangepicker-bs3.css" />
    
    <script>
    var user = '<?php echo $_SESSION['name_user']?>';
    var username = '<?php echo $_SESSION['username']?>';
    var permiso = '<?php echo $_SESSION['permisos_acceso']?>';
    </script>
</head>

<body id="page-top">

    <!-- Page Wrapper -->
    <div id="wrapper">
        <!-- Menu lateral -->
        <?php include('config/menus/menu_lateral.php') ?>
        <!-- Content Wrapper -->
        <div id="content-wrapper" class="d-flex flex-column">

        <div id="content">
                <!-- Menu Superior -->
                <?php include('config/menus/menu_superior.html') ?>
                
                <!-- Controlador de contenido -->
                <?php include('config/Controlador.php') ?>

            </div>
            <!-- Footer -->
            <footer class="sticky-footer bg-white">
                <div class="container my-auto">
                    <div class="copyright text-center my-auto">
                        <span>Copyright &copy; Andres Rivera 2020</span>
                    </div>
                </div>
            </footer>
            <!-- End of Footer -->
            

        </div>
        <!-- End of Content Wrapper -->

    </div>
    <!-- End of Page Wrapper -->

    <!-- Scroll to Top Button-->
    <a class="scroll-to-top rounded" href="#page-top">
        <i class="fas fa-angle-up"></i>
    </a>

    <!-- Logout Modal-->
    <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
        aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel"><i class="fas fa-sign-out-alt "></i> Seguro que quiere salir?</h5>
                </div>
                <div class="modal-body">Seleccione Salir si realmente quiere cerrar la sesion.</div>
                <div class="modal-footer">
                    <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancelar</button>
                    <a class="btn btn-danger" href="back-end/logout.php">
                        <i class="fas fa-sign-out-alt "></i> Salir
                    </a>
                </div>
            </div>
        </div>
    </div>

    <!-- Bootstrap core JavaScript-->
    <script src="lib/jquery/jquery.min.js"></script>
    <script src="lib/bootstrap/js/bootstrap.bundle.min.js"></script>

    <!-- Core plugin JavaScript-->
    <script src="lib/jquery-easing/jquery.easing.min.js"></script>

    <!-- Custom scripts for all pages-->
    <script src="lib/js/sb-admin-2.min.js"></script>

    <!-- Page level plugins 
    <script src="lib/chart.js/Chart.min.js"></script>-->

    <!-- Page level plugins -->
    <script src="lib/datatables/jquery.dataTables.min.js"></script>
    <script src="lib/datatables/dataTables.bootstrap4.min.js"></script>

    <!-- Page level custom scripts -->
    <script src="lib/js/demo/datatables-demo.js"></script>
    
    <?php 
        if($m=='inicio1'){
            echo '<script src="lib/js/demo/chart-area-demo.js"></script>';
        }
    ?>


</body>

</html>