<?php

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

require_once ("cCuentadeposito.php");

$oCuentadeposito= new cCuentadeposito();



$dts=$oCuentadeposito->filtrar();

$num_rows= mysql_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_tarjeta" class="table table-bordered table-striped">

             <thead>

                <tr>

                    <th>NOMBRE</th>

                    <th>CAJA</th>

                    <th>ID</th>

                    <th>&nbsp;</th>

                </tr>

            </thead> 

            <?php

            if($num_rows>=1){

                ?>  

                <tbody>

                    <?php

                    while($dt = mysql_fetch_array($dts)){

                        ?>

                        <tr>

                            <td><?php echo $dt['tb_cuentadeposito_nom']?></td>

                            <td><?php echo $dt['tb_caja_nom']?></td>

                            <td><?php echo $dt['tb_cuentadeposito_id']?></td>

                            <td align="center">

                            

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

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

							

                            </td>

                        </tr>

                        <?php

                    }

                    mysql_free_result($dts);

                    ?>

                </tbody>

                <?php

            }

            ?>

        </table>

    </div>

</div>

</div>

</div>

</section>



<script type="text/javascript">

  $(function() {  

    $("#tabla_tarjeta").DataTable( {

      "columnDefs": [

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

      ],

      "searching": false,

      "order":[[0,"asc"]]

  });

}); 

</script>