<div class="main-content">

<div class="page-content">
  <div class="container-fluid">

    <div class="row">

      <div class="col-lg-12">
       <div class="card">
        <div class="card-body">    
         <h4 class="mt-0 header-title m-b-30">Topup Balance</h4>
         <?php  if($this->session->flashdata()) {
      echo Helpers::showFlash($this->session->flashdata("response"));
    } ?>  
<div class="table-responsive">
        <table id="datatable" class="table">
          <thead>
           <tr>
           <th>Register Date</th>
             <th>Email</th>
             <th>Username</th>
             <th>Balance</th>
             <th>Referral ID</th>
             <th>Name</th>
             <th>Phone Number</th>
             
           </tr>
        </thead>
        <tbody>
        <?php
          if($data) {
          foreach ($data as $user) { 
            $userdetails = Helpers::getUserObj($user["user_id"]);
           
            ?>
            <tr>
            <td><?= $user["updated_at"]; ?></td>
            <td><?= $userdetails["email"]; ?></td>
              <td><?= $userdetails["username"]; ?></td>              
              <td><?= $user["wallet_amount"]; ?></td>
              <td><?= $userdetails["referral_id"]; ?></td>
              <td><?= $userdetails["full_name"]; ?></td>
              <td><?= $userdetails["phone_number"]; ?></td>
             
            </tr>
          <?php } } else { ?>
            <tr><td>No user found</td></tr>
          <?php } ?>
              
         </tbody>
       </table> 
</div>
     </div>
   </div>

 </div>

</div>
</div>
</div>