<?php  

include 'index.php';

if(isset($_SESSION['estado_user'])=='ACTIVO' AND $_SESSION['tipo_user']){

	if(isset($_POST['perLic'])){
		$id_per=$_POST['id_per'];
		$numDoc_per=$_POST['numDoc_per'];
		$expeditoDoc_per=$_POST['expeditoDoc_per'];
		$nom_per=$_POST['nom_per'];
		$primerAp_per=$_POST['primerAp_per'];
		$segundoAp_per=$_POST['segundoAp_per'];
		$fechaNac_per=$_POST['fechaNac_per'];
		$numCelu_per=$_POST['numCelu_per'];
		$id_dir=$_POST['id_dir'];
		$nom_dir=$_POST['nom_dir'];
		$id_uni=$_POST['id_uni'];
		$nom_uni=$_POST['nom_uni'];
		$cargo=$_POST['cargo'];
		$gradoAcad_per=$_POST['gradoAcad_per'];

	?>

		<script type="text/javascript">
			$( document ).ready(function() {
			    $('#myModal').modal('toggle')
			});
		</script>

		<div class="modal fade " id="myModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
			<div class="modal-dialog modal-lg">
				<div class="modal-content row">
					<div class="row">
			            <div class="col-md-12">
			                <div class="card mb-4">
			                    <div class="card-header" style="background: #BDBDBD;">
			                        <div class="row">
			                            <div class="col-md-11">
			                                <i class="fas fa-list"></i>
			                                Permisos / Licencias
			                            </div>
			                            <div class="col-md-1">
			                                <a href="index.php" class="btn btn-outline-dark"><i class="far fa-window-close"></i></a>
			                            </div>
			                        </div>
			                    </div>
			                    <div class="card-body">
			                        <form name="" action="index.php" method="POST"> 
			                        	<input type="hidden" name="id_per" value="<?php print $id_per; ?>">
			                        	<div class="form-row">
			                        		<div class="col-md-12">
			                        			<label>Apellido y Nombre : </label>
			                        			<label class="form-control"> <B> <?php print $gradoAcad_per." ".$primerAp_per." ".$segundoAp_per." ".$nom_per; ?></B></label>
			                        		</div>
			                        	</div>
			                        	<div class="form-row">
			                        		<div class="col-md-4">
			                        			<label>Nº de Documento :</label>
			                        			<label class="form-control"><strong> <?php print $numDoc_per; ?></strong></label>
			                        		</div>
			                        		<div class="col-md-8">
			                        			<label>Cargo : </label>
			                        			<label class="form-control"><strong> <?php print $cargo; ?></strong></label>
			                        		</div>
			                        	</div>
			                        	<div class="form-row">
			                        		<div class="col-md-12">
			                        			<label>Motivo : </label>
			                        			<textarea name="motivo_perm" class="form-control" cols="3"></textarea>
			                        		</div>
			                        	</div>
			                        	<div class="form-row">
			                        		<div class="col-md-6">
			                        			<label>a Partir del : </label>
			                        			<input type="date" name="fechaInc_perm" class="form-control">
			                        		</div>
			                        		<div class="col-md-6">
			                        			<label>Hasta el : </label>
			                        			<input type="date" name="fechaFin_perm" class="form-control">
			                        		</div>
			                        	</div>
			                        	<div class="form-group mt-4 mb-0"> <button type="submit" name="permGuardar" class="btn btn-primary btn-block">Guardar</button> </div>
			                        </form>
			                    </div>
			                </div>
			            </div>
			        </div>
			    </div>
			</div>
		</div>  

	<?php 
	}else{
		header('location:personalGAMPV.php');
	}


	

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