<?php $empresa = $this->Controlador_model->get($this->empresa, 'empresa'); ?>

<?php $usuario = $this->Controlador_model->get($this->usuario, 'usuario'); ?>

<?php if ($empresa->tipo == 1) { ?>

<?php $nombreempresa = substr($empresa->nombre, 0, 18); ?>

<?php } else { ?>

<?php $nombreempresa = substr($empresa->razonsocial, 0, 18); ?>

<?php } ?>

<!-- Topbar Start -->

<div class="navbar-custom">

  <ul class="list-unstyled topnav-menu float-right mb-0">



    <li class="dropdown notification-list d-none d-md-inline-block">

      <a href="#" id="btn-fullscreen" class="nav-link waves-effect waves-light">

        <i class="mdi mdi-crop-free noti-icon"></i>

      </a>

    </li>



    <li class="dropdown notification-list">

      <a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">

        <img src="<?= base_url() . 'files/foto/' . $usuario->imagen ?>" alt="user-image" class="rounded-circle">

      </a>

      <div class="dropdown-menu dropdown-menu-right profile-dropdown ">

        <!-- item-->

        <div class="dropdown-header noti-title">

          <h6 class="text-overflow m-0">Bienvenido !</h6>

        </div>



        <!-- item-->

        <a href="<?= base_url() ?>usuario/miperfil" class="dropdown-item notify-item">

          <i class="mdi mdi-face-profile"></i>

          <span>Perfil</span>

        </a>



        <!-- item-->

        <a href="<?= base_url() ?>usuario/miclave" class="dropdown-item notify-item">

          <i class="mdi mdi-settings"></i>

          <span>Contraseña</span>

        </a>



        <div class="dropdown-divider"></div>



        <!-- item-->

        <a href="<?= base_url() ?>login/salir" class="dropdown-item notify-item">

          <i class="mdi mdi-power-settings"></i>

          <span>Salir</span>

        </a>



      </div>

    </li>

  </ul>



  <!-- LOGO -->

  <div class="logo-box">

    <a href="<?= base_url() ?>" class="logo text-center logo-dark">

      <span class="logo-lg">

        <span class="logo-lg-text-dark">Moltran</span>

      </span>

      <span class="logo-sm">

        <span class="logo-lg-text-dark">C</span>

      </span>

    </a>



    <a href="<?= base_url() ?>" class="logo text-center logo-light">

      <span class="logo-lg">

        <span class="logo-lg-text-light"><?= $nombreempresa ?></span>

      </span>

      <span class="logo-sm">

        <span class="logo-lg-text-light">C</span>

      </span>

    </a>

  </div>



  <!-- LOGO -->



  <ul class="list-unstyled topnav-menu topnav-menu-left m-0">

    <li>

      <button class="button-menu-mobile waves-effect waves-light">

        <i class="mdi mdi-menu"></i>

      </button>

    </li>

  </ul>

</div>

<!-- end Topbar -->

