<?php echo $header;?>
<div id="dashboard">
	<div class="container">
<div class="row"><br/></div>
<div class="panel">

	<div class="panel-header"><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_WITHDRAWAL_DETAILS"];?> 
	<?php echo $w['0']['up_first_name'];?> <?php echo $w['0']['up_last_name'];?>

	<div class="pull-right">
		<a href="<?php echo HTTP_SERVER_ADMIN ?>requests/filter.php?user=<?php echo $w['0']['pub_withdrawal_user_id'];?>&m=rejected" class="btn btn-warning"><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_REJECTED_PAYMENTS"];?></a>
	</div>

	<div class="pull-right">&nbsp;&nbsp;</div>

	<div class="pull-right">
		<a href="<?php echo HTTP_SERVER_ADMIN ?>requests/filter.php?user=<?php echo $w['0']['pub_withdrawal_user_id'];?>&m=approved" class="btn btn-success"><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_APPROVED_PAYMENTS"];?></a>
	</div>

	<div class="pull-right">&nbsp;&nbsp;</div>

	<div class="pull-right">
		<a href="<?php echo HTTP_SERVER_ADMIN ?>clickfraud/index.php?user=<?php echo $w['0']['pub_withdrawal_user_id'];?>" class="btn btn-danger"><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_CLICK_FRAUD"];?></a>
	</div>

	<div class="row"></div>
	</div>

<div class="panel-content">
<div class="col-md-12">
<!-- ADMIN QUICK STATS -->

<div class="row"><br/></div>
<div class="row">


<div class="col-md-6">
<h3>User Details</h3>

<table class="table">

      <tbody>

        <tr>
          <td><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_FIRST_NAME"];?></td>
          <td><?php echo $w['0']['up_first_name'];?></td>
        </tr>

        <tr>
          <td><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_LAST_NAME"];?></td>
          <td><?php echo $w['0']['up_last_name'];?></td>
        </tr>

        <tr>
          <td><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_PHONE"];?></td>
          <td><?php echo $w['0']['up_phone'];?></td>
        </tr>

        <tr>
          <td><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_TAX_ID"];?></td>
          <td><?php echo $w['0']['up_phone'];?></td>
        </tr>

      </tbody>

</table>
</div>

<div class="col-md-6">
<h3><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_REQUEST_DETAILS"];?></h3>


<table class="table">

      <tbody>

        <tr>
          <td><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_DATE"];?></td>
          <td><?php echo date ( DATE_FORMAT_FULL, $w['0']['pub_withdrawal_date'] );?></td>
        </tr>

        <tr>
          <td><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_AMOUNT"];?></td>
          <td>

<?php if ( MONEY_ALIGN == 'LEFT' ) { ?>
	<?php echo MONEY_SYMBOL;?> <?php echo $w['0']['pub_withdrawal_amount'];?></td>
<?php } ?>

<?php if ( MONEY_ALIGN == 'RIGHT' ) { ?>
	<?php echo $w['0']['pub_withdrawal_amount'];?> <?php echo MONEY_SYMBOL;?></td>
<?php } ?>

        </tr>

        <tr>
          <td><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_STATUS"];?></td>
          <td>

<?php if ( $w['0']['pub_withdrawal_status'] == 0 ) { //*** Pending ***//?>
	<?php echo $LANG["WBS_ADMIN_REQUESTS_STATS_PENDING"]; ?>
<?php } ?>
<?php if ( $w['0']['pub_withdrawal_status'] == 4 ) { //*** Pending - Admin Checking IT ***//?>
	<?php echo $LANG["WBS_ADMIN_REQUESTS_STATS_PENDING"]; ?>
<?php } ?>

<?php if ( $w['0']['pub_withdrawal_status'] == 1 ) { //*** Approved ***//?>
	<?php echo $LANG["WBS_ADMIN_REQUESTS_STATS_APPROVED"]; ?>
<?php } ?>

<?php if ( $w['0']['pub_withdrawal_status'] == 2 ) { //*** Rejected ***//?>
	<?php echo $LANG["WBS_ADMIN_REQUESTS_STATS_REJECTED"]; ?>
<?php } ?>

<?php if ( $w['0']['pub_withdrawal_status'] == 3 ) { //*** Canceled ***//?>
	<?php echo $LANG["WBS_ADMIN_REQUESTS_STATS_CANCELED"]; ?>
<?php } ?>

		 </td>
        </tr>

        <tr>
          <td><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_PAYPAL_NAME"];?></td>
          <td><?php echo $w['0']['ppp_first_name'];?> <?php echo $w['0']['ppp_last_name'];?></td>
        </tr>

        <tr>
          <td><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_PAYPAL_EMAIL"];?></td>
          <td><?php echo $w['0']['ppp_paypal_id'];?></td>
        </tr>

      </tbody>

</table>
</div>

</div>

<legend><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_LATEST_10_CLICKS_FRAUD"];?></legend>

<?php if ( !empty ( $clickFraud ) ) { ?>
<table class="table">
	<thead>
        <tr>
          <th><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_CF_DATE"];?></th>
          <th><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_CF_KEYWORD"];?></th>
          <th><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_CF_VALUE"];?></th>
        </tr>
	</thead>

      <tbody>
<?php foreach($clickFraud as $cf): ?>
        <tr>
          <td><?php echo date ( DATE_FORMAT_FULL, $cf['cf_date'] );?></td>
          <td><?php echo $cf['cf_keyword'];?></td>
          <td>

<?php if ( MONEY_ALIGN == 'LEFT' ) { ?>
	<?php echo MONEY_SYMBOL;?> <?php echo $cf['cf_value'];?></td>
<?php } ?>

<?php if ( MONEY_ALIGN == 'RIGHT' ) { ?>
	<?php echo $cf['cf_value'];?> <?php echo MONEY_SYMBOL;?></td>
<?php } ?>

		  </td>
        </tr>
<?php endforeach; ?>
      </tbody>

</table>
<?php } else { ?>
	<?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_CF_NO_CLICK_FRAUD"];?>
<?php } ?>

<?php if ( $w['0']['pub_withdrawal_status'] == 0 or $w['0']['pub_withdrawal_status'] == 4 ) { //*** Pending ***//?>
	<div class="alert alert-success" role="alert"><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_PAYMENT_PENDING"];?></div>



<div class="col-md-12 input-group margin-bottom-10">
	<div id="mark-loader"></div>
</div>


<div class="col-md-12 input-group margin-bottom-10">

	<button id="mark-rejected" data-id="<?php echo $w['0']['pub_withdrawal_id'];?>" type="submit" class="btn btn-danger pull-right"><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_PAYMENT_REJECT"];?></button>

	<div class="pull-right">&nbsp;&nbsp;&nbsp;</div>

	<button id="mark-paid" data-id="<?php echo $w['0']['pub_withdrawal_id'];?>" type="submit" class="btn blue-btn pull-right"><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_PAYMENT_MARK_PAID"];?></button>

</div>



<?php } ?>


<?php if ( $w['0']['pub_withdrawal_status'] == 1 ) { //*** Approved ***//?>
	<div class="alert alert-success" role="alert"><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_PAYMENT_STATUS_APPROVED"];?></div>
<?php } ?>


<?php if ( $w['0']['pub_withdrawal_status'] == 2 ) { //*** Rejected ***//?>
	<div class="alert alert-success" role="alert"><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_PAYMENT_STATUS_REJECTED"];?></div>
<?php } ?>


<?php if ( $w['0']['pub_withdrawal_status'] == 3 ) { //*** Canceled ***//?>
	<div class="alert alert-success" role="alert"><?php echo $LANG["WBS_ADMIN_REQUESTS_DETAILS_PAYMENT_STATUS_CANCELED"];?></div>
<?php } ?>




<!-- END ADMIN QUICK STATS -->
<div class="row"><br/></div>
</div>
<div class="row"><br/></div>
</div>

</div>
</div>
</div>
<?php echo $footer;?>