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

<form action="/admin/users/search" method="post">
<table width="250" border="0" align="center">
  <tr>
	<td><b>Логин:</b></td>
	<td><input type="text" name="user" /></td>
	<td><input type="submit" value="Поиск" /></td>
  </tr>
</table>
</form>
<BR />

<?php if($users_info != false) : ?>

<table cellpadding='3' cellspacing='0' border='0' bordercolor='#336633' align='center' width="99%">
  <tr bgcolor="#efefef">
	<td align="center" width="50" class="m-tb"><a href="/admin/users/1/<?=$page; ?>" class="stn-sort">ID</a></td>
	<td align="center" width="150" class="m-tb">User</td>

	<td align="center" width="90" class="m-tb">
		&nbsp;|&nbsp;
		<a href="/admin/users/b/<?=$page; ?>" class="stn-sort">покупки</a> &nbsp;|&nbsp;
		<a href="/admin/users/p/<?=$page; ?>" class="stn-sort">выплаты</a> &nbsp;|&nbsp; <br>
		&nbsp;|&nbsp;
		<a href="/admin/users/r/<?=$page; ?>" class="stn-sort">реклама</a> &nbsp;|&nbsp;
		<a href="/admin/users/k/<?=$page; ?>" class="stn-sort">касса</a> &nbsp;|&nbsp;
	</td>

	<td align="center" width="100" class="m-tb">Скорость</td>
	<td align="center" width="100" class="m-tb"><a href="/admin/users/6/<?=$page; ?>" class="stn-sort">IP</a></td>
	<td align="center" width="100" class="m-tb"><a href="/admin/users/5/<?=$page; ?>" class="stn-sort">Зарегистрирован</a></td>
	<td align="center" width="100" class="m-tb">Пос. активность</td>
  </tr>

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

	<tr class="htt">
		<td align="center"><?=$row["id"]; ?></td>
		<td align="center"><a href="/admin/users/edit/<?=$row["id"]; ?>" class="stn"><?=$row["user"]; ?></a></td>
		
		<td align="center">
			&nbsp;|&nbsp;
			<?=sprintf("%.2f",$row["money_b"]); ?> руб.&nbsp;|&nbsp;
			<?=sprintf("%.2f",$row["money_p"]); ?> руб.&nbsp;|&nbsp; <br>
			&nbsp;|&nbsp;
			<?=sprintf("%.2f",$row["money_r"]); ?> руб.&nbsp;|&nbsp;
			<?=sprintf("%.2f",$row["money_k"]); ?> руб.&nbsp;|&nbsp;
		</td>


		<td align="center"><?=sprintf("%.4f", $row["speed"]); ?></td>
		<td align="center"><?=$row["uip"]; ?></td>
		<td align="center"><?=date("d.m.Y",$row["date_reg"]); ?></td>	
		<td align="center"><?=date("d.m.Y в H:i",$row["lastupdate"]); ?></td>

	<?php endforeach; ?>

</table>
<BR />

<?PHP else : ?>

	<center><b>На данной странице нет записей</b></center><BR />

<?php endif; ?>

<?=$navigation; ?>

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

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