<?php echo $header;?>
<script>
function set(field,Pvalue)
{
	$('#page').val(1);
	nav();
}
function get(nothing,p)
{
	page=p;
	nav();
}
function nav()
{
	var urlPage='';
	if(page)  urlPage="?user=<?php echo $profile['0']['up_user_id'];?>&m=<?php echo $paginator['m'];?>&p="+page;
	else  urlPage="?user=<?php echo $profile['0']['up_user_id'];?>&m=<?php echo $paginator['m'];?>&p=1";
	location="?user=<?php echo $profile['0']['up_user_id'];?>&m=<?php echo $paginator['m'];?>&p="+page;
}
</script>
<div id="dashboard">
	<div class="container">
<div class="row"><br/></div>
<div class="panel">

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

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



<table class="table">
      <thead>
        <tr>
          <th><?php echo $LANG["WBS_ADMIN_REQUESTS_STATS_DATE"];?></th>
          <th><?php echo $LANG["WBS_ADMIN_REQUESTS_STATS_NAME"];?></th>
          <th><?php echo $LANG["WBS_ADMIN_REQUESTS_STATS_AMOUNT_OF_MONEY"];?></th>
          <th><?php echo $LANG["WBS_ADMIN_REQUESTS_STATS_STATUS"];?></th>
          <th></th>
        </tr>
      </thead>
      <tbody>


			<?php if ( !empty ( $withdrawals ) ) { ?>
			<?php foreach($withdrawals as $withdrawl): ?>
				<tr
					<?php if ( $withdrawl['pub_withdrawal_status'] == 0 ) { ?> class="danger"<?php } ?>
					<?php if ( $withdrawl['pub_withdrawal_status'] == 1 ) { ?> class="success"<?php } ?>
				>
				  <td><?php echo date ( DATE_FORMAT_FULL, $withdrawl['pub_withdrawal_date'] );?></td>
				  <td><?php echo $withdrawl['up_first_name'];?> <?php echo $withdrawl['up_last_name'];?></td>
				  <td>
				  
<?php if ( MONEY_ALIGN == 'LEFT' ) { ?>
	<?php echo MONEY_SYMBOL;?> <?php echo sprintf(NUMBER_FORMAT, $withdrawl['pub_withdrawal_amount']);?>
<?php } ?>

<?php if ( MONEY_ALIGN == 'RIGHT' ) { ?>
	<?php echo sprintf(NUMBER_FORMAT, $withdrawl['pub_withdrawal_amount']);?> <?php echo MONEY_SYMBOL;?>
<?php } ?>
				  
				  </td>
				  <td>

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

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

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

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

				  </td>

<td class="cancel-request" id="cancel-request-<?php echo $withdrawl['pub_withdrawal_id'];?>">
	<a class="no-decoration" href="<?php echo HTTP_SERVER_ADMIN ?>requests/details.php?id=<?php echo $withdrawl['pub_withdrawal_id'];?>"><span class="glyphicon glyphicon-eye-open"></span> <?php echo $LANG["WBS_ADMIN_REQUESTS_STATS_OPEN"];?></a>
</td>

				</tr>
			<?php endforeach; ?>
			<?php } ?>


      </tbody>
</table>

<?php if ( $paginator['rows'] > 10 ) { ?>
<div class="row"></div>
	<?php echo $paginator['pager'];?>
<?php } ?>



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

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