<?php

include("../bd/sql_variables.php");

$con= mysqli_connect("$sql_host", "$sql_usuario", "$sql_pass") or die(header ("No Disponible Servidor de Base de Datos"));
mysqli_select_db($con,"$sql_db");

$ugid=$_GET['ugid'];

//listado de descanso medico
$sqldm="select dm_id as id, concat(date_format(dm_fechaini,'%d/%m/%Y'),' - ', date_format(dm_fechafin,'%d/%m/%Y'),' (', dm_numdias,')') ";
$sqldm=$sqldm." as dias, dm_obs from tb_descmed where ug_id='$ugid' order by dm_fechaini desc";
//echo $sqldm;
$resultdm = mysqli_query($con, $sqldm);
$cadenadm="<select name='dmselect' id='dmselect' size='4' style='width:22em;' ondblClick='modificardm()'>";
while ($rowdm= mysqli_fetch_assoc($resultdm)){
$codigo=$rowdm['id'];
$dias=$rowdm['dias'];
$cadenadm=$cadenadm."<option value='".$codigo."'>".$dias."</option>";
}
$cadenadm=$cadenadm."</select>";
echo $cadenadm;


				
?>