<?php //print_r($usertype);exit; ?>
    <section class="content-header">
      <h1>
        <?php if($this->uri->segment(3)=='expiredusers'){ echo 'Expired';} ?> Members
      </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>Email</th>
                  <th>Pseudonym</th>
                  <th>Membership</th>
                  <th>Last Payemnt Date</th>
                  <th>Last Login</th>
                  <th>Account Type</th>
                  <th>Status</th>
                </tr>
                </thead>
                 <?php if(count($users)>0)
                {?>
                <tbody>
               <?php
                $i=1;
                foreach ($users as $data) 
                {
                ?>
                <tr>
                    <td><?php echo $data['email']; ?></td>
                    <td><?php echo $data['username']; ?></td>
                    <td><?php echo $data['userstatus']; ?></td>
                    <td><?php if($data['created'] > 0) { echo date('d-m-Y h:i:s',$data['created']);} ?></td>
                    <td><?php if($data['last_login'] > 0) { echo date('d-m-Y h:i:s',$data['last_login']);} ?></td>
                    <td><?php echo $data['accounttype'];?></td>
                    <td><?php if($data['email_confirmed'] == 1) { echo 'Active'; } elseif($data['email_confirmed'] ==0 ) { echo 'Email not confirmed'; } else { echo 'Inactive'; }?></td>
                     
                </tr>

               <?php $i++; } ?>

                </tbody>
                <?php } ?>
                <tfoot>
               
                </tfoot>
              </table>
              <?php if($this->uri->segment(3)!='expiredusers'){ ?>
                <div class="custom_pagination"><?php echo $link; ?></div>
              <?php } ?>  
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    <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>