<?php



//ini_set('display_errors',1);



session_start();

require_once ("../../config/Cado.php");

require_once ("cCliente.php");

$oCliente = new cCliente();



$dts1=$oCliente->filtrardirecciones($_POST['cli_id'],'');

$num_rows= mysqli_num_rows($dts1);



?>





		<div class="table-responsive">		

				<div class="col-lg-12 col-md-12 col-xs-12 " >

				

            <table id="tabla_clientedirecciones" class="table table-bordered table-striped ">

                <thead>

                    <tr>

						<th>&nbsp;</th>

						<th>DIRECCION</th>

                        <th>TIPO</th>                       

                    </tr>

                </thead>

                <?php

                if($num_rows>0){

                ?>

                <tbody>

                    <?php

                        while($dt1 = mysqli_fetch_array($dts1)){

							

					?>

                            <tr>

								<td nowrap >     

						

	<button class="btn btn-sm btn-primary"  onClick="clientedir_form('editardireccion','<?php echo $dt1['tb_clientedireccion_id']?>',<?php echo $_POST['cli_id']; ?>)" ><i class="fas fa-edit"></i></button>

	<button class="btn btn-sm btn-primary" onClick="eliminar_clientedirecciones('<?php echo $dt1['tb_clientedireccion_id']?>')" ><i class="fas fa-trash"></i></button>

	

							

								</td>

								

                                <td nowrap ><?php echo $dt1['tb_clientedireccion_nom']?></td>

                                <td >

                                    <?php  

                                    if($dt1['tb_clientedireccion_tip']==1){

                                        echo '<label  class="label label-primary" >DOMICILIO FISCAL</label>';

                                    }else if ($dt1['tb_clientedireccion_tip']==2) {

                                        echo '<label  class="label label-warning" >UBICACION OTROS</label>';

                                    }

                                    ?>

                                </td>                            

                               

                            </tr>

                    <?php

                    }

                    mysqli_free_result($dts1);

                    ?>

                    </tbody>

                <?php }?>

            </table>

          </div>

        </div>

       

	  



 <script type="text/javascript">

  $(function() {  

   

  }); 

</script> 