<?php

$rs = mysql_query("SELECT COUNT(*) as cont_fotos FROM cal_fotos where sincro='N'");
  if($row = mysql_fetch_array($rs)){
    $cant_fotos = $row['cont_fotos'];
    }

?>

<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
  <a class="navbar-brand" href="inspector.php"><img src="../Foto_exportadora/<?php echo $cliente; ?>.jpeg" width="40"></a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <div class="collapse navbar-collapse" id="navbarCollapse">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
          Inspección
        </a>
        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
          <?php
          $vista = "";
          if (isset($_REQUEST['inspeccion'])) {
            $vista = $_REQUEST['inspeccion'];
          }
          ?>
          <a class="dropdown-item <?php if ($vista == "contenedor") echo "active"; ?>" href="inspector.php?inspeccion=contenedor">Ingreso Contenedor</a>
          <!-- <a class="dropdown-item <?php if ($vista == "camion") echo "active"; ?>" href="inspector.php?inspeccion=camion">Ingreso Camión</a> -->
        </div>
      </li>
      <li class="nav-item">
        <a class="nav-link" target="_BLANK" href="../sincronizar/sincronizar_planillas_conte.php">Sincronizar Planillas</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" target="_BLANK" href="../sincronizar/subir_fotos_conte.php">Sincronizar <?php echo $cant_fotos; ?> Fotos</a>
      </li>
      <li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
          SISTEMA
        </a>
        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
          <a class="dropdown-item" target="_BLANK" href="../sincronizar/sincronizar_bd_conte.php">Sincro BD</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" target="_BLANK" href="../sincronizar/sincronizar_archivo_conte.php">Sincro Sistema</a>
        </div>
      </li>
    </ul>
    <a class="nav-link" href="../cierra_sesion.php">Cerrar Sesión</a>
  </div>
</nav>