<?php

require_once("../class/class.conectar.php");

$Objcon = new Conectar();
$conex = $Objcon->con();

$ugid=$_GET['ugid'];
$idhrsper=$_GET['idhrsper'];

//listado de hrs permiso
$sqllic="select a.hrp_id as id, a.thp_id as idthp, (select thp_desc from tb_tphoraper where thp_id=a.thp_id) as deschrsper, concat(date_format(a.hrp_fecha,'%d/%m/%Y'),'-',date_format(a.hrp_horaini,'%k:%i %p'),'-',date_format(a.hrp_horafin,'%k:%i %p'),' (',a.hrp_numhora,')') as hora ";
$sqllic=$sqllic."  from tb_horapermiso a where a.ug_id='$ugid' and a.hrp_id='$idhrsper' order by a.hrp_fecha desc";
//echo $sqllic;
$resultlic = mysqli_query($conex,$sqllic);
while ($rowlic= mysqli_fetch_array($resultlic)){
$idthpid=$rowlic['idthp'];
$desctipohrsper=$rowlic['deschrsper'];
}
echo "<input type='hidden' id='idthper' name='idthper' value='".$idthpid."'><input type='text' size='40' id='outhrper' class='SalidaText' value='".$desctipohrsper."'>";


				
?>