<?php defined('BASEPATH') OR exit('No direct script access allowed'); 
if($this->session->user_id == "")
{
 redirect('admin');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
 <?php $this->load->view('front/includes/header-script')?>
 <title><?=TITLE?></title>
</head>
<body>
 <header>
  <div class="container">
   <div class="logo d-flex">
    <img src="<?=base_url();?>assets/front/img/logo.jpg" alt=""> 
    <span class="d-flex align-items-center justify-content-center">
     <h1>Continuing Education Registration</h1>
   </span>
 </div>
</div>
</header>
<div class="container">
  <section class="abc-approve">
   <?php foreach($order as $value) { ?>
    <div class="container">
      <h1>Review / Approve Registrations</h1>
      <h2><?=$value['class_name']?></h2>
      <p>Start Date: <?=date("d-m-Y",strtotime($value['calss_start_date']))?><br>
       End Date: <?=date("d-m-Y",strtotime($value['calss_end_date']))?><br>
       Time: <?=date('h:i A',strtotime($value['calss_start_time']))?> – <?=date('h:i A',strtotime($value['calss_end_time']))?><br>
       Location: <?=$value['class_room']?><br>
       Days of Week: <?=$value['class_day']?>
     </p>
     <?php foreach ($return_class as $key) {

     } 
     ?>
     <?php foreach($registrants as $val)
     {
      if ($val->reg_id == $value['reg_id']) ?>
        <div class="approve">
          <label><span> <?=$value['class_id']?> </span><?php if($val->reg_m_type == "M"){echo "Member / Alumni";}elseif($val->reg_m_type == "N"){echo "Non-Member ";}elseif($val->reg_m_type == "S"){echo "Subscribing Employer";}?></label>
          <div class="d-flex approve-content">
            <div class="col-sm-8 no-pad"><?=$val->att_f_name?>  <?=$val->att_l_name?>   <?=$val->att_email?>  <?=$val->att_number?>   <a href="" class="cls-btn"> (remove) </a> </div>
            <div class="col-sm-4">$ <?=$val->att_price?>.00</div>
          </div>
        <?php } ?>
        <div class="d-flex alumi-content class-sum">
          <div class="col-sm-8 no-pad">Class Total</div>
          <div class="col-sm-4">$ <?=$value['regclass_total_price']?>.00</div>
        </div>
        <div class="d-flex alumi-content class-sum grand">
          <div class="col-sm-8 no-pad">Grand Total</div>
          <div class="col-sm-4">$ <?=$value['reg_total']?>.00</div>
        </div>
      </div>
    <?php } ?>
    <div class="d-flex justify-content-between abc-btn">
      <div class="p-2"><a href="<?= base_url();?>admin/order-list"><button type="button" class="btn" style="background: #be0000; color: #fff;">Back</button></a></div>
   </section>
   <?php $this->load->view('front/includes/footer-script')?>
 </body>
 </html>