 <!-- Navigation-->
 <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" id="mainNav" style="padding:0;">
        <a class="navbar-brand" href="<?= base_url('dashboard'); ?>"><label onmouseover="this.style.color='red';" onmouseout="this.style.color='green';" class='confirm_selection'><i style="color:grey;font-size:36px;">iHRMS</i></label></a>
        <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="navbarResponsive" >

              <ul class="navbar-nav navbar-sidenav" id="exampleAccordion" style="overflow-y: auto;">
 
                      <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Dashboard">
                            <a class="nav-link" href="<?= base_url('dashboard'); ?>">
                              <i class="fa fa-fw fa-dashboard"></i>
                              <span class="nav-link-text">Dashboard</span>
                            </a>
                      </li>
                      <?php if($this->session->userdata('admin_id')): ?>
                      <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Master">
                            <a class="nav-link nav-link-collapse collapsed" data-toggle="collapse" href="#Master" data-parent="#exampleAccordion">
                              <i class="fa fa-fw fa-cogs"></i>
                              <span class="nav-link-text">Master</span>
                            </a>

                            <ul class="sidenav-second-level collapse" id="Master">
                                  <li>
                                        <a href="<?= base_url('menu_permission'); ?>"><i class="fa fa-fw fa-lightbulb-o"></i>Menu Permission</a>
                                  </li>
                                  <li>
                                        <a href="<?= base_url('users/user_types'); ?>"><i class="fa fa-fw fa-lightbulb-o"></i>User Types</a>
                                  </li>
                            </ul>
                      </li>
                      <?php endif; ?>
                      
                        <?php if($menus): ?>
                            <?php foreach($menus as $main_menu): ?>
                                <?php foreach($menus as $sub_menu): ?>
                                    <?php if($main_menu['id']==$sub_menu['under_menu_id']):  ?>
                                        <li class="nav-item" data-toggle="tooltip" data-placement="right" title="<?php echo $main_menu['menu_name']; ?>">
                                            <a class="nav-link nav-link-collapse collapsed" data-toggle="collapse" href="#<?php echo $main_menu['menu_name']; ?>" data-parent="#exampleAccordion">
                                            <i class="fa fa-fw fa-dashboard"></i>
                                            <span class="nav-link-text"><?php echo $main_menu['menu_name']; ?></span>
                                            </a>
                                                    <ul class="sidenav-second-level collapse" id="<?php echo $main_menu['menu_name']; ?>">
                                                        <?php foreach($menus as $sub_menu): ?>
                                                            <?php if($main_menu['id']==$sub_menu['under_menu_id']): ?>
                                                                <li>
                                                                    <?php foreach($menus as $menu_permission): ?>
                                                                        <?php foreach($menus as $page): ?>
                                                                            <?php if(($menu_permission['file_path']==$page['file_path'])&&($menu_permission['id']==$sub_menu['id'])): ?>
                                                                                <a href="<?= base_url($page['file_path']); ?>"><i class="fa fa-fw fa-lightbulb-o"></i><?php echo $sub_menu['menu_name']; ?></a>
                                                                            <?php break;endif; ?>
                                                                        <?php endforeach; ?>
                                                                    <?php endforeach; ?>
                                                                </li>
                                                            <?php endif; ?>
                                                        <?php endforeach; ?>
                                                    </ul>   
                                        </li>
                                        <?php break; endif; ?>
                                <?php endforeach; ?>
                            <?php endforeach; ?>
                        <?php endif; ?>


              </ul>

 
              <ul class="navbar-nav ml-auto">

                      <li class="nav-item">
                            <a class="nav-link" data-toggle="modal" data-target="#exampleModal">
                            <i class="fa fa-fw fa-sign-out"></i>Logout</a>
                      </li>

              </ul>

        </div>

  </nav>


  	      <!-- Breadcrumbs-->
            <ol class="breadcrumb">
                <li class="breadcrumb-item active">
                    <a href="<?php base_url(); ?>dashboard">Dashboard</a>
                </li>
            </ol>
