<?PHP
$_OPTIMIZATION["title"] = "Последние выплаты";
$_OPTIMIZATION["description"] = "Список последних выплат";
$_OPTIMIZATION["keywords"] = "Последние выплаты";
?>

<div class="cl-right"><div class="s-bk-lf">
	<div class="acc-title">Последние выплаты</div>
</div>
<div class="silver-bk">
<p></p>
<div class="clr"></div>	


<center><b>Отображены выплаты за последние 24 часа</b></center>
<BR />
<?PHP

$dt = time() - 60*60*24;

$db->Query("SELECT * FROM db_payment WHERE status = '3' AND date_add > '$dt'");



if($db->NumRows() > 0){

$all_pay = 0;
$all_pay_sum = 0;

?>

<table cellpadding='3' cellspacing='0' border='0' bordercolor='#336633' align='center' width="99%">
  <tr bgcolor="#efefef">
    <td align="center" width="50" class="m-tb">Пользователь</td>
	<td align="center" width="50" class="m-tb">Сумма</td>
    <td align="center" width="50" class="m-tb">Платежная система</td>
    <td align="center" width="50" class="m-tb">Кошелек</td>
	<td align="center" width="50" class="m-tb">Дата</td>
  </tr>



<?PHP

	while($data = $db->FetchArray()){
	$all_pay ++;
	$all_pay_sum += $data["sum"];
	?>
	<tr class="htt">
	<td align="center"><?=substr($data["user"],0,-3); ?><font color = 'red'>XXX</font></td>
    <td align="center"><?=sprintf("%.2f",$data["sum"]); ?> <?=$data["valuta"]; ?></td>
	<td align="center"><img src='/img/payeer-icon.png' style="width: 25px; height: 25px;"></td>
	<td align="center"><?=substr($data["purse"],0,-3); ?><font color = 'red'>XXX</font></td>
	<td align="center"><?=date("d.m.Y H:i:s",$data["date_add"]); ?></td>
  	</tr>
	<?PHP
	
	}

?>
	</table>
<table cellpadding='3' cellspacing='0' border='0' bordercolor='#336633' align='center' width="99%">
<tr bgcolor="#efefef">
		<!--<td align="center" width="50" class="m-tb" colspan=2>Всего выплат: </?=$all_pay; ?> шт.</td>-->
		<td align="center" width="50" class="m-tb" colspan=2>На сумму: <?=sprintf("%.2f",$all_pay_sum); ?> RUB</td>
</tr>
	</table>
<BR />
</div>

<?PHP


}else echo "<center><b>Выплат нет :(</b></center><BR />";


?>
<div class="clr"></div>								<div class="clr"></div>	
							<br>
							<br>
							</div>
						<div class="clr"></div>
						
						<style>
						
.logo12 {
    background-image: url('/img/logo12.jpg');
    color: #5d3d1d;
    margin: 10px 0px 0px -10px;
    opacity: 0.9;
    height: 202px;
    background-size: 105%;
}
					</style>