<?php
$icone_submenu = '<i class="fa fa-angle-right fa-lg pull-right" style="margin-top: 3px;margin-right: -5px"></i>';
?>

<nav id="nav" class="nav-primary hidden-xs">
<ul class="nav" data-spy="affix" data-offset-top="50">

  <?php if($clientes_gerenciar == 1 or $representante_gerenciar == 1){ ?>
  <li class="dropdown-submenu <?php if($pagina == "cadastros" or $pagina == "cadastros"){echo " active";}?>">
    <a><i class="fa fa-users fa-lg"></i><span>Cadastros</span><?php echo $icone_submenu?></a>
      <ul class="dropdown-menu">
        <?php if($clientes_gerenciar == 1){ ?><li><a href="clientes.php"><span class="text-submenu"><i class="fa fa fa-users"></i>Clientes</a></span></li><?php } ?>
        <?php if($representante_gerenciar == 1){ ?><li><a href="representantes.php"><span class="text-submenu"><i class="fa fa fa-user-tie"></i>Representantes</a></span></li><?php } ?>
      </ul>
  </li>
  <?php } ?>

  <?php if($clubes_ativos == 1 or $clubes_inativos == 1 or $clubes_novo == 1){ ?>
  <li class="dropdown-submenu <?php if($pagina == "clubes" or $pagina == "clube"){echo " active";}?>">
    <a><i class="fa fa-trophy fa-lg"></i><span>Clubes</span><?php echo $icone_submenu?></a>
      <ul class="dropdown-menu">
        <?php if($clubes_ativos == 1){ ?><li><a href="clubes-ativos.php"><span class="text-submenu"><i class="fa fa fa-th-list"></i>Clubes Ativos</a></span></li><?php } ?>
        <?php if($clubes_inativos == 1){ ?><li><a href="clubes-inativos.php"><span class="text-submenu"><i class="fa fa fa-th-list"></i>Clubes Inativos</a></span></li><?php } ?>
        <?php if($clubes_novo == 1){ ?><li><a href="clubes-novo.php"><span class="text-submenu"><i class="fa fa fa-file-o"></i>Novo Cadastro</a></span></li><?php } ?>
      </ul>
  </li>
  <?php } ?>

  <?php if($mensalidades==1){ ?>
  <li class="dropdown-submenu <?php if($pagina == "agenda"){echo " active";}?>">
    <a href="mensalidades.php"><i class="fa fa-calendar fa-lg"></i><span>Mensalidades</span></a>
  </li>
  <?php } ?>

  <?php /*if($mensalidades == 1 or $banco_retorno==1 or $notas_fiscais==1){ ?>
  <li class="dropdown-submenu <?php if($pagina == "mensalidades"){echo " active";}?>">
    <a><i class="fa fa-calendar fa-lg"></i><span>Mensalidades</span><?php echo $icone_submenu?></a>
    <ul class="dropdown-menu">
      <?php if($mensalidades == 1){ ?><li><a href="mensalidades.php"><span class="text-submenu"><i class="fa fa-calendar fa-lg"></i>Mensalidades</span></a></span></li><?php } ?>
      <?php if($banco_retorno == 1){ ?><li><a href="boletos_retornos.php"><span class="text-submenu"><i class="fa fa fa-history"></i>Retornos</a></span></li><?php } ?>
      <?php if($notas_fiscais == 1){ ?><li><a href="notas_fiscais.php"><span class="text-submenu"><i class="fa fa fa-file-pdf-o"></i>Notas Fiscais</a></span></li><?php } ?>
    </ul>
  </li>
  <?php }*/ ?>

  <?php if($fingeral || $fingeral_centros || $fingeral_contas || $fingeral_fornecedores || $notas_fiscais){ ?>
    <li class="dropdown-submenu <?php if($pagina == "financeiro"){echo " active";}?>">
      <a><i class="fa fa-usd fa-lg"></i><span>Financeiro</span><?php echo $icone_submenu?></a>
      <ul class="dropdown-menu">
        <?php if($fingeral==1){ ?>
          <li><a href="fingeral.php?idc=1"><span class="text-submenu"><i class="fa fa-book fa-lg"></i>Caixas</span></a></span></li>
          <li><a href="fingeral_rep.php"><span class="text-submenu"><i class="fa fa-user-tie fa-lg"></i>Representantes</span></a></span></li>
          <li><a href="fingeral_dre.php"><span class="text-submenu"><i class="fa fa-chart-line fa-lg"></i>DRE</span></a></span></li>
        <?php } ?>
        <?php if($notas_fiscais == 1){ ?><li><a href="fingeral_nfs.php"><span class="text-submenu"><i class="fa fa fa-file-pdf-o"></i>Notas Fiscais</a></span></li><?php } ?>
        <?php if($fingeral_centros || $fingeral_contas || $fingeral_fornecedores){ ?>
          <li><a href="fingeral_regs.php"><span class="text-submenu"><i class="fa fa-list-alt fa-lg"></i>Registros</span></a></span></li>
        <?php } ?>
      </ul>
    </li>
  <?php } ?>

  <?php if($bank_contas==1){ ?>
    <li class="dropdown-submenu <?php if($pagina == "bank"){echo " active";}?>">
      <a><i class="fa fa-bank"></i><span>PW Bank</span><?php echo $icone_submenu?></a>
      <ul class="dropdown-menu">
        <?php if($bank_contas == 1){ ?><li><a href="pwbank_contas.php"><span class="text-submenu"><i class="fa fa fa-book"></i>Contas</a></span></li><?php } ?>
        <?php if($bank_contas == 1){ ?><li><a href="pwbank_contas_asaas.php"><span class="text-submenu"><i class="fa fa fa-book"></i>Contas Asaas</a></span></li><?php } ?>
      </ul>
    </li>
  <?php } ?>

  <?php if($gameid == 1 || $gameid_saldo_clubes==1 || $gameid_configs==1){ ?>
    <li class="dropdown-submenu <?php if($pagina == "gameid"){echo " active";}?>">
      <a><i class="ipw-gid"></i><span>GameID</span><?php echo $icone_submenu?></a>
      <ul class="dropdown-menu">
        <?php if($gameid_saldo_clubes == 1){ ?><li><a href="gameid_clubes.php"><span class="text-submenu"><i class="fa fa fa-bank"></i>Clubes</a></span></li><?php } ?>
        <?php if($gameid_configs == 1){ ?><li><a href="gameid_config.php"><span class="text-submenu"><i class="fa fa fa-cogs"></i>Configurações</a></span></li><?php } ?>
        <?php if($usuario_id==1 && $usuario_nivel==1){ ?><li><a href="salve_bolha_caixa.php"><span class="text-submenu"><i class="fa fa-life-buoy"></i>Salve Bolha</a></span></li><?php } ?>
      </ul>
    </li>
  <?php } ?>

  <?php if($suporte == 1){ ?>
    <li class="dropdown-submenu <?php if($pagina == "suporte"){echo " active";}?>">
      <a><i class="fa fa-headset fa-lg"></i><span>Suporte</span><?php echo $icone_submenu?></a>
      <ul class="dropdown-menu">
        <li><a href="suporte.php"><span class="text-submenu"><i class="fa fa fa-th-list"></i>Clubes</a></span></li>
        <li><a href="suporte.php?inativos=1"><span class="text-submenu"><i class="fa fa fa-th-list"></i>Clubes Inativos</a></span></li>
        <li><a href="suporte_gameid_solicitacoes.php"><span class="text-submenu"><i class="fa fa fa-th-list"></i>GameID Solicitações</a></span></li>
        <?php if($suporte_logs){ ?><li><a href="suporte_logs.php"><span class="text-submenu"><i class="fa fa fa-th-list"></i>Logs Usuários</a></span></li><?php } ?>
      </ul>
    </li>
  <?php } ?>

  <?php if($agenda_acoes == 1){ ?>
  <li class="dropdown-submenu <?php if($pagina == "agenda"){echo " active";}?>">
  <a href="agenda.php"><i class="fa fa-clock-o fa-lg"></i><span>Agenda</span></a></li>
  <?php } ?>

  <?php if($planos == 1){ ?>
    <li class="dropdown-submenu <?php if($pagina == "planos"){echo " active";}?>">
      <a><i class="fa fa-cubes fa-lg"></i><span>Planos</span><?php echo $icone_submenu?></a>
      <ul class="dropdown-menu">
        <li><a href="planos_painel.php"><span class="text-submenu"><i class="fa fa fa-cubes"></i>Planos</a></span></li>
        <li><a href="planos_configs.php"><span class="text-submenu"><i class="fa fa fa-cogs"></i>Configurações</a></span></li>
      </ul>
    </li>
  <?php } ?>

  <?php if($emails == 1){ ?>
    <li class="dropdown-submenu <?php if($pagina == "email"){echo " active";}?>">
      <a href="emails.php"><i class="fa fa-envelope fa-lg"></i><span>E-mails</span></a></li>
  <?php } ?>

  <?php if($usuario_id==1 AND $usuario_nivel==1 && ($funcoes_mysql == 1 or $funcoes_bigdata == 1)){ ?>
    <li class="dropdown-submenu <?php if($pagina == "mybd"){echo " active";}?>">
      <a><i class="fa fa-code fa-lg"></i><span>Fun&ccedil;&otilde;es</span><?php echo $icone_submenu?></a>
      <ul class="dropdown-menu">
        <?php if($funcoes_mysql == 1){ ?><li><a href="sql_script.php"><span class="text-submenu"><i class="fa fa fa-code"></i>MySql Atualiza&ccedil;&otilde;es</a></span></li><?php } ?>
        <?php if($funcoes_bigdata == 1){ ?><li><a href="sql_bigdata.php"><span class="text-submenu"><i class="fa fa fa-database"></i>Funções de BigData</a></span></li><?php } ?>
      </ul>
    </li>
  <?php } ?>

  <?php if($logos == 1){ ?>
    <li class="dropdown-submenu <?php if($pagina == "outros"){echo " active";}?>">
      <a><i class="fa fa-book fa-lg"></i><span>Outros</span><?php echo $icone_submenu?></a>
      <ul class="dropdown-menu">
        <li><a href="logos.php"><span class="text-submenu"><i class="fa fa fa-images"></i>Logos</a></span></li>
      </ul>
    </li>
  <?php } ?>

  <?php /*if($campanhas == 1){ ?>
  <li class="dropdown-submenu <?php if($pagina == "campanhas"){echo " active";}?>">
      <a><i class="fa fa-globe fa-lg"></i><span>Campanhas</span><?php echo $icone_submenu?></a>
      <ul class="dropdown-menu">
          <li><a href="campanha_wsop_sat.php"><span class="text-submenu"><i class="fa fa fa-circle"></i>WSOP - Satélites</a></span></li>
      </ul>
  </li>
  <?php }

  if($blog == 1){ ?>
  <li class="dropdown-submenu <?php if($pagina == "blog"){echo " active";}?>">
    <a href="blog.php"><i class="fa fa-newspaper-o fa-lg"></i><span>Blog</span></a></li>
  <?php }

  if($sorteios == 1){ ?>
  <li class="dropdown-submenu <?php if($pagina == "sorteios"){echo " active";}?>">
    <a href="sorteios.php"><i class="fa fa-gift fa-lg"></i><span>Sorteios</span></a></li>
  <?php }*/ ?>

</ul>
</nav>