<header class="main-header">

    <!-- Logo -->

    <a href="<?php echo base_url()?>admin/dashboard" class="logo">

      <!-- mini logo for sidebar mini 50x50 pixels -->

      <span class="logo-mini"><b>CE</span>

      <!-- logo for regular state and mobile devices -->

      <span class="logo-lg"><b>Castleevents</span>

    </a>

    <!-- Header Navbar: style can be found in header.less -->

    <nav class="navbar navbar-static-top">

      <!-- Sidebar toggle button-->

      <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">

        <span class="sr-only">Toggle navigation</span>

        <span class="icon-bar"></span>

        <span class="icon-bar"></span>

        <span class="icon-bar"></span>

      </a>



      <div class="navbar-custom-menu">

        <ul class="nav navbar-nav">

          

          <!--<li class="dropdown tasks-menu request_noti">

            <a href="#" class="dropdown-toggle" data-toggle="dropdown">

              <i class="fa fa-flag-o"></i>

              <span class="label label-danger">0</span>

            </a>

            <ul class="dropdown-menu ">

              <li class="header">You have 0 request</li>

            </ul>

          </li>-->

          <!-- User Account: style can be found in dropdown.less -->

          <li class="dropdown user user-menu">

            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
            <?php $userImage = getValue('sys_files',array('id'=>$loginDetails['avatar_file_id']));?>  
            <image src="<?php if(!empty($userImage)){ echo  base_url().'assets/userfiles/'.$userImage['path'].'/80/'.$userImage['filename'].'.'.$userImage['extension']; } else { echo base_url().'assets/images/crown_log.svg'; } ?>" class="user-image">
               
            <span class="hidden-xs"><?php if(!empty($loginDetails)) echo $loginDetails['alias'];?></span>

            </a>

            <ul class="dropdown-menu">

              <!-- User image -->

              <li class="user-header">

                  <?php $userImage = getValue('sys_files',array('id'=>$loginDetails['avatar_file_id']));?>  
            <image src="<?php if(!empty($userImage)){ echo  base_url().'assets/userfiles/'.$userImage['path'].'/160/'.$userImage['filename'].'.'.$userImage['extension']; } else { echo base_url().'assets/images/crown_log.svg'; } ?>" class="user-image">

            <p>

                 <?php if(!empty($loginDetails)) { echo $loginDetails['alias'];}?>



                </p>

              </li>

              <!-- Menu Body -->

              <!--<li class="user-body">

                <div class="row">

                  <div class="col-xs-4 text-center">

                    <a href="#">Followers</a>

                  </div>

                  <div class="col-xs-4 text-center">

                    <a href="#">Sales</a>

                  </div>

                  <div class="col-xs-4 text-center">

                    <a href="#">Friends</a>

                  </div>

                </div>

              </li>-->

              <!-- Menu Footer-->

              <li class="user-footer" style="">

                <div class="pull-left">

                  

                </div>

                <div class="pull-right">

                  <a href="<?php echo base_url('admin/login/logout');?>" class="btn btn-black btn-flat">Sign out</a>

                </div>

              </li>

            </ul>

          </li>

          <!-- Control Sidebar Toggle Button -->

          <li>

            <!-- <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a> -->

          </li>

        </ul>

      </div>

    </nav>

  </header>
