<? include('checkcookie.php'); ?>
<h3>Просмотр Заблокированных</h3>
<br>
<?
if(isset($_POST["id"]))
{
	$id=$_POST["id"];
	$username=$_POST["username"];
	$dow_user_ban=$_POST["dow_user_ban"];

	mysql_query("UPDATE seelf_dow_list SET username='$username' where id='$id'");
	mysql_query("UPDATE seelf_dow_list SET dow_user_ban='$dow_user_ban' where id='$id'");

	echo "<font color=\"green\"><b>Готово.</b></font><br><br>";
}

	if ($_GET["option"]=="delete")
	{
		$id=$_GET["id"];
		mysql_query("DELETE FROM seelf_dow_list WHERE id='$id'");

		echo "<font color=\"#cc0000\"><b>удален.</b></font><br><br>";
	}
?>
<br>
<table width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<th>ID</th>
		<th>Логин</th>
		<th>Попыток подбора</th>
		<th>Удалить</th>
	</tr>
	<?
	$sql="SELECT * FROM seelf_dow_list order by id desc";
	$tabla = mysql_query($sql);
	while ($registro = mysql_fetch_array($tabla))
	{
		?>
		<tr>
			<td><?=$registro["id"] ?></td>
			<td><?=$registro["username"] ?></td>
			<td><?=$registro["dow_user_ban"] ?></td>
			<td>
				<form method="post" action="adminmain.php?p=downloads_blacklist&id=<?= $registro["id"] ?>&option=delete">
				<input type="submit" value="Delete" class="button">
				</form>
			</td>
		</tr>
	<? } ?>
</table>