<!-- ============================================================== -->
<!-- Topbar header - style you can find in pages.scss -->
<!-- ============================================================== -->
<header class="topbar">
  <nav class="navbar top-navbar navbar-expand-md navbar-light">
    <!-- Logo -->
    <div class="navbar-header">
      <a class="navbar-brand" href="<?php echo $Url; ?>/inicio">
        <!-- Logo icon -->
        <b>
          <!--You can put here icon as well // <i class="wi wi-sunset"></i> //-->
          <!-- Dark Logo icon -->
          <!--<img src="<?php echo $Position; ?>/images/logo-icon.png" width="25" alt="homepage" class="dark-logo" />-->
          <!-- Light Logo icon -->
          <img src="<?php echo $Position; ?>images/logo-light-icon.png" alt="homepage" class="light-logo" />
        </b>
        <!--End Logo icon -->
        <!-- Logo text -->
        <span>
         <!-- dark Logo text -->
         <img src="<?php echo $Position; ?>images/logo.png"  width="150" alt="homepage" class="dark-logo" />
         <!-- Light Logo text -->
         <img src="<?php echo $Position; ?>images/logo-light.png" class="light-logo" alt="homepage" /></span>
       </a>
    </div>
    <!-- /.Logo -->
    <div class="navbar-collapse">
        <!-- ============================================================== -->
        <!-- toggle and nav items -->
        <!-- ============================================================== -->
        <ul class="navbar-nav mr-auto mt-md-0">
            <!-- This is  -->
            <li class="nav-item"> <a class="nav-link nav-toggler hidden-md-up text-muted waves-effect waves-dark" href="javascript:void(0)"><i class="mdi mdi-menu"></i></a> </li>
            <li class="nav-item"> <a class="nav-link sidebartoggler hidden-sm-down text-muted waves-effect waves-dark" href="javascript:void(0)"><i class="ti-menu"></i></a> </li>
        </ul>
        <!-- ============================================================== -->
        <!-- User profile and search -->
        <!-- ============================================================== -->
        <ul class="navbar-nav my-lg-0">

          <!-- Profile -->
          <li class="nav-item dropdown">
            <a style="border-left: 1px solid #eeeff0;" class="nav-link dropdown-toggle text-muted waves-effect waves-dark" href="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              <i class="fa fa-file mar-r-10"></i>
              <span>
                <?php echo $SitoSel[Nombre]; ?>
              </span>
            </a>
            <div class="dropdown-menu dropdown-menu-right scale-up">
              <ul class="dropdown-user">
                <?php
                  //Sitios
                  $Query = "
                    SELECT
                      sit.Id, sit.Nombre
                    FROM CMS_Sitios sit
                    LEFT JOIN CMS_AdminsSitios adm ON adm.Fk_Sitio = sit.Id
                    WHERE
                      sit.Activo = '1'
                      AND adm.Fk_Administrador = '$User[Id]'
                    ORDER BY sit.Nombre ASC
                  ";
                  $SitiosTop = $mysqli->query($Query);
                  mysqli_data_seek($SitiosTop, 0);
                  while($SitioTop = mysqli_fetch_array($SitiosTop)) {
                ?>
                <li>
                  <form method="get" action="<?php echo $Position; ?>home">
                    <a href="javascript:;" onclick="parentNode.submit();">
                      <i class="fa fa-file mar-r-5"></i>
                      <?php echo $SitioTop[Nombre]; ?>
                    </a>
                    <input type="hidden" name="ChangeSite" value="Ok" />
                    <input type="hidden" name="Sitio" value="<?php echo $SitioTop[Id]; ?>" />
                  </form>
                </li>
              <?php } ?>
              </ul>
            </div>
          </li>
          <!-- /.Profile -->

          <!-- Profile -->
          <li class="nav-item dropdown">
            <a style="border-left: 1px solid #eeeff0;" class="nav-link dropdown-toggle text-muted waves-effect waves-dark" href="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              <i class="fa fa-user-circle mar-r-10"></i>
              <span><?php //echo $User['Nombre']; ?></span>
            </a>
            <div class="dropdown-menu dropdown-menu-right scale-up">
              <ul class="dropdown-user">
                <!--<li><a href="#"><i class="ti-user mar-r-5"></i> Perfil</a></li>-->
                <li>
                  <a href="#">
                    <i class="fa fa-user mar-r-5"></i>
                    <?php echo $User['Nombre']; ?>
                  </a>
                </li>
                <li role="separator" class="divider"></li>
                <li>
                  <a href="<?php echo $logoutAction ?>">
                    <i class="fa fa-power-off mar-r-5"></i>
                    Salir
                  </a>
                </li>
              </ul>
            </div>
          </li>
          <!-- /.Profile -->

        </ul>
      </div>
  </nav>
</header>
<!-- ============================================================== -->
<!-- End Topbar header -->
<!-- ============================================================== -->
