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

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title><?php echo $title ?> | <?php echo $app_setting->application_name ?></title>

  <!-- Google Font: Source Sans Pro -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/fontawesome-free/css/all.min.css">
  <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <!-- Tempusdominus Bootstrap 4 -->
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
  <!-- iCheck -->
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/icheck-bootstrap/icheck-bootstrap.min.css">
  <!-- JQVMap -->
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/jqvmap/jqvmap.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="<?php echo admin_css() ?>css/adminlte.min.css">
  <!-- overlayScrollbars -->
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
  <!-- Daterange picker -->
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/daterangepicker/daterangepicker.css">
  <!-- summernote -->
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/summernote/summernote-bs4.min.css">
  <script src="<?php echo admin_css() ?>plugins/sweetalert/sweetalert2.all.min.js"></script>
<?php if($this->uri->segment(3)!= "edit_course"): ?>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<?php else: ?>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha512-+NqPlbbtM1QqiK8ZAo4Yrj2c4lNQoGv8P79DPtKzj++l5jnN39rHA/xsqn8zE9l0uSoxaCdrOgFs6yjyfbBxSg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

  <?php endif; ?>
  
  <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.6.4/css/buttons.dataTables.min.css">
  <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="https://cdn.datatables.net/buttons/1.6.4/css/buttons.dataTables.min.css">

  <!-- Select2 -->
  <link rel="stylesheet" href="<?php echo admin_css() ?>plugins/select2/css/select2.min.css">
</head>

<body class="hold-transition sidebar-mini layout-fixed">


  <div class="wrapper">

    <!-- Navbar -->
    <nav class="main-header navbar navbar-expand navbar-white navbar-light">
      <!-- Left navbar links -->
      <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>
        <li class="nav-item d-none d-sm-inline-block">
          <a href="<?php echo base_url() ?>" target="_blank" class="nav-link btn btn-primary" style="color: #fff">View Website</a>
        </li>
        <?php if (user()->role == 'User'): ?>
          <!--  <li class="nav-item d-none d-sm-inline-block ml-3">
          <a href="<?php echo $app_setting->special_fb_product_group ?>" target="_blank" class="nav-link btn btn-primary" style="background-color: #4267B2;color: #fff;border-color:#4267B2;"> <i class="fa fa-facebook"></i> Join Private Facebook Community</a>
        </li>
        <li class="nav-item d-none d-sm-inline-block ml-3">
          <a href="<?php echo $app_setting->special_fb_course_group ?>" target="_blank" class="nav-link btn btn-primary" style=" background-color: #25D366;color: #fff; border-color:#25D366;"><i class="fa fa-whatsapp"></i> Join Private WhatsAppp Community</a>
        </li> -->
        <?php endif; ?>
      </ul>



      <!-- Right navbar links -->
      <ul class="navbar-nav ml-auto">
        <!-- Notifications Dropdown Menu -->
        <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">
            <span class="dropdown-item dropdown-header">Profile</span>
            <div class="dropdown-divider"></div>
            <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 admin_url() ?>admin/logout" class="dropdown-item">Logout
            </a>
          </div>
        </li>

      </ul>
    </nav>
    <!-- /.navbar -->
    <style type="text/css">
      .brand-link .brand-image {
        background-color: #fff;
      }

      .user-panel img {
        background-color: #fff;
      }
    </style>
    <!-- Main Sidebar Container -->
    <aside class="main-sidebar sidebar-dark-primary elevation-4">
      <!-- Brand Logo -->
      <a href="index3.html" class="brand-link">
        <img src="<?php echo base_url() ?><?php echo $app_setting->header_logo ?>" alt="<?php echo $app_setting->application_name ?>" class="brand-image img-circle elevation-3" style="opacity: .8">
        <span class="brand-text font-weight-light"><?php echo $app_setting->application_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 if (user()->image) {
                        echo base_url() . user()->image;
                      } else {
                        echo base_url() . 'uploads/logo/logo_avatra.png';
                      } ?>" class="img-circle elevation-2" alt="<?php echo user()->name ?>">
          </div>
          <div class="info">
            <a href="#" class="d-block"><?php echo user()->name ?></a>
          </div>
        </div>

        <!-- SidebarSearch Form -->
        <div class="form-inline">
          <div class="input-group" data-widget="sidebar-search">
            <input class="form-control form-control-sidebar" type="search" placeholder="Search" aria-label="Search" id="mySearch" onkeyup="myFunction()">
            <div class="input-group-append">
              <button class="btn btn-sidebar">
                <i class="fas fa-search fa-fw"></i>
              </button>
            </div>
          </div>
        </div>

        <?php $this->load->view('admin/include/menu_bar'); ?>

        <?php if (empty(user()->mobile)): ?>
          <script>
            $(document).ready(function() {
              $("#pay_ment_model").modal();
            });
          </script>
          <div class="modal fade" id="pay_ment_model" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true" data-keyboard="false" data-backdrop="static">
            <div class="modal-dialog modal-dialog-centered" role="document">
              <div class="modal-content">
                <div class="modal-header">
                  <h5 class="modal-title" id="exampleModalLabel">Complete Your Registration</h5>

                </div>
                <div class="modal-body">
                  <?php echo form_open(base_url() . 'admin/admin/registration'); ?>
                  <div class="form-group">
                    <label for="recipient-name" class="col-form-label">Your Name:</label>
                    <input type="text" class="form-control" placeholder="Enter Your Name" name="name">
                  </div>
                  <div class="form-group">
                    <label for="recipient-name" class="col-form-label">Your Mobile No:</label>
                    <input type="number" class="form-control" placeholder="Enter Your Mobile No." name="mobile">
                  </div>
                </div>
                <div class="modal-footer">
                  <a href="<?php echo admin_url() ?>admin/logout" style="float: left" class="btn btn-primary">Logout</a>
                  <button type="submit" class="btn btn-success">Submit</button>
                </div>
                <?php echo form_close(); ?>
              </div>
            </div>
          </div>
        <?php endif; ?>
        <style type="text/css">
          .required {
            color: red !important;
          }

          .form-group small {
            color: #979ba1;
          }
        </style>
        <?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');
        }
        ?>