<?php include('fncr-geral/configuracao_geral.php');
$pagina = "planos";
$blq_pag = "planos";
include('fncr-geral/permissoes_restricao.php');

$id_grupo = $_GET['g'];

// ************************************** GERAL **************************************

$sql = $bd->getConexao()->prepare('SELECT * FROM planos_niveis WHERE id_plano_grupo = :id_plano_grupo ORDER BY ordem');
$sql->bindValue(':id_plano_grupo', $id_grupo, PDO::PARAM_STR);
if( $sql->execute() ) { $niveis = $sql->fetchall(PDO::FETCH_ASSOC);}

?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
  <?php include('fncr-geral/html-head.php');?>

<script type="text/javascript">


</script>

</head>
<body>

<!-- BARRA SUPERIOR -->
<?php include('barra-sup.php');?>
<!-- MENU PRINCIPAL -->
<?php include('menu.php');?>

<section id="content">
  <!-- MENSAGENS DE ALERTA -->
  <?php include('fncr-geral/mensagens.php');?>

  <div class="clearfix padder bg-fncr-clearfix">
<h3 class="m-b">Planos - Níveis</h3>
</div>

<section id="content" class="content-sidebar bg-white">
<section class="main">

<br>

  <div class="col-lg-12">
    <section class="panel">
      <header class="panel-heading">
        Níveis
      </header>
      <div class="table-responsive">
        <table class="table table-striped b-t text-small">
          <thead>
          <tr>
            <th class="text-center" width="1"></th>
            <th>Nível</th>
          </tr>
          </thead>
          <tbody>
          <?php foreach ($niveis as $l){?>
          <tr>
            <td class="text-info">
              <a href="planos_configs.php?n=<?php echo $l['id']?>"><i class="fa fa-folder-open fa-lg" data-toggle="tooltip" data-placement="top" title="Entrar"></i></a>
            </td>
            <td><?php echo $l['nome']?></td>
          </tr>
          <?php } ?>
          </tbody>
        </table>
      </div>
    </section>
  </div>

</section>
<!-- /.main -->
</section>

<!-- FOOTER -->
<?php include('footer.php');?>

<!-- app -->
<script src="js/app.js"></script>
<script src="js/app.plugin.js"></script>
<script src="js/app.data.js"></script>

</body>
</html>
<?php $bd = null; $bd_fn = null;?>