<? require 'header.php'; ?>
<div class="menucenter">
<br>
<?
$res=mysql_query("select valutaname from tb_site where id='1'");
$res=mysql_fetch_assoc($res);
$vn=$res["valutaname"];

$res=mysql_query("select count(id) as kolvo, sum(money) as allpay from tb_payme");
$res=mysql_fetch_assoc($res);

?><center>
<span style="font-weight: bold; font-size: 14px; text-align: center;">
В ожидании <span style="color: #ff0000;"><?=$res["kolvo"] ?></span> выплат на сумму <span style="color: #ff0000;"><?=$res["allpay"] ?></span> <?=$vn ?>
</span></center>
<br>
<table class='reyt' width='100%' border='0' cellpadding='0' cellspacing='0'>
<thead><tr>
<th align="center">Дата\Время запроса</th>
<th align="center">Имя пользователя</th>
<th align="center">Сумма выплаты</th>
<th align="center">Номер счета</th>
</tr></thead>

<?

$tabla = mysql_query("SELECT datetime,username,money,pemail FROM tb_payme ORDER BY datetime DESC");

while ($registro = mysql_fetch_assoc($tabla))
{
	echo "
	<tbody><tr>
	<td class='value' align='center' >". $registro["datetime"] ."</td>
	<td class='value' align='center' >". $registro["username"] ."</td>
	<td class='value' align='center' >". $registro["money"] ."</td>
        <td class='value' align='center' ><font color=\"#000000\">".substr($registro["pemail"],0,10)."<font color=\"#ff0000\">XXX</font>"."</font></td>
	</tr>";
}
?>
</tbody></table>
<? require 'footer.php'; ?>