<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title><?php echo $app_setting->app_name; ?> | Dashboard</title>
  <link rel="icon" type="image/png" sizes="192x192"  href="<?php echo base_url()?><?php echo $app_setting->fevicon; ?>">
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/fontawesome-free/css/all.min.css">
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <link rel="stylesheet" href="<?php echo admin_css() ?>dist/css/adminlte.min.css">
  <link rel="stylesheet" href="<?php echo admin_css() ?>dist/css/custom.css">
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/font-awesome-4/css/font-awesome.min.css">
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/sweetalert/sweetalert.min.css">
  <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
  
  <script src="<?php echo admin_css() ?>plugins/sweetalert/sweetalert.min.js"></script>
  <?php if($this->uri->segment(2) == 'examination' ||  $this->uri->segment(3) == 'all_subject' || $this->uri->segment(3) == 'short_about_us' || $this->uri->segment(3) == 'all_category' || $this->uri->segment(3) == 'view_all_course' || $this->uri->segment(3) == 'course_lession' || $this->uri->segment(3) == 'view_all_post' || $this->uri->segment(3) == 'about_us_page' || $this->uri->segment(3) == 'testimonial' || $this->uri->segment(3) == 'placement_logo' || $this->uri->segment(3) == 'lead_management' || $this->uri->segment(2) == 'role_permission' || $this->uri->segment(3) == 'view_all_employee' || $this->uri->segment(3) == 'view_all_page' || $this->uri->segment(3) == 'gallery' || $this->uri->segment(3) == 'view_all_branch' || $this->uri->segment(3) == 'all_enquiry' || $this->uri->segment(2) == 'master' || $this->uri->segment(3) == 'course_fee_setting' || $this->uri->segment(3) == 'all_package' || $this->uri->segment(3) == 'admitted_student' || $this->uri->segment(3) == 'all_followup' || $this->uri->segment(3) == 'fees_receipts' || $this->uri->segment(3) == 'all_expense' || $this->uri->segment(3) == 'fees_instalments' || $this->uri->segment(3) == 'view_all_advane_salary' || $this->uri->segment(3) == 'view_all_salary' || $this->uri->segment(3) == 'my_payout_details' || $this->uri->segment(3) == 'all_lession_and_chapter' || $this->uri->segment(3) == 'view_all_question' || $this->uri->segment(3) == 'my_task_details' || $this->uri->segment(3) == 'student_doubt' || $this->uri->segment(3) == 'career_category' || $this->uri->segment(3) == 'view_all_job' || $this->uri->segment(3) == 'view_all_job_application'): ?>
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
   <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
  <?php 
  endif;
  if($this->uri->segment(3) == 'visual_setting' ): ?>
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css">
  <?php 
  endif;
  if($this->uri->segment(3) == 'application_setting' || $this->uri->segment(3) == 'add_new_post' || $this->uri->segment(3) == 'edit_blog_post' || $this->uri->segment(3) == 'edit_course' || $this->uri->segment(3) == 'add_new_course' || $this->uri->segment(3) == 'add_new_page' || $this->uri->segment(3) == 'update_page' || $this->uri->segment(3) == 'notification' || $this->uri->segment(3) == 'ebook' || $this->uri->segment(3) == 'add_new_job' || $this->uri->segment(3) == 'edit_job'): ?>
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/summernote/summernote-bs4.min.css">
  <?php endif;
  if($this->uri->segment(3) == 'edit_course'): ?>
    <link rel="stylesheet" href="<?php echo admin_css() ?>dist/css/dropzone.css">
    <script src="<?php echo admin_css() ?>dist/js/onDomChange.js"></script>
    <script src="<?php echo admin_css() ?>dist/js/dragula.min.js"></script>
  <?php endif;?>
  
  <script src="<?php echo admin_css() ?>dist/js/3.5.1.jquery.min.js"></script>
  <?php if($this->uri->segment(3) == 'edit_bundle_course' || $this->uri->segment(3) == 'add_new_enquiry' || $this->uri->segment(3) == 'edit_enquiry' || $this->uri->segment(2) == 'course'): ?>
    <link rel="stylesheet" href="<?php echo admin_css(); ?>plugins/select2/css/select2.min.css">
  <?php endif;?>
</head>


<body class="hold-transition sidebar-mini layout-fixed <?php //if($uri->getSegment(3) == 'add_new_order'){echo 'sidebar-collapse';}?>">
<div class="wrapper">

 <!-- 
  <div class="preloader flex-column justify-content-center align-items-center">
    <img class="animation__shake" src="<?php //echo base_url()?><?php //echo $app_setting->admin_panel_logo; ?>" alt="<?php //echo $app_setting->application_name; ?>" width="100">
  </div> -->
  <div class="loader" style="display:none"></div>
  <!-- Navbar -->
  <nav class="main-header navbar navbar-expand navbar-white navbar-light">
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
      </li>
    </ul>
    <ul class="navbar-nav">
      <li class="nav-item">
         <a class="nav-link" style="padding: 0rem 1rem;" href="<?php echo base_url() ?>"  role="button"><button class="btn btn-outline-success btn-sm view-website"><i class="fa fa-home"></i>&nbsp;Home</button></a>
      </li>
   </ul>
    <!-- Right navbar links -->
    <ul class="navbar-nav ml-auto">
      <li class="nav-item dropdown">
         <a class="nav-link" data-toggle="dropdown" href="#">
         <i class="fa fa-cog"></i>
         </a>
         <div class="dropdown-menu dropdown-menu-xs dropdown-menu-right">
            <a href="<?php echo base_url() ?>admin/update_profile/update_profile_details" class="dropdown-item">Update Profile
            </a>
             <div class="dropdown-divider"></div>
              <a href="<?php echo base_url() ?>admin/update_profile/update_profile_password" class="dropdown-item">Change Password
             </a>
             <div class="dropdown-divider"></div>
              <a href="<?php echo base_url() ?>admin/logout" class="dropdown-item">Logout
             </a>
         </div>
      </li>
    </ul>
  </nav>
  <!-- /.navbar -->

  <!-- Main Sidebar Container -->
  <aside class="main-sidebar sidebar-dark-primary elevation-4">
    <!-- Brand Logo -->
    <a href="<?php echo base_url()?>/admin/admin/dashboard" class="brand-link dashboard-title">
      <span style="white-space: initial;font-size:17px!important" class="brand-text font-weight-light" ><?php echo $app_setting->app_name; ?></span>
    </a>

    <!-- Sidebar -->
    <div class="sidebar">
      <!-- Sidebar user panel (optional) -->
      <div class="user-panel mt-3 pb-3 mb-3 d-flex">
        <div class="image">
          <img src="<?php echo check_image(user()->user_photo); ?>" class="img-circle elevation-2" alt="<?php echo user()->user_name; ?>">
        </div>
        <div class="info">
          <a href="#" style="margin-bottom: -5px;" class="d-block"><?php echo user()->user_name; ?></a>
          <span style="color:#c2c7d0;font-size:12px">( <?php echo user()->user_role; ?> )</span>
        </div>
      </div>

      
      <!-- Sidebar Menu -->
      <nav class="mt-2">
        <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
          <!-- Add icons to the links using the .nav-icon class
               with font-awesome or any other icon font library -->
          <li class="nav-item <?php if($this->uri->segment(2) == 'dashboard'){echo 'menu-open';}?>">
            <a href="<?php echo base_url()?>admin/admin/dashboard" class="nav-link <?php if($this->uri->segment(2) == 'dashboard'){echo 'active';}?>">
              <i class="nav-icon fas fa-tachometer-alt"></i>
              <p>
                Dashboard 
              </p>
            </a>
          </li>
          <?php if(check_user_permission('course')): ?>
            <li class="nav-item <?php if($this->uri->segment(2) == 'course' || $this->uri->segment(2) == 'question'){echo 'menu-open';}?>">
              <a href="#" class="nav-link <?php if($this->uri->segment(2) == 'course' || $this->uri->segment(2) == 'question'){echo 'active';}?>">
                <i class="nav-icon fas fa-home"></i>
                <p>
                  Course
                  <i class="fas fa-angle-left right"></i>
                </p>
              </a>
              <ul class="nav nav-treeview">
                <li class="nav-item ">
                  <a href="<?php echo base_url()?>/admin/course/all_category" class="nav-link <?php if($this->uri->segment(3) == 'all_category'){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>All Category</p>
                  </a>
                </li>
                <li class="nav-item ">
                  <a href="<?php echo base_url()?>/admin/course/view_all_course" class="nav-link <?php if($this->uri->segment(3) == 'view_all_course'){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>All Course</p>
                  </a>
                </li>
                <li class="nav-item ">
                   <a href="<?php echo base_url()?>/admin/course/course_lession" class="nav-link <?php if($this->uri->segment(3)=="course_lession"){echo 'active';}?>">
                      <i class="far fa-circle nav-icon"></i>
                      <p>Course Lession</p>
                   </a>
                </li>
                <li class="nav-item ">
                    <a href="<?php echo base_url() ?>/admin/course/all_subject" class="nav-link <?php if($this->uri->segment(3) =="all_subject"){echo 'active';}?>">
                      <i class="far fa-circle nav-icon"></i>
                      <p>All Subject</p>
                    </a>
                  </li>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/question/view_all_question" class="nav-link <?php if($this->uri->segment(3) =="view_all_question"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>View All Question</p>
                  </a>
                </li>
              </ul>
            </li>
          <?php endif;?>
          <?php if(check_user_permission('course_out_line')): ?>
            <li class="nav-item <?php if($this->uri->segment(2) == 'course'){echo 'menu-open';}?>">
              <a href="#" class="nav-link <?php if($this->uri->segment(2) == 'course'){echo 'active';}?>">
                <i class="nav-icon fas fa-home"></i>
                <p>
                  Course
                  <i class="fas fa-angle-left right"></i>
                </p>
              </a>
              <ul class="nav nav-treeview">
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/course/all_lession_and_chapter" class="nav-link <?php if($this->uri->segment(3) =="all_lession_and_chapter"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>All Course Outline</p>
                  </a>
                </li>
              </ul>
            </li>
          <?php endif;?>
          <?php
          if( check_user_permission('royalty')): ?>
          <li class="nav-item has-treeview d-none <?php if($this->uri->segment(2) == "royalty"){ echo "menu-open";}?>">
            <a href="#" class="nav-link <?php if($this->uri->segment(2) == "royalty"){ echo "active";}?>">
              <i class="nav-icon fas fa-crown"></i>
              <p>
                Royalty Manager
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item ">
                <a href="<?php echo base_url() ?>/admin/royalty/all_package" class="nav-link <?php if($this->uri->segment(3) =="all_package"){echo 'active';}?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>View All Package</p>
                </a>
              </li>
            </ul>
          </li>
          <?php endif;?>
          <?php
          if(check_user_permission('student_enq') || check_user_permission('student_adm')): ?>
          <li class="nav-item has-treeview <?php if($this->uri->segment(2) == "students"){ echo "menu-open";}?>">
            <a href="#" class="nav-link <?php if($this->uri->segment(2) == "students"){ echo "active";}?>">
              <i class="nav-icon fas fa-user-friends"></i>
              <p>
                Enrolments Manager
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <?php if(check_user_permission('student_enq')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/students/all_enquiry" class="nav-link <?php if($this->uri->segment(3) =="all_enquiry"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Enquiry</p>
                  </a>
                </li>
              <?php endif; ?>
              <?php if(check_user_permission('student_adm')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/students/admitted_student" class="nav-link <?php if($this->uri->segment(3) =="admitted_student"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Admission</p>
                  </a>
                </li>
              <?php endif; ?>
            </ul>
          </li>
          <?php endif;?>
          <?php
          if(check_user_permission('fees_instalments') || check_user_permission('fees_receipts')): ?>
          <li class="nav-item has-treeview <?php if($this->uri->segment(2) == "fees_management"){ echo "menu-open";}?>">
            <a href="#" class="nav-link <?php if($this->uri->segment(2) == "fees_management"){ echo "active";}?>">
              <i class="nav-icon fas fa-rupee-sign"></i>
              <p>
                Fees Manager
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <?php if(check_user_permission('fees_instalments')): ?>
                <!-- <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/fees_management/fees_instalments" class="nav-link <?php if($this->uri->segment(3) =="fees_instalments"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Fees Instalments</p>
                  </a>
                </li> -->
              <?php endif;?>
              <?php if(check_user_permission('fees_receipts')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/fees_management/fees_receipts" class="nav-link <?php if($this->uri->segment(3) =="fees_receipts"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Fees Receipts</p>
                  </a>
                </li>
              <?php endif;?>
            </ul>
          </li>
          <?php endif;?>
          <?php
          if(check_user_permission('assign_exam') || check_user_permission('viva_and_practical') || check_user_permission('extend') || check_user_permission('re_exam')): ?>
          <li class="nav-item has-treeview <?php if($this->uri->segment(3) == "assign_exam" || $this->uri->segment(3) == "viva_and_practical" || $this->uri->segment(3) == "extend" || $this->uri->segment(3) == "re_exam" || $this->uri->segment(3) == "result" || $this->uri->segment(3) == "view_question_paper" || $this->uri->segment(3) == "current_exam"){ echo "menu-open";}?>">
            <a href="#" class="nav-link <?php if($this->uri->segment(3) == "assign_exam" || $this->uri->segment(3) == "viva_and_practical" || $this->uri->segment(3) == "extend" || $this->uri->segment(3) == "re_exam" || $this->uri->segment(3) == "result" || $this->uri->segment(3) == "view_question_paper" || $this->uri->segment(3) == "current_exam"){ echo "active";}?>">
              <i class="nav-icon fas fa-book-open"></i>
              <p>
                Examination Manager
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              
              <?php if(check_user_permission('assign_exam')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/examination/assign_exam" class="nav-link <?php if($this->uri->segment(3) =="assign_exam"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Assign Exam</p>
                  </a>
                </li>
              <?php endif;?>
              <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/examination/view_question_paper" class="nav-link <?php if($this->uri->segment(3) =="view_question_paper"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>View Question Paper</p>
                  </a>
                </li>
              <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/examination/view_question_bank" class="nav-link <?php if($this->uri->segment(3) =="view_question_bank"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>View Question Bank</p>
                  </a>
                </li>
              <?php if(check_user_permission('viva_and_practical')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/examination/viva_and_practical" class="nav-link <?php if($this->uri->segment(3) =="viva_and_practical"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Viva & Practical</p>
                  </a>
                </li>
              <?php endif;?>
              <?php if(check_user_permission('current_exam')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/examination/current_exam" class="nav-link <?php if($this->uri->segment(3) =="current_exam"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Current Exam</p>
                  </a>
                </li>
              <?php endif;?>
              <?php if(check_user_permission('result')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/examination/result" class="nav-link <?php if($this->uri->segment(3) =="result"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Result</p>
                  </a>
                </li>
              <?php endif;?>
              <?php if(check_user_permission('extend')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/examination/extend" class="nav-link <?php if($this->uri->segment(3) =="extend"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Extend</p>
                  </a>
                </li>
              <?php endif;?>
              <?php if(check_user_permission('re_exam')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/examination/re_exam" class="nav-link <?php if($this->uri->segment(3) =="re_exam"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Re-Exam</p>
                  </a>
                </li>
              <?php endif;?>
              
            </ul>
          </li>
          <?php endif;?>
          <?php if(check_user_permission('branch')): ?>
            <li class="nav-item <?php if($this->uri->segment(2) == 'branch'){echo 'menu-open';}?>">
              <a href="#" class="nav-link <?php if($this->uri->segment(2) == 'branch'){echo 'active';}?>">
                <i class="nav-icon fas fa-users"></i>
                <p>
                  Branch
                  <i class="fas fa-angle-left right"></i>
                </p>
              </a>
              <ul class="nav nav-treeview">
                <li class="nav-item ">
                   <a href="<?php echo base_url()?>/admin/branch/view_all_branch" class="nav-link <?php if($this->uri->segment(3)=="view_all_branch"){echo 'active';}?>">
                      <i class="far fa-circle nav-icon"></i>
                      <p>View All Branch</p>
                   </a>
                </li>
              </ul>
            </li>
          <?php endif;?>
          <?php if(check_user_permission('role_permission')): ?>
            <li class="nav-item <?php if($this->uri->segment(3) == "role_permission"){ echo "menu-open";}?>">
               <a href="<?php echo base_url() ?>admin/role_permission" class="nav-link">
                  <i class="nav-icon fas fa-lock"></i>
                  <p>
                     Role Permission
                  </p>
               </a>
            </li>
          <?php endif;?>
          <?php if(check_user_permission('employee_management')): ?>
            <li class="nav-item has-treeview <?php if($this->uri->segment(2) == "employee"){ echo "menu-open";}?>">
                <a href="#" class="nav-link <?php if($this->uri->segment(2) == "employee"){ echo "active";}?>">
                   <i class="nav-icon fas fa-users"></i>
                   <p>
                      Employee Management
                      <i class="fas fa-angle-left right"></i>
                   </p>
                </a>
                <ul class="nav nav-treeview">
                  <li class="nav-item ">
                      <a href="<?php echo base_url() ?>admin/employee/view_all_employee" class="nav-link <?php if($this->uri->segment(3)=="view_all_employee"){echo 'active';}?>">
                         <i class="fa fa-long-arrow-right nav-icon"></i>
                         <p>View All Employee</p>
                      </a>
                  </li>
                </ul>
             </li>
          <?php endif;?>
          <?php if(check_user_permission('payout')): ?>
             <li class="nav-item has-treeview <?php if($this->uri->segment(2) == "payout"){ echo "menu-open";}?>">
                <a href="#" class="nav-link <?php if($this->uri->segment(2) == "payout"){ echo "active";}?>">
                   <i class="nav-icon fas fa-usd"></i>
                   <p>
                      Payout
                      <i class="fas fa-angle-left right"></i>
                   </p>
                </a>
                <ul class="nav nav-treeview">
                  <?php if(user()->is_employee != 1): ?>
                    <li class="nav-item ">
                        <a href="<?php echo base_url() ?>admin/payout/view_all_advane_salary" class="nav-link <?php if($this->uri->segment(3)=="view_all_advane_salary"){echo 'active';}?>">
                           <i class="fa fa-long-arrow-right nav-icon"></i>
                           <p>View All Adv Salary</p>
                        </a>
                    </li>
                    <li class="nav-item ">
                        <a href="<?php echo base_url() ?>admin/payout/view_all_salary" class="nav-link <?php if($this->uri->segment(3)=="view_all_salary"){echo 'active';}?>">
                           <i class="fa fa-long-arrow-right nav-icon"></i>
                           <p>View All Salary</p>
                        </a>
                    </li>
                  <?php endif; ?>
                  <?php if(user()->is_employee == 1): ?>
                    <li class="nav-item ">
                        <a href="<?php echo base_url() ?>admin/payout/my_payout_details" class="nav-link <?php if($this->uri->segment(3)=="my_payout_details"){echo 'active';}?>">
                           <i class="fa fa-long-arrow-right nav-icon"></i>
                           <p>My Payout Details</p>
                        </a>
                    </li>
                  <?php endif; ?>
                </ul>
             </li>
          <?php endif; ?>
          <?php if(check_user_permission('lead_management')): ?>
            <li class="nav-item <?php if($this->uri->segment(3) == "lead_management"){ echo "menu-open";}?>">
               <a href="<?php echo base_url() ?>admin/admin/lead_management" class="nav-link">
                  <i class="nav-icon fas fa-tachometer-alt"></i>
                  <p>
                     Lead Management
                  </p>
               </a>
            </li>
          <?php endif;?>
          <?php if (check_user_permission('career_page')): ?>
              <li class="nav-item has-treeview <?php if($this->uri->segment(2) == "career"){ echo "menu-open";}?>">
                 <a href="#" class="nav-link <?php if($this->uri->segment(2) == "career"){ echo "active";}?>">
                    <i class="nav-icon fas fa-user-md"></i>
                    <p>
                       Career Page
                       <i class="fas fa-angle-left right"></i>
                    </p>
                 </a>
                 <ul class="nav nav-treeview">
                    <li class="nav-item">
                       <a href="<?php echo base_url() ?>admin/career/career_category" class="nav-link <?php if($this->uri->segment(2)=="career_category"){echo 'active';}?>">
                          <i class="fa fa-long-arrow-right nav-icon"></i>
                          <p>Career Category</p>
                       </a>
                    </li>
                    <li class="nav-item ">
                       <a href="<?php echo base_url() ?>admin/career/view_all_job" class="nav-link <?php if($this->uri->segment(2)=="view_all_job"){echo 'active';}?>">
                          <i class="fa fa-long-arrow-right nav-icon"></i>
                          <p>View All Job</p>
                       </a>
                    </li>
                    <li class="nav-item ">
                       <a href="<?php echo base_url() ?>admin/career/view_all_job_application" class="nav-link <?php if($this->uri->segment(2)=="view_all_job_application"){echo 'active';}?>">
                          <i class="fa fa-long-arrow-right nav-icon"></i>
                          <p>All Job Application</p>
                       </a>
                    </li>
                 </ul>
              </li>
              <?php endif; ?>
          <?php
          //if(check_user_permission('add_lead_source') || check_user_permission('add_followup_mode') || check_user_permission('add_batch')):
          if(user()->user_role =='Branch'): ?>
          <li class="nav-item has-treeview <?php if($this->uri->segment(2) == "master"){ echo "menu-open";}?>">
            <a href="#" class="nav-link <?php if($this->uri->segment(2) == "master"){ echo "active";}?>">
              <i class="nav-icon fas fa-book"></i>
              <p>
                Master
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <?php //if(check_user_permission('add_lead_source')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/master/all_lead_source" class="nav-link <?php if($this->uri->segment(3) =="all_lead_source"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>All Lead Source</p>
                  </a>
                </li>
              <?php //endif;?>
              <?php //if(check_user_permission('add_followup_mode')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/master/all_followup_mode" class="nav-link <?php if($this->uri->segment(3) =="all_followup_mode"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>All Followup Mode</p>
                  </a>
                </li>
              <?php //endif;?>
              <?php //if(check_user_permission('add_batch')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/master/all_batch" class="nav-link <?php if($this->uri->segment(3) =="all_batch"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>All Batch</p>
                  </a>
                </li>
              <?php //endif;?>
              <?php //if(check_user_permission('account_head')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/master/all_account_head" class="nav-link <?php if($this->uri->segment(3) =="all_account_head"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>All Account Head</p>
                  </a>
                </li>
              <?php //endif;?>
            </ul>
          </li>
          <?php endif;?>
          <?php
          if(check_user_permission('expense_management')): ?>
          <li class="nav-item has-treeview <?php if($this->uri->segment(2) == "expense_management"){ echo "menu-open";}?>">
            <a href="#" class="nav-link <?php if($this->uri->segment(2) == "expense_management"){ echo "active";}?>">
              <i class="nav-icon fas fa-money"></i>
              <p>
                Expense Management
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <li class="nav-item ">
                <a href="<?php echo base_url() ?>/admin/expense_management/all_expense" class="nav-link <?php if($this->uri->segment(3) =="all_expense"){echo 'active';}?>">
                  <i class="far fa-circle nav-icon"></i>
                  <p>All Expense</p>
                </a>
              </li>
            </ul>
          </li>
          <?php endif;?>
         
          <?php if(check_user_permission('blog')): ?>
            <li class="nav-item has-treeview <?php if($this->uri->segment(2) == "blog"){ echo "menu-open";}?>">
                <a href="#" class="nav-link <?php if($this->uri->segment(2) == "blog"){ echo "active";}?>">
                   <i class="nav-icon fab fa-blogger"></i>
                   <p>
                      Blog
                      <i class="fas fa-angle-left right"></i>
                   </p>
                </a>
                <ul class="nav nav-treeview">
                   <!-- <li class="nav-item">
                      <a href="<?php echo base_url() ?>admin/blog/blog_category" class="nav-link <?php if($this->uri->segment(3)=="blog_category"){echo 'active';}?>">
                         <i class="fa fa-long-arrow-right nav-icon"></i>
                         <p>Blog Category</p>
                      </a>
                   </li> -->
                   <!-- <li class="nav-item ">
                      <a href="<?php echo base_url() ?>admin/blog/add_new_post" class="nav-link <?php if($this->uri->segment(3)=="add_new_post"){echo 'active';}?>">
                         <i class="fa fa-long-arrow-right nav-icon"></i>
                         <p>Add New Post</p>
                      </a>
                   </li> -->
                   <li class="nav-item">
                      <a href="<?php echo base_url() ?>admin/blog/view_all_post" class="nav-link <?php if($this->uri->segment(3)=="view_all_post"){echo 'active';}?>">
                         <i class="fa fa-long-arrow-right nav-icon"></i>
                         <p>View all Post</p>
                      </a>
                   </li>
                   <!-- <li class="nav-item">
                      <a href="<?php echo base_url() ?>admin/blog/view_blog_comments" class="nav-link <?php if($this->uri->segment(3)=="view_blog_comments"){echo 'active';}?>">
                         <i class="fa fa-long-arrow-right nav-icon"></i>
                         <p>View Blog Comments</p>
                      </a>
                   </li>
                   <li class="nav-item">
                      <a href="<?php echo base_url() ?>admin/blog/widget" class="nav-link <?php if($this->uri->segment(3)=="widget"){echo 'active';}?>">
                         <i class="fa fa-long-arrow-right nav-icon"></i>
                         <p>
                            Widget
                         </p>
                      </a>
                   </li> -->
                </ul>
             </li>
          <?php endif;?>
          <?php if(check_user_permission('front_setting')): ?>
          <li class="nav-item <?php if($this->uri->segment(2) == 'front_setting'){echo 'menu-open';}?>">
              <a href="#" class="nav-link <?php if($this->uri->segment(2) == 'front_setting'){echo 'active';}?>">
                <i class="nav-icon fas fa-home"></i>
                <p>
                  Front Setting
                  <i class="fas fa-angle-left right"></i>
                </p>
              </a>
              <ul class="nav nav-treeview">
                <li class="nav-item ">
                  <a href="<?php echo base_url()?>/admin/front_setting/edit_slider/1" class="nav-link <?php if($this->uri->segment(3) == 'edit_slider'){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Slider</p>
                  </a>
                </li>
                <li class="nav-item ">
                  <a href="<?php echo base_url()?>/admin/front_setting/slider_block" class="nav-link <?php if($this->uri->segment(3) == 'slider_block'){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Slider Block</p>
                  </a>
                </li>
                <li class="nav-item ">
                  <a href="<?php echo base_url(); ?>admin/front_setting/short_about_us" class="nav-link <?php if($this->uri->segment(3) =="short_about_us"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Short About Us</p>
                  </a>
                </li>
                <li class="nav-item ">
                  <a href="<?php echo base_url(); ?>admin/front_setting/testimonial" class="nav-link <?php if($this->uri->segment(3) =="testimonial"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Testimonial </p>
                  </a>
                </li>
                <li class="nav-item ">
                  <a href="<?php echo base_url(); ?>admin/front_setting/banner_details" class="nav-link <?php if($this->uri->segment(3) =="banner_details"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Banner Details</p>
                  </a>
                </li>
                <li class="nav-item ">
                  <a href="<?php echo base_url(); ?>admin/front_setting/placement_logo" class="nav-link <?php if($this->uri->segment(3) =="placement_logo"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Placement Logo</p>
                  </a>
                </li>
                <li class="nav-item ">
                  <a href="<?php echo base_url(); ?>admin/front_setting/about_us_page" class="nav-link <?php if($this->uri->segment(3) =="about_us_page"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>About Us Page</p>
                  </a>
                </li>
                <li class="nav-item ">
                  <a href="<?php echo base_url(); ?>admin/front_setting/view_all_page" class="nav-link <?php if($this->uri->segment(3) =="view_all_page"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>All Page</p>
                  </a>
                </li>
                <li class="nav-item ">
                  <a href="<?php echo base_url(); ?>admin/front_setting/notification" class="nav-link <?php if($this->uri->segment(3) =="notification"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Top Notification</p>
                  </a>
                </li>
                <li class="nav-item ">
                  <a href="<?php echo base_url(); ?>admin/front_setting/gallery" class="nav-link <?php if($this->uri->segment(3) =="gallery"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Gallery</p>
                  </a>
                </li>
                <li class="nav-item ">
                  <a href="<?php echo base_url(); ?>admin/front_setting/ebook" class="nav-link <?php if($this->uri->segment(3) =="ebook"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>E-Book</p>
                  </a>
                </li>
              </ul>
            </li>
          <?php endif;?>
          <?php if(check_user_permission('app_setting') || check_user_permission('visual_setting')): ?>
             <li class="nav-item has-treeview <?php if($this->uri->segment(2) == "setting"){ echo "menu-open";}?>">
              <a href="#" class="nav-link <?php if($this->uri->segment(2) == "setting"){ echo "active";}?>">
                <i class="nav-icon fas fa-tools"></i>
                <p>
                  Setting 
                  <i class="fas fa-angle-left right"></i>
                </p>
              </a>
              <ul class="nav nav-treeview">
                <?php if(check_user_permission('app_setting')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/setting/application_setting" class="nav-link <?php if($this->uri->segment(3) =="application_setting"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Application Setting</p>
                  </a>
                </li>
                <?php endif; ?>
                <?php if(check_user_permission('visual_setting')): ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/setting/visual_setting" class="nav-link <?php if($this->uri->segment(3) =="visual_setting"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Visual Setting</p>
                  </a>
                </li> 
                <?php endif; ?>
                

              </ul>
            </li>
          <?php endif;?>
          <?php if(user()->user_role == 'Instractor'): ?>
            <li class="nav-item has-treeview <?php if($this->uri->segment(2) == "master"){ echo "menu-open";}?>">
            <a href="#" class="nav-link <?php if($this->uri->segment(2) == "master"){ echo "active";}?>">
              <i class="nav-icon fas fa-users"></i>
              <p>
                All Batch
                <i class="fas fa-angle-left right"></i>
              </p>
            </a>
            <ul class="nav nav-treeview">
              <?php 
              $ins_id = user()->user_id;
              $this->db->where('instructor_id', $ins_id);
              $all_student_batch = $this->db->get('student_batch')->result(); 
              foreach ($all_student_batch as $key => $student_batch) {
              ?>
                <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/master/batch_details/<?php echo $student_batch->batch_id; ?>" class="nav-link <?php if($this->uri->segment(3) =="master"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p><?php echo $student_batch->batch_name; ?></p>
                  </a>
                </li>
              <?php }; ?>
              <li class="nav-item ">
                  <a href="<?php echo base_url() ?>/admin/master/batch_progress" class="nav-link <?php if($this->uri->segment(3) =="batch_progress"){echo 'active';}?>">
                    <i class="far fa-circle nav-icon"></i>
                    <p>Batch Progress</p>
                  </a>
                </li>
            </ul>
          </li>
          <li class="nav-item has-treeview <?php if($this->uri->segment(2) == "my_task"){ echo "menu-open";}?>">
                <a href="#" class="nav-link <?php if($this->uri->segment(2) == "my_task"){ echo "active";}?>">
                   <i class="nav-icon fas fa-tasks"></i>
                   <p>
                      My Task
                      <i class="fas fa-angle-left right"></i>
                   </p>
                </a>
                <ul class="nav nav-treeview">
                  <?php 
                    $ins_id = user()->user_id;
                    $this->db->where('instructor_id', $ins_id);
                    $all_student_batch = $this->db->get('student_batch')->result();
                    foreach ($all_student_batch as $key => $student_batch) {
                    ?>
                      <li class="nav-item ">
                        <a href="<?php echo base_url() ?>admin/my_task/my_task_details/<?php echo $student_batch->batch_id; ?>" class="nav-link <?php if($this->uri->segment(3) =="master"){echo 'active';}?>">
                          <i class="far fa-circle nav-icon"></i>
                          <p><?php echo $student_batch->batch_name; ?></p>
                        </a>
                      </li>
                    <?php }; ?>
                    <li class="nav-item ">
                      <a href="<?php echo base_url() ?>admin/my_task/student_doubt" class="nav-link <?php if($this->uri->segment(3) =="student_doubt"){echo 'active';}?>">
                        <i class="far fa-circle nav-icon"></i>
                        <p>Student Doubt</p>
                      </a>
                    </li>
                </ul>
             </li>
             <li class="nav-item has-treeview <?php if($this->uri->segment(2) == "attandence"){ echo "menu-open";}?>">
                <a href="#" class="nav-link <?php if($this->uri->segment(2) == "attandence"){ echo "active";}?>">
                   <i class="nav-icon fas fa-list-alt"></i>
                   <p>
                      Attandence
                      <i class="fas fa-angle-left right"></i>
                   </p>
                </a>
                <ul class="nav nav-treeview">
                  <li class="nav-item ">
                    <a href="<?php echo base_url() ?>admin/attandence/my_attandence" class="nav-link <?php if($this->uri->segment(3) =="my_attandence"){echo 'active';}?>">
                      <i class="far fa-circle nav-icon"></i>
                      <p>My Attandence</p>
                    </a>
                  </li>
                  <li class="nav-item ">
                    <a href="<?php echo base_url() ?>admin/attandence/student_attandence" class="nav-link <?php if($this->uri->segment(3) =="student_attandence"){echo 'active';}?>">
                      <i class="far fa-circle nav-icon"></i>
                      <p>Student Attandence</p>
                    </a>
                  </li>
                </ul>
             </li>
          <?php endif; ?>
        </ul>
      </nav>
      <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
  </aside>
<?php
    $errors = $this->session->userdata('errors');
    if (isset($errors)) {
        ?>
        <script>
            swal ( "Oops" ,  "<?php echo $errors ?>" ,  "error" )
        </script>
        <?php echo $errors ?>
        <?php
        $this->session->unset_userdata('errors');
    }
    $error = $this->session->userdata('error');
    if (isset($error)) {
        ?>
         <script>
            swal ( "Oops" ,  "<?php echo $error ?>" ,  "error" )
        </script>
        <?php
        $this->session->unset_userdata('error');
    }
    $success = $this->session->userdata('success');
    if (isset($success)) {
        ?>
         <script>
            swal({
          title: "Done!",
          text: "<?php echo $success ?>",
          icon: "success",
        });
        </script>
        <?php
        $this->session->unset_userdata('success');
    }
    ?>
