<?php
 
session_start();
include("DMMYSQLG.php");
include("DSA1000.php");
include("DMMYSQLG.php");
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<body>
<?php
 
$ayuda = 'DN911A_PR.php';
include("DYAYUDA.php");
?>
<div align="center"></div>
<div align="center">
  <form name="frm1" method="post" action="" >
    <p>
    <?php
 
	
	?>
    </p>
    <table  align="center">
      <tr>
        <th colspan="10"><div align="left">
          <input type="button" name="Submit6" value="Agregar" onClick="openpage('DN91100_AG.php','_self')"/>
          <input type="Submit" name="bot3" value="Consultar"  onClick="openpage('DN91100_CO.php','_self')"/>
          <input type="button" name="bot2" value="Modificar" onClick="openpage('DN91100_MO.php','_self')"/>
          <input type="button" name="bot1" value="Eliminar" onClick="openpage('DN91100_EL.php','_self')"/>
          <input type="button" name="bot4" value="Imprimir " onClick="openpage('DN91100_IM.php','_self')"/>
          <input type="button" name="Submit" value="Mostrar todo" onClick="openpage('DN91100_PR.php','_self')"/>
        </div></th>
      </tr>
      <tr>
        <th colspan="10">Concepto - Motivos de Ausencia </th>
      </tr>
      <tr>
        <th><div align="center">Sel</div></th>
        <th><div align="center">Clave Falta</div></th>
		<th><div align="center">Clave Descanso </div></th>
		<th><div align="center">Clave Dia Festivo </div></th>
		<th><div align="center">Clave Dia Retardo </div></th>
		<th><div align="center">Descanso Trabajado</div></th>
		<th><div align="center">Festivo Trabajado</div></th>
		<th><div align="center">Checa / Huella </div></th>
		<th><div align="center">Prima Dominical </div></th>
		<th><div align="center">Actualiza</div></th>
      </tr>
	<?php

	include("DE10000.php");
	while($reg = mysqli_fetch_array($sql))
	{
	  	echo "<tr>";
		echo '<td><div align="center"><input name="bot" type="radio" value="'. $reg["no_reg"].'">&nbsp</div></td>';
		$sq_dnmotaus = mysqli_query($con ,"select * from dnmotaus where no_reg= '".$reg['cve_fal']."'");
		$dt_dnmotaus = mysqli_fetch_array($sq_dnmotaus);
		echo '<td><div align="center">' . $dt_dnmotaus['descrip'] . '&nbsp</div></td>';
		$sq_dnmotaus = mysqli_query($con ,"select * from dnmotaus where no_reg= '".$reg['cve_des']."'");
		$dt_dnmotaus = mysqli_fetch_array($sq_dnmotaus);
		echo '<td><div align="center">' . $dt_dnmotaus['descrip'] . '&nbsp</div></td>';
		$sq_dnmotaus = mysqli_query($con ,"select * from dnmotaus where no_reg= '".$reg['cve_dfe']."'");
		$dt_dnmotaus = mysqli_fetch_array($sq_dnmotaus);
		echo '<td><div align="center">' . $dt_dnmotaus['descrip'] . '&nbsp</div></td>';
		$sq_dnmotaus = mysqli_query($con ,"select * from dnmotaus where no_reg= '".$reg['cve_ret']."'");
		$dt_dnmotaus = mysqli_fetch_array($sq_dnmotaus);
		echo '<td><div align="center">' . $dt_dnmotaus['descrip'] . '&nbsp</div></td>';
		$sq_dnmotaus = mysqli_query($con ,"select * from dnmotaus where no_reg= '".$reg['des_tra']."'");
		$dt_dnmotaus = mysqli_fetch_array($sq_dnmotaus);
		echo '<td><div align="center">' . $dt_dnmotaus['descrip'] . '&nbsp</div></td>';
		$sq_dnmotaus = mysqli_query($con ,"select * from dnmotaus where no_reg= '".$reg['fes_tra']."'");
		$dt_dnmotaus = mysqli_fetch_array($sq_dnmotaus);
		echo '<td><div align="center">' . $dt_dnmotaus['descrip'] . '&nbsp</div></td>';
		echo '<td><div align="center">' . $reg['huella'] . '&nbsp</div></td>';
		$sq_dnmotaus = mysqli_query($con ,"select * from dnmotaus where no_reg= '".$reg['pri_vac']."'");
		$dt_dnmotaus = mysqli_fetch_array($sq_dnmotaus);
		echo '<td><div align="center">' . $dt_dnmotaus['descrip'] . '&nbsp</div></td>';
		echo '<td><div align="center">' . $reg['actuali'] . '&nbsp</div></td>';
		echo "</tr>";
	}
	mysqli_close($con);
	?>
    </table>
  </form>
</div>
</body>
</html>