<?php $this->session->set_userdata('course_id', $course->rand_id);
$get_cookie = get_cookie('course_id_' . $course->rand_id);
?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<link rel="stylesheet" href="<?php echo base_url() ?>assets/social_share/css/social-share-kit.css" type="text/css">
<script src="https://cdn.plyr.io/3.7.8/plyr.js"></script>
<link rel="stylesheet" href="https://cdn.plyr.io/3.7.8/plyr.css" />
<style type="text/css">
   .btn {
      border-radius: 0 !important;
   }

   .top-bar {
      display: none !important;
   }

   .sst,
   #back-to-top,
   .newsletter-new,
   .footer-main {
      display: none !important;
   }

   .smllogo {
      padding: 0.75rem 0;
      margin: auto !important;
      /* float: center; */
      width: 200px;
   }
</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');
}
?>
<!--Section-->
<?php
if ($course->course_adv_payment) {
   if ($course->online_training_has_discount == 1) {
      $amt = $course->online_training_discount;
      $amount = $course->course_adv_payment;
      $rest = $course->online_training_discount - $course->course_adv_payment;
   } else {
      $amt = $course->online_training_price;
      $amount = $course->course_adv_payment;
      $rest = $course->online_training_price - $course->course_adv_payment;
   }
} else {
   if ($course->online_training_has_discount == 1) {
      $amt = $course->online_training_discount;
      $amount = $course->online_training_discount;
      $rest = 0;
   } else {
      $amt = $course->online_training_price;
      $amount = $course->online_training_price;
      $rest = 0;
   }
}
?>
<div class="mainSection" style="background:#102349 !important;">
   <div class="sptb-1" style="padding-top: 70px;">
      <div class="header-text1 mb-0">
         <div class="container">
            <div class="row">
               <div class="col-xl-8 col-lg-7 col-md-12">
                  <div>
                     <h1 class=" display-5 font-weight-semibold text-white"><?php echo $course->title ?></h1>
                     <div class="d-block d-md-flex align-items-center mb-5">
                        <span class=" ms-3 text-warning"><i class="fe fe-user "></i> 1500+ Enrolled </span>
                        <span class="ms-4">
                           <i class="fa fa-star text-warning"></i>
                           <i class="fa fa-star text-warning"></i>
                           <i class="fa fa-star text-warning"></i>
                           <i class="fa fa-star text-warning"></i>
                           <i class="fa fa-star"></i>
                           <span class="text-warning">(1100)</span>
                        </span>
                        <span class="ms-3 text-warning"><i class="fe fe-bar-chart "></i> <?php echo ucfirst($course->level); ?> </span>
                     </div>
                     <p class=" lead text-white"> <?php echo $course->short_description ?></p>
                     <div class="text-center-2">
                        <a href="javascript:void(0)" onclick="open_free_live_course_model(2)" class="btn-secondary btn btn-lg" style="border-radius: 0;background-color: <?php echo $visual_setting->color_5; ?>!important;border-color: <?php echo $visual_setting->color_5; ?>!important;color:#fff">Get Free Live Video<span class="text-white"><i class="fa fa-video-camera ms-1 text-white"></i></span></a>
                        <a onclick="open_free_demo_course_model(3)" style="border-radius: 0;background-color: <?php echo $visual_setting->color_4; ?>!important;border-color: <?php echo $visual_setting->color_4; ?>!important;color:#fff" href="javascript:void(0)" class="btn-secondary btn btn-lg padding">Book A Free Trail <span class="text-white"><i style="color:#fff!important" class="fa fa-desktop ms-1 text-white"></i></span></a>
                     </div>
                  </div>
               </div>
               <div class="col-xl-4 col-lg-5 col-md-12">
                  <div class="card d-lg-block d-none">
                     <div class="card-body p-1">
                        <div class="product-slider">
                           <ul class="list-unstyled video-list-thumbs">
                              <?php
                              if ($course->video_url) {
                                 $link = $course->video_url;
                                 $video_id = explode("?v=", $link);
                                 $video_id = $video_id[1];
                                 $thumbnail = "http://img.youtube.com/vi/" . $video_id . "/maxresdefault.jpg";
                              ?>
                                 <li class="mb-0">
                                    <a data-bs-toggle="modal" data-bs-target="#homeVideo" class="class-video p-0">
                                       <img loading="lazy" src="<?php echo $thumbnail; ?>" alt="<?php echo $course->title ?>" class="img-responsive  border br-7">
                                       <span class="video-icon" href="javascript:void(0)"><i class="fe fe-play"></i></span>
                                    </a>
                                 </li>
                              <?php } else { ?>
                                 <li class="mb-0">
                                    <a class="class-video p-0">
                                       <img loading="lazy" src="<?php echo base_url(); ?><?php echo $course->image ?>" alt="<?php echo $course->title ?>" class="img-responsive  border br-7">
                                    </a>
                                 </li>
                              <?php } ?>
                           </ul>
                        </div>
                        <div class="text-center">
                           <div class="wideget-user-tab wideget-user-tab4 pt-3">
                              <div class="tab-menu-heading">
                                 <div class="tabs-menu1">
                                    <ul class="nav" style=" justify-content: center;">
                                       <li class="ms-0"><a href="#tab-8" class="active btn" data-bs-toggle="tab" style="padding: 5px 12px 5px 12px;color: #fff!important;background: #acabaf;font-size: 14px;">In Class <i style="font-size:17px" class="fe fe-user"></i></a></li>
                                       <li><a href="#tab-6" style="padding: 5px 12px 5px 12px;color: #fff!important;background: #acabaf;font-size: 14px;" data-bs-toggle="tab" class="btn">Online <i style="font-size:17px" class="fe fe-monitor"></i></a></li>
                                    </ul>
                                 </div>
                              </div>
                           </div>
                           <div class="tab-content border-0 pb-2 pt-2 bg-white details-tab-content" id="price_box">
                              <div class="tab-pane active" id="tab-8">
                                 <div class="mb-2">
                                    <h3>Price</h3>
                                    <?php
                                    if ($course->is_free_course == 1) : ?>
                                       <span class="font-weight-semibold h2 text-default-dark mb-0">FREE</span>
                                    <?php $ttl_price = 0;
                                    else : ?>
                                       <?php if ($course->discount_flag == 1) : ?>
                                          <span class="font-weight-semibold h2 text-default-dark mb-0">&#x20B9; <?php echo $ttl_price = $course->discounted_price; ?>
                                             <span class="ms-1 font-weight-normal fs-16 strike-text text-default">&#x20B9; <?php echo $course->price; ?></span>
                                          </span>
                                       <?php else : ?>
                                          <span class="font-weight-semibold h2 text-default-dark mb-0">
                                             <?php if ($course->price > 0) {
                                                echo ' &#x20B9;' . $course->price;
                                                $ttl_price = $course->price;
                                             } else {
                                                echo '<span style="color:green">FREE</span>';
                                                $ttl_price = 0;
                                             }
                                             ?></span>
                                    <?php endif;
                                    endif;
                                    ?>
                                 </div>
                                 <div class="">
                                    <a onclick="open_payment_model('in Class', '<?php echo $amount; ?>', '<?php echo $ttl_price; ?>')" href="javascript:void(0)" class="btn  btn-primary mb-xl-0" style="background-color:#28b738!important;border:#28b738!important"><span>Book a Seat <i class="fe fe-award"></i></span></a>
                                    <?php if ($course->syllabus) : ?>
                                       <a href="javascript:void(0)" onclick="open_model_1(1)" class="btn btn-secondary mb-xl-0" style="background-color:#fe5e08!important;border:#fe5e08!important"><span>Syllabus <i class="fe fe-download"></i></span></a>
                                    <?php endif; ?>
                                 </div>
                                 <small>You can reserve your set by paying &#x20B9;<?php echo $amount; ?>.</small>
                              </div>
                              <div class="tab-pane" id="tab-6">
                                 <div class="mb-2">
                                    <h3>Price</h3>
                                    <?php
                                    if ($course->is_free_course == 1) : ?>
                                       <span class="font-weight-semibold h2 text-default-dark mb-0">FREE</span>
                                    <?php else : ?>
                                       <?php if ($course->online_training_has_discount == 1) : ?>
                                          <span class="font-weight-semibold h2 text-default-dark mb-0">&#x20B9; <?php echo $ttl_price_1 =  $course->online_training_discount; ?>
                                             <span class="ms-1 font-weight-normal fs-16 strike-text text-default">&#x20B9; <?php echo $course->online_training_price; ?></span>
                                          </span>
                                       <?php else : ?>
                                          <span class="font-weight-semibold h2 text-default-dark mb-0"><?php
                                                                                                         if ($course->online_training_price > 0) {
                                                                                                            echo ' &#x20B9;' . $course->online_training_price;
                                                                                                            $ttl_price_1 = $course->online_training_price;
                                                                                                         } else {
                                                                                                            echo '<span style="color:green">FREE</span>';
                                                                                                            $ttl_price_1 = 0;
                                                                                                         }
                                                                                                         ?></span>
                                    <?php endif;
                                    endif;
                                    ?>
                                 </div>
                                 <div class="">
                                    <a onclick="open_payment_model('Online', '<?php echo $amount ?>', '<?php echo $ttl_price_1; ?>')" href="javascript:void(0)" class="btn  btn-primary mb-3 mb-xl-0" style="background-color:#28b738!important;border:#28b738!important"><span>Book a Seat<i class="fe fe-award"></i></span></a>
                                    <?php if ($course->online_syllabus) : ?>
                                       <a href="javascript:void(0)" onclick="open_model_1(1)" class="btn  btn-secondary mb-3 mb-xl-0" style="background-color:#fe5e08!important;border:#fe5e08!important"><span> Syllabus <i class="fe fe-download"></i></span></a>
                                    <?php endif; ?>
                                 </div>
                                 <small>You can reserve your set by paying &#x20B9;<?php echo $amount; ?>.</small>
                              </div>
                           </div>
                           <!--  <div style="margin-top:10px;">
                              <h6 style="margin-bottom: -10px;">Have a Queries? Ask out Experts</h6>
                              <div style="display: inline-block;font-size: 55px;"><i class="fa fa-phone-square"></i></div>
                              <div class="d-none" style="display: inline-block;text-align: left;padding-left: 10px;">
                                 <p style="font-size: 22px;margin-bottom: 0;"><b>+91-<?php echo $app_setting->mobile ?></b></p>
                                 <span style="font-size: 12px;padding-left:8px">Available 24x7 for your Queries</span>
                              </div>
                              </div> -->
                           <!-- <div class="p-3">
                              <div class="d-flex share-col" id="coupon">
                                 <a href="javascript:void(0)" onclick="share_model()" class="udlite-link-underline">Share</a>
                                 <?php if (!$get_cookie) : ?>
                                 <a href="javascript:void(0)" onclick="openNav()" class="udlite-link-underline">Apply Coupon</a>
                              <?php endif; ?>
                              </div>
                              </div> -->
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
      <!-- /header-text -->
   </div>
</div>

<!--/Section-->
<!--Section-->
<section class="sptb">
   <div class="container">
      <div class="row">
         <div class="col-xl-8 col-lg-8 col-md-12">
            <div class="card d-lg-none">
               <div class="card-body">
                  <div class="product-slider">
                     <ul class="list-unstyled video-list-thumbs">
                        <?php
                        if ($course->video_url) {
                           $link = $course->video_url;
                           $video_id = explode("?v=", $link);
                           $video_id = $video_id[1];
                           $thumbnail = "http://img.youtube.com/vi/" . $video_id . "/maxresdefault.jpg";
                        ?>
                           <li class="mb-0">
                              <a data-bs-toggle="modal" data-bs-target="#homeVideo" class="class-video p-0">
                                 <img loading="lazy" src="<?php echo $thumbnail; ?>" alt="<?php echo $course->title ?>" class="img-responsive  border br-7">
                                 <span class="video-icon" href="javascript:void(0)"><i class="fe fe-play"></i></span>
                              </a>
                           </li>
                        <?php } else { ?>
                           <li class="mb-0">
                              <a class="class-video p-0">
                                 <img loading="lazy" src="<?php echo base_url(); ?><?php echo $course->image ?>" alt="<?php echo $course->title ?>" class="img-responsive  border br-7">
                              </a>
                           </li>
                        <?php } ?>
                     </ul>
                  </div>
                  <div class="mt-4 mb-4 text-center">
                     <br />
                     <div class="wideget-user-tab wideget-user-tab4">
                        <div class="tab-menu-heading">
                           <div class="tabs-menu1">
                              <ul class="nav" style="justify-content: center;">
                                 <li class="ms-0"><a href="#tab-10" class="active btn" data-bs-toggle="tab" style="padding: 5px 12px 5px 12px;color: #fff!important;background: #acabaf;font-size: 14px;">In Class <i style="font-size:17px" class="fe fe-user"></i></a></li>
                                 <li><a href="#tab-11" style="padding: 5px 12px 5px 12px;color: #fff!important;background: #acabaf;font-size: 14px;" data-bs-toggle="tab" class="btn">Online <i style="font-size:17px" class="fe fe-monitor"></i></a></li>
                              </ul>
                           </div>
                        </div>
                     </div>
                     <div class="tab-content border-0 p-5 bg-white details-tab-content">
                        <div class="tab-pane active" id="tab-10">
                           <div class="mb-2">
                              <h3>Price</h3>
                              <?php if ($course->is_free_course == 1) : ?>
                                 <span class="font-weight-semibold h2 text-default-dark mb-0">FREE</span>
                              <?php $ttl_price_3 = 0;
                              else : ?>
                                 <?php if ($course->discount_flag == 1) : ?>
                                    <span class="font-weight-semibold h2 text-default-dark mb-0">&#x20B9; <?php echo $ttl_price_3 = $course->discounted_price; ?>
                                       <span class="ms-1 font-weight-normal fs-16 strike-text text-default">&#x20B9; <?php echo $course->price; ?></span>
                                    </span>
                                 <?php else : ?>
                                    <span class="font-weight-semibold h2 text-default-dark mb-0"> <?php
                                                                                                   if ($course->price > 0) {
                                                                                                      echo ' &#x20B9;' . $course->price;
                                                                                                      $ttl_price_3 = $course->price;
                                                                                                   } else {
                                                                                                      echo '<span style="color:green">FREE</span>';
                                                                                                      $ttl_price_3 = 0;
                                                                                                   }
                                                                                                   ?></span>
                                 <?php endif; ?>
                              <?php endif; ?>
                           </div>
                           <div class="">
                              <a onclick="open_payment_model('in Class', '<?php echo $amount; ?>', '<?php echo $ttl_price_3; ?>')" href="javascript:void(0)" class="btn  btn-primary mb-xl-0" style="background-color:#28b738!important;border:#28b738!important"><span>Book a Seat <i class="fe fe-award"></i></span></a>
                              <?php if ($course->syllabus) : ?>
                                 <a href="javascript:void(0)" onclick="open_model_1(1)" class="btn btn-secondary mb-xl-0" style="background-color:#fe5e08!important;border:#fe5e08!important"><span> Syllabus <i class="fe fe-download"></i></span></a>
                              <?php endif; ?>
                           </div>
                           <small>You can reserve your set by paying &#x20B9;<?php echo $amount; ?>.</small>
                        </div>
                        <div class="tab-pane" id="tab-11">
                           <div class="mb-2">
                              <h3>Price</h3>
                              <?php if ($course->is_free_course == 1) : ?>
                                 <span class="font-weight-semibold h2 text-default-dark mb-0">FREE</span>
                              <?php else : ?>
                                 <?php if ($course->online_training_has_discount == 1) : ?>
                                    <span class="font-weight-semibold h2 text-default-dark mb-0">&#x20B9; <?php echo $ttl_price_4 = $course->online_training_discount; ?>
                                       <span class="ms-1 font-weight-normal fs-16 strike-text text-default">&#x20B9; <?php echo  $course->online_training_price; ?></span>
                                    </span>
                                 <?php else : ?>
                                    <span class="font-weight-semibold h2 text-default-dark mb-0"> <?php
                                                                                                   if ($course->online_training_price > 0) {
                                                                                                      echo ' &#x20B9;' . $course->online_training_price;
                                                                                                      $ttl_price_4 = $course->online_training_price;
                                                                                                   } else {
                                                                                                      echo '<span style="color:green">FREE</span>';
                                                                                                      $ttl_price_4 = 0;
                                                                                                   }
                                                                                                   ?></span>
                                 <?php endif; ?>
                              <?php endif; ?>
                           </div>
                           <div class="">
                              <a onclick="open_payment_model('Online', '<?php echo $amount ?>', '<?php echo $ttl_price_4; ?>')" href="javascript:void(0)" class="btn  btn-primary mb-3 mb-xl-0" style="background-color:#28b738!important;border:#28b738!important"><span>Book a Seat<i class="fe fe-award"></i></span></a>
                              <?php if ($course->online_syllabus) : ?>
                                 <a href="javascript:void(0)" onclick="open_model_1(2)" class="btn  btn-secondary mb-3 mb-xl-0" style="background-color:#fe5e08!important;border:#fe5e08!important"><span> Syllabus <i class="fe fe-download"></i></span></a>
                              <?php endif; ?>
                           </div>
                           <small>You can reserve your set by paying &#x20B9;<?php echo $amount; ?>.</small>
                        </div>
                     </div>
                     <!-- <div style="margin-top:10px;">
                        <h6 style="margin-bottom: -10px;">Have a Queries? Ask out Experts</h6>
                        <div style="display: inline-block;font-size: 55px;"><i class="fa fa-phone-square"></i></div>
                        <div style="display: inline-block;text-align: left;padding-left: 10px;">
                           <p style="font-size: 22px;margin-bottom: 0;"><b>+91-<?php echo $app_setting->mobile ?></b></p>
                           <span style="font-size: 12px;padding-left:8px">Available 24x7 for your Queries</span>
                        </div>
                        </div>
                        <div class="p-3">
                        <div class="d-flex share-col">
                           <a href="javascript:void(0)" onclick="share_model()" class="udlite-link-underline">Share</a>
                           <a href="javascript:void(0)" onclick="openNav()" class="udlite-link-underline">Apply Coupon</a>
                        </div>
                        </div> -->
                  </div>
               </div>
            </div>
         </div>
         <div class="row">
            <div class="col-xl-12 col-lg-12 col-md-12">
               <div class="border-0 mb-5 " id="Overview">
                  <?php if ($course->description) : ?>
                     <div class="card">
                        <div class="card-header">
                           <h3 class="card-title"><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Overview</h3>
                        </div>
                        <div class="card-body">
                           <div class="mb-0 description">
                              <?php echo $course->description ?>
                           </div>
                           <h3 class="card-title mb-3 font-weight-bold">What Will I Learn?</h3>
                           <ul class="list-group mb-5 description">
                              <?php $items =  count(json_decode($course->outcomes)); ?>
                              <?php
                              foreach (json_decode($course->outcomes) as $row) {
                              ?>
                                 <li class="mb-0">
                                    <p><i class="fa fa-caret-right me-1 text-primary" aria-hidden="true"></i><?php echo $row; ?></p>
                                 </li>
                              <?php }; ?>
                           </ul>
                           <h4 class="card-title mb-3 font-weight-bold">Requirements</h4>
                           <div class="row">
                              <?php $items =  count(json_decode($course->requirements));
                              //Columns must be a factor of 12 (1,2,3,4,6,12)
                              $numOfCols = 2;
                              $rowCount = 0;
                              $bootstrapColWidth = 12 / $numOfCols;
                              ?>
                              <div class="row">
                                 <?php
                                 foreach (json_decode($course->requirements) as $row) {
                                 ?>
                                    <div class="col-md-<?php echo $bootstrapColWidth; ?>">
                                       <ul class="list-unstyled widget-spec-1">
                                          <li class="text-default-dark"><i class="text-default fe fe-check"></i><span> <?php echo $row; ?></span></li>
                                       </ul>
                                    </div>
                                 <?php
                                    $rowCount++;
                                    if ($rowCount % $numOfCols == 0) echo '</div><div class="row">';
                                 }
                                 ?>
                              </div>
                           </div>
                        </div>
                     </div>
                  <?php endif; ?>
                  <style>
                     .accordion-button:not(.collapsed),
                     .accordion-button:focus {
                        outline: none;
                        border-color: transparent;
                        box-shadow: none;
                        background-color: transparent;
                     }

                     .accordion-button::after {
                        content: "\f078";
                        font-family: "Font Awesome 6 Free";
                        font-weight: 900;
                        position: absolute;
                        left: 1rem;
                        /* top: 50%; */
                        transform: translateY(-50%);
                        font-size: 1rem;
                        transition: transform 0.3s ease;
                        background-image: none !important;
                        background-color: #fff;
                        color: red;
                     }

                     .accordion-button.collapsed::after {
                        content: "\f078";
                        position: absolute;
                        left: 1rem;
                        top: 50%;
                        transform: translateY(-50%);
                        /* Font Awesome chevron up icon */
                     }

                     .ac-lecture li {
                        margin: 0 !important;
                     }

                     .ac-lecture li a {
                        padding: 10px 15px;
                        color: #000;
                     }

                     .ac-lecture li a {
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        padding: 7px 10px;
                        border-radius: 5px;
                     }

                     .ac-lecture li a span {
                        font-size: 15px;
                     }

                     .ellipsis-line-2 {
                        display: -webkit-box !important;
                        -webkit-line-clamp: 2;
                        -webkit-box-orient: vertical;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        white-space: normal;
                     }

                     .ac-lecture li a span i {
                        font-size: 19px;
                     }

                     .ac-lecture li a span i {
                        color: var(--theme-color-1);
                        font-size: 15px;
                        margin-right: 14px;
                     }

                     .ac-lecture li a .lecture-info {
                        font-size: 13px;
                     }
                  </style>
                  <div class="card " id="Trainer">
                     <div class="card-header">
                        <h3 class="card-title "><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Curriculum</h3>
                     </div>
                     <div class="card-body">
                        <div class="mb-4">
                           <div class="accordion accordion-flush" id="accordionFlushExample">
                              <?php
                              $a = 1;
                              $this->db->order_by('order', 'ASC');
                              $this->db->where('course_id', $course->c_id);
                              $allSection = $this->db->get('section')->result();
                              foreach ($allSection as $key => $section) :
                                 $this->db->order_by('order', 'ASC');
                                 $this->db->where('section_id', $section->id);
                                 $all_lession = $this->db->get('lesson')->result();
                              ?>
                                 <div class="accordion-item rounded-3 border-0 shadow mb-2">
                                    <h2 class="accordion-header">
                                       <button class="accordion-button border-bottom collapsed fw-semibold" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapse_<?php echo $a; ?>" aria-expanded="false" aria-controls="flush-collapse_<?php echo $a; ?>">
                                          <div class="row w-100 ms-5">
                                             <div class="col-auto accordion-item-title d-flex flex-column">
                                                <span><?php echo $section->title; ?></span>
                                             </div>
                                             <div class="col-auto ms-auto pe-0">
                                                <span class="ms-auto me-2 pe-2 border-end text-14px text-muted fw-400">
                                                   <?php echo count($all_lession); ?> Lessons </span>
                                                <!-- <span class="me-0 text-14px text-muted fw-400">
                                                18:50:32 Hours </span> -->
                                             </div>
                                          </div>
                                       </button>
                                    </h2>
                                    <div id="flush-collapse_<?php echo $a; ?>" class="accordion-collapse collapse" data-bs-parent="#accordionFlushExample">
                                       <div class="accordion-body">
                                          <ul class="ac-lecture">
                                             <?php foreach ($all_lession as $lession) : ?>
                                                <li>
                                                   <?php if ($lession->video_type == 'YouTube' && $lession->is_free == 1) : ?>
                                                      <a href="javascript:void(0)" onclick="openVideoModel('<?php echo $lession->video_url; ?>')" class="checkPropagation">
                                                      <?php else : ?>
                                                         <a href="#" class="checkPropagation">
                                                         <?php endif; ?>
                                                         <span class="d-flex  ellipsis-line-2">
                                                            <i class="fa-regular fa-circle-play"></i>
                                                            <?php echo $lession->title; ?></span>

                                                         <?php if ($lession->lesson_type == 'video') : ?>
                                                            <div class="d-flex justify-content-center">
                                                               <span class="badge badge-success badge-pill me-3"><i class="fa fa-eye text-white"></i>Preview</span>
                                                               <div class="lecture-info align-content-center" style="width: 60px"><?php echo substr($lession->duration, 3); ?> min</div>
                                                            </div>
                                                         <?php endif; ?>
                                                      </a>
                                                </li>
                                             <?php endforeach ?>
                                          </ul>
                                       </div>
                                    </div>
                                 </div>
                              <?php $a++;
                              endforeach; ?>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
               <?php $all_lession = $this->course_model->get_all_lession_by_course($id_course->id);
               if ($all_lession) :
               ?>
                  <script type="text/javascript">
                     $(document).on('click', '.clickable', function(e) {
                        var $this = $(this);
                        if (!$this.hasClass('panel-collapsed')) {
                           $this.parents('.panel').find('.panel-body').slideUp();
                           $this.addClass('panel-collapsed');
                           $this.find('i').removeClass('glyphicon-chevron-up').addClass('glyphicon-chevron-down');
                        } else {
                           $this.parents('.panel').find('.panel-body').slideDown();
                           $this.removeClass('panel-collapsed');
                           $this.find('i').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up');
                        }
                     })
                  </script>
                  <style type="text/css">
                     .clickable {
                        cursor: pointer;
                     }

                     .card-header .card-tools {
                        float: right;
                        margin-right: -0.625rem;
                     }
                  </style>
                  <div class="card " id="Curriculum">
                     <div class="card-header">
                        <h3 class="card-title "><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Curriculum</h3>
                        <?php if ($course->curriculum_pdf) : ?>
                           <a href="javascript:void(0)" onclick="open_model_10()" style="margin-left:20px" class="btn btn-success btn-sm pull-right pl-5 ml-5"><i class="fa fa-download"></i></a>
                        <?php endif; ?>
                     </div>
                     <div class="card-body">
                        <?php
                        $lession_d = 0;
                        foreach ($all_lession as $key => $lession) {
                           $lession_d += count(json_decode($lession->content));
                        }
                        $a = 1;
                        foreach ($all_lession as $key => $lession) : ?>
                           <div class="mb-4 panel le--sss">
                              <h4 class="clickable card-title mb-1">
                                 <div class="row">
                                    <div class="col-sm-6">
                                       Module <?php echo $a; ?>. <?php echo $lession->l_title; ?>
                                    </div>
                                    <?php
                                    $lesst = 0;
                                    for ($g = 0; $g < count(json_decode($lession->content)); $g++) :
                                       $lessio_co = json_decode($lession->content)[$g];
                                       $myArray = explode(',', $lessio_co);
                                       foreach ($myArray as $keyy => $value) :
                                          $lesst += count($value);
                                       endforeach;
                                    endfor; ?>
                                    <div class="col-sm-5">
                                       <?php $ass_pdf = $this->course_model->get_ass_pdf_by_c_id_and_lession_id($lession->course, $lession->l_id); ?>
                                       <?php $mini_pdf = $this->course_model->get_mini_pdf_by_c_id_and_lession_id($lession->course, $lession->l_id); ?>
                                       <span style="font-size:13px"><i class="fa fa-paperclip"></i> <?php echo count($ass_pdf); ?> Assignment | <i class="fa fa-file"></i> <?php echo count($mini_pdf); ?> Practical | <i class="fa fa-book"></i> <?php echo $lesst; ?> Lession</span>
                                    </div>
                                    <div class="col-sm-1">
                                       <span class="pull-right"><i class="glyphicon glyphicon-chevron-down"></i></span>
                                    </div>
                                 </div>
                              </h4>
                              <div class="panel-body pt-1" style="display: none;">
                                 <p class="mb-0"><?php echo $lession->l_description; ?></p>
                                 <?php $r = 1;
                                 for ($c = 0; $c < count(json_decode($lession->content)); $c++) :
                                    $lessio_co = json_decode($lession->content)[$c];
                                    $myArray = explode(',', $lessio_co);
                                 ?>
                                    <?php
                                    $rty = json_decode($lession->section)[$c];
                                    if ($rty) {
                                       echo '<p class="pt-3 pb-0 mb-1"><b>Lession ' . $r . ' - ' . $rty . '</b></p>';
                                    }; ?>
                                    <?php
                                    foreach ($myArray as $keyy => $value) : ?>
                                       <p class="mb-0" style="padding-left: 30px;"><i class="fa fa-check"></i> <?php echo $value; ?> </p>
                                 <?php endforeach;
                                    $r++;
                                 endfor; ?>
                              </div>
                           </div>
                        <?php $a++;
                        endforeach; ?>
                     </div>
                  </div>
               <?php endif;
               $all_upcoming_batches = $this->frontend_model->get_all_upcoming_batches_by_course_id($course->c_id);
               if ($all_upcoming_batches) : ?>
                  <div class="card " id="Upcomming">
                     <div class="card-header">
                        <h3 class="card-title "><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Upcomming Batch</h3>
                     </div>
                     <div class="card-body">
                        <div class="row">
                           <?php $r = 1;
                           foreach ($all_upcoming_batches as $upcoming_batches) : ?>
                              <div class="col-lg-12 col-md-12 col-12 <?php if ($r > 1) {
                                                                        echo 'mt-5';
                                                                     } ?>">
                                 <div class="card-d">
                                    <div class="d-card">
                                       <div class="row">
                                          <div class="col-sm-9">
                                             <div class="mobile-inline">
                                                <?php if ($upcoming_batches->batches_category == 1) : ?>
                                                   <span class="tag-tag"><i class="fa fa-play-circle-o" aria-hidden="true"></i> Recorded</span>
                                                <?php elseif ($upcoming_batches->batches_category == 2) : ?>
                                                   <span class="tag-tag"><i style="color:red" class="fa fa-circle blink_me" aria-hidden="true"></i> Live Virtual</span>
                                                <?php else : ?>
                                                   <span class="tag-tag"><img loading="lazy" src="<?php echo base_url() ?>assets/online-learning.png" width="20"> Face2Face Class</span>
                                                <?php endif; ?>
                                                <span class="tag-tag"><i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo $upcoming_batches->duration ?></span>
                                                <span class="tag-tag"><i class="fa fa-calendar" aria-hidden="true"></i> Batch start on <?php echo date("d-m-Y", strtotime($upcoming_batches->batches_start_date)); ?></span>
                                             </div>
                                             <!-- <h5 class="mt-5 mobile-padding"><b><a href="<?php echo base_url() ?>course-details/<?php echo $upcoming_batches->slug; ?>/<?php echo $upcoming_batches->rand_id ?>"><?php echo $upcoming_batches->title ?> <i class="fa fa-long-arrow-right" aria-hidden="true"></i></a></b>
                                          <?php if ($upcoming_batches->batches_tag) : ?>
                                             <span class="COI-preferred"><?php echo $upcoming_batches->batches_tag ?></span>
                                          <?php endif; ?>
                                          </h5> -->
                                             <p class="mt-3"><?php echo $upcoming_batches->batches_description; ?></p>
                                             <div class="chech-display">
                                                <?php foreach (json_decode($upcoming_batches->batches_options) as $batches_options) : ?>
                                                   <a class="new-a"><i aria-hidden="true" class="fa fa-check"></i> <?php echo $batches_options; ?></a>
                                                <?php endforeach; ?>
                                             </div>
                                             <?php if ($upcoming_batches->batches_category == 3) : ?>
                                                <div class=" mt-3"><i class="fa fa-map-marker" aria-hidden="true"></i> Locations:
                                                   <?php $branch_address = $this->branch_model->get_all_barnch_address_for_face_course();
                                                   $rrt = '';
                                                   foreach (array_slice($branch_address, 0, 3) as $keyy => $address) {

                                                      $rrt .= '| <b><a href="' . base_url() . '/branch/' . $address->slug . '">' . ucwords(strtolower($address->name)) . '</a></b>&nbsp;';

                                                      if ($keyy == 3) {
                                                         $rrt .= '<a href="#" class="btn btn-sm text-white">View All </a>';
                                                      }
                                                   }
                                                   echo substr($rrt, 1);;
                                                   ?>
                                                </div>
                                             <?php endif; ?>
                                          </div>
                                          <div class="col-sm-3 ">
                                             <div class="price-display" style="text-align:center">
                                                <span class="price-set">
                                                   <b>
                                                      <?php if ($upcoming_batches->online_training_has_discount == 1) : ?>
                                                         <b style="font-size:22px">₹<?php echo $upcoming_batches->online_training_discount; ?>/-</b>
                                                         <span class="badge badge-success" style="margin-top:-10px"><?php $per_data =  (($upcoming_batches->price - $upcoming_batches->discounted_price) * 100) / $upcoming_batches->price;
                                                                                                                     echo round($per_data);
                                                                                                                     ?>% off</span>
                                                      <?php else : ?>
                                                         <b style="font-size:22px">₹<?php echo $upcoming_batches->online_training_price; ?>/-</b>
                                                      <?php endif; ?>
                                                   </b>
                                                </span>
                                                <?php if ($upcoming_batches->online_training_has_discount == 1) : ?>
                                                   <span class="price-set" style="display:block;text-align: center;">
                                                      <b><del style="font-size:17px">₹<?php echo $upcoming_batches->online_training_price; ?>/-</del>
                                                      </b>
                                                   </span>
                                                <?php endif; ?>
                                                <div class="jumbotron countdown show" data-Date='<?php echo date("Y/m/d", strtotime($upcoming_batches->batches_start_date)); ?> 23:59:59'>
                                                   <span class="price-set hurry" style="display:block;text-align: center;">
                                                      <a href="<?php echo base_url() ?>home/up_batch_payment/<?php echo $upcoming_batches->rand_id; ?>/<?php echo $upcoming_batches->batches_id ?>" class="btn text-white btn7 new-btn mt-3 query-modal-button btn-sm">Book Your Slot</a>
                                                   </span>
                                                   <span style="display:block;text-align: center;" class="text-center mt-3 hurry">Hurry Up !!</span>
                                                   <div class="running">
                                                      <timer>
                                                         <span class="days"></span>:<span class="hours"></span>:<span class="minutes"></span>:<span class="seconds"></span>
                                                      </timer>
                                                   </div>
                                                   <span style="display:block;text-align: center;" class="text-center hurry">Time Left.</span>
                                                   <div class="ended">
                                                      <div class="text"> <button disabled class="btn text-white btn7 new-btn mt-3 query-modal-button btn-sm">Booking Close</button></div>
                                                   </div>
                                                </div>
                                             </div>
                                          </div>
                                       </div>
                                    </div>
                                 </div>
                              </div>
                           <?php $r++;
                           endforeach; ?>
                        </div>
                        <script src="<?php echo base_url() ?>assets/front/js/multi-countdown.js"></script>
                     </div>
                  </div>
                  <style type="text/css">
                     .card-d {
                        position: relative;
                        display: -ms-flexbox;
                        display: flex;
                        -ms-flex-direction: column;
                        flex-direction: column;
                        min-width: 0;
                        word-wrap: break-word;
                        background-color: #fff;
                        background-clip: border-box;
                        border: 1px solid rgba(0, 0, 0, .125);
                        border-radius: 0.25rem;
                     }

                     .d-card {
                        padding: 1rem;
                     }
                  </style>
               <?php
               endif;
               $all_training_batches = $this->frontend_model->get_all_batch_training();
               if ($all_training_batches) :
               ?>
                  <div class="card " id="Customize">
                     <div class="card-header">
                        <h3 class="card-title "><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Customize Training</h3>
                     </div>
                     <div class="card-body">
                        <div class="row">
                           <?php $s = 1;
                           foreach ($all_training_batches as $training) : ?>
                              <div class="col-lg-12 col-md-12 col-12 <?php if ($s > 1) {
                                                                        echo 'mt-5';
                                                                     } ?>">
                                 <div class="card-d">
                                    <div class="d-card">
                                       <div class="row">
                                          <div class="col-sm-9">
                                             <h5 class="mobile-padding"><b><?php echo $training->training_title; ?> </b>
                                             </h5>
                                             <div class="chech-display mt-3">
                                                <?php foreach (json_decode($training->training_options) as $training_options) : ?>
                                                   <a class="new-a"><i aria-hidden="true" class="fa fa-check"></i> <?php echo $training_options; ?></a>
                                                <?php endforeach; ?>
                                             </div>
                                          </div>
                                          <div class="col-sm-3 ">
                                             <div class="price-display" style="text-align:center">
                                                <span class="price-set" style="display:block;text-align: center;">
                                                   <a href="javascripti:void(0)" onclick="training_contact('<?php echo $training->training_id; ?>')" class="btn text-white btn7 new-btn mt-3 query-modal-button">Contact Us</a>
                                             </div>
                                             </span>
                                          </div>
                                       </div>
                                    </div>
                                 </div>
                              </div>
                           <?php $s++;
                           endforeach; ?>
                        </div>
                     </div>
                  </div>
               <?php endif; ?>
               <script type="text/javascript">
                  function training_contact(e) {
                     $('#training_contact').modal('show');
                     $('#training_id').val(e);
                  }
               </script>
               <div class="modal show" id="training_contact" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
                  <div class="modal-dialog" role="document">
                     <div class="modal-content" style="background-color:#e0e3e3">
                        <div class="modal-header" style="border-bottom: none;padding-bottom: 0!important;">
                           <button type="button" class="close" onclick="close_model()" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                           </button>
                        </div>
                        <div class="modal-body" style="padding-top: 0!important;">
                           <div style="padding:25px;padding-top: 0!important;">
                              <?php echo form_open(base_url() . 'home/apply_customize_training'); ?>
                              <h6 class="text-center" style="font-weight: 500;">CONGRATS, YOU'RE IN!</h6>
                              <h5 class="text-center">Complete Your Registration To Join Customize Training.</h5>
                              <div class="row" style="padding-top:20px">
                                 <div class="col-sm-6">
                                    <div class="form-group">
                                       <input type="text" class="form-control effect" name="f_name" required="" placeholder="Enter First Name *">
                                    </div>
                                 </div>
                                 <div class="col-sm-6">
                                    <div class="form-group">
                                       <input type="text" class="form-control effect" name="l_name" required="" placeholder="Enter Last Name *">
                                    </div>
                                 </div>
                                 <div class="col-sm-6">
                                    <div class="form-group">
                                       <input type="email" class="form-control effect" name="email" required="" id="email_new" placeholder="Enter Email ID *">
                                    </div>
                                 </div>
                                 <div class="col-sm-6">
                                    <div class="form-group">
                                       <input type="tel" name="mobile" required="" class="form-control effect" pattern="[0-9]{10}" placeholder="Enter Mobile No *">
                                       <input type="hidden" name="training_id" required="" id="training_id">
                                    </div>
                                 </div>
                                 <div class="col-sm-12">
                                    <div class="form-group">
                                       <div class="g-recaptcha" data-sitekey="<?php echo $app_setting->captcha_site_key; ?>"></div>
                                    </div>
                                 </div>
                                 <div class="col-sm-12">
                                    <button type="submit" class="block">Submit</button>
                                 </div>
                              </div>
                           </div>
                        </div>
                        <?php echo form_close(); ?>
                     </div>
                  </div>
               </div>
               <div class="card " id="Trainer">
                  <div class="card-header">
                     <h3 class="card-title "><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Trainer Profile</h3>
                  </div>
                  <div class="card-body">
                     <div class="mb-4">
                        <h5 class=""><?php echo $course->trainner_profile_heading ?></h5>
                        <p class="mb-0 mt-4"><?php echo $course->trainner_profile_content ?></p>
                     </div>
                  </div>
               </div>
               <div class="card " id="Certification">
                  <div class="card-header">
                     <h3 class="card-title "><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Certification</h3>
                  </div>
                  <div class="card-body">
                     <div class="mb-4">
                        <?php echo $course->certification ?>
                     </div>
                  </div>
               </div>
               <div class="card " id="Assignments">
                  <div class="card-header">
                     <h3 class="card-title "><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Assignments</h3>
                  </div>
                  <div class="card-body">
                     <div class="mb-4">
                        <?php echo $course->assignments ?>
                     </div>
                  </div>
               </div>
               <div class="card " id="Project">
                  <div class="card-header">
                     <h3 class="card-title "><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Practical</h3>
                  </div>
                  <div class="card-body">
                     <div class="mb-4">
                        <?php echo $course->project ?>
                     </div>
                  </div>
               </div>
               <div class="card" id="Ratings">
                  <div class="card-header">
                     <h3 class="card-title"><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Ratings</h3>
                  </div>
                  <div class="card-body">
                     <?php
                     $total_rate = 0;
                     $result = $this->db->select('sum(rate) as rates')
                        ->from('course_review')
                        ->where('course_id', $course->rand_id)
                        ->where('status', 1)
                        ->get()
                        ->row();
                     $rater = $this->db->select('rate')
                        ->from('course_review')
                        ->where('course_id', $course->rand_id)
                        ->where('status', 1)
                        ->get()
                        ->num_rows();
                     if ($result->rates != null) {
                        $total_rate = $result->rates / $rater;
                     }
                     $this->db->where('course_id', $course->rand_id);
                     $this->db->where('rate', 5);
                     $this->db->where('status', 1);
                     $rate5 = $this->db->get('course_review')->num_rows();
                     $this->db->where('course_id', $course->rand_id);
                     $this->db->where('rate', 4);
                     $this->db->where('status', 1);
                     $rate4 = $this->db->get('course_review')->num_rows();
                     $this->db->where('course_id', $course->rand_id);
                     $this->db->where('rate', 3);
                     $this->db->where('status', 1);
                     $rate3 = $this->db->get('course_review')->num_rows();
                     $this->db->where('course_id', $course->rand_id);
                     $this->db->where('rate', 2);
                     $this->db->where('status', 1);
                     $rate2 = $this->db->get('course_review')->num_rows();
                     $this->db->where('course_id', $course->rand_id);
                     $this->db->where('rate', 1);
                     $this->db->where('status', 1);
                     $rate1 = $this->db->get('course_review')->num_rows();
                     // Example data
                     $star1 = $rate1;
                     $star2 = $rate2;
                     $star3 = $rate3;
                     $star4 = $rate4;
                     $star5 = $rate5;

                     $tot_starss = $star1 + $star2 + $star3 + $star4 + $star5;
                     if ($tot_starss) {
                        $tot_stars = $tot_starss;
                     } else {
                        $tot_stars = 1;
                     }
                     for ($i = 1; $i <= 5; ++$i) {
                        $var = "star$i";
                        $count = $$var;
                        $percent = $count * 100 / $tot_stars;
                        $data[$i] = array('ss' => $percent);
                     }
                     ?>
                     <div class="row">
                        <div class="col-xl-4 text-center my-auto  border-end">
                           <div class="ratings-view">
                              <h1 class="text-view mb-0 font-weight-semibold fs-60"> <?php
                                                                                       if ($total_rate) {
                                                                                          echo number_format("$total_rate", 1, ".", ".");
                                                                                       } else {
                                                                                          echo "4.5";
                                                                                       }
                                                                                       ?></h1>
                              <p class="mb-0 font-weight-bold">Out Of 5.0</p>
                              <p class="text-warning mb-0">
                                 <?php
                                 $result1 = $this->db->select('sum(rate) as rates')
                                    ->from('course_review')
                                    ->where('course_id', $course->rand_id)
                                    ->where('status', 1)
                                    ->get()
                                    ->row();

                                 $rater1 = $this->db->select('rate')
                                    ->from('course_review')
                                    ->where('course_id', $course->rand_id)
                                    ->where('status', 1)
                                    ->get()
                                    ->num_rows();
                                 if ($result1->rates != null) {
                                    $total_rate1 = $result1->rates / $rater1;
                                    if (gettype($total_rate1) == 'integer') {
                                       for ($t1 = 1; $t1 <= $total_rate1; $t1++) {
                                          echo "<i class=\"fa fa-star\"></i>";
                                       }
                                       for ($tt1 = $total_rate1; $tt1 < 5; $tt1++) {
                                          echo "<i class=\"fa fa-star-o\"></i>";
                                       }
                                    } elseif (gettype($total_rate1) == 'double') {
                                       $pieces1 = explode(".", $total_rate1);
                                       for ($q1 = 1; $q1 <= $pieces1[0]; $q1++) {
                                          echo "<i class=\"fa fa-star\"></i>";
                                          if ($pieces1[0] == $q1) {
                                             echo "<i class=\"fa fa-star-half-o\"></i>";
                                             for ($qq1 = $pieces1[0]; $qq1 < 4; $qq1++) {
                                                echo "<i class=\"fa fa-star-o\"></i>";
                                             }
                                          }
                                       }
                                    } else {
                                       for ($w1 = 0; $w1 <= 4; $w1++) {
                                          echo "<i class=\"fa fa-star-o\"></i>";
                                       }
                                    }
                                 } else {
                                    for ($o1 = 0; $o1 <= 4; $o1++) {
                                       echo "<i class=\"fa fa-star-o\"></i>";
                                    }
                                 }
                                 ?>
                              </p>
                           </div>
                        </div>
                        <div class="col-xl-8 my-auto">
                           <div class="ps-0 ps-md-5">
                              <div class="row">
                                 <div class="col-2">
                                    <span class="font-weight-semibold">5stars</span>
                                 </div>
                                 <div class="col-8">
                                    <div class="progress mb-2 mt-2 h-2">
                                       <div class="progress-bar bg-primary" style="width:<?php //echo round($data[5]['ss']) 
                                                                                          ?>80%"></div>
                                    </div>
                                 </div>
                                 <div class="col-2">
                                    <span>(<?php //echo round($data[5]['ss']) 
                                             ?>80%)</span>
                                 </div>
                              </div>
                              <div class="row">
                                 <div class="col-2">
                                    <span class="font-weight-semibold">4stars</span>
                                 </div>
                                 <div class="col-8">
                                    <div class="progress mb-2 mt-2 h-2">
                                       <div class="progress-bar bg-primary" style="width:<?php //echo round($data[4]['ss']) 
                                                                                          ?>60%"></div>
                                    </div>
                                 </div>
                                 <div class="col-2">
                                    <span>(<?php //echo round($data[4]['ss']) 
                                             ?>60%)</span>
                                 </div>
                              </div>
                              <div class="row">
                                 <div class="col-2">
                                    <span class="font-weight-semibold">3stars</span>
                                 </div>
                                 <div class="col-8">
                                    <div class="progress mb-2 mt-2 h-2">
                                       <div class="progress-bar bg-primary" style="width:<?php //echo round($data[3]['ss']) 
                                                                                          ?>0%"></div>
                                    </div>
                                 </div>
                                 <div class="col-2">
                                    <span>(<?php //echo round($data[3]['ss']) 
                                             ?>0%)</span>
                                 </div>
                              </div>
                              <div class="row">
                                 <div class="col-2">
                                    <span class="font-weight-semibold">2stars</span>
                                 </div>
                                 <div class="col-8">
                                    <div class="progress mb-2 mt-2 h-2">
                                       <div class="progress-bar bg-primary" style="width:<?php //echo round($data[2]['ss']) 
                                                                                          ?>0%"></div>
                                    </div>
                                 </div>
                                 <div class="col-2">
                                    <span>(<?php //echo round($data[2]['ss']) 
                                             ?>0%)</span>
                                 </div>
                              </div>
                              <div class="row">
                                 <div class="col-2">
                                    <span class="font-weight-semibold">1stars</span>
                                 </div>
                                 <div class="col-8">
                                    <div class="progress mb-2 mt-2 h-2">
                                       <div class="progress-bar bg-primary" style="width:<?php //echo round($data[1]['ss']) 
                                                                                          ?>0%"></div>
                                    </div>
                                 </div>
                                 <div class="col-2">
                                    <span>(<?php //echo round($data[1]['ss']) 
                                             ?>0%)</span>
                                 </div>
                              </div>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
               <div class="card">
                  <div class="card-header">
                     <h3 class="card-title"><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Reviews</h3>
                  </div>
                  <div class="card-body">
                     <?php foreach ($all_reviews as $review) : ?>
                        <div class="media mt-0 p-5 border br-7 review-media">
                           <div class="d-flex me-3">
                              <a href="javascript:void(0)"><img loading="lazy" class="media-object brround avatar-lg" alt="64x64" src="<?php echo base_url() ?>uploads/user_icon.png"> </a>
                           </div>
                           <div class="media-body">
                              <h4 class="mt-0 mb-1 font-weight-semibold"><?php echo $review->name; ?>
                                 <small class="text-muted fs-14 float-end  ">
                                    <?php echo $this->setting_model->time_elapsed_string($review->date_time); ?>
                                 </small>
                              </h4>
                              <span class="fs-14">
                                 <?php if ($review->rate == 1) { ?>
                                    <i class="fa fa-star text-yellow"></i>
                                    <i class="fa fa-star text-gray"></i>
                                    <i class="fa fa-star text-gray"></i>
                                    <i class="fa fa-star text-gray"></i>
                                    <i class="fa fa-star text-gray"></i>
                                 <?php } elseif ($review->rate == 2) { ?>
                                    <i class="fa fa-star text-yellow"></i>
                                    <i class="fa fa-star text-yellow"></i>
                                    <i class="fa fa-star text-gray"></i>
                                    <i class="fa fa-star text-gray"></i>
                                    <i class="fa fa-star text-gray"></i>
                                 <?php } elseif ($review->rate == 3) { ?>
                                    <i class="fa fa-star text-yellow"></i>
                                    <i class="fa fa-star text-yellow"></i>
                                    <i class="fa fa-star text-yellow"></i>
                                    <i class="fa fa-star text-gray"></i>
                                    <i class="fa fa-star text-gray"></i>
                                 <?php } elseif ($review->rate == 4) { ?>
                                    <i class="fa fa-star text-yellow"></i>
                                    <i class="fa fa-star text-yellow"></i>
                                    <i class="fa fa-star text-yellow"></i>
                                    <i class="fa fa-star text-yellow"></i>
                                    <i class="fa fa-star text-gray"></i>
                                 <?php } elseif ($review->rate == 5) { ?>
                                    <i class="fa fa-star text-yellow"></i>
                                    <i class="fa fa-star text-yellow"></i>
                                    <i class="fa fa-star text-yellow"></i>
                                    <i class="fa fa-star text-yellow"></i>
                                    <i class="fa fa-star text-yellow"></i>
                                 <?php } ?>
                              </span>
                              <p class="font-13 fs-15 mb-2 mt-2">
                                 <?php
                                 echo $review->comments;
                                 ?>
                              </p>
                              <!--<a href="javascript:void(0)" class="me-2 text-primary"><i class="fa fa-thumbs-o-up me-2"></i>Helpful ?</a>
                              <a href="#" class="me-2 float-end"><span class="text-primary"><i class="fa fa-heart-o me-2"></i><?php //echo $review->like
                                                                                                                              ?> Likes</span></a>-->
                           </div>
                        </div>
                     <?php endforeach ?>
                     <div class="mt-2 border br-7">
                        <?php if ($this->session->userdata('bcount_sess_logged_in') == true) : ?>
                           <div class="ps-5 pt-5">
                              <h3 class="card-title">Leave a Review</h3>
                           </div>
                           <?php echo form_open(base_url() . 'home/submit_course_review'); ?>
                           <div class="card-body pb-0">
                              <div class="rating-stars d-flex pb-5">
                                 <h4 class="font-weight-semibold fs-14 me-4">Your Rating</h4>
                                 <div class="star-ratings start-ratings-main clearfix">
                                    <div class="stars stars-example-fontawesome stars-example-fontawesome">
                                       <div class="br-wrapper br-theme-fontawesome-stars">
                                          <select class="example-fontawesome" name="rate" autocomplete="off" style="display: none;">
                                             <option value="1">1</option>
                                             <option value="2">2</option>
                                             <option value="3">3</option>
                                             <option value="4" selected="">4</option>
                                             <option value="5">5</option>
                                          </select>
                                       </div>
                                    </div>
                                 </div>
                              </div>
                           </div>
                           <input type="hidden" name="course_id" value="<?php echo $course->rand_id ?>">
                           <div class="card-body border-top-0 pt-2">
                              <div class="form-group">
                                 <textarea required class="form-control" name="comments" rows="6" placeholder="Comment"></textarea>
                              </div>
                              <button type="submit" class="btn btn-primary">Submit</button>
                           </div>
                           <?php echo form_close(); ?>
                        <?php endif; ?>
                     </div>
                  </div>
               </div>
            </div>
            <?php $all_faq = $this->course_model->get_all_faq_by_course($id_course->id);
            if ($all_faq) : ?>
               <div class="card">
                  <div class="card-header">
                     <h3 class="card-title"><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; FAQ</h3>
                  </div>
                  <div class="card-body">
                     <?php
                     $faq_d = 0;
                     foreach ($all_faq as $key => $faq) {
                        $faq_d += count(json_decode($faq->f_content));
                     }
                     $a = 1;
                     foreach ($all_faq as $key => $faq) : ?>
                        <div class="mb-4">
                           <h5 class=""><?php echo $a; ?>. <?php echo $faq->f_title; ?></h5>
                           <?php for ($c = 0; $c < count(json_decode($faq->f_content)); $c++) :
                              $faq_co = json_decode($faq->f_content)[$c]; ?>
                              <p class="mb-0"><?php echo $faq_co; ?> </p>
                           <?php endfor; ?>
                        </div>
                     <?php $a++;
                     endforeach; ?>
                  </div>
               </div>
            <?php endif; ?>
            <h3 class="mb-5 mt-4">Related Course</h3>
            <!--Related Posts-->
            <div id="myCarousel5" class="profile-carousel owl-carousel owl-carousel-icons2">
               <?php $all_course_letest = $this->course_model->all_letest_course_for_course_page($course->id, $course->category_id);
               foreach ($all_course_letest as $key => $letest_course) : ?>
                  <div class="item">
                     <div class="card overflow-hidden">
                        <div class="item-card9-img">
                           <div class="item-card9-imgs">
                              <a href="<?php echo base_url() ?>course-details/<?php echo $letest_course->slug; ?>/<?php echo $letest_course->rand_id; ?>"></a>
                              <img loading="lazy" src="<?php echo base_url() ?><?php echo  $letest_course->image ?>" alt="<?php echo  $letest_course->title; ?>" class="cover-image">
                           </div>
                           <div class="item-card9-icons">
                              <a href="javascript:void(0)" class="item-card9-icons1 bg-primary"> <i class="fa fa fa-heart-o"></i></a>
                              <a href="javascript:void(0)" class="item-card9-icons1 bg-secondary"> <i class="fa fa fa-share-alt"></i></a>
                           </div>
                           <div class="item-overly-trans">
                              <a href="<?php echo base_url() ?>course-details/<?php echo $letest_course->slug; ?>/<?php echo $letest_course->rand_id; ?>" class="bg-primary">Popular</a>
                           </div>
                        </div>
                        <div class="card-body">
                           <div class="item-card9">
                              <a href="<?php echo base_url() ?>course-details/<?php echo $letest_course->slug; ?>/<?php echo $letest_course->rand_id; ?>" class="text-dark mt-2">
                                 <h3 class="font-weight-semibold mt-2 mb-2"><?php echo mb_strimwidth($letest_course->title, 0, 50, "..."); ?></h3>
                              </a>
                              <p class="mb-0"><?php echo  mb_strimwidth($letest_course->short_description, 0, 100, "..."); ?></p>
                           </div>
                           <!-- <div class="mt-2 mb-2">
                           <div class="rating-stars d-flex me-5">
                              <h4 class="font-weight-semibold me-2">4.2</h4>
                              <div class="star-ratings start-ratings-main clearfix me-3">
                                 <div class="stars stars-example-fontawesome stars-example-fontawesome-sm">
                                    <div class="br-wrapper br-theme-fontawesome-stars">
                                       <select class="example-fontawesome" name="rating" autocomplete="off" style="display: none;">
                                          <option value="1">1</option>
                                          <option value="2">2</option>
                                          <option value="3">3</option>
                                          <option value="4" selected="">4</option>
                                          <option value="5">5</option>
                                       </select>
                                    </div>
                                 </div>
                              </div>
                              (4,24,525)
                           </div>
                           </div> -->
                           <?php if ($letest_course->is_free_course == 1) : ?>
                              <h4 class="font-weight-semibold fs-20 text-dark pt-5"><i class="fe fe-tag mt-0 fs-18 me-2"></i>FREE</h4>
                           <?php else : ?>
                              <?php if ($letest_course->discount_flag == 1) : ?>
                                 <h4 class="font-weight-semibold fs-20 text-dark pt-5"><i class="fe fe-tag mt-0 fs-18 me-2"></i>&#x20B9; <?php echo $letest_course->discounted_price; ?></h4>
                              <?php else : ?>
                                 <h4 class="font-weight-semibold fs-20 text-dark pt-5"><i class="fe fe-tag mt-0 fs-18 me-2"></i>&#x20B9; <?php echo $letest_course->price; ?></h4>
                              <?php endif; ?>
                           <?php endif; ?>
                        </div>
                     </div>
                  </div>
               <?php endforeach; ?>
            </div>
            <!--  <h3 class="mb-5 mt-4">Latest Course</h3>
               <div class="card">
                  <div class="card-body pb-5">
                     <ul class="vertical-scroll">
                        <?php foreach ($all_letest_course as $key => $letest_course) : ?>
                        <li class="news-item">
                           <table>
                              <tr>
                                 <td><img loading="lazy" src="<?php echo base_url() ?><?php echo $letest_course->image ?>" alt="<?php echo $letest_course->title ?>" class="w-8 border me-2 p-2" /></td>
                                 <td class="ps-3">
                                    <?php if ($course->is_free_course == 1) : ?>
                                    <span class="float-end font-weight-bold">FREE</span>
                                    <?php else : ?>
                                    <?php if ($course->discount_flag == 1) : ?>
                                    <span class="float-end font-weight-bold">&#x20B9; <?php echo $course->discounted_price; ?></span>
                                    <?php else : ?>
                                    <span class="float-end font-weight-bold">&#x20B9; <?php echo $course->price; ?></span>
                                    <?php endif; ?>
                                    <?php endif; ?>
                                    <h4 class="mb-1 font-weight-semibold"><?php echo $letest_course->title ?></h4>
                                    <a href="<?php echo base_url() ?>course-details/<?php echo $letest_course->slug; ?>/<?php echo $letest_course->rand_id; ?>" class="btn-link text-muted">View Details</a>
                                 </td>
                              </tr>
                           </table>
                        </li>
                        <?php endforeach ?>
                     </ul>
                  </div>
               </div>-->
            <h3 class="mb-5 mt-4">Popular Course Category</h3>
            <div class="card">
               <div class="card-body">
                  <div class="product-tags clearfix">
                     <ul class="list-unstyled mb-0">
                        <?php foreach ($all_top_course as $key => $top_course) : ?>
                           <li><a href="<?php echo base_url() ?>course-details/<?php echo $top_course->slug; ?>/<?php echo $top_course->rand_id; ?>"><?php echo $top_course->title; ?></a></li>
                        <?php endforeach ?>
                     </ul>
                  </div>
               </div>
            </div>
         </div>
         <!--Right Side Content-->
         <div class="col-xl-4 col-lg-4 col-md-12 mt-lg-n23">
            <script type="text/javascript">
               function open_payment_model(e, price, main_p) {
                  $('#open_payment_model').modal('show');
                  $('#class').val(e);
                  $('#amount').val(price);
                  $('.tr_id').html(e);
                  $('.tr_rs').html('&#x20B9;' + price)
                  var due_p = main_p - price;
                  $('.tr_rest').html('&#x20B9;' + due_p)
               }

               function open_free_demo_course_model(e) {
                  $('#open_free_demo_course_model').modal('show');
               }

               function open_free_live_course_model(e) {
                  $('#open_free_live_course_model').modal('show');
               }
            </script>
            <div class="modal show" id="open_free_live_course_model" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
               <div class="modal-dialog" role="document">
                  <div class="modal-content">
                     <div class="modal-header" style="border-bottom: none;padding-bottom: 0!important;">
                        <button type="button" class="close" onclick="close_model()" data-dismiss="modal" aria-label="Close">
                           <span aria-hidden="true">&times;</span>
                        </button>
                     </div>
                     <div class="modal-body" style="padding-top: 0!important;">
                        <div style="padding:25px;padding-top: 0!important;">
                           <?php echo form_open(base_url() . 'home/apply_live_video_class_from_branch'); ?>
                           <h6 class="text-center" style="font-weight: 500;">CONGRATS, YOU'RE IN!</h6>
                           <h5 class="text-center">Complete Your Registration To Join Free Live Video Class.</h5>
                           <div class="row" style="padding-top:20px">
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <input type="text" class="form-control" name="f_name" required="" placeholder="Enter First Name *">
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <input type="text" class="form-control" name="l_name" required="" placeholder="Enter Last Name *">
                                 </div>
                              </div>
                              <div class="col-sm-12">
                                 <div class="form-group">
                                    <input type="email" class="form-control" name="email" required="" id="email_new" placeholder="Enter Email ID *">
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <input type="tel" class="form-control" name="mobile" pattern="[0-9]{10}" required="" placeholder="Enter Mobile No *">
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <select type="text" class="form-control effect" name="branch" required="">
                                       <option value="">Select Branch *</option>
                                       <?php
                                       $all_branch = $this->branch_model->get_all_branch();
                                       foreach ($all_branch as $key => $branch) : ?>
                                          <option value="<?php echo $branch->id; ?>"><?php echo $branch->name; ?></option>
                                       <?php endforeach; ?>
                                    </select>
                                 </div>
                              </div>
                              <div class="col-sm-12">
                                 <div class="form-group">
                                    <div class="g-recaptcha" data-sitekey="<?php echo $app_setting->captcha_site_key; ?>"></div>
                                 </div>
                              </div>
                              <input type="hidden" class="form-control" name="course" required="" value="<?php echo $id_course->rand_id ?>">
                              <input type="hidden" class="form-control" name="class" required="" value="0">
                              <input type="hidden" class="form-control" name="price" required="" id="amount">
                              <div class="col-sm-12">
                                 <button type="submit" class="block">Submit</button>
                              </div>
                           </div>
                        </div>
                     </div>
                     <?php echo form_close(); ?>
                  </div>
               </div>
            </div>
            <div class="modal show" id="open_free_demo_course_model" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
               <div class="modal-dialog" role="document">
                  <div class="modal-content">
                     <div class="modal-header" style="border-bottom: none;padding-bottom: 0!important;">
                        <button type="button" class="close" onclick="close_model()" data-dismiss="modal" aria-label="Close">
                           <span aria-hidden="true">&times;</span>
                        </button>
                     </div>
                     <div class="modal-body" style="padding-top: 0!important;">
                        <div style="padding:25px;padding-top: 0!important;">
                           <?php echo form_open(base_url() . 'home/apply_demo_class_from_branch'); ?>
                           <h6 class="text-center" style="font-weight: 500;">CONGRATS, YOU'RE IN!</h6>
                           <h5 class="text-center">Complete Your Registration To Join Free Demo Class.</h5>
                           <div class="row" style="padding-top:20px">
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <input type="text" class="form-control" name="f_name" required="" placeholder="Enter First Name *">
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <input type="text" class="form-control" name="l_name" required="" placeholder="Enter Last Name *">
                                 </div>
                              </div>
                              <div class="col-sm-12">
                                 <div class="form-group">
                                    <input type="email" class="form-control" name="email" required="" id="email_new" placeholder="Enter Email ID *">
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <input type="tel" class="form-control" name="mobile" required="" placeholder="Enter Mobile No *" pattern="[0-9]{10}">
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <select type="text" class="form-control effect" name="branch" required="">
                                       <option value="">Select Branch *</option>
                                       <?php
                                       $all_branch = $this->branch_model->get_all_branch();
                                       foreach ($all_branch as $key => $branch) : ?>
                                          <option value="<?php echo $branch->id; ?>"><?php echo $branch->name; ?></option>
                                       <?php endforeach; ?>
                                    </select>
                                 </div>
                              </div>
                              <div class="col-sm-12">
                                 <div class="form-group">
                                    <div class="g-recaptcha" data-sitekey="<?php echo $app_setting->captcha_site_key; ?>"></div>
                                 </div>
                              </div>
                              <input type="hidden" class="form-control" name="course" required="" value="<?php echo $id_course->rand_id ?>">
                              <input type="hidden" class="form-control" name="class" required="" value="0">
                              <input type="hidden" class="form-control" name="price" required="" id="amount">
                              <div class="col-sm-12">
                                 <button type="submit" class="block">Submit</button>
                              </div>
                           </div>
                        </div>
                     </div>
                     <?php echo form_close(); ?>
                  </div>
               </div>
            </div>
            <div class="modal show" id="open_payment_model" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
               <div class="modal-dialog" role="document">
                  <div class="modal-content">
                     <div class="modal-header" style="border-bottom: none;padding-bottom: 0!important;">
                        <button type="button" class="close" onclick="close_model()" data-dismiss="modal" aria-label="Close">
                           <span aria-hidden="true">&times;</span>
                        </button>
                     </div>
                     <div class="modal-body" style="padding-top: 0!important;">
                        <div style="padding:25px;padding-top: 0!important;">
                           <?php echo form_open(base_url() . 'home/request_for_course'); ?>
                           <h6 class="text-center" style="font-weight: 500;">CONGRATS, YOU'RE IN!</h6>
                           <p class="pt-2">You are choosing: <b class="tr_id"></b> training. Today you paying <b class="tr_rs"></b> for reserve your <b class="tr_id"></b> training seat balnace payment <b class="tr_rest"></b> you need to pay on your batch fisrt day.</p>
                           <h5 class="text-center" id="text_info1"></h5>
                           <h6 class="text-center">Don't worry we offerd EMI,Educational loan options.</h6>
                           <div class="row" style="padding-top:20px">
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <input type="text" class="form-control" name="f_name" required="" placeholder="Enter First Name *">
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <input type="text" class="form-control" name="l_name" required="" placeholder="Enter Last Name *">
                                 </div>
                              </div>
                              <div class="col-sm-12">
                                 <div class="form-group">
                                    <input type="email" class="form-control" name="email" required="" id="email_new" placeholder="Enter Email ID *">
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <input type="tel" class="form-control" name="mobile" required="" placeholder="Enter Mobile No *" pattern="[0-9]{10}">
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <select type="text" class="form-control " name="batch_slot" required="" placeholder="Enter Mobile No *">
                                       <option value="">Select Batch Slot * </option>
                                       <option value="">Eraly Morning</option>
                                       <option value="">Morning</option>
                                       <option value="">Afternoon</option>
                                       <option value="">Evening</option>
                                    </select>
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <input type="text" class="form-control" name="batch_time" required="" placeholder="Enter Preferd Batch time *">
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <select type="text" class="form-control " name="batch_slot" required="" placeholder="Enter Mobile No *">
                                       <option value="">Do you have own laptop * </option>
                                       <option value="1">Yes</option>
                                       <option value="2">No</option>
                                    </select>
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <select type="text" class="form-control " name="branch" required="">
                                       <option value="">Select Branch *</option>
                                       <?php
                                       $all_branch = $this->branch_model->get_all_branch();
                                       foreach ($all_branch as $key => $branch) : ?>
                                          <option value="<?php echo $branch->id; ?>"><?php echo $branch->name; ?></option>
                                       <?php endforeach; ?>
                                    </select>
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <input type="number" required name="pin_code" id="billing_pin_code" placeholder="Your Pin Code *" class="form-control" onchange="check_address(this)" />
                                 </div>
                              </div>
                              <div class="col-sm-12">
                                 <div class="form-group">
                                    <input name="address" placeholder="Enter Address *" class="form-control" required>
                                 </div>
                              </div>
                              <div class="col-sm-12">
                                 <div class="form-group">
                                    <select name="area" required class="form-control" id="area">
                                       <option value="">Select A Area</option>
                                    </select>
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <input name="city" placeholder="Enter City *" required readonly="" class="form-control" id="city">
                                 </div>
                              </div>
                              <div class="col-sm-6">
                                 <div class="form-group">
                                    <input id="state" name="state" placeholder="Enter State *" required readonly="" class="form-control">
                                 </div>
                              </div>
                              <div class="col-sm-12">
                                 <div class="form-group">
                                    <div class="g-recaptcha" data-sitekey="<?php echo $app_setting->captcha_site_key; ?>"></div>
                                 </div>
                              </div>
                              <input type="hidden" class="form-control" name="course_id" required="" value="<?php echo $id_course->id ?>">
                              <input type="hidden" class="form-control" name="class" required="" id="class">
                              <input type="hidden" class="form-control" name="price" required="" id="amount">
                              <div class="col-sm-12">
                                 <button type="submit" class="block">Submit</button>
                              </div>
                           </div>
                        </div>
                     </div>
                     <?php echo form_close(); ?>
                  </div>
               </div>
            </div>
            <script>
               function check_address(e) {
                  let pin_code = e.value;
                  $.ajax({
                     beforeSend: function() {
                        $(".preloader-ajax").show();
                        $(".preloader-ajax-bg").show();
                     },
                     type: "GET",
                     dataType: "JSON",
                     async: true,
                     url: '<?php echo base_url(); ?>home/get_pin_code_details/' + pin_code,
                     success: function(data) {
                        $('#area').html(data.area);
                        $('#city').val(data.city);
                        $('#state').val(data.state);
                        $(".preloader-ajax").hide();
                        $(".preloader-ajax-bg").hide();
                     },
                     error: function() {
                        $(".preloader-ajax").hide();
                        $(".preloader-ajax-bg").hide();
                     }
                  });
               }
            </script>
         </div>
         <!--/Right Side Content-->
      </div>
   </div>
</section>
<script type="text/javascript">
   function form_submit_2() {
      var f_name = $('#f_name').val();
      var l_name = $('#l_name').val();
      var email = $('#email_new').val();
      var course = $('#course').val();
      var class_1 = 1;
      var mobile = $('#mobile').val();

      $.ajax({
         url: '<?php echo base_url() ?>home/download_syllabus_pdf',
         type: 'POST',
         data: {
            f_name: f_name,
            l_name: l_name,
            email: email,
            course: course,
            class: class_1,
            mobile: mobile
         },
         success: function(data) {
            console.log(data);
            window.open(data, '_blank');
            alert('Syllabus Successfully Downloaded');
            location.reload();
         }
      })
   }
</script>
<!--/Section-->
<div class="modal show" id="download_cur_pdf" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
   <div class="modal-dialog" role="document">
      <div class="modal-content">
         <div class="modal-header" style="border-bottom: none;padding-bottom: 0!important;">
            <button type="button" class="close" onclick="close_model()" data-dismiss="modal" aria-label="Close">
               <span aria-hidden="true">&times;</span>
            </button>
         </div>
         <div class="modal-body" style="padding-top: 0!important;">
            <div style="padding:25px;padding-top: 0!important;">
               <form>
                  <h6 class="text-center" style="font-weight: 500;">CONGRATS, YOU'RE IN!</h6>
                  <h5 class="text-center" id="text_info70"></h5>
                  <div class="row" style="padding-top:20px">
                     <div class="col-sm-6">
                        <div class="form-group">
                           <input type="text" class="form-control" id="f_name" required="" placeholder="Enter First Name *">
                        </div>
                     </div>
                     <div class="col-sm-6">
                        <div class="form-group">
                           <input type="text" class="form-control" id="l_name" required="" placeholder="Enter Last Name *">
                        </div>
                     </div>
                     <div class="col-sm-6">
                        <div class="form-group">
                           <input type="email" class="form-control" required="" id="email_new" placeholder="Enter Email ID *">
                        </div>
                     </div>
                     <input class="form-control" type="hidden" id="course" value="<?php echo $course->rand_id ?>">
                     <input class="form-control" id="class_1" type="hidden">
                     <div class="col-sm-6">
                        <div class="form-group">
                           <input type="tel" class="form-control syl-mobile" id="mobile" required="" placeholder="Enter Mobile No *" pattern="[0-9]{10}">
                        </div>
                     </div>
                     <div class="col-sm-12">
                        <div class="form-group">
                           <div class="g-recaptcha" data-sitekey="<?php echo $app_setting->captcha_site_key; ?>"></div>
                        </div>
                     </div>
                     <div class="col-sm-12">
                        <button type="button" onclick="form_submit_2()" class="block">Download Syllabus !</button>
                     </div>
                  </div>
            </div>
         </div>
         </form>
      </div>
   </div>
</div>
<div class="modal show" id="download_syllabus" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
   <div class="modal-dialog" role="document">
      <div class="modal-content">
         <div class="modal-header" style="border-bottom: none;padding-bottom: 0!important;">
            <button type="button" class="close" onclick="close_model()" data-dismiss="modal" aria-label="Close">
               <span aria-hidden="true">&times;</span>
            </button>
         </div>
         <div class="modal-body" style="padding-top: 0!important;">
            <div style="padding:25px;padding-top: 0!important;">
               <form>
                  <h6 class="text-center" style="font-weight: 500;">CONGRATS, YOU'RE IN!</h6>
                  <h5 class="text-center" id="text_info7"></h5>
                  <div class="row" style="padding-top:20px">
                     <div class="col-sm-6">
                        <div class="form-group">
                           <input type="text" class="form-control" id="f_name_1" required="" placeholder="Enter First Name *">
                        </div>
                     </div>
                     <div class="col-sm-6">
                        <div class="form-group">
                           <input type="text" class="form-control" id="l_name_1" required="" placeholder="Enter Last Name *">
                        </div>
                     </div>
                     <div class="col-sm-6">
                        <div class="form-group">
                           <input type="email" class="form-control" required="" id="email_new_1" placeholder="Enter Email ID *">
                        </div>
                     </div>
                     <input class="form-control" type="hidden" id="course" value="<?php echo $course->rand_id ?>">
                     <input class="form-control" id="class_1" type="hidden">
                     <div class="col-sm-6">
                        <div class="form-group">
                           <input type="tel" class="form-control syl-mobile" id="mobile_1" required="" placeholder="Enter Mobile No *" pattern="[0-9]{10}">
                        </div>
                     </div>
                     <div class="col-sm-12">
                        <div class="form-group">
                           <div class="g-recaptcha" data-sitekey="<?php echo $app_setting->captcha_site_key; ?>"></div>
                        </div>
                     </div>
                     <div class="col-sm-12">
                        <button type="button" onclick="form_submit()" class="block">Download Syllabus !</button>
                     </div>
                  </div>
            </div>
         </div>
         </form>
      </div>
   </div>
</div>
<div class="modal show referal-friend-modal" id="referalModal" tabindex="-1" aria-labelledby="referalModalLabel" aria-hidden="true">
   <div class="modal-dialog ">
      <div class="modal-content">
         <div class="modal-header">
            <h5 class="modal-title" id="referalModalLabel">Share With Friends</h5>
            <button onclick="close_model()" type="button" class="btn-close" data-dismiss="modal" aria-label="Close">
               <span aria-hidden="true"></span>
            </button>
         </div>
         <div class="modal-body">
            <div class="input-group mb-3">
               <input type="text" class="form-control" id="shareURL" placeholder="Recipient's username" value="<?php echo $actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>?>" readonly>
               <div class="input-group-append">
                  <button class="btn btn-darkblue dL-referral-modal-social-btn" type="button" onclick="copyText()" style="border-top-left-radius:0;border-bottom-left-radius:0;" data-eventLabel="Copy Link Button" data-login_status="0" data-eventSource="Share Now Modal">Copy
                  </button>
               </div>
            </div>
            <div class="rounded-social-buttons">
               <div class="sharethis-inline-share-buttons"></div>
               <div class="ssk-group ssk-count">
                  <a style="color: #fff!important" href="#" class="ssk ssk-whatsapp" onClick="window.open('https://wa.me/?text=<?php echo $actual_link; ?>')"></a>
                  <a style="color: #fff!important" href="" class="ssk ssk-facebook"></a>
                  <a style="color: #fff!important" href="" class="ssk ssk-twitter"></a>
                  <a style="color: #fff!important" href="" class="ssk ssk-google-plus"></a>
                  <a style="color: #fff!important" href="" class="ssk ssk-pinterest"></a>
                  <a style="color: #fff!important" href="" class="ssk ssk-linkedin"></a>
                  <a style="color: #fff!important" href="" class="ssk ssk-email"></a>
               </div>
            </div>
         </div>
      </div>
   </div>
</div>
<style type="text/css">
   .sticky-footer {
      background: rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(6px);
      position: fixed;
      bottom: 0;
      width: 100%;
      z-index: 100;
   }

   .btn-2 .title {
      font-size: 15px !important;
      color: #fff;
      font-weight: 700;
      text-transform: uppercase;
   }

   .book-btn button.btn-2 {
      white-space: normal;
      width: 30%;
      border-radius: 0;
   }

   @media screen and (max-width: 992px) {
      .book-btn button.btn-2 {
         width: 100%;
      }
   }

   .btn-2 {
      -webkit-animation: bounce 1s infinite alternate;
      -moz-animation: bounce 1s infinite alternate;
      animation: bounce 1s infinite alternate;
   }

   @-webkit-keyframes bounce {
      to {
         -webkit-transform: scale(1.2);
      }
   }

   @-moz-keyframes bounce {
      to {
         -moz-transform: scale(1.2);
      }
   }

   @keyframes bounce {
      to {
         transform: scale(1.2);
      }
   }
</style>
<section class="sticky-footer">
   <div class="container">
      <div class="row">
         <div class="col-xl-12 col-lg-12 col-md-12 col-12">
            <div class="container botton-section book-btn mt-3 mb-3 hurry text-center">
               <div class="row ">
                  <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                     <div class="">
                        <button class="btn btntn btn-2" data-bs-toggle="modal" data-bs-target="#open_book_free_model">
                           <span class="title text-white">Book A Free Trial</span>
                           <div style="color:#fff;font-size:8px">Offer only first 25 Students</div>
                        </button>
                     </div>
                  </div>
               </div>
            </div>
         </div>
         <!-- <div class="col-xl-7 col-lg-7 col-md-7 col-6 d-none d-lg-block">
            <div class="row">
               <div class="col-xl-12 col-lg-12 col-md-12 mt-5 col-12">
                  <div class="text-white">
                     <div class="container">
                        <div class="row">
                           <div class="col-lg-12 col-md-12 col-12">
                              <div class="widget-title text-center">
                                 <h6 class="font-weight-semibold text-white">Pay Today only &#x20B9;<?php echo $amount; ?> & reserve  Your Seat at 50% Discount.</h6>
                              </div>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
            </div> -->
      </div>
   </div>
</section>
<div class="modal show" id="open_book_free_model" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
   <div class="modal-dialog" role="document">
      <div class="modal-content" style="background-color:#e0e3e3">
         <div class="modal-header" style="border-bottom: none;padding-bottom: 0!important;">
            <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
            </button>
         </div>
         <div class="modal-body" style="padding-top: 0!important;">
            <div style="padding:25px;padding-top: 0!important;">
               <?php echo form_open(base_url() . 'home/apply_new_reg'); ?>
               <h6 class="text-center" style="font-weight: 500;">CONGRATS, YOU'RE IN!</h6>
               <h5 class="text-center">Complete Your Registration To Join Book a Free trail class.</h5>
               <div class="row" style="padding-top:20px">
                  <div class="col-sm-6">
                     <div class="form-group">
                        <input type="text" class="form-control effect" name="f_name" required="" placeholder="Enter First Name *">
                     </div>
                  </div>
                  <div class="col-sm-6">
                     <div class="form-group">
                        <input type="text" class="form-control effect" name="l_name" required="" placeholder="Enter Last Name *">
                     </div>
                  </div>
                  <div class="col-sm-12">
                     <div class="form-group">
                        <input type="email" class="form-control effect" name="email" required="" id="email_new" placeholder="Enter Email ID *">
                     </div>
                  </div>
                  <div class="col-sm-6">
                     <div class="form-group">
                        <input type="tel" class="form-control" name="mobile" required="" placeholder="Enter Mobile No *" pattern="[0-9]{10}">
                     </div>
                  </div>
                  <div class="col-sm-6">
                     <div class="form-group">
                        <select type="text" class="form-control effect" name="class_training" placeholder="Enter Company Name" required="">
                           <option value="">Select Your Free Trail Mode *</option>
                           <option value="1">Online-At Zoom Meet</option>
                           <option value="2">Face2Face-At Branch</option>
                        </select>
                     </div>
                  </div>
                  <input type="hidden" name="course" value="<?php echo $course->c_id; ?>">
                  <div class="col-sm-12">
                     <div class="form-group">
                        <select type="text" class="form-control effect" name="branch" required="">
                           <option value="">Select Branch *</option>
                           <?php
                           $all_branch = $this->branch_model->get_all_branch();
                           foreach ($all_branch as $key => $branch) : ?>
                              <option value="<?php echo $branch->id; ?>"><?php echo $branch->name; ?></option>
                           <?php endforeach; ?>
                        </select>
                     </div>
                  </div>
                  <div class="col-sm-12">
                     <div class="form-group">
                        <div class="g-recaptcha" data-sitekey="<?php echo $app_setting->captcha_site_key; ?>"></div>
                     </div>
                  </div>
                  <div class="col-sm-12">
                     <button type="submit" class="block">Submit</button>
                  </div>
               </div>
            </div>
         </div>
         <?php echo form_close(); ?>
      </div>
   </div>
</div>
<!-- <div id="mySidenav" class="sidenav">
   <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
   <button class="spinBtn">CLICK 2 SPIN!</button>
   <div class="wheelContainer">
      <svg class="wheelSVG" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserve AspectRatio="xMidYMid meet" text-rendering="optimizeSpeed">
         <defs>
            <filter id="shadow" x="-100%" y="-100%" width="550%" height="550%">
               <feOffset in="SourceAlpha" dx="0" dy="0" result="offsetOut"></feOffset>
               <feGaussianBlur stdDeviation="9" in="offsetOut" result="drop" />
               <feColorMatrix in="drop" result="color-out" type="matrix" values="0 0 0 0   0
                  0 0 0 0   0 
                  0 0 0 0   0 
                  0 0 0 .3 0" />
               <feBlend in="SourceGraphic" in2="color-out" mode="normal" />
            </filter>
         </defs>
         <g class="mainContainer">
            <g class="wheel" />
         </g>
         <g class="centerCircle" />
         <g class="wheelOutline" />
         <g class="pegContainer">
            <path class="peg" fill="#EEEEEE" d="M22.139,0C5.623,0-1.523,15.572,0.269,27.037c3.392,21.707,21.87,42.232,21.87,42.232  s18.478-20.525,21.87-42.232C45.801,15.572,38.623,0,22.139,0z" />
         </g>
         <g class="valueContainer" />
      </svg>
      <div class="toast">
         <p />
      </div>
   </div>
   </div> -->
<div class="modal fade" id="homeVideo" tabindex="-1" role="dialog">
   <div class="modal-dialog" role="document">
      <div class="modal-content">
         <button type="button" class="btn btn-default" data-bs-dismiss="modal"><i class="fa fa-times"></i></button>
         <?php echo preg_replace("/\s*[a-zA-Z\/\/:\.]*youtube.com\/watch\?v=([a-zA-Z0-9\-_]+)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.]*)/i", "<iframe width=\"100%\" height=\"415\" src=\"//www.youtube.com/embed/$1\" frameborder=\"0\" allowfullscreen></iframe>", $course->video_url); ?>
      </div>
   </div>
</div>
<script>
   function openNav() {
      // document.getElementById("mySidenav").style.width = "100%";
   }

   function closeNav() {
      // document.getElementById("mySidenav").style.width = "0";
   }
</script>
<style type="text/css">
   .item-card9-img {
      /*  height: 100px; */
   }

   .wideget-user-tab .tabs-menu1 ul li .active {
      background-color: #c0392b !important;
      border: none;
      border-bottom: #c0392b !important;
   }

   .course-details .wideget-user-tab.wideget-user-tab3 .tabs-menu1 ul li a {
      background: #c0392b !important;
   }

   .wideget-user-tab .tabs-menu1 ul li .active {
      background-color: #c0392b !important;
      border: none;
      border-bottom: #c0392b !important;
   }

   .course-details .wideget-user-tab.wideget-user-tab3 .tabs-menu1 ul li a {
      background: #c0392b !important;
   }

   @media screen and (max-width: 992px) {
      .text-center-2 {
         text-align: center;
      }

      .padding {
         margin-top: 0px;
      }
   }

   .udlite-link-underline {
      text-decoration: underline;
      text-underline-offset: 0.4rem;
      flex: auto;
      font-weight: 700;
   }

   .share-col {
      display: flex;
      flex-wrap: wrap;
      column-gap: 1.6rem;
   }

   .referal-friend-modal .rounded-social-buttons {
      text-align: center;
   }

   .ssk {
      border-radius: 100%;
   }

   @media (max-width: 991px) {
      #referalModal.modal {
         height: 100%;
         overflow-y: scroll;
         top: 0;
      }
   }

   #referalModal .modal-header {
      color: #fff;
      background-color: <?php echo $visual_setting->color_5; ?>;
      margin-left: -1px;
   }

   #referalModal .modal-header .modal-title {
      color: #fff;
   }

   #referalModal .modal-header .btn-close {
      color: #fff;
      background: url("https://www.learnvern.com/images/close.svg") center/1em auto no-repeat;
   }

   .ssk-count .ssk-num {
      display: none;
   }

   .card-header {
      background: <?php echo $visual_setting->color_5; ?>;
      color: #fff !important;
   }

   .card-header .card-title {
      color: #fff;
   }

   .card .card-body details .pre-content {
      white-space: normal !important;
      font-family: 'Nunito', sans-serif !important;
   }

   .le--sss {
      display: block;
      width: 100%;
      cursor: pointer;
      text-align: left;
      text-decoration: none;
      font-size: 15px;
      font-weight: 400;
      padding: 10px 10px 10px 40px;
      position: relative;
      margin-bottom: 5px;
      border-radius: 6px;
      background-color: #f9f9f9;
      border: solid 1px #E8E9EB;
      -webkit-transition: all 0.5s ease;
      -ms-transition: all 0.5s ease;
      -o-transition: all 0.5s ease;
      -moz-transition: all 0.5s ease;
      transition: all 0.5s ease;
   }
</style>
<script type="text/javascript">
   function share_model() {
      $('#referalModal').modal('show');
   }

   function copyText() {
      $("#shareURL").select(), document.execCommand("copy")
   }

   function form_submit() {
      var f_name = $('#f_name_1').val();
      var l_name = $('#l_name_1').val();
      var email = $('#email_new_1').val();
      var course = $('#course').val();
      var class_1 = $('#class_1').val();
      var mobile = $('#mobile_1').val();
      if (mobile.length != 10) {
         alert("Please Enter valid Mobile No.");
         $(".syl-mobile").css('border', '1px solid #c81a1a');
         return false;
      }

      $.ajax({
         url: '<?php echo base_url() ?>home/download_syllabus',
         type: 'POST',
         data: {
            f_name: f_name,
            l_name: l_name,
            email: email,
            course: course,
            class: class_1,
            mobile: mobile
         },
         success: function(data) {
            window.open(data, '_blank');
            alert('Syllabus Successfully Downloaded');
            location.reload();
         }
      })
   }
</script>
<div class="modal fade" id="videoModel" tabindex="-1" role="dialog">
   <div class="modal-dialog" role="document">
      <div class="modal-content" id="mainPlayer">

      </div>
   </div>
</div>
<script>
   // Function to initialize Plyr
   function initializePlyr() {
      // Initialize Plyr for newly inserted content
      const player = new Plyr('#player');
   }

   // Function to extract YouTube video ID
   function getVideoID(url) {
      var videoID = null;
      var regex = /(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?v=([^\&\?\/]+)/;
      var matches = url.match(regex);
      if (matches) {
         videoID = matches[1];
      }
      return videoID;
   }

   // Function to open the video modal
   function openVideoModel(url) {
      var videoID = getVideoID(url);
      if (videoID) {
         var embedURL = 'https://www.youtube.com/embed/' + videoID;
         var iframeCode = '<div class="plyr__video-embed" id="player"><iframe src="' + embedURL +
            '" allowfullscreen allowtransparency allow="autoplay" ' +
            'style="width: 100%; height: 100%; border: none;"></iframe></div>';

         $('#mainPlayer').html(iframeCode); // Replace the contents of the #mainPlayer div with the new iframe
         $('#videoModel').modal('show');

         // Initialize Plyr after content is added
         initializePlyr();
      } else {
         console.log('Invalid YouTube URL');
      }
   }
</script>
<script src="<?php echo base_url() ?>assets/social_share/js/social-share-kit.js"></script>
<script type="text/javascript">
   SocialShareKit.init();
</script>