<?php //print_r($usertype);exit; ?>
    <section class="content-header">
      <h1>
        Admin users
      </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>
    <form action="" method="post">
    <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/administrator/add">Add</a>
              </div>
               
              <div></div>
            <!-- /.box-header -->
            <div class="box-body">
            <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                  <th>Username</th>
                  <th>Email</th>
                  <th>Action</th>
                </tr>
                </thead>
                 <?php if(count($admin)>0)
                {?>
                <tbody>
               <?php
                foreach ($admin as $data) 
                {
                  ?>
                <tr>
                    <td><?php echo $data['username']; ?></td>
                    <td><?php echo $data['email']; ?></td>
                    <td>
                        <a href="<?php echo base_url();?>admin/administrator/delete/<?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/administrator/permission/<?php echo base64_encode($data['id']);?>" title="Permission"><span class="fa fa-plus"></span></a></td>
                    </td>
                </tr>

               <?php } ?>

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

    </section>
    </form>
    <style type="text/css">
      .dataTables_info, .dataTables_paginate {   
      /*display: none;*/
      }
    </style>

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

    $('.custom_pagination a').click(function(e){
      e.preventDefault();
      $('#search_frm').attr('action',$(this).attr('href'));
      $('#search_frm').submit();
    })
  });
</script>
<style type="text/css">
  .dataTables_length, .dataTables_filter{ display: none; }
</style>