<?php
//modificar
include("../bd/sql_variables.php");

$db_conexion= mysql_connect("$sql_host", "$sql_usuario", "$sql_pass") or die(header ("No Disponible Servidor de Base de Datos"));
mysql_select_db("$sql_db");

$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 = mysql_query($sqllic);
$cadenalic="<select name='licselect' id='licselect' size='4' style='width:22em;' ondblClick='modificarlic()' onClick='listardescfechalic()' onLoad='listardescfechalic()'>";
while ($rowlic= mysql_fetch_array($resultlic)){
$codigo=$rowlic['idtl'];
$dias=$rowlic['dias'];
$cadenalic=$cadenalic."<option value='".$codigo."'>".$dias."</option>";
}
$cadenalic=$cadenalic."</select>";
echo $cadenalic;


				
?>