  <div class="main-content">



   <div class="page-content">

     <div class="container-fluid">



       <div class="row">



         <div class="col-lg-12 table-responsive">

          <div class="card">

           <div class="card-body ">    

            <h4 class="mt-0 header-title m-b-30">Withdrawal Requests</h4>

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

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

           } ?>



                  <div class="table-responsive">

          <table class="table" id="datatable">

            <thead class=" text-primary">  



              <tr>  

              <th>Sr No. </th>

              <th>Date</th>

              <th>Status</th>   

                  <th>Wallet Address</th>

                <th>Username</th>

                <th>Amount</th>

                <th>Email</th>

               

                        

               

              </tr>

            </thead>

            <tbody>

              <?php  foreach ($data as $key => $value) { 

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

                  ?>

                <tr>

                    <td>

                  <?= $key+1;?>

                </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_withdraw?id={$value["id"]}"; ?>'>Accept</a></div>

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

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

                  </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 }?>

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



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

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

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

                 

                

                 



                 <?php  }?>



               </tr>

           

            </tbody>

          </table>

                  </div>

  



          </div>

        </div>



      </div>



    </div>

  </div>

</div> 





