<?php
session_start(); 
require_once ("../conexion.php");
require_once('../include/sesiones.php');
$com_id=$_GET['com_id'];

?>
<table class="table table-bordered table-hover table-striped">
    <tr>
    	<th>NOMBRE</th>
    	<th width="5%"></th>
    </tr>
        <?php
        	$sumador_total=0;
        	$sql=mysqli_query($con, "SELECT * from sabores_combos where combo_id='$com_id' and empresa='$empresa'");
        	while ($row=mysqli_fetch_array($sql))
        	{
        	$sab_id=$row["sab_id"];
        	$nombre=$row["sab_nombre"];
        ?>
	<tr>
		<td><?php echo $nombre;?></td>
		<td >
		    <a href="#" id="dele-<?php echo $row["sab_id"];?>" class="btn btn-xs btn-danger"> <i class="btn-icon-only icon-remove"></i></a>
    		<script>
    		$("#dele-"+<?php echo $row["sab_id"];?>).click(function(e){
    			e.preventDefault();
    			p = confirm("Estas seguro?");
    			if(p){
    				$.get("./php_combos/eliminar_sabor.php","sab_id="+<?php echo $row["sab_id"];?>,function(data){
    					loadTablasabores();
    				});
    			}
    		});
    		</script>
        </td>
	</tr>		
	<?php } ?>
</table>