<?php
//ini_set('display_errors',1);
require_once ("../../config/Cado.php");
require_once ("../piso/cPiso.php");
$oPiso = new cPiso();
//$oSalon = cSalon::ningunDato();
$dts = $oPiso->selectConLocal('');
$num_rows= mysqli_num_rows($dts);
?>
<section class="content">
	<div class="container-fluid">
	<div class="row">
	    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
		    <div class="card">
				<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding:5px;">
	
	<div class="table-responsive">
		
          <table id="tabla_salon" class="table table-bordered table-striped">
           <thead>
		<tr >  
		<td style="font-weight:bold; " colspan="3">PISOS PUNTO VENTA</td>  
        <td height="30"  align="right" ><a class="btn_agregar btn btn-danger" href="javascript:void(0)" onClick="piso_form('insertar')">Nuevo Piso</a></td>
		</tr>
        
		<tr>
        <th>EMPRESA | PUNTO VENTA</th>
        <th>PISO</th>
        <th>ALMACEN</th>
        <th></th>
        </tr>
    </thead>
          <?php
if($num_rows>=1){
?>  
    <tbody>
    <?php
   
    while($fila = mysqli_fetch_array($dts)){
    ?>
        <tr>
            <td><?php echo $fila['tb_empresa_nomcom'].' | '.$fila['tb_puntoventa_nom']; ?></td>
            <td><?php echo $fila['tb_piso_nom']; ?></td>
            <td><?php echo $fila['tb_almacen_nom']?></td>
                   
			<td align="center" >					
		<!--	<span title="Ver Mesas" class="btn btn-primary glyphicon glyphicon-zoom-in" 
			onClick="mesa_tabla('<?php echo $fila['tb_piso_id']?>','1','<?php echo $fila['tb_puntoventa_nom'].' | '.$fila['tb_piso_nom']; ?>')"  ></span>
			-->
           
<button class="btn btn-sm btn-primary" onClick="piso_form('editar','<?php echo $fila['tb_piso_id']?>')" ><i class="fas fa-edit"></i></button>
<button class="btn btn-sm btn-primary" onClick="eliminar_piso('<?php echo $fila['tb_piso_id']?>')" ><i class="fas fa-trash"></i></button>
		   </td>
                 
            </tr>
    <?php
        }
        mysqli_free_result($dts);
    ?>
    </tbody>
    <?php
}
?>
      </table>
    </div>
    </div>
    </div>
  </div>
</div>
</div>
</section>