<?php

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

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

$ugid=$_GET['ugid'];

//listado de licenias
$sqllic="select lc_id as id, tlc_id as idtl, concat(date_format(lc_fechaini,'%d/%m/%Y'),' - ', date_format(lc_fechafin,'%d/%m/%Y'),' (', lc_numdias,')') ";
$sqllic=$sqllic." as dias from tb_licencias where ug_id='$ugid' order by lc_fechaini desc";
//echo $sqldm;
$resultlic = mysqli_query($conex,$sqllic);
$cadenalic="<select name='licselect' id='licselect' size='4' style='width:22em;' ondblClick='modificarlic(12)' onClick='listardescfechalic()' onLoad='listardescfechalic()'>";
while ($rowlic= mysqli_fetch_array($resultlic)){
$codigo=$rowlic['id'];
$dias=$rowlic['dias'];
$cadenalic=$cadenalic."<option value='".$codigo."'>".$dias."</option>";
}
$cadenalic=$cadenalic."</select>";
echo $cadenalic;


				
?>