<style>
  table thead tr th{
    font-size: 13px;
    font-weight: bolder;
  }
  table tbody tr td{
    font-size: 13px;
    font-weight:;
  }
</style>
<div class="table-responsive">
  <table class="table table-striped table-bordered">
    <div class="hidden-lg hidden-md" align="left" style="font-size: 15px; margin-left: 10px; color: blue;"><img src="images/swipe-left.gif" class="img-responsive" width="45"> Swipe left to view full transaction details.</div>

    <thead>
      <tr>

        <th>status</th>
        <th>Date</th>
        <th>Narration</th>
        <th>Amount</th>
        
      </tr>
    </thead>
    <tbody>
<?php

while($row = mysqli_fetch_assoc($query)){

$trans_id = $row["id"];

$cot_trans_status = $row["cot_trans_status"];
$aml_trans_status = $row["aml_trans_status"];
$nrt_trans_status = $row["nrt_trans_status"];

$date = $row["date"];
$desc = $row["desc"];
$tamount = $row["amount"];
$status = $row["status"];
$trans_status = $row["trans_status"];

$r_name = $row["r_name"];
$r_account_number = $row["r_account_number"];
$r_bank_name = $row["r_bank_name"];

  ?>



<tr>
  <td style="font-size:12px;"><?php echo $date; ?></td>
  <td style="font-size:12px;"><a>
    <?php

    //Check trans codes status
    if($cot_trans_status == "0"){
      $trans_link = "other-digital-transfer-cot.php?name=$r_name&&amount=$tamount&&bnknamee=$r_bank_name&&account_number=$r_account_number&&trans_date=$date";
    }elseif($aml_trans_status == "0"){
      $trans_link = "other-digital-transfer-ant.php?name=$r_name&&amount=$tamount&&bnknamee=$r_bank_name&&account_number=$r_account_number&&trans_date=$date";
    }elseif($nrt_trans_status == "0"){
      $trans_link = "other-digital-transfer-nrt.php?name=$r_name&&amount=$tamount&&bnknamee=$r_bank_name&&account_number=$r_account_number&&trans_date=$date";
    }else{

    }

    //Check trans codes status
    if($cot_trans_status == "22"){
      $trans_link = "international-wire-transfer-cot.php?name=$r_name&&amount=$tamount&&bnknamee=$r_bank_name&&account_number=$r_account_number&&trans_date=$date";
    }elseif($aml_trans_status == "22"){
      $trans_link = "international-wire-transfer-ant.php?name=$r_name&&amount=$tamount&&bnknamee=$r_bank_name&&account_number=$r_account_number&&trans_date=$date";
    }elseif($nrt_trans_status == "22"){
      $trans_link = "international-wire-transfer-nrt.php?name=$r_name&&amount=$tamount&&bnknamee=$r_bank_name&&account_number=$r_account_number&&trans_date=$date";
    }else{

    }

     if($trans_status == "PENDING"){
         $trans_status = "<a class='btn btn-warning' style='border-radius:0px; padding:2px 2px; font-size:10px; border-radius:5px; color:#000;'><i class='fa fa-warning'></i> PENDING</a><br><br><a href='$trans_link'>View Report <i class='fa fa-caret-right'></i></a>";
     }elseif($trans_status == "APPROVED"){
         $trans_status = "<a class='btn btn-success' style='border-radius:0px; padding:2px 2px; font-size:10px; border-radius:5px;'><i class='fa fa-check'></i> APPROVED</a>";
     }elseif($trans_status == "DECLINED"){
         $trans_status = "<a class='btn btn-danger' style='border-radius:0px; padding:2px 2px; font-size:10px; border-radius:5px;'><i class='fa fa-times'></i> DECLINED</a>";
     }else{
      echo "";
     }
    ?>
    <?php echo $trans_status; ?>
  </a></td>


  
  <td style="font-size:12px;"><?php echo $desc; ?></td>


  <?php
   if($status == "CREDIT"){
    echo '<td style="font-size:12px; color:#5cb85c;">'.$b_currency.''.number_format($tamount, 2).'</td>';
   }else{
    echo '<td style="font-size:12px; color:#d43f3a;">'.$b_currency.''.number_format($tamount, 2).'</td>';
   }
  ?>


  
</tr>

<?php

}

?>
      </tbody>
    </table>
</div>
