<?php //print_r($usertype);exit; ?>
    <section class="content-header">
      <h1>
        Email Content
      </h1>
      <ol class="breadcrumb">
        <li><a href="<?php echo base_url().'admin';?>"><i class="fa fa-dashboard"></i> Home</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>
              
              </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>Action</th>
                </tr>
                </thead>
                 <?php if(count($emails)>0)
                {?>
                <tbody>
               <?php
                $i=1;
                foreach ($emails as $data) 
                {
                ?>
                <tr>
                    <td><?php echo $i;?></td>
                    <td><?php echo $data['name']; ?></td>
                    <td>
                      <a href="<?php echo base_url();?>admin/email_content/view/<?php echo $data['type'];?>" title="View"><span class="fa fa-pencil-square"></span></a>
                    </td> 
                </tr>

               <?php $i++; } ?>

                </tbody>
                <?php } ?>
                <tfoot>
               
                </tfoot>
              </table>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    
<div id="myModal1" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Event Revenue</h4>
      </div>
      <div class="modal-body">
      </div>
      
    </div>

  </div>
</div>
    
<script>
  $(function () {
    $("#example1").DataTable();
    $('.check_revenue').click(function(){
      $.ajax({
        url: "<?php echo base_url('admin/event/check_revenue'); ?>",
        type: "POST",
        data: "id="+$(this).data('id'),
        success:function(res)
        {
          $('.modal-body').html(res);
        }
      })
    })
  });
</script>