<div class="wrapper-container">

      <!-- ========= For all Alerts and Notifications ===== !-->
  <script>
        <?php if(session()->getFlashdata('success')){ ?>
            toastr.success("<?= session()->getFlashdata('success'); ?>");
        <?php }else if(session()->getFlashdata('error')){  ?>
            toastr.error("<?= session()->getFlashdata('error'); ?>");
        <?php }else if(session()->getFlashdata('warning')){  ?>
            toastr.warning("<?= session()->getFlashdata('warning'); ?>");
        <?php }else if(session()->getFlashdata('info')){  ?>
            toastr.info("<?= session()->getFlashdata('info'); ?>");
        <?php } ?>
  </script>
<header class="header">
    <div class="mx-3 d-flex bd-highlight">
        <div class="bd-highlight align-self-center "><a class="btn me-3" onclick="OpenOrClose()"><i class="bi bi-justify-left fs-4"></i></a>  
     </div>
        <div class="flex-grow-1 bd-highlight align-self-center"> &nbsp;</div>
        <div class="bd-highlight">
            <ul class="nav">
            <li class="nav-item align-self-center ">
            <a class="nav-link nav-icon position-relative align-items-center mt-2" href="<?= base_url('administrator/notifications') ?>"> <i class="bi bi-bell"></i> <small><span class="position-absolute  translate-middle badge rounded-pill bg-danger badge-number"><small>
            <?php if($mynotifications > 99):?>
                99+
              <?php else: ?>
                <?= $mynotifications ?>
              <?php endif;?>
            </span>
          </a><!-- End Notification Icon -->
            </small>
            </span></small>
            </a>
            </li>
            <li class="nav-item">
            <a class="nav-link nav-icon position-relative align-items-center mt-2" href="#"> <i class="bi bi-chat-left-text"></i> <span class="position-absolute translate-middle badge rounded-pill bg-primary badge-number">3</span>
            </a>
            </li></ul>
        </div>
        <div class="bd-highlight">
            <!-- User Login/Logout Area !-->
            <a class="nav-link nav-profile d-flex align-items-center pe-0" href="#" data-bs-toggle="dropdown">
                <?php if($userdata->photo):?>
                    <img src="<?= $userdata->photo ?>" alt="Profile" class="rounded-circle" style="width: 30px; height: 30px">
                <?php else:?>    
                <img src="<?= base_url()?>/assets/images/profiler.jpeg" alt="Profile" class="rounded-circle" style="width: 30px; height: 30px"> 
                <?php endif;?>
                <span class="d-none d-md-block dropdown-toggle ps-2"><small><?= $userdata->first_name;?></small></span> 
            </a>
            <ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow profile text-dark">
                <li> <a class="dropdown-item d-flex align-items-center" href="<?= base_url('administrator/my-profile');?>"> <i class="bi bi-gear me-2"></i> <span>Account Settings</span> </a></li>
                <li><hr class="dropdown-divider"></li>
                <li> <a class="dropdown-item d-flex align-items-center" href="#"> <i class="bi bi-question-circle me-2"></i> <span>Need Help?</span> </a></li><li><hr class="dropdown-divider"></li>
                <li> <a class="dropdown-item d-flex align-items-center" href="<?= base_url('logout');?>"> <i class="bi bi-box-arrow-right me-2"></i> <span>Sign Out</span> </a></li>
            </ul>
            <!-- END User login/logout !-->
        </div>
    </div>
</header>
