 <?php $setting = get_setting(); ?>
 <?php $auth_info = $this->common_m->get_auth_all_info(); ?>
 <header class="main-header">
    <!-- Logo -->
    <a href="<?php echo base_url() ?>" class="logo">
      <!-- mini logo for sidebar mini 50x50 pixels -->
      <span class="logo-mini"><b>CI</b></span>
      <!-- logo for regular state and mobile devices -->
      <span class="logo-lg"><img src="<?= base_url(!empty($setting['logo'])?$setting['logo'] :"assets/images/logo-example.png");?>" alt="" class="logo"></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="push-menu" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>

      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
              <i class="icofont-globe"></i>
              <?= !empty(auth('site_lang'))?auth('site_lang'):$settings['language'] ;?> &nbsp;<span class="caret"></span></a>
              <ul class="dropdown-menu menu_style" role="menu">
                <?php $languages = $this->common_m->select_with_status('languages'); ?>
                <?php foreach ($languages as $key => $language): ?>
                  <li>
                   <a class="dropdown-item" href="<?= base_url('home/lang_switch/'.$language['slug']) ;?>"><?= $language['lang_name'] ;?></a>
                 </li>
               <?php endforeach ?>
              </ul>
            </li>
          <li class="hidden-xs hidden-sm">
            <a><?php 
              if ($this->agent->is_browser())
              {
                $agent = $this->agent->browser().' '.$this->agent->version();
              }
              elseif ($this->agent->is_robot())
              {
                $agent = $this->agent->robot();
              }
              elseif ($this->agent->is_mobile())
              {
                $agent = $this->agent->mobile();
              }
              else
              {
                $agent = 'Unidentified User Agent';
              }

              echo "<i class='fa fa-globe'></i> ".$agent."&nbsp; &nbsp;"; 

              echo $this->agent->platform();
              ?></a>
          </li>
          <!-- Messages: style can be found in dropdown.less-->
          <li class="dropdown messages-menu hidden">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-envelope-o"></i>
              <span class="label label-success">4</span>
            </a>
            <ul class="dropdown-menu">
              <li class="header">You have 4 messages</li>
              <li>
                <!-- inner menu: contains the actual data -->
                <ul class="menu">
                  <li><!-- start message -->
                    <a href="#">
                      <div class="pull-left">
                        <img src="<?= base_url()?>assets/admin/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        Support Team
                        <small><i class="fa fa-clock-o"></i> 5 mins</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                  <!-- end message -->
                  <li>
                    <a href="#">
                      <div class="pull-left">
                        <img src="<?= base_url()?>assets/admin/dist/img/user3-128x128.jpg" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        AdminLTE Design Team
                        <small><i class="fa fa-clock-o"></i> 2 hours</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                  <li>
                    <a href="#">
                      <div class="pull-left">
                        <img src="<?= base_url()?>assets/admin/dist/img/user4-128x128.jpg" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        Developers
                        <small><i class="fa fa-clock-o"></i> Today</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                  <li>
                    <a href="#">
                      <div class="pull-left">
                        <img src="<?= base_url()?>assets/admin/dist/img/user3-128x128.jpg" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        Sales Department
                        <small><i class="fa fa-clock-o"></i> Yesterday</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                  <li>
                    <a href="#">
                      <div class="pull-left">
                        <img src="<?= base_url()?>assets/admin/dist/img/user4-128x128.jpg" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        Reviewers
                        <small><i class="fa fa-clock-o"></i> 2 days</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                </ul>
              </li>
              <li class="footer"><a href="#">See All Messages</a></li>
            </ul>
          </li>
          <!-- Notifications: style can be found in dropdown.less -->
          <li class="dropdown notifications-menu hidden">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-bell-o"></i>
              <span class="label label-warning">10</span>
            </a>
            <ul class="dropdown-menu">
              <li class="header">You have 10 notifications</li>
              <li>
                <!-- inner menu: contains the actual data -->
                <ul class="menu">
                  <li>
                    <a href="#">
                      <i class="fa fa-users text-aqua"></i> 5 new members joined today
                    </a>
                  </li>
                  <li>
                    <a href="#">
                      <i class="fa fa-warning text-yellow"></i> Very long description here that may not fit into the
                      page and may cause design problems
                    </a>
                  </li>
                  <li>
                    <a href="#">
                      <i class="fa fa-users text-red"></i> 5 new members joined
                    </a>
                  </li>
                  <li>
                    <a href="#">
                      <i class="fa fa-shopping-cart text-green"></i> 25 sales made
                    </a>
                  </li>
                  <li>
                    <a href="#">
                      <i class="fa fa-user text-red"></i> You changed your username
                    </a>
                  </li>
                </ul>
              </li>
              <li class="footer"><a href="#">View all</a></li>
            </ul>
          </li>
          <!-- Tasks: style can be found in dropdown.less -->
          <li class="tasks-menu ">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-compress"></i>
            </a>
            <ul class="dropdown-menu menu_style">
              <li class=""><a href="<?= base_url('admin/dashboard') ;?>"><?=  !empty(lang('dashboard'))?lang('dashboard'):"Dashboard";?></a></li>
              <li class=""><a href="<?= base_url('') ;?>"><?=  !empty(lang('frontend'))?lang('frontend'):"Frontend";?></a></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">
              <img src="<?= base_url(!empty($auth_info['thumb'])?$auth_info['thumb']:'assets/images/avatar.png')?>" class="user-image uploaded_img" alt="User Image">
              <span class="hidden-xs"><?= isset($auth_info['name']) && !empty($auth_info['name'])?$auth_info['name']:$auth_info['username']; ?></span>
            </a>
            <ul class="dropdown-menu">
              <!-- User image -->
              <li class="user-header">
                <img src="<?= base_url(!empty($auth_info['thumb'])?$auth_info['thumb']:'assets/images/avatar.png')?>" class="img-circle uploaded_img" alt="User Image">

                <p>
                  <?= !empty($auth_info['name'])?$auth_info['name']:$auth_info['username']; ?>
                  <?php if(!empty($auth_info['designation'])){ ?>
                    <span><?= "- ".$auth_info['designation']; ?></span>
                  <?php } ?>
                  <small><?= !empty(lang('member_since'))?lang('member_since'):"Member since";?> - <?= cl_format($auth_info['post_time']); ?></small>
                  
                  <!-- <small id="time"></small> -->
                </p>
              </li>
              <div class="text-center">
                <small><?= !empty(lang('last_login'))?lang('last_login'):"Last Login";?> - <?= cl_format($auth_info['login_time']); ?></small>
              </div>
              <!-- Menu Body -->
              
              <!-- Menu Footer-->
              <li class="user-footer">
                <div class="pull-left">
                  <a href="<?= base_url('admin/dashboard/profile') ?>" class="btn btn-default btn-flat"><?= !empty(lang('profile'))?lang('profile'):"Profile";?></a>
                </div>
                <div class="pull-right">
                  <a href="<?= base_url('admin/home/logout') ?>" class="btn btn-default btn-flat"><?= !empty(lang('logout'))?lang('logout'):"Logout";?></a>
                </div>
              </li>
            </ul>
          </li>
          <!-- Control Sidebar Toggle Button -->
          
        </ul>
      </div>
    </nav>
  </header>


  
  