
<nav class="main-header navbar navbar-expand navbar-info navbar-info">
  <!-- Left navbar links -->
  <ul class="navbar-nav">
    <li class="nav-item">
      <a class="nav-link text-white" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
    </li>
  </ul>
  <!-- Right navbar links -->
  <ul class="navbar-nav ml-auto">
    <!-- Messages Dropdown Menu -->
    <li class="nav-item ">
      <h3 style="color: #fff;"><?php echo $_SESSION["bn_name"];?></h3> 
    </li>

      <li class="nav-item dropdown">
        <a class="nav-link text-white" data-toggle="dropdown" href="#">
          <i class="fas fa-user-cog"></i>
        </a>
        <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
          <!-- Message Start -->
          <!-- Message End -->
          <div class="dropdown-divider"></div>
          <!-- Message Start -->
          <div class="media">
            <div class="media-body">
              <button class="btn btn-primary" style="height: 40px;" id="clave" data-toggle="modal" data-target="#clave_cambio_app">Cambio de contraseña</button>

            </div>
          </div>
          <!-- Message End -->
          <div class="dropdown-divider"></div>
          <!-- Message Start -->
          <div class="media">
            <button class="btn btn-success" style="height: 40px;" id="cierre_cajageneral">Cierre de Caja</button>
          </div>

          <div class="dropdown-divider"></div>
          <!-- Message Start -->
          <div class="media">
            <button class="btn btn-danger" style="height: 40px;" id="logout">Cerrar Sesión</button>
          </div>
        </div>
        <!-- Message End -->
        <div class="dropdown-divider"></div>
      </li>

    </ul>
  </nav>
  <!-- /.navbar -->
  <!-- Main Sidebar Container -->
  <aside class="main-sidebar sidebar-info-info elevation-4" style="background-color: #17a2b8;">
    <!-- Brand Logo -->
    <a href="<?php echo $url_admin;?>home/" class="brand-link" style="height: 100px;" >
      <img src="<?php echo $url_admin;?>dist/img/logo.png" alt="Logo" class="elevation-3" style="width: 70%; height: 100%;">
      <span class="brand-text font-weight-light" style="color: #000;">.</span>
    </a>

    <!-- Sidebar -->
    <div class="sidebar" >
      <!-- Sidebar user panel (optional) -->
      <div class="user-panel mt-3 pb-3 mb-3 d-flex">
        <a href="#" data-toggle="modal" data-target="#avatarimg"><div class="image">
          <img id="imagenmuestra_avatar" src="" class="img-circle elevation-2" alt="User Image">
        </div></a>
        <div class="info">
          <a href="#" class="d-block text-white"><?php echo $userapp?></a>
        </div>
      </div>

      <!-- Sidebar Menu -->
      <nav class="mt-2">
        <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false" id="menu_1">
          <li class="nav-item">
            <a href="<?php echo $url_admin;?>home/" class="nav-link text-white">
              <i class="nav-icon fas fa-tachometer-alt"></i>
              <p>
                Home
              </p>
            </a>
          </li>

          <li class="nav-item has-treeview ">
            <a href="#" class="nav-link text-white linkeo" >
              <i class="nav-icon fas fa-landmark"></i>
              <p>
                Bancos
                <i class="right fas fa-angle-left"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="<?php echo $url_admin;?>bancos/" class="nav-link text-white">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Bancos</p>
                </a>
              </li>
              <li class="nav-item">
                <a href="<?php echo $url_admin;?>cuentas/" class="nav-link text-white">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Cuentas</p>
                </a>
              </li>
            </ul>
          </li>
          <li class="nav-item">
            <a href="<?php echo $url_admin;?>pagos_sistema/" class="nav-link text-white">
              <i class="nav-icon fas fa-handshake"></i>
              <p>
                Pagos en Sistema
              </p>
            </a>
          </li>
          <li class="nav-item has-treeview ">
            <a href="#" class="nav-link text-white linkeo" >
              <i class="nav-icon fas fa-cash-register"></i>
              <p>
                Transacciones
                <i class="right fas fa-angle-left"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="<?php echo $url_admin;?>transacciones/" class="nav-link text-white">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Transacciones</p>
                </a>
              </li>
             <li class="nav-item">
                <a href="<?php echo $url_admin;?>transacciones_eliminadas/" class="nav-link text-white">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Eliminadas</p>
                </a>
              </li>
            </ul>
          </li>
          <li class="nav-item">
            <a href="<?php echo $url_admin;?>reportes/" class="nav-link text-white">
              <i class="nav-icon far fa-folder-open"></i>
              <p>
                Reportes
              </p>
            </a>
          </li>
          <li class="nav-item has-treeview ">
            <a href="#" class="nav-link text-white linkeo" >
              <i class="nav-icon fas fa-users"></i>
              <p>
                Usuarios
                <i class="right fas fa-angle-left"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item">
                <a href="<?php echo $url_admin;?>usuarios/" class="nav-link text-white">
                  <i class="far fa-circle nav-icon"></i>
                  <p>Usuarios</p>
                </a>
              </li>
            </ul>
          </li>

        </ul>
      </nav>
      <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
  </aside>

  <div class="modal fade" id="clave_cambio_app">
    <div class="modal-dialog modal-lg">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title">Cambio de contraseña</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="card-body">

           <div class="form-group">
            <label for="name_method">Nueva contraseña <span style="color: red">(Min. 8 caracteres)*</span></label>
            <input type="password" class="form-control" id="clave_cambio" >
          </div>
        </div>

      </div>
      <div class="modal-footer justify-content-between">
        <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $_SESSION['lang']['CERRAR'];?> </button>
        <button type="button" class="btn btn-primary " id="clave_cambio1" ><?php echo $_SESSION['lang']['SALVAR'];?> </button>
      </div>
    </div>
    <!-- /.modal-content -->
  </div>
  <!-- /.modal-dialog -->
</div>

<div class="modal fade" id="cierre_caja_modal">
  <div class="modal-dialog">
    <div class="modal-content bg-danger">
      <div class="modal-header">
        <h4 class="modal-title">Desea realizar cierre de caja?</h4>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <p>Presiona confirmar para el cierre</p>
      </div>
      <div class="modal-footer justify-content-between">
        <button type="button" class="btn btn-outline-light" data-dismiss="modal">Cerrar</button>
        <button type="button" class="btn btn-outline-light" id="cierre_caja_general">Confirmar</button>
      </div>
    </div>
    <!-- /.modal-content -->
  </div>
  <!-- /.modal-dialog -->
</div>


<div class="modal fade" id="avatarimg" role="dialog" style="overflow-y: scroll;">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <form role="form">
        <div class="modal-header">
          <h4 class="modal-title" >Avatars</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="card-body">
           <div class="container-fluid">
            <div class="row" >
              <?php 
              $carpeta='dist/img/avatar/';
              $ficheros1  = scandir($carpeta);
              //var_dump($ficheros1);
              foreach ($ficheros1 as $value_avatar) {
                if ('.' !== $value_avatar && '..' !== $value_avatar){
                  $extencion_avatar = explode(".", $value_avatar);
                  ?>
                  <div class="form-group col-sm-3">
                    <div class="custom-control custom-radio"><input class="custom-control-input avatar_desc" name="avatar_desc" type="radio" id="avatar_desc_<?php echo $value_avatar;?>" value="<?php echo $value_avatar;?>"><label for="avatar_desc_<?php echo $value_avatar;?>" class="custom-control-label"><?php echo $extencion_avatar[0];?></label></div>
                    <center><img src="<?php echo $url_admin;?>dist/img/avatar/<?php echo $value_avatar;?>" class="img-circle elevation-2" style="height: 50px;width: 50%;" alt="User Image"></center>
                  </div>
                  <?php }}?>
                </div>

              </div>
            </div>
          </div>
          <div class="modal-footer justify-content-between">
            <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $_SESSION['lang']['CERRAR'];?></button>
            <button type="button" class="btn btn-primary " id="avatar_save"><?php echo $_SESSION['lang']['SALVAR'];?></button>

          </div>
        </form>
      </div>
      <!-- /.modal-content -->
    </div>
  </div>