<?php require_once(ROOT . "/views/admin/layouts/_header_admin.php"); ?>

<div class="s-bk-lf">
	<div class="acc-title">История выплат</div>
</div>
<div class="silver-bk"><div class="clr"></div>	
<center><a href="/admin/payments">Список выплат</a> || <a href="/admin/payments/days">По дням</a></center><BR />

<?php if(count($payments) > 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">ID</td>
			<td align="center" width="150" class="m-tb">Пользователь</td>
			<td align="center" width="75" class="m-tb">Сумма</td>
			<td align="center" width="75" class="m-tb">Платёжка</td>
			<td align="center" width="150" class="m-tb">Дата операции</td>
		</tr>


	<?php foreach($payments as $row) : ?>

		<tr class="htt">
		    <td align="center" width="50"><?=$row["id"]; ?></td>
		    <td align="center"><a href="/admin/users/edit/<?=$row["user_id"]; ?>" class="stn"><?=$row["user"]; ?></a></td>
		    <td align="center" width="75"><?=$row["sum"]; ?></td>
			<td align="center" width="75"><?=$row["payment_system"]; ?></td>
			<td align="center" width="150"><?=date("d.m.Y в H:i:s",$row["date_add"]); ?></td>
	  	</tr>

	<?php endforeach; ?>

</table>

<?php else : ?>

	<center><b>Записей нет</b></center><BR />

<?php endif; ?>

<?php echo $navigation; ?>

</div>
<div class="clr"></div>	

<?php require_once(ROOT . "/views/admin/layouts/_footer_admin.php"); ?>