<?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>	

<?=(isset($errors)) ? $errors : ''; ?>

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

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

	<tr class="htt">
		<td align="center"><b><?=$paynames[$row['payment_system']]; ?></b></td>
		<td align="center"><?=$row['purse']; ?></td>
		<td align="center"><a href="/admin/users/edit/<?=$row["user_id"]; ?>" class="stn"><?=$row["user"]; ?></a></td>
		<td align="center"><?=$row['sum']; ?></td>
		<td align="center"><?=date("d.m.Y H:i", $row['date_add']); ?></td>
		<td align="center">
			<form method="post" action="" style="display: inline-block;">
				<input type="hidden" name="batch" value="<?=$row['id']; ?>">
				<input type="submit" name="yes" value="выплачено">
			</form>
			<form method="post" action="" style="display: inline-block;">
				<input type="hidden" name="batch" value="<?=$row['id']; ?>">
				<input type="submit" name="no" value="отклонить">
			</form>
		</td>
	</tr>

<?php endforeach; ?>

</table>

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

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