<?php //print_r($usertype);exit; ?>
    <section class="content-header">
      <h1>
        Events Entry
      </h1>
      <ol class="breadcrumb">
        <li><a href="<?php echo base_url().'admin';?>"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="<?php echo base_url().'admin/event';?>"> Event</a></li>
        <li class="active">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">Management</h3>
              <a class="btn btn-primary margin-right pull-right" href="<?php echo base_url()?>admin/event/entry_add/<?php echo $this->uri->segment(4); ?>">Add</a>
              </div>
               
              <div></div>
            <!-- /.box-header -->
            <div class="box-body">
              <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                  <th>#</th>
                  <th>Title</th>
                  <th>Base Price</th>
                  <th>Image</th>
                  <th>Action</th>
                 
                </tr>
                </thead>
                 <?php if(count($entry)>0)
                {?>
                <tbody>
               <?php
                $i=1;
                foreach ($entry as $data) 
                {
                ?>
                <tr>
                    <td><?php echo $i;?></td>
                    <td><?php echo $data['title']; ?></td>
                    <td><?php echo $data['base_price']; ?></td>
                    <td><img src="<?php echo base_url().'assets/userfiles/'.$data['path'].'/'.$data['filename'].'.'.$data['extension'];  ?>" width="80"></td>
                    <td>
                      <a href="<?php echo base_url();?>admin/event/entry_edit/<?php echo base64_encode($data['event_id']);?>/<?php echo base64_encode($data['id']);?>" title="edit"><span class="fa fa-pencil-square"></span></a>
                      <a href="<?php echo base_url();?>admin/event/entry_delete/<?php echo base64_encode($data['event_id']);?>/<?php echo base64_encode($data['id']);?>" title="Delete" onclick="return confirm('Are you sure to delete ?');"><span class="fa fa-ban"></span></a>
                      <a href="<?php echo base_url();?>admin/event/roomlist/<?php echo base64_encode($data['id']);?>" title="Room List" ><span class="fa fa-plus"></span></a>
                      <a href="<?php echo base_url();?>admin/event/limousinelist/<?php echo base64_encode($data['id']);?>" title="Limousine List" ><span class="fa fa-plus-circle"></span></a>
					  <?php if($data['is_sold'] == 1) { ?>
					  <a href="<?php echo base_url();?>admin/event/entry_sold/<?php echo base64_encode($data['event_id']);?>/<?php echo base64_encode($data['id']);?>/2" title="Make Unsold" onclick="return confirm('Are you sure to make unsold ?');"><span class="fa fa-times"></span></a>
					  <?php } else { ?>
					  <a href="<?php echo base_url();?>admin/event/entry_sold/<?php echo base64_encode($data['event_id']);?>/<?php echo base64_encode($data['id']);?>/1" title="Make Sold Out" onclick="return confirm('Are you sure to make sold out ?');"><span class="fa fa-check"></span></a>
					  <?php } ?>
                    </td> 
                </tr>

               <?php $i++; } ?>

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

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