<?php
session_start();
require_once('../conexion.php');
require_once('../include/sesiones.php');
?>
<table class="table table-striped table-bordered">
    <thead>
        <tr>
            <th>NOMBRE</th>
            <th width="20%"></th>
        </tr>
    </thead>
    <?php
        $registros=mysqli_query($con,"SELECT * from banco where empresa='$empresa' order by ban_nombre asc") or die(mysqli_error($con));
        while ($reg=mysqli_fetch_array($registros)){
        $id=$reg["ban_id"];
    ?>
        <tr>
            <td><?php  echo $reg['ban_nombre']; ?></td>
            <td >
                <?php 
                {?>
                  
                  <a href="#" id="del-<?php echo $reg["ban_id"];?>"  title="Eliminar" class="btn btn-xs btn-danger"> <i class="btn-icon-only icon-remove"></i></a>
               <?php }?>
            </td>
            <script>
            $("#del-"+<?php echo $reg["ban_id"];?>).click(function(e){
              e.preventDefault();
              p = confirm("Estas seguro?");
              if(p){
                $.get("./php_empresas/eliminar_banco.php","ban_id="+<?php echo $reg["ban_id"];?>,function(data){
                  loadbancos();
                });
              }
            });
            </script>
        </tr>
    <?php }?>
</table>

<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="editModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">Actualizar Rol</h4>
            </div>
            <div class="modal-body">
                <div id="form-edit"></div>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->