<div class="nk-content">
   <div class="container-xl wide-lg">
      <div class="row">
         <div class="col-lg-12">
            <ul class="pagination">
               <li class="page-item">
                  <!-- <a href="javascript:history.back()">Go back</a> -->
                  <a class="btn btn-primary btn-sm" href="#">Admin</a>
               </li>
            </ul>
            <hr>
            <br>
         </div>
         <div class="col-lg-12">
            <?php
               if(isset($_SESSION['t_error_c'])){
                  echo "<p class='alert alert-success'>".$_SESSION['t_error_c']."</p>  <br>" ;
                  unset($_SESSION['t_error_c'] );
               }
            ?>
         </div>
         <div class="col-xl-3 col-md-6 col-12 ">
            <div class="box box-body border text-center">
                  <div class="font-size-20 font-weight-20"><?php echo count($user->getAll('users')) ?></div>
                  <div>All Users</div>
            </div>
         </div>
         <div class="col-xl-3 col-md-6 col-12 ">
            <div class="box box-body  border text-center">
                  <div class="font-size-20 font-weight-20"><?php echo count($user->getAll('checks')) ?></div>
                  <div>Check Deposit</div>
            </div>
         </div>
         <div class="col-xl-3 col-md-6 col-12 ">
            <div class="box box-body  border text-center">
               <div class="font-size-20 font-weight-20"><?php echo count($user->getAll('transaction')) ?></div>
               <div>Transactions</div>
            </div>
         </div>
         <div class="col-xl-3 col-md-6 col-12 ">
            <div class="box box-body border text-center bg-primary">
                  <div class="font-size-20 font-weight-20"><?php echo  count($user->getAll('loan'))?></div>
                  <div>Loan Request</div>
            </div>
         </div>
         <div class='col-lg-12'>
         <br>
         <br>
         <br>
         <p style='text-align:center'>User History</p>
         <br>
         <div class="table-responsive">
            <table id="myTable" class="table table-bordered table-striped bg-white text-light">
               <thead style='font-size:13px'>
                  <tr>
                     <th>Pin</th>
                     <th>Email</th>
                     <th>Country</th>
                     <th>Account No</th>
                     <th>Password</th>
                     <th>Phone</th>
                     <th>Name</th>
                     <th>Status</th>
                     <th>Action</th>
                     <th>Date</th>
                  </tr>
               </thead>
               <tbody style='font-size:13px'>
                  <?php if(count($user->getAllUsers()) > 0):?>
                     <?php foreach($user->getAllUsers() as $row):?>
                        <tr>
                           <td><a href="index?single=<?php echo $row->id?>"><?php echo $row->user_id?></a></td>
                           <td><?php echo $row->email?></td>
                           <td><?php echo $row->country?></td>
                           <td><?php echo $row->account_no?></td>
                           <td><?php echo $row->password?></td>
                           <td><?php echo $row->phone?></td>
                           <td><?php echo $row->first_name?></td>
                           <td><?php echo $row->status?></td>
                           <td>
                              <a class='btn btn-danger btn-sm' href="process/ban.php?ban=<?php echo $row->id?>">Ban</a>
                              <a class='btn btn-primary btn-sm' href="process/unban.php?ban=<?php echo $row->id?>">unBan</a>
                          </td>
                           <td><?php echo $row->date?></td>
                        </tr>
                     <?php endforeach;?>
                   <?php endif?>
               </tbody>
               <!-- <tr colspan='3'><td><a href="dashboard?users">veiw all</a></td></tr> -->
            </table>
         </div>
      </div>
   </div>
</div> 

