<?php
require_once("../../config/conexion.php");
require_once("../../models/Permisos.php");
require_once("../../models/Biometrico.php");
$permiso = new Permisos();
$resultado = $permiso->Permisos_por_Perfil("BIOMETRICO", $_SESSION["perfil"]);
foreach ($resultado as $row) {
    $actualizar = $row["actualizar"];
    $leer = $row["leer"];
}
if (isset($_SESSION["usuariodbk"])) {
    ?>
    <!DOCTYPE html>
    <html lang="es">
        <head>
            <?php
            require_once '../html/MainHead.php';
            ?>
            <title>SIED | BIOMETRICO CALENDARIO</title>
        </head>
        <body class="hold-transition sidebar-mini layout-fixed">           
            <?php require_once '../html/MainMenu.php'; ?> 
            <?php require_once '../html/MainHeader.php'; ?>             
            <div class="content-wrapper ">
                <div class="content-header">
                    <div class="container-fluid">
                        <div class="row mb-2">
                            <div class="col-sm-6">
                                <h1 class="m-0">BIOMETRICO CALENDARIO</h1>
                            </div>
                            <div class="col-sm-6">
                                <ol class="breadcrumb float-sm-right">
                                    <li class="breadcrumb-item"><a href="../UsuHome/">Inicio</a></li>
                                    <li class="breadcrumb-item active">Biometrico Calendario</li>
                                </ol>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="br-pagebody mg-t-5 pd-x-30">
                    <section class="content">
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-md-3">
                                    <div class="sticky-top mb-3">
                                        <div class="card">
                                            <div class="card-header">
                                                <div class="card-title">
                                                    <b>Eventos</b>
                                                </div>
                                            </div>
                                            <div class="card-body">
                                                <div id="external-events"></div>
                                            </div>
                                        </div>

                                        <div class="card">
                                            <div class="card-header">
                                                <div class="card-title">
                                                    <b>Crear Evento</b>
                                                </div>
                                            </div>

                                            <div class="card-body">

                                                <form id="create-event">
                                                    <div class="form-group">
                                                        <label for="">Nombre de evento</label>
                                                        <input id="title_event" name="title" type="text" class="form-control" placeholder="Nombre de evento" required>
                                                    </div>

                                                    <div class="btn-group" style="width: 100%; margin-bottom: 10px;">
                                                        <ul id="color-chooser" class="fc-color-picker">
                                                            <li>
                                                                <a class="text-primary" href="#">
                                                                    <i class="fas fa-square"></i>
                                                                </a>
                                                            </li>
                                                            <li>
                                                                <a class="text-warning" href="#">
                                                                    <i class="fas fa-square"></i>
                                                                </a>
                                                            </li>
                                                            <li>
                                                                <a class="text-success" href="#">
                                                                    <i class="fas fa-square"></i>
                                                                </a>
                                                            </li>
                                                            <li>
                                                                <a class="text-danger" href="#">
                                                                    <i class="fas fa-square"></i>
                                                                </a>
                                                            </li>
                                                        </ul>
                                                    </div>
                                                    <button class="btn btn-primary btn-sm" type="submit" id="add-new-event">
                                                        <i class="fas fa-plus mr-1"></i>
                                                        Crear Evento
                                                    </button>

                                                        
                                                </form>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-9">
                                    <div class="card card-primary">
                                        <div class="card-body p-0">
                                            <div id="calendar"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
            <?php require_once '../html/MainFooter.php'; ?> 
            <aside class="control-sidebar control-sidebar-dark">
            </aside>                
            <?php require_once 'mantenimiento.php'; ?>
            <?php require_once 'visualizar.php'; ?>
            <?php require_once '../html/MainJS.php'; ?>
            <script src="https://code.jquery.com/ui/1.13.1/jquery-ui.min.js" integrity="sha256-eTyxS0rkjpLEo16uXTS0uVCS4815lc40K2iVpWDvdSY=" crossorigin="anonymous"></script>
            <script src="https://cdn.jsdelivr.net/npm/fullcalendar@6.0.0/index.global.min.js" integrity="sha256-qhVoe2CgVKC9i6bmWEMbE2erRC7/aclX8n7Aaw6Y+uY=" crossorigin="anonymous"></script>
            <script type="text/javascript" src="calendario.js"></script>
        </body>
    </html>
    <?php
} else {
    header("Location:" . Conexion::ruta() . "view/404/");
}
?>

