<?php

session_start();



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

require_once("cUsuarioperfil.php");

$oUsuarioperfil = new cUsuarioperfil();





$dts=$oUsuarioperfil->filtrar();

$num_rows= mysqli_num_rows($dts);



?>











<section class="content" id="table" style="min-height:0px;padding-bottom:0px;margin-bottom:-30px;">

  <div class="row">

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

      <div class="box">

        <div class="box-body">

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

             <thead>

                <tr>               

                    <th>NOMBRE</th>

                    <th>ID</th>

                    <th align="center">&nbsp;</th>

                </tr>

            </thead>

             <tbody>

                <?php

        if($num_rows>0)

        {

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

        ?>

      <tr>

        <td><?php echo $dt1['tb_usuarioperfil_nom']; ?></td>     

        <td><?php echo $dt1['tb_usuarioperfil_id']; ?></td>



		<td align="center" nowrap="nowrap">



<span title="Editar" class="btn btn-primary glyphicon glyphicon-pencil"  onClick="usuarioperfil_form('editar','<?php echo $dt1['tb_usuarioperfil_id']?>')"  ></span>

<span title="Eliminar" class="btn btn-primary glyphicon glyphicon-trash" onClick="usuarioperfil_eliminar('<?php echo $dt1['tb_usuarioperfil_id']?>')" ></span>	

						 

		</td>

                        </tr>

                <?php

                }

                }

                mysqli_free_result($dts1);

                ?>

                </tbody>

</table>

</div>

</div>

</div>

</div>

</section>







<script type="text/javascript">

    $(function() {  

        $("#tabla_usuarioperfil").DataTable( {

          "columnDefs": [

          { "orderable": false, "targets": [2] }

          ],

          "searching": false,

          "order":[[1,"asc"]]

      });

    }); 

</script>