<?php
include 'header.php';
include 'erpc_financeiro_bancos_toolbar.php'; 
require_once 'connect.php';
?>

<div class="block">
  <div class="header">
	<h2>Bancos</h2>
  </div>
  <div class="content">
    <div class="table-responsive">
      <table class="table table-bordered table-striped table-responsible sortable">
        <thead>
          <tr>
            <th width="3%"><input type="checkbox" class="checkall" /></th>
            <!--<th width="3%">Status</th>-->
            <th width=5%>ID</th>
            <th width=10%>Código</th>
            <th width=75%>Banco</th>
            <!--<th width=25%>Data Inicio</th>-->
            <th width=4%>Editar</th>
			<th width=4%>Excluir</th>
          </tr>
        </thead>
        <tbody>

          <?php
          $consulta = "select * from erpc_financeiro_bancos where st_ativo=1";
          //echo $consulta;
          $resultado = mysqli_query($conexao, $consulta) or die ($erro = mysqli_error($conexao));
          if (mysqli_num_rows($resultado)>0) {
            while ($registro = mysqli_fetch_assoc($resultado)){
              
              $id 			= $registro['id'];
			  $id_crip 		= base64_encode($id);
			  $ds_codigo	= $registro ['ds_codigo'];
			  $ds_banco 	= $registro['ds_banco'];
              //$dt_inclusao = $registro['dt_inclusao'];
			  
          echo "<tr>";
            echo "<td class='text-center'><input type='checkbox' /></td>";
            //echo "<td class='text-center'><i class='fa fa-circle text-success' title='Status'><span class='sr-only'>Status</span></i></td>";
            echo "<td>$id</td>";
			echo "<td>$ds_codigo</td>";
            echo "<td>$ds_banco</td>";
            //echo "<td>dmitry@domain.com</td>";
            //echo "<td>$dt_inclusao</td>";
            echo "<td class='text-center'><a href='erpc_financeiro_bancos_edit.php?id=$id_crip'><i class='glyphicon glyphicon-pencil' title='Editar'><span class='sr-only'>Editar</span></i></a></td>";
            echo "<td class='text-center'><a href='erpc_financeiro_bancos_remove.php?id=$id_crip'><i class='glyphicon glyphicon-remove' title='Remover'><span class='sr-only'>Remover</span></i></a></td>";
          echo "</tr>";
            }
          }		  
          ?>	
        </tbody>
      </table>
    </div> <!-- table-responsive -->
  </div> <!-- content -->
</div> <!-- block -->

<!-- modal da legenda, deve ficar no fim do body, mas posso colocar aqui pois o js/code.js faz a movimentação depois para mim -->
<div class="modal fade bs-legenda-modal-sm" tabindex="-1" role="dialog" aria-labelledby="myLegenda">
  <div class="modal-dialog modal-sm">
    <div class="modal-content">
      <table class="table">
        <tr>
          <td><i class="fa fa-circle text-success" title="Status"><span class="sr-only">Status</span></i></td>
          <td>Descrição do status aqui</td>
        </tr>
        <tr>
          <td><i class="fa fa-circle text-danger" title="Status"><span class="sr-only">Status</span></i></td>
          <td>Descrição do status aqui</td>
        </tr>
        <tr>
          <td><i class="fa fa-circle text-info" title="Status"><span class="sr-only">Status</span></i></td>
          <td>Descrição do status aqui</td>
        </tr>
        <tr>
          <td><i class="fa fa-circle text-warning" title="Status"><span class="sr-only">Status</span></i></td>
          <td>Descrição do status aqui</td>
        </tr>
      </table>
    </div>
  </div>
</div>
<!-- fim modal legenda -->

<?php include 'footer.php';?>
