  <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 table-responsive">    

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

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

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

           } ?>



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

              <thead>

              <tr>

                <th>Sr. No</th>

                <th>Username</th>

                <th>Name</th>

                <th>Withdraw Type</th>                

                <th>Amount</th>

                <th>USDT Address</th>                

                <th>QR Code</th>

                <th>Date</th>

                <th>Status</th>

                <th>Slip</th>

                <th></th>

              </tr>

           </thead>

           <?php $key=1; ?>

           <tbody>

              <?php foreach ($data as $value) { 

                $user = Helpers::userdetails($value["user_id"]);

                ?>

                <tr>



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

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

                  <td><?= $user["full_name"]; ?></td>

                  <td><?= $value["withdraw_type"]; ?></td>                  

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

                  <td><?= $user["usdt_address"]; ?></td>

                  <td><img src="<?= base_url(); ?>uploads/files/qr/<?= $user["id"]; ?>/<?= $user["qr_code"]; ?>" class="img-fluid" style="width: 100px;"></td>

                  <td><?= $value["created_at"]; ?></td>

                  <td><?= $value["status"] ? 'Transferred': 'Not Transferred'; ?></td>

                  

                  <td><?php if($value["slip"]) {?><img src="<?= base_url(); ?>uploads/files/withdrawslip/<?= $value['id'] ?>/<?= $value['slip'] ?>"  style="width: 100px;"><?php } else{ ?> <a href="<?= base_url(); ?>admin/edit_withdraw?id=<?= $value['id'] ?>">Upload Slip</a><?php } ?></td>



                  <?php if(!$value["marked"]) {?>

                <td><div class="row text-center"> 

                    <a class="btn btn-info" href='<?= base_url()."admin/approve_withdraw?id={$value["id"]}"; ?>'>Transferred</a>

                    <div></div>

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

                  </div>

                  </td>

                  <?php } ?>

                </tr>

              <?php $key= $key+1;} ?>

            </tbody>

          </table> 



        </div>

      </div>



    </div>



  </div>

</div>

</div>