<?php defined('BASEPATH') OR exit('No direct script access allowed'); 
$urlcheck = $this->uri->segment(2);
$this->session->set_userdata('urlcheck',$urlcheck);
if(is_null($urlcheck)) { $urlcheck = isset($first_loc)? $first_loc : ''; }
$cart = $this->session->userdata('cart');
?>
<!DOCTYPE html>
<html lang="en">
<head>
 <?php $this->load->view('front/includes/header-script')?>
 <title><?=FRONT_TITLE?></title>
 <?php $this->load->view('front/includes/index-header')?>
</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>
<section class="abc-tab">
 <div class="container">
  <div class="d-flex flex-row nav">
    <?php foreach($reg_location as $value) { ?>
      <div>
        <a class="<?php if($urlcheck==$value['locat_id']) { echo "active";} ?>" href="<?= base_url();?>loc-class/<?=$value['locat_id']?>"><?=$value['locat_name']?></a>
      </div>
    <?php  } ?>
  </div>

  <?php $count = 0; foreach ($reg_class as $value) { $count++;
   echo form_open('reg-manage'); ?>
   <div class="abc-detail d-flex">
     <div class="title">
      <h2 class="d-flex">Class Title</h2>
      <div class="adv"><font style="font-weight: bold;font-size: 20px;"><?=$value['class_name']?></font>  Hours<span class="hr-span"><?=$value['class_hours']?></span></div>
      <div class="date"><input type="checkbox" <?php if(isset($cart)) { if(in_array($value['form_id'], $cart)) { echo "checked"; } } ?> name="form_class[]" id="<?=$value['form_id']?>" value="<?=$value['form_id']?>">
       <label for="<?=$value['form_id']?>"></label>
       <span>Start Date:</span>
       <span><?=date("m-d-Y",strtotime($value['calss_start_date']))?></span>
       <span><?=date('h:i A',strtotime($value['calss_start_time']))?></span>
       <span><?php ob_start(); foreach (explode(",", $value['class_day']) as $day) {
         echo ucfirst(strtolower($day)).',';
       }
       $output = ob_get_clean();
       echo rtrim($output, ',');
       ?></span>
     </div>
   </div>
   <div class="seat">
    <?php if($count==1) { ?><h2 class="justify-content-center d-flex">Seats Remaining</h2><?php } ?>
    <input type="hidden" name="form_id" id="form_id" value="<?=$value['form_id']?>">
    <span><?php if($value['remain_seats'] <= 0) { echo "No Seats Available"; } else { echo $value['remain_seats']; }?></span>
  </div>
</div>
<br>

<div style="display: <?php if(isset($cart)) { if(in_array($value['form_id'], $cart)) { echo "block"; } else { echo "none"; } } else { echo "none"; } ?>;" class="abc-expand <?=$value['form_id']?>">
 <?php $registrants = explode(",", $value['class_registrants']); ?>
 <div class="member d-flex"> <?php if(in_array("M", $registrants)) { ?><span>Member / Alumni: $<?=$value['class_price_m']?>.00</span><?php } if(in_array("M2", $registrants)) { ?><span>Member / Alumni 2+: $<?=$value['class_price_m2']?>.00</span><?php } if(in_array("N", $registrants)) { ?><span> Non-Member: $<?=$value['class_price_n']?>.00</span><?php } if(in_array("N2", $registrants)) { ?><span> Non-Member 2+: $<?=$value['class_price_n2']?>.00</span><?php } if(in_array("S", $registrants)) { ?><span>SE: $<?=$value['class_price_s']?>.00</span><?php } ?>
</div>
<div class="d-flex class-des">
  <div class="col-md-5 no-pad">
   <h2>Class Description</h2>
   <p><?=$value['class_description']?></p>
   <span>Instructor: <?=$value['instr_name']?></span>
 </div>
 <div class="col-md-7">
   <h2>Class Details</h2>
   <p>Start Date: <?=date("m-d-Y",strtotime($value['calss_start_date']))?><br>
    End Date: <?=date("m-d-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']?>, <?=$value['class_address']?>, <?=$value['class_city']?>, <?=$value['class_state']?>, <?=$value['class_code']?><br>
    Days of Week: <?=$value['class_day']?><br>
    Seats Available: <?=$value['class_seats']?><br>
  </p>
</div>
</div>
<div class="attendee">
  <h3>Attendee Info</h3>

  <?php $member = $this->session->userdata('member'.$value['form_id']);
  if(in_array("M", $registrants)) { ?>
    <label>Member / Alumni</label>
    <div class="member flex-row d-flex flex-wrap">
     <div class="col-sm-10 no-pad resultsm<?=$value['form_id']?>"">
      <?php if(isset($member['M']) && !empty($member['M'])) { 
        foreach ($member['M'] as $key => $val)  { ?>
          <ul class="d-flex">
            <input type="hidden" name="class_price_m_<?=$value['form_id']?>" id="class_price_m1<?=$value['form_id']?>" value="<?=$value['class_price_m']?>"> 
            <li><input type="text" onblur="membersum(<?=$value['form_id']?>,0,<?=$value['class_price_m']?>);" onKeyUp="member(1<?=$value['form_id']?>)" name="m_first_name_<?=$value['form_id']?>[]" id="m_first_name1<?=$value['form_id']?>" placeholder="First Name*"value="<?=isset($val['first_name'])? $val['first_name'] : ''?>"></li>
            <li><input type="text" onKeyUp="member(1<?=$value['form_id']?>)" name="m_last_name_<?=$value['form_id']?>[]" id="m_last_name1<?=$value['form_id']?>" placeholder="Last Name*" value="<?=isset($val['last_name'])? $val['last_name'] : ''?>"></li>
            <li><input type="email" onKeyUp="member(1<?=$value['form_id']?>)" name="m_email_id_<?=$value['form_id']?>[]" id="m_email_id1<?=$value['form_id']?>" placeholder="Email Address*" value="<?=isset($val['email_id'])? $val['email_id'] : ''?>"></li>
            <li><input type="text" onKeyUp="member(1<?=$value['form_id']?>)" class="yourphone" name="m_phone_no_<?=$value['form_id']?>[]" id="m_phone_no1<?=$value['form_id']?>" placeholder="Phone Number*" value="<?=isset($val['phone_no'])? $val['phone_no'] : ''?>"></li>
            <li><input type="text" maxlength="4" onKeyUp="member(1<?=$value['form_id']?>);if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" name="m_ssn_<?=$value['form_id']?>[]" id="m_ssn1<?=$value['form_id']?>" placeholder="Last 4 Of SSN*" value="<?=isset($val['ssn'])? $val['ssn'] : ''?>"></li>
            <a href="<?= base_url(). 'remove-data/'.$value['form_id'].'/'.$key.'/'.$value['class_price_m'].'/'.'M'?>"><span class="button"> X </span></a>
          </ul>
        <?php } } else { ?>
          <ul class="d-flex">
            <input type="hidden" name="class_price_m_<?=$value['form_id']?>" id="class_price_m<?=$value['form_id']?>" value="<?=$value['class_price_m']?>"> 
            <li><input type="text" onblur="membersum(<?=$value['form_id']?>,0,<?=$value['class_price_m']?>);" onKeyUp="member(1<?=$value['form_id']?>)" name="m_first_name_<?=$value['form_id']?>[]" id="m_first_name1<?=$value['form_id']?>" placeholder="First Name*" ></li>
            <li><input type="text" onKeyUp="member(1<?=$value['form_id']?>)" name="m_last_name_<?=$value['form_id']?>[]" id="m_last_name1<?=$value['form_id']?>" placeholder="Last Name*" ></li>
            <li><input type="email" onKeyUp="member(1<?=$value['form_id']?>)" name="m_email_id_<?=$value['form_id']?>[]" id="m_email_id1<?=$value['form_id']?>" placeholder="Email Address*" ></li>
            <li><input type="text" class="yourphone" onKeyUp="member(1<?=$value['form_id']?>)" class="phone" name="m_phone_no_<?=$value['form_id']?>[]" id="m_phone_no1<?=$value['form_id']?>" placeholder="Phone Number*" ></li>
            <li><input type="text" maxlength="4" onKeyUp="member(1<?=$value['form_id']?>);if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" name="m_ssn_<?=$value['form_id']?>[]" id="m_ssn1<?=$value['form_id']?>" placeholder="Last 4 Of SSN*" ></li>
          </ul>
        <?php } ?>
      </div>
      <div class="col-sm-2 enroll-btnm" form-data="<?=$value['form_id']?>" mem-price="<?=$value['class_price_m']?>">
        <label class="d-flex">
         <span>+</span>
         <p>Enroll Attendee</p>
       </label>
     </div>
     <div class="col-sm-10 clone-append no-pad"> </div>
   </div>

 <?php } $memplus = $this->session->userdata('memplus'.$value['form_id']);
 if(in_array("M2", $registrants)) { ?>
  <label>Member / Alumni 2+</label>
  <div class="member flex-row d-flex flex-wrap">
   <div class="col-sm-10 no-pad resultsm2<?=$value['form_id']?>"">
    <?php if(isset($memplus['M2']) && !empty($memplus['M2'])) { 
      foreach ($memplus['M2'] as $key => $val)  { ?>
        <ul class="d-flex">
          <input type="hidden" name="class_price_m2_<?=$value['form_id']?>" id="class_price_m21<?=$value['form_id']?>" value="<?=$value['class_price_m2']?>"> 
          <li><input type="text" onblur="memplussum(<?=$value['form_id']?>,0,<?=$value['class_price_m2']?>);" onKeyUp="memplus(1<?=$value['form_id']?>)" name="mp_first_name_<?=$value['form_id']?>[]" id="m2_first_name<?=$value['form_id']?>" placeholder="First Name*"value="<?=isset($val['first_name'])? $val['first_name'] : ''?>"></li>
          <li><input type="text" onKeyUp="memplus(1<?=$value['form_id']?>)" name="mp_last_name_<?=$value['form_id']?>[]" id="m2_last_name<?=$value['form_id']?>" placeholder="Last Name*" value="<?=isset($val['last_name'])? $val['last_name'] : ''?>"></li>
          <li><input type="email" onKeyUp="memplus(1<?=$value['form_id']?>)" name="mp_email_id_<?=$value['form_id']?>[]" id="m2_email_id<?=$value['form_id']?>" placeholder="Email Address*" value="<?=isset($val['email_id'])? $val['email_id'] : ''?>"></li>
          <li><input type="text" class="yourphone" onKeyUp="memplus(1<?=$value['form_id']?>)" class="phone" name="mp_phone_no_<?=$value['form_id']?>[]" id="m2_phone_no<?=$value['form_id']?>" placeholder="Phone Number*" value="<?=isset($val['phone_no'])? $val['phone_no'] : ''?>"></li>
          <li><input type="text" maxlength="4" onKeyUp="memplus(1<?=$value['form_id']?>);if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" name="mp_ssn_<?=$value['form_id']?>[]" id="m2_ssn<?=$value['form_id']?>" placeholder="Last 4 Of SSN*" value="<?=isset($val['ssn'])? $val['ssn'] : ''?>"></li>
          <a href="<?= base_url(). 'remove-data/'.$value['form_id'].'/'.$key.'/'.$value['class_price_m2'].'/'.'M2'?>"><span class="button"> X </span></a>
        </ul>
      <?php  } } else { ?>
        <ul class="d-flex">
          <input type="hidden" name="class_price_m2_<?=$value['form_id']?>" id="class_price_m2<?=$value['form_id']?>" value="<?=$value['class_price_m']?>"> 
          <li><input type="text" onblur="memplussum(<?=$value['form_id']?>,0,<?=$value['class_price_m2']?>);" onKeyUp="memplus(1<?=$value['form_id']?>)" name="mp_first_name_<?=$value['form_id']?>[]" id="m2_first_name1<?=$value['form_id']?>" placeholder="First Name*" ></li>
          <li><input type="text" onKeyUp="memplus(1<?=$value['form_id']?>)" name="mp_last_name_<?=$value['form_id']?>[]" id="m2_last_name1<?=$value['form_id']?>" placeholder="Last Name*" ></li>
          <li><input type="email" onKeyUp="memplus(1<?=$value['form_id']?>)" name="mp_email_id_<?=$value['form_id']?>[]" id="m2_email_id1<?=$value['form_id']?>" placeholder="Email Address*" ></li>
          <li><input type="text" class="yourphone" onKeyUp="memplus(1<?=$value['form_id']?>)" class="phone" name="mp_phone_no_<?=$value['form_id']?>[]" id="m2_phone_no1<?=$value['form_id']?>" placeholder="Phone Number*" ></li>
          <li><input type="text" maxlength="4" onKeyUp="memplus(1<?=$value['form_id']?>);if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" name="mp_ssn_<?=$value['form_id']?>[]" id="m2_ssn1<?=$value['form_id']?>" placeholder="Last 4 Of SSN*" ></li>
        </ul>

      <?php } ?>

    </div>
    <div class="col-sm-2 enroll-btnm2" form-data="<?=$value['form_id']?>" mem2-price="<?=$value['class_price_m2']?>">
      <label class="d-flex">
       <span>+</span>
       <p>Enroll Attendee</p>
     </label>
   </div>
   <div class="col-sm-10 clone-append no-pad"> </div>
 </div>

<?php } $nonmember = $this->session->userdata('nonmember'.$value['form_id']);
if(in_array("N", $registrants)) { ?>
 <label>Non-Member</label>
 <div class="member flex-row d-flex flex-wrap">
   <div class="col-sm-10 no-pad resultsn<?=$value['form_id']?>">
     <?php if(isset($nonmember['N']) && !empty($nonmember['N'])) { 
      foreach ($nonmember['N'] as $key => $val) { ?>
        <ul class="d-flex">
          <input type="hidden" name="class_price_n_<?=$value['form_id']?>" id="class_price_n1<?=$value['form_id']?>" value="<?=$value['class_price_n']?>"> 
          <li><input type="text" onblur="nmembersum(<?=$value['form_id']?>,0,<?=$value['class_price_n']?>);" onKeyUp="nonmember(1<?=$value['form_id']?>)" name="n_first_name_<?=$value['form_id']?>[]" id="n_first_name1<?=$value['form_id']?>" placeholder="First Name*" value="<?=isset($val['first_name'])? $val['first_name'] : ''?>"></li>
          <li><input type="text" onKeyUp="nonmember(1<?=$value['form_id']?>)" name="n_last_name_<?=$value['form_id']?>[]" id="n_last_name1<?=$value['form_id']?>" placeholder="Last Name*" value="<?=isset($val['last_name'])? $val['last_name'] : ''?>"></li>
          <li><input type="email" onKeyUp="nonmember(1<?=$value['form_id']?>)" name="n_email_id_<?=$value['form_id']?>[]" id="n_email_id1<?=$value['form_id']?>" placeholder="Email Address*" value="<?=isset($val['email_id'])? $val['email_id'] : ''?>"></li>
          <li><input type="text" class="yourphone" onKeyUp="nonmember(1<?=$value['form_id']?>)" class="phone" name="n_phone_no_<?=$value['form_id']?>[]" id="n_phone_no1<?=$value['form_id']?>" placeholder="Phone Number*" value="<?=isset($val['phone_no'])? $val['phone_no'] : ''?>"></li>
          <li><input type="text" maxlength="4" onKeyUp="nonmember(1<?=$value['form_id']?>);if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" name="n_ssn_<?=$value['form_id']?>[]" id="n_ssn1<?=$value['form_id']?>" placeholder="Last 4 Of SSN*" value="<?=isset($val['ssn'])? $val['ssn'] : ''?>"></li>
          <a href="<?= base_url(). 'remove-data/'.$value['form_id'].'/'.$key.'/'.$value['class_price_n'].'/'.'N'?>"><span class="button"> X </span></a>
        </ul>
      <?php  } } else { ?>
        <ul class="d-flex">
          <input type="hidden" name="class_price_n_<?=$value['form_id']?>" id="class_price_n<?=$value['form_id']?>" value="<?=$value['class_price_n']?>"> 
          <li><input type="text" onblur="nmembersum(<?=$value['form_id']?>,0,<?=$value['class_price_n']?>);" onKeyUp="nonmember(1<?=$value['form_id']?>)" name="n_first_name_<?=$value['form_id']?>[]" id="n_first_name1<?=$value['form_id']?>" placeholder="First Name*"></li>
          <li><input type="text" onKeyUp="nonmember(1<?=$value['form_id']?>)" name="n_last_name_<?=$value['form_id']?>[]" id="n_last_name1<?=$value['form_id']?>" placeholder="Last Name*"></li>
          <li><input type="email" onKeyUp="nonmember(1<?=$value['form_id']?>)" name="n_email_id_<?=$value['form_id']?>[]" id="n_email_id1<?=$value['form_id']?>" placeholder="Email Address*"></li>
          <li><input type="text" class="yourphone" onKeyUp="nonmember(1<?=$value['form_id']?>)" class="phone" name="n_phone_no_<?=$value['form_id']?>[]" id="n_phone_no1<?=$value['form_id']?>" placeholder="Phone Number*"></li>
          <li><input type="text" maxlength="4" onKeyUp="nonmember(1<?=$value['form_id']?>);if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" name="n_ssn_<?=$value['form_id']?>[]" id="n_ssn1<?=$value['form_id']?>" placeholder="Last 4 Of SSN*"></li>
        </ul>

      <?php } ?>

    </div>
    <div class="col-sm-2 enroll-btnn" form-data="<?=$value['form_id']?>" nmem-price="<?=$value['class_price_n']?>">
      <label class="d-flex">
       <span>+</span>
       <p>Enroll Attendee</p>
     </label>
   </div>
   <div class="col-sm-10 clone-append no-pad"> </div>
 </div>

<?php } $nonplus = $this->session->userdata('nonplus'.$value['form_id']);
if(in_array("N2", $registrants)) { ?>
 <label>Non-Member 2+</label>
 <div class="member flex-row d-flex flex-wrap">
   <div class="col-sm-10 no-pad resultsn2<?=$value['form_id']?>">
     <?php if(isset($nonplus['N2']) && !empty($nonplus['N2'])) { 
      foreach ($nonplus['N2'] as $key => $val) { ?>
        <ul class="d-flex">
          <input type="hidden" name="class_price_n2_<?=$value['form_id']?>" id="class_price_n21<?=$value['form_id']?>" value="<?=$value['class_price_n']?>"> 
          <li><input type="text" onblur="nmemplussum(<?=$value['form_id']?>,0,<?=$value['class_price_n2']?>);" onKeyUp="nonmemplus(1<?=$value['form_id']?>)" name="np_first_name_<?=$value['form_id']?>[]" id="n2_first_name1<?=$value['form_id']?>" placeholder="First Name*" value="<?=isset($val['first_name'])? $val['first_name'] : ''?>"></li>
          <li><input type="text" onKeyUp="nonmemplus(1<?=$value['form_id']?>)" name="np_last_name_<?=$value['form_id']?>[]" id="n2_last_name1<?=$value['form_id']?>" placeholder="Last Name*" value="<?=isset($val['last_name'])? $val['last_name'] : ''?>"></li>
          <li><input type="email" onKeyUp="nonmemplus(1<?=$value['form_id']?>)" name="np_email_id_<?=$value['form_id']?>[]" id="n2_email_id1<?=$value['form_id']?>" placeholder="Email Address*" value="<?=isset($val['email_id'])? $val['email_id'] : ''?>"></li>
          <li><input type="text" class="yourphone" onKeyUp="nonmemplus(1<?=$value['form_id']?>)" class="phone" name="np_phone_no_<?=$value['form_id']?>[]" id="n2_phone_no1<?=$value['form_id']?>" placeholder="Phone Number*" value="<?=isset($val['phone_no'])? $val['phone_no'] : ''?>"></li>
          <li><input type="text" maxlength="4" onKeyUp="nonmemplus(1<?=$value['form_id']?>);if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" name="np_ssn_<?=$value['form_id']?>[]" id="n2_ssn1<?=$value['form_id']?>" placeholder="Last 4 Of SSN*" value="<?=isset($val['ssn'])? $val['ssn'] : ''?>"></li>
          <a href="<?= base_url(). 'remove-data/'.$value['form_id'].'/'.$key.'/'.$value['class_price_n2'].'/'.'N2'?>"><span class="button"> X </span></a>
        </ul>
      <?php  } } else { ?>
        <ul class="d-flex">
          <input type="hidden" name="class_price_n2_<?=$value['form_id']?>" id="class_price_n2<?=$value['form_id']?>" value="<?=$value['class_price_n2']?>"> 
          <li><input type="text" onblur="nmemplussum(<?=$value['form_id']?>,0,<?=$value['class_price_n2']?>);" onKeyUp="nonmemplus(1<?=$value['form_id']?>)" name="np_first_name_<?=$value['form_id']?>[]" id="n2_first_name1<?=$value['form_id']?>" placeholder="First Name*"></li>
          <li><input type="text" onKeyUp="nonmemplus(1<?=$value['form_id']?>)" name="np_last_name_<?=$value['form_id']?>[]" id="n2_last_name1<?=$value['form_id']?>" placeholder="Last Name*"></li>
          <li><input type="email" onKeyUp="nonmemplus(1<?=$value['form_id']?>)" name="np_email_id_<?=$value['form_id']?>[]" id="n2_email_id1<?=$value['form_id']?>" placeholder="Email Address*"></li>
          <li><input type="text" class="yourphone" onKeyUp="nonmemplus(1<?=$value['form_id']?>)" class="phone" name="np_phone_no_<?=$value['form_id']?>[]" id="n2_phone_no1<?=$value['form_id']?>" placeholder="Phone Number*"></li>
          <li><input type="text" maxlength="4" onKeyUp="nonmemplus(1<?=$value['form_id']?>);if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" name="np_ssn_<?=$value['form_id']?>[]" id="n2_ssn1<?=$value['form_id']?>" placeholder="Last 4 Of SSN*"></li>
        </ul>

      <?php } ?>

    </div>
    <div class="col-sm-2 enroll-btnn2" form-data="<?=$value['form_id']?>" nmem2-price="<?=$value['class_price_n2']?>">
      <label class="d-flex">
       <span>+</span>
       <p>Enroll Attendee</p>
     </label>
   </div>
   <div class="col-sm-10 clone-append no-pad"> </div>
 </div>

<?php }  $semember = $this->session->userdata('semember'.$value['form_id']);
if(in_array("S", $registrants)) { ?>
 <label>Subscribing Employer</label>
 <div class="member flex-row d-flex flex-wrap">
   <div class="col-sm-10 no-pad resultss<?=$value['form_id']?>">
    <?php if(isset($semember['S']) && !empty($semember['S'])) { 
      foreach ($semember['S'] as $key => $val) { ?>
       <ul class="d-flex">
        <input type="hidden" name="class_price_s_<?=$value['form_id']?>" id="class_price_s1<?=$value['form_id']?>" value="<?=$value['class_price_s']?>"> 
        <li><input type="text" onblur="smembersum(<?=$value['form_id']?>,0,<?=$value['class_price_s']?>);" onKeyUp="employer(1<?=$value['form_id']?>)" name="s_first_name_<?=$value['form_id']?>[]" id="s_first_name1<?=$value['form_id']?>" placeholder="First Name*" value="<?=isset($val['first_name'])? $val['first_name'] : ''?>"></li>
        <li><input type="text" onKeyUp="employer(1<?=$value['form_id']?>)" name="s_last_name_<?=$value['form_id']?>[]" id="s_last_name1<?=$value['form_id']?>" placeholder="Last Name*" value="<?=isset($val['last_name'])? $val['last_name'] : ''?>"></li>
        <li><input type="email" onKeyUp="employer(1<?=$value['form_id']?>)" name="s_email_id_<?=$value['form_id']?>[]" id="s_email_id1<?=$value['form_id']?>" placeholder="Email Address*" value="<?=isset($val['email_id'])? $val['email_id'] : ''?>"></li>
        <li><input type="text" class="yourphone" onKeyUp="employer(1<?=$value['form_id']?>)" class="phone" name="s_phone_no_<?=$value['form_id']?>[]" id="s_phone_no1<?=$value['form_id']?>" placeholder="Phone Number*" value="<?=isset($val['phone_no'])? $val['phone_no'] : ''?>"></li>
        <li><input type="text" maxlength="4" onKeyUp="employer(1<?=$value['form_id']?>);if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" name="s_ssn_<?=$value['form_id']?>[]" id="s_ssn1<?=$value['form_id']?>" placeholder="Last 4 Of SSN*" value="<?=isset($val['ssn'])? $val['ssn'] : ''?>"></li>
        <a href="<?= base_url(). 'remove-data/'.$value['form_id'].'/'.$key.'/'.$value['class_price_s'].'/'.'S'?>"><span class="button"> X </span></a>
      </ul>
    <?php  } } else { ?>
     <ul class="d-flex">
      <input type="hidden" name="class_price_s_<?=$value['form_id']?>" id="class_price_s<?=$value['form_id']?>" value="<?=$value['class_price_s']?>"> 
      <li><input type="text" onblur="smembersum(<?=$value['form_id']?>,0,<?=$value['class_price_s']?>);" onKeyUp="employer(1<?=$value['form_id']?>)" name="s_first_name_<?=$value['form_id']?>[]" id="s_first_name1<?=$value['form_id']?>" placeholder="First Name*" ></li>
      <li><input type="text" onKeyUp="employer(1<?=$value['form_id']?>)" name="s_last_name_<?=$value['form_id']?>[]" id="s_last_name1<?=$value['form_id']?>" placeholder="Last Name*"></li>
      <li><input type="email" onKeyUp="employer(1<?=$value['form_id']?>)" name="s_email_id_<?=$value['form_id']?>[]" id="s_email_id1<?=$value['form_id']?>" placeholder="Email Address*" ></li>
      <li><input type="text" class="yourphone" onKeyUp="employer(1<?=$value['form_id']?>)" class="phone" name="s_phone_no_<?=$value['form_id']?>[]" id="s_phone_no1<?=$value['form_id']?>" placeholder="Phone Number*" ></li>
      <li><input type="text" maxlength="4" onKeyUp="employer(1<?=$value['form_id']?>);if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" name="s_ssn_<?=$value['form_id']?>[]" id="s_ssn1<?=$value['form_id']?>" placeholder="Last 4 Of SSN*" ></li>
    </ul>
  <?php } ?>

</div>
<div class="col-sm-2 enroll-btns" form-data="<?=$value['form_id']?>" smem-price="<?=$value['class_price_s']?>">
  <label class="d-flex">
   <span>+</span>
   <p>Enroll Attendee</p>
 </label>
</div>
<div class="col-sm-10 clone-append no-pad"> </div>
</div>

<?php } ?>

</div>
<div class="class-total">
  <h3>Class Totals</h3>
  <div class="alumi">
    <?php if(in_array("M", $registrants)) { ?>
     <label>Member / Alumni</label>
     <span class="almeb<?=$value['form_id']?>">
      <?php if(isset($member['M']) && !empty($member['M'])) {
        foreach ($member['M'] as $key => $val)  { ?>
          <div class="d-flex alumi-content mebdiv">
            <div class="col-sm-8"><span style="color: grey;"><?=isset($val['first_name'])? $val['first_name'] : ''?> <?=isset($val['last_name'])? $val['last_name'] : ''?> <?=isset($val['email_id'])? $val['email_id'] : ''?> <?=isset($val['phone_no'])? $val['phone_no'] : ''?> <?=isset($val['ssn'])? $val['ssn'] : ''?></span></div>
            <div class="col-sm-1">$ <?=$value['class_price_m']?></div>
            <a href="<?= base_url(). 'remove-data/'.$value['form_id'].'/'.$key.'/'.$value['class_price_m'].'/'.'M'?>"><span class="cls-btn-m">X</span></a>
          </div>

        <?php } } else { ?>

         <div class="d-flex alumi-content mebdiv" id="madiv1<?=$value['form_id']?>">
          <div class="col-sm-8 resultsm<?=$value['form_id']?>"><span style="color: grey;" id="member1<?=$value['form_id']?>"></span></div>
          <div class="col-sm-1">$ <h id="mprice<?=$value['form_id']?>">0.00</h></div> 
          <span onClick="resetm(<?=$value['form_id']?>,<?=$value['class_price_m']?>);"> X </span></div>
        <?php } ?>
      </span>
      <input name="mebhid" id="mebhid<?=$value['form_id']?>" type="hidden" value="1">

    <?php } if(in_array("M2", $registrants)) { ?>
     <label>Member / Alumni 2+</label>
     <span class="almeb2<?=$value['form_id']?>">
      <?php if(isset($memplus['M2']) && !empty($memplus['M2'])) {
        foreach ($memplus['M2'] as $key => $val)  { ?>
          <div class="d-flex alumi-content meb2div">
            <div class="col-sm-8"><span style="color: grey;"><?=isset($val['first_name'])? $val['first_name'] : ''?> <?=isset($val['last_name'])? $val['last_name'] : ''?> <?=isset($val['email_id'])? $val['email_id'] : ''?> <?=isset($val['phone_no'])? $val['phone_no'] : ''?> <?=isset($val['ssn'])? $val['ssn'] : ''?></span></div>
            <div class="col-sm-1">$ <?=$value['class_price_m2']?></div>
            <a href="<?= base_url(). 'remove-data/'.$value['form_id'].'/'.$key.'/'.$value['class_price_m2'].'/'.'M2'?>"><span class="cls-btn-m2">X</span></a>
          </div>

        <?php } } else { ?>

         <div class="d-flex alumi-content meb2div" id="m2adiv1<?=$value['form_id']?>">
          <div class="col-sm-8 resultsm2<?=$value['form_id']?>"><span style="color: grey;" id="memplus1<?=$value['form_id']?>"></span></div>
          <div class="col-sm-1">$ <h id="mplusprice<?=$value['form_id']?>">0.00</h></div> 
          <span onClick="resetm2(<?=$value['form_id']?>,<?=$value['class_price_m2']?>);"> X </span></div>
        <?php } ?>
      </span>
      <input name="mebhid2" id="mebhid2<?=$value['form_id']?>" type="hidden" value="1">
    <?php } if(in_array("N", $registrants)) { ?>
      <label>Non-Member</label>
      <span class="alnmeb<?=$value['form_id']?>">
       <?php if(isset($nonmember['N']) && !empty($nonmember['N'])) { 
         foreach ($nonmember['N'] as $key => $val) { ?>
          <div class="d-flex alumi-content nmebdiv">
            <div class="col-sm-8"><span style="color: grey;"><?=isset($val['first_name'])? $val['first_name'] : ''?> <?=isset($val['last_name'])? $val['last_name'] : ''?> <?=isset($val['email_id'])? $val['email_id'] : ''?> <?=isset($val['phone_no'])? $val['phone_no'] : ''?> <?=isset($val['ssn'])? $val['ssn'] : ''?></span></div>
            <div class="col-sm-1">$ <?=$value['class_price_n']?></div>
            <a href="<?= base_url(). 'remove-data/'.$value['form_id'].'/'.$key.'/'.$value['class_price_n'].'/'.'N'?>"><span class="cls-btn-n">X</span></a>
          </div>

        <?php } } else { ?>

         <div class="d-flex alumi-content nmebdiv" id="nadiv1<?=$value['form_id']?>">
          <div class="col-sm-8 resultsn<?=$value['form_id']?>"><span style="color: grey;" id="nonmember1<?=$value['form_id']?>"></span></div>
          <div class="col-sm-1">$ <h id="nprice<?=$value['form_id']?>">0.00</h></div>
          <span onClick="resetn(<?=$value['form_id']?>,<?=$value['class_price_n']?>);"> X </span>
        </div>
      <?php } ?>
    </span>
    <input name="nmebhid" id="nmebhid<?=$value['form_id']?>" type="hidden" value="1">
  <?php } if(in_array("N2", $registrants)) { ?>
    <label>Non-Member 2+</label>
    <span class="alnmeb2<?=$value['form_id']?>">
     <?php if(isset($nonplus['N2']) && !empty($nonplus['N2'])) { 
       foreach ($nonplus['N2'] as $key => $val) { ?>
        <div class="d-flex alumi-content nmeb2div">
          <div class="col-sm-8"><span style="color: grey;"><?=isset($val['first_name'])? $val['first_name'] : ''?> <?=isset($val['last_name'])? $val['last_name'] : ''?> <?=isset($val['email_id'])? $val['email_id'] : ''?> <?=isset($val['phone_no'])? $val['phone_no'] : ''?> <?=isset($val['ssn'])? $val['ssn'] : ''?></span></div>
          <div class="col-sm-1">$ <?=$value['class_price_n2']?></div>
          <a href="<?= base_url(). 'remove-data/'.$value['form_id'].'/'.$key.'/'.$value['class_price_n2'].'/'.'N2'?>"><span class="cls-btn-n2">X</span></a>
        </div>

      <?php } } else { ?>

       <div class="d-flex alumi-content nmeb2div" id="nadiv21<?=$value['form_id']?>">
        <div class="col-sm-8 resultsn2<?=$value['form_id']?>"><span style="color: grey;" id="nmemplus1<?=$value['form_id']?>"></span></div>
        <div class="col-sm-1">$ <h id="nplusprice<?=$value['form_id']?>">0.00</h></div>
        <span onClick="resetn2(<?=$value['form_id']?>,<?=$value['class_price_n2']?>);"> X </span>
      </div>
    <?php } ?>
  </span>
  <input name="nmebhid" id="nmebhid<?=$value['form_id']?>" type="hidden" value="1">
<?php } if(in_array("S", $registrants)) { ?>
 <label>Subscribing Employer</label>
 <span class="alsmeb<?=$value['form_id']?>">
   <?php if(isset($semember['S']) && !empty($semember['S'])) { 
    foreach ($semember['S'] as $key => $val) { ?>
     <div class="d-flex alumi-content smebdiv">
      <div class="col-sm-8"><span style="color: grey;"><?=isset($val['first_name'])? $val['first_name'] : ''?> <?=isset($val['last_name'])? $val['last_name'] : ''?> <?=isset($val['email_id'])? $val['email_id'] : ''?> <?=isset($val['phone_no'])? $val['phone_no'] : ''?> <?=isset($val['ssn'])? $val['ssn'] : ''?></span></div>
      <div class="col-sm-1">$ <?=$value['class_price_s']?></div>
      <a href="<?= base_url(). 'remove-data/'.$value['form_id'].'/'.$key.'/'.$value['class_price_s'].'/'.'S'?>"><span class="cls-btn-n">X</span></a>
    </div>

  <?php } } else { ?>

   <div class="d-flex alumi-content smebdiv" id="sadiv1<?=$value['form_id']?>">
    <div class="col-sm-8 resultss<?=$value['form_id']?>"><span style="color: grey;" id="employer1<?=$value['form_id']?>"></span></div>
    <div class="col-sm-1">$ <h id="sprice<?=$value['form_id']?>">0.00</h></div>
    <span onClick="resets(<?=$value['form_id']?>,<?=$value['class_price_s']?>);"> X </span>
  </div>
<?php } ?>
</span>
<input name="smebhid" id="smebhid<?=$value['form_id']?>" type="hidden" value="1">
<?php } ?>
</div>
<div class="d-flex alumi-content class-sum">
  <div class="col-sm-8">Class Total</div>
  <div class="col-sm-4">$ <label id="total1<?=$value['form_id']?>"><?=$this->session->userdata('classtotal'.$value['form_id']);?></label>.00</div>
</div>
</div>
</div>

<?php  }  ?>

<div class="d-flex justify-content-between abc-btn">
  <div class="p-2"><a href="<?=base_url();?>reset-page"><button type="button" class="btn" style="background: #ff0000; color: #fff; ">Reset</button></a></div>
  <div class="p-2"><button type="submit" class="btn" style="background: #333366; color: #fff;">Review Order</button>
  </div>
</div>
<?php echo form_close(); ?>
</div>
</section>
<!-- Optional JavaScript -->
<?php $this->load->view('front/includes/footer-script')?>
</body>
</html>