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

$sql = $bd->getConexao()->prepare('
  SELECT
    clubes_configuracao.logo,
    clubes.status,
    clubes.bloqueio,
    clubes.cancelado,
    IFNULL(DATE_FORMAT(clubes.data_cadastro,"%d/%m/%Y"), "00/00/0000") as data_cad
  FROM clubes
    LEFT JOIN clubes_configuracao on clubes_configuracao.id_clube = clubes.id
  WHERE clubes.status <> 9
  ORDER BY clubes.data_cadastro DESC');
if( $sql->execute() ) { $resul_logos = $sql->fetchall(PDO::FETCH_ASSOC);}

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

  <link rel="stylesheet" type="text/css" href="js/datatables2/media/css/jquery.dataTables.css">
  <script type="text/javascript" language="javascript" src="js/datatables2/media/js/jquery.dataTables.js"></script>

  <script type="text/javascript" language="javascript" class="init">


  </script>
</head>
<body>

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

<section id="content">

<div class="clearfix padder bg-fncr-clearfix">
<h3 class="m-b">Clubes</h3>

</div>

<section id="content" class="content-sidebar bg-white" style="padding-bottom: 100px">
<!-- .main -->
<section class="main">
<br>

  <div class="col-lg-12">
    <?php
    $cont_clubes = count($resul_logos);
    foreach($resul_logos as $l){ if(file_exists("../_logos/".$l['logo'].".png")){
      $background = $l['cancelado']==0 ? '#0c0c0c' : '#999999';
    ?>
    <div style="float: left; width: 100px; height: 100px; background: <?php echo $background?>; margin: 10px; border-radius: 10px; padding: 10px">
      <div style="font-size: 11px;color: #d5d5d5;text-align: left;margin-bottom: 10px">
        <?php echo $l['data_cad']?>
        <div class="pull-right"><?php echo $cont_clubes?></div>
      </div>
      <div style="text-align: center">
        <a href="<?php echo URL_LOGOS.$l['logo']?>.png?id=<?php echo $id_arqs?>" target="_blank">
          <img src="<?php echo URL_LOGOS.$l['logo']?>.png?id=<?php echo $id_arqs?>" style="max-height: 50px">
        </a>
      </div>
    </div>
    <?php } ?>
    <?php $cont_clubes--;} ?>
  </div>

</section>
</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>
<!-- Sparkline Chart -->
<script src="js/charts/sparkline/jquery.sparkline.min.js"></script>
<!-- Easy Pie Chart -->
<script src="js/charts/easypiechart/jquery.easy-pie-chart.js"></script>
<!-- select2 -->
<script src="js/select2/select2.min.js"></script>
<!-- fuelux -->
<script src="js/fuelux/fuelux.js"></script>
<!-- datepicker -->
<script src="js/datepicker/bootstrap-datepicker.js"></script>
<!-- slider -->
<script src="js/slider/bootstrap-slider.js"></script>
<!-- file input -->
<script src="js/file-input/bootstrap.file-input.js"></script>
<!-- combodate -->
<script src="js/combodate/moment.min.js"></script>
<script src="js/combodate/combodate.js"></script>
<!-- parsley -->
<script src="js/parsley/parsley.min.js"></script>

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