  <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">Deposits</h4>

            <?php  if($this->session->flashdata()) {

             echo Helpers::showFlash($this->session->flashdata("response"));

           } ?>



           <table id="datatable" class="table table-striped table-bordered dt-responsive nowrap">

             <thead>

              <tr>

                <th>Sr No</th>

                <th>Username</th>

                <!-- <th>Phone</th> -->

                <th>Amount</th>

                <th>Date</th>

                <th>Status</th>

              </tr>

           </thead>

           <tbody>

                <?php $i = 1; foreach ($data as $value) { 

                  $user = helpers::getUserObj($value['user_id']);

                  ?>

                <tr>



                  <td><?= $i;?></td>

                  <td><?= $user['username'];?></td>

                  <!-- <td><?= $user['phone_number'];?></td> -->

                  <td><?= $value['amount'];?></td>

                  <td><?= $value['date'];?></td>

                  <?php if($value['status'] == '0'){ ?>

                  <td><div class="row text-center"> <div class="col-md-12" style="margin-bottom: 10px">

                    <a class="btn btn-success" href='<?= base_url()."admin/approve_funds?id={$value["id"]}"; ?>'>Accept</a></div>

                     <div class="col-md-12">

                    <a class="btn btn-danger" href='<?= base_url()."admin/disapprove_funds?id={$value["id"]}"; ?>'>Cancel</a> </div>

                  </td>

                <?php }?>



                  <?php if($value['status'] == '1'){ ?>

                  <td> <b class="text-success">Accepted</b>

                  </td>

                <?php }?>



                   <?php if($value['status'] == '2'){ ?>

                  <td> <b class="text-danger">Cancelled</b>

                  </td>

                <?php }?>



                 <?php $i++; }?>

                 

            </tbody>

          </table> 



        </div>

      </div>



    </div>



  </div>

</div>

</div>