<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta name="description" content="" />
  <meta name="author" content="" />
  <link
    rel="icon"
    href="<?php echo base_url(); ?><?php echo $app_setting->fevicon; ?>" />
  <title><?php echo $app_setting->application_name; ?></title>

  <!-- Vendors Style-->
  <link rel="stylesheet" href="<?php echo student_lms_css(); ?>css/vendors_css.css" />

  <!-- Style-->
  <link rel="stylesheet" href="<?php echo student_lms_css(); ?>css/style.css" />
  <link rel="stylesheet" href="<?php echo student_lms_css(); ?>css/skin_color.css" />
  <link rel="stylesheet" type="text/css" href="<?php echo student_lms_css(); ?>css/custom-9.css" />
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.4.0/js/iziToast.min.js" integrity="sha512-Zq9o+E00xhhR/7vJ49mxFNJ0KQw1E1TMWkPTxrWcnpfEFDEXgUiwJHIKit93EW/XxE31HSI5GEOW06G6BF1AtA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.4.0/css/iziToast.min.css" integrity="sha512-O03ntXoVqaGUTAeAmvQ2YSzkCvclZEcPQu1eqloPaHfJ5RuNGiS4l+3duaidD801P50J28EHyonCV06CUlTSag==" crossorigin="anonymous" referrerpolicy="no-referrer" />
  
</head>

<body class="hold-transition light-skin sidebar-mini theme-violet fixed">
  <div class="wrapper">
    <div id="loader"></div>

    <header class="main-header">
      <div class="d-flex align-items-center logo-box justify-content-start">
        <a
          href="#"
          class="waves-effect waves-light nav-link d-none d-md-inline-block mx-10 push-btn bg-transparent"
          data-toggle="push-menu"
          role="button">
          <span class="icon-Align-left"><span class="path1"></span><span class="path2"></span><span class="path3"></span></span>
        </a>
        <!-- Logo -->
        <a href="<?php echo admin_url(); ?>admin" class="logo">
          <!-- logo-->
          <div class="logo-lg">
            <span class="light-logo"><img src="<?php echo base_url() ?><?php echo $app_setting->header_logo ?>" alt="logo" /></span>
            <span class="dark-logo"><img src="<?php echo base_url() ?><?php echo $app_setting->header_logo ?>" alt="logo" /></span>
          </div>
        </a>
      </div>
      <!-- Header Navbar -->
      <nav class="navbar navbar-static-top">
        <!-- Sidebar toggle button-->
        <div class="app-menu">
          
        </div>

        <div class="navbar-custom-menu r-side">
          <ul class="nav navbar-nav">
            <li class="btn-group nav-item d-lg-inline-flex d-none">
              <a
                href="#"
                data-provide="fullscreen"
                class="waves-effect waves-light nav-link full-screen"
                title="Full Screen">
                <i class="icon-Expand-arrows"><span class="path1"></span><span class="path2"></span></i>
              </a>
            </li>
            
            <!-- Notifications -->
            <li class="dropdown notifications-menu">
              <a
                href="#"
                class="waves-effect waves-light dropdown-toggle"
                data-bs-toggle="dropdown"
                title="Notifications">
                <i class="icon-Notifications"><span class="path1"></span><span class="path2"></span></i>
              </a>
              <ul class="dropdown-menu animated bounceIn">
                <li class="header">
                  <div class="p-20">
                    <div class="flexbox">
                      <div>
                        <h4 class="mb-0 mt-0">Notifications</h4>
                      </div>
                    </div>
                  </div>
                </li>
                <li>
                  <!-- inner menu: contains the actual data -->
                  <ul class="menu sm-scrol">
                    <li>
                      <a href="#">
                        <i class="fa fa-times text-info"></i> No Notification Found
                      </a>
                    </li>
                
                  </ul>
                </li>
                <li class="footer">
                  <a href="#">View all</a>
                </li>
              </ul>
            </li>

            <!-- User Account-->
            <li class="dropdown user user-menu">
              <a
                href="#"
                class="waves-effect waves-light dropdown-toggle"
                data-bs-toggle="dropdown"
                title="User">
                <i class="icon-User"><span class="path1"></span><span class="path2"></span></i>
              </a>
              <ul class="dropdown-menu animated flipInX">
                <li class="user-body">
                  <a class="dropdown-item" href="<?php echo admin_url(); ?>course/my_course"><i class="ti-file text-muted me-2"></i> My Courses</a>
                  <a class="dropdown-item" href="<?php echo admin_url(); ?>admin/account_setting"><i class="ti-settings text-muted me-2"></i> Settings</a>
                  <div class="dropdown-divider"></div>
                  <a class="dropdown-item" href="<?php echo admin_url(); ?>admin/logout"><i class="ti-lock text-muted me-2"></i> Logout</a>
                </li>
              </ul>
            </li>

           
          </ul>
        </div>
      </nav>
    </header>

    <aside class="main-sidebar">
      <!-- sidebar-->
      <section class="sidebar position-relative">
        <div class="multinav">
          <div class="multinav-scroll" style="height: 100%">
            <!-- sidebar menu-->

            <ul class="sidebar-menu" data-widget="tree">
              <li>
                <div class="box">
                  <div class="box-body text-center">
                    <div class="">
                      <img src="<?php if (user()->image) {
                                  echo base_url() . user()->image;
                                } else {
                                  echo base_url() . 'uploads/logo/logo_avatra.png';
                                } ?>" width="150" class="rounded-circle bg-info-light" alt="user" />
                      <h4 class="mt-20 mb-0"><?php echo user()->name; ?></h4>
                      <a href="#">ID : <?php echo date('Ydm', strtotime(user()->created_at)) . user()->id; ?></a>
                    </div>
                  </div>
                  <?php if(user()->role == 'Student'): ?>
                  <div class="p-5 bt-1">
                    <div class="row text-center">
                      <div class="col-12">
                        <a href="<?php echo admin_url() ?>/course/my_course" class="link d-flex align-items-center justify-content-center font-medium waves-effect waves-light btn btn-primary-light ">
                          <span class="icon-Code1 fs-20 me-5"><span class="path1"></span><span class="path2"></span></span>Continue Learning</a>
                      </div>
                    </div>
                    
                  </div>
                  <?php endif; ?>
                </div>
              </li>
              <li>
                <a href="#">
                  <i class="glyphicon glyphicon-heart"><span class="path1"></span><span class="path2"></span></i>
                  <span>For You</span>
                </a>
              </li>
              <li>
                <a href="<?php echo admin_url(); ?>/admin">
                  <i class="icon-Layout-4-blocks"><span class="path1"></span><span class="path2"></span></i>
                  <span>Dashboard</span>
                </a>
              </li>
              <?php if(user()->role == 'Student'): ?>
              <li>
                <a href="<?php echo admin_url() ?>/course/my_course">
                  <i span class="icon-Layout-grid"><span class="path1"></span><span class="path2"></span></i>
                  <span>My Courses</span>
                </a>
              </li>
              <li>
                <a href="<?php echo admin_url(); ?>admin/learner_report">
                  <i span class="icon-File"><span class="path1"></span><span class="path2"></span></i>
                  <span>Learner Report</span>
                </a>
              </li>
              <?php else: ?>
                <li>
                <a href="<?php echo admin_url() ?>/course/my_course">
                  <i span class="icon-Layout-grid"><span class="path1"></span><span class="path2"></span></i>
                  <span>My Product</span>
                </a>
              </li>
              <?php endif; ?>
              <li>
                <a href="<?php echo admin_url(); ?>admin/account_setting">
                  <i span class="icon-Settings-2"><span class="path1"></span><span class="path2"></span></i>
                  <span>Account Setting</span>
                </a>
              </li>
              <li>
                <a href="<?php echo admin_url(); ?>admin/faq">
                  <i span class="glyphicon glyphicon-flash"><span class="path1"></span><span class="path2"></span></i>
                  <span>FAQ</span>
                </a>
              </li>
              <li>
                <a href="<?php echo admin_url() ?>admin/logout">
                  <i span class="icon-Chat-locked"><span class="path1"></span><span class="path2"></span></i>
                  <span>Logout</span>
                </a>
              </li>
            </ul>
          </div>
        </div>
      </section>

    </aside>

    <?php
    $errors = $this->session->userdata('errors');
    if (isset($errors)) {
    ?>
      <script>
        iziToast.error({
          title: 'Error',
          message: '<?php echo $errors ?>',
        });
      </script>
    <?php
      $this->session->unset_userdata('errors');
    }
    $error = $this->session->userdata('error');
    if (isset($error)) {
    ?>
      <script>
        iziToast.error({
          title: 'Error',
          message: '<?php echo $error ?>',
        });
      </script>
    <?php
      $this->session->unset_userdata('error');
    }
    $success = $this->session->userdata('success');
    if (isset($success)) {
    ?>
      <script>
        iziToast.success({
          title: 'OK',
          message: '<?php echo $success ?>',
          position: 'topRight',
          messageColor: '#000'
        });
      </script>
    <?php
      $this->session->unset_userdata('success');
    }
    ?>