<?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_MONEY_HISTORY"];?>
		<span class="pull-right">
			<a href="<?php echo HTTP_SERVER_WEBSITE;?>dashboard/publisher/money"><?php echo $LANG["WBS_MONEY_HISTORY_REQUEST_MONEY"];?></a>
		</span>
	</div>

<div class="panel-content">

<div id="withdrawals-list" class="col-md-12">


<table class="table">
      <thead>
        <tr>
          <th><?php echo $LANG["WBS_MONEY_HISTORY_DATE"];?></th>
          <th><?php echo $LANG["WBS_MONEY_HISTORY_AMOUNT_OF_MONEY"];?></th>
          <th><?php echo $LANG["WBS_MONEY_HISTORY_STATUS"];?></th>
          <th></th>
        </tr>
      </thead>
      <tbody>


			<?php if ( !empty ( $withdrawals ) ) { ?>
			<?php foreach($withdrawals as $withdrawl): ?>
				<tr>
				  <td><?php echo date ( DATE_FORMAT_FULL, $withdrawl['pub_withdrawal_date'] );?></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_MONEY_HISTORY_STATUS_PENDING"]; ?>
<?php } ?>
<?php if ( $withdrawl['pub_withdrawal_status'] == 4 ) { //*** Pending - Admin Checking IT ***//?>
	<?php echo $LANG["WBS_MONEY_HISTORY_STATUS_PENDING"]; ?>
<?php } ?>

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

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

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

				  </td>

				  <td class="cancel-request" id="cancel-request-<?php echo $withdrawl['pub_withdrawal_id'];?>">
<?php if ( $withdrawl['pub_withdrawal_status'] == 0 ) { ?>
	<div data-id="<?php echo $withdrawl['pub_withdrawal_id'];?>" class="cancel-withdrawal"><span class="glyphicon glyphicon-remove"></span> <?php echo $LANG["WBS_MONEY_HISTORY_CANCEL_PAYMENT"];?></div>
<?php } ?>
				  </td>

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


      </tbody>
</table>

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

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

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