<?php
session_start();
require_once ("../conexion.php");
require_once('../include/sesiones.php'); 
?>

<div class="table-responsive">
    <table class="table table-striped table-bordered">
		<tr class="warning">
			<th width="">CONCEPTO</th>
			<th width="">CANTIDAD</th>
			<th width="">VALOR HORA</th>
			<th width="5%"></th>
		</tr>

<?php
    $sql=mysqli_query($con,"SELECT * FROM dian_nomina_horas_extras_temp where empresa='$empresa' and usuario='$usu_id' ");
	while ($row1=mysqli_fetch_array($sql))
	{
		$hor_id=$row1['hor_id'];
?>
		<tr>
			<td><?php echo $row1['hor_nombre']; ?> <?php echo $row1['hor_inicio']; ?> / <?php echo $row1['hor_fin']; ?></td>
			<td><?php echo $row1['hor_cantidad']; ?></td>
			<td><?php echo number_format($row1['hor_valor'],0); ?></td>
			
			<td>
				 <a href="#" id="del-<?php echo $row1["hor_id"];?>" class="btn btn-xs btn-danger"> <i class="btn-icon-only icon-remove"></i></a>
	            <script>
	            $("#del-"+<?php echo $row1["hor_id"];?>).click(function(e){
	                e.preventDefault();
	                p = confirm("Estas seguro?");
	                if(p){
	                    $.get("./php_doc_nomina/eliminar_hora_temp.php","hor_id="+<?php echo $row1["hor_id"];?>,function(data){
	                        loadtabla_horas();
	                    });
	                }
	            });
	            </script>
			</td>
		</tr>
<?php } ?>
</table>
</div>
