<?php 
session_start();

if(isset($_SESSION['estado_user'])=='ACTIVO' AND $_SESSION['tipo_user']){
include 'incluciones/header.php';

include 'incluciones/Db.php';
include 'Model/personalModel.php';

include 'Controller/personalEditarGuardarController.php';
#include 'Controller/personalEstadoController.php';          
include 'Controller/viajeRegController.php';                #incluye su model
include 'Controller/permisosLicRegController.php';          #incluye su model

?>


<main>
    <div class="container-fluid"> <br>
        <!--<h1 class="mt-4">RECURSOS HUMANOS 2020 </h1> 
        <ol class="breadcrumb mb-4">
            <li class="breadcrumb-item active">Dashboard</li>
        </ol> -->
        <div class="row">
            <div class="col-xl-3 col-md-6">
                <div class="card bg-primary text-white mb-4">
                    <div class="card-body">de Planta</div>
                    <div class="card-footer d-flex align-items-center justify-content-between">
                        <a class="small text-white stretched-link" href="#">Ver Detalles</a>
                        <div class="small text-white"><i class="fas fa-angle-right"></i></div>
                    </div>
                </div>
            </div>
            <div class="col-xl-3 col-md-6">
                <div class="card bg-warning text-white mb-4">
                    <div class="card-body">Eventual</div>
                    <div class="card-footer d-flex align-items-center justify-content-between">
                        <a class="small text-white stretched-link" href="#">Ver Detalles</a>
                        <div class="small text-white"><i class="fas fa-angle-right"></i></div>
                    </div>
                </div>
            </div>
            <div class="col-xl-3 col-md-6">
                <div class="card bg-success text-white mb-4">
                    <div class="card-body">Consultores</div>
                    <div class="card-footer d-flex align-items-center justify-content-between">
                        <a class="small text-white stretched-link" href="#">Ver Detalles</a>
                        <div class="small text-white"><i class="fas fa-angle-right"></i></div>
                    </div>
                </div>
            </div>
            <div class="col-xl-3 col-md-6">
                <div class="card bg-danger text-white mb-4">
                    <div class="card-body">Total Personal</div>
                    <div class="card-footer d-flex align-items-center justify-content-between">
                        <a class="small text-white stretched-link" href="#">Ver Detalles</a>
                        <div class="small text-white"><i class="fas fa-angle-right"></i></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row" style="margin-top: 1%;">
            <div class="col-xl-12">
                <div class="card mb-4">
                    <div class="card-header" style="background: #BDBDBD;">
                        <div class="row">
                            <div class="col-md-6">
                                <i class="fas fa-list"></i>
                                Personal del GAM-PV
                            </div>
                            <div class="col-md-6">
                                <a href="index.php" class="btn btn-outline-danger" style="float: right;"><i class="far fa-window-close"></i></a> 
                                <a href="permisosLic.php" class="btn btn-outline-info" style="float: right;"><i class="far fa-folder-open"></i>Imprimir Permisos/Licencias</a>
                                <a href="viajes.php" class="btn btn-outline-success" style="float: right;"><i class="far fa-folder-open"></i>Imprimir Viaje</a>
                            </div>
                        </div>
                    </div>
                    <div class="card-body">
                        <?php include 'Controller/personalEstadoController.php';   ?>
                        <div class="table-responsive">
                            <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0" style="font-size: 12px;">
                                <thead>
                                    <tr>
                                        <th>Nº</th>
                                        <th>Nº CI</th>
                                        <th>Nombre Completo</th>
                                        <th>Celular</th>
                                        <th>Dirección</th>
                                        <th>Unidad</th>
                                        <th>Cargo</th>
                                        <th>Estado</th>
                                        <th>Editar</th>
                                        <th>Viaje</th>
                                        <th>P/Licencias</th>
                                    </tr>
                                </thead>
                                <tfoot>
                                    <tr>
                                        <th>Nº</th>
                                        <th>Nº CI</th>
                                        <th>Nombre Completo</th>
                                        <th>Celular</th>
                                        <th>Dirección</th>
                                        <th>Unidad</th>
                                        <th>Cargo</th>
                                        <th>Estado</th>
                                        <th>Editar</th>
                                        <th>Viaje</th>
                                        <th>P/Licencias</th>
                                    </tr>
                                </tfoot>
                                    <style type="text/css">
                                        #mover:hover{
                                            background: #D8D8D8;
                                        }
                                    </style>
                                <tbody>
                                    <?php
                                    include 'Controller/personalMostrarController.php'; #esta mas arriba
                                    ?>
                                </tbody>
                            </table>
                        </div>
                        
                    </div>
                </div>
            </div>
        </div>
        
    </div>
</main>

                
<?php
include 'incluciones/footer.php';
}else{
    header('location:../../index.php');
}
?>