<?php //print_r($usertype);exit; ?>
    <section class="content-header">
      <h1>
        Events
      </h1>
      <ol class="breadcrumb">
        <li><a href="<?php echo base_url().'admin';?>"><i class="fa fa-dashboard"></i> Home</a></li>
        <li class=""><a href="<?php echo base_url().'admin/event';?>">Event</a></li>
        <li class="active">Guest List</li>
      </ol>
    </section>

    <section class="content">
      <div class="row">
        <?php echo $this->utility->showMsg();?>
        <div class="col-xs-12">
          <div class="box">
            <div class="box-header">
              <h3 class="box-title">Guest List</h3>
              <a class="btn btn-primary margin-right pull-right" href="<?php echo base_url()?>admin/event/add">Add</a>
              </div>
               
              <div></div>
            <!-- /.box-header -->
            <div class="box-body table-responsive">
              <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                  <th>#</th>
                  <th>Username</th>
                  <th>Email</th>
                  <th>Member status</th>
                  <th>Checkin date</th>
                  <th>Drink package</th>
                  <th>No. of cape</th>
                  <th>Ceremonial</th>
                  <th>Extra Wish</th>
                  <th>Total Amount</th>
                  <th>Details Checked</th>
                  <th>Payment Status</th>
                 
                </tr>
                </thead>
                 <?php if(count($guestlist)>0)
                {?>
                <tbody>
               <?php
                $i=1;
                foreach ($guestlist as $data) 
                {
                ?>
                <tr>
                    <td><?php echo $i;?></td>
                    <td><?php echo $data['username']; ?></td>
                    <td><?php echo $data['email']; ?></td>
                    <td><?php if($data['member_status']==4) { echo 'Premium'; } else { echo 'Basic';} ?></td>
                    <td><?php echo $data['confirmed']; ?></td>
                    <td><?php if($data['drinking_package']==1) { echo 'Basic'; } else { echo 'Premium';}?></td>
                    <td><?php echo $data['cape']; ?></td>
                    <td><?php if($data['ceremonial']==1) { echo 'Accepted'; } ?></td>
                    <td><?php echo $data['extra_wish']; ?></td>
                    <td><?php echo number_format($data['summury'],2,',','.'); ?></td>
                    <td><?php if($data['details_check']==1) { echo 'Yes'; } else { echo 'No';}?></td>
                    <td><?php if($data['payment']==1) { echo 'Paid'; }else{ echo 'Unpaid';} ?></td>
                     
                </tr>

               <?php $i++; } ?>

                </tbody>
                <?php } ?>
                <tfoot>
               
                </tfoot>
              </table>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    

    
<script>
  $(function () {
    $("#example1").DataTable();
  });
</script>