Создаете файл ban.php
И туда пихаете етот код ... и настраиваете под себя
Код:
<?php $ConnectDB = mysql_connect("localhost", "логин", "пароль") or die ("Нет соединения с MySQL"); mysql_select_db("realmd") or die ("Нет соединения с базой $dbr"); echo "<h2>Забаненные аккаунты</h2>"; echo "<table width=\"100%\" border=\"1\" align=\"center\"><tr> <color #FF0000><td align=\"center\" width=\"20%\">забанен:</td></color> <color #FF0000><td align=\"center\" width=\"20%\">Бан установлен:</td></color> <color #FF0000><td align=\"center\" width=\"20%\">Забанил:</td></color> <color #FF0000><td align=\"center\" width=\"20%\">Причина:</td></color> <color #FF0000><td align=\"center\" width=\"20%\">Бан до:</td> </color> </tr></table>"; $i=0; $data = mysql_query("SELECT * FROM account_banned WHERE active = 1 ORDER BY bandate DESC LIMIT 100",$ConnectDB); @$row = mysql_fetch_array($data[$i]); { while($row = mysql_fetch_array($data)) { $banid = $row['id']; $usern = mysql_query("SELECT * FROM account WHERE id= $banid LIMIT 1",$ConnectDB); $rowuser = mysql_fetch_array($usern); $banuser = $rowuser['username']; $bandate = date("H:i:s d.m.Y", $row['bandate']); $bannedby = $row['bannedby']; $banreason = $row['banreason']; $unbandate = date("H:i:s d.m.Y", $row['unbandate']); echo "<font color=\"beer\"> <table width=\"100%\" border=\"1\" align=\"center\"><tr> <color #FF0000><td align=\"center\" width=\"20%\">$banuser</td></color> <color #FF0000><td align=\"center\" width=\"20%\">$bandate г.</td></color> <color #FF0000><td align=\"center\" width=\"20%\">$bannedby</td></color> <color #FF0000><td align=\"center\" width=\"20%\">$banreason</td></color> <color #FF0000><td align=\"center\" width=\"20%\">$unbandate г.</td></color> </tr></table></font>"; $i++; } } //теперь выборка по IP адресам echo "<color #FF0000><h2>БАНЫ по IP </h2><br></color>"; echo "<table width=\"100%\" border=\"1\" align=\"center\"><tr> <td align=\"center\" width=\"20%\">IP:</td> <td align=\"center\" width=\"20%\">Бан установлен:</td> <td align=\"center\" width=\"20%\">Забанил:</td> <td align=\"center\" width=\"20%\">Причина:</td> <td align=\"center\" width=\"20%\">Бан до:</td> </tr></table>"; $u=0; $bannedip = mysql_query("SELECT * FROM ip_banned ORDER BY bandate DESC LIMIT 100"); @$row = mysql_fetch_array($bannedip[$u]); { while($row = mysql_fetch_array($bannedip)) { $banip = $row['ip']; $bandate = date("H:i:s d.m.Y", $row['bandate']); $bannedby = $row['bannedby']; $banreason = $row['banreason']; $unbandate = date("H:i:s d.m.Y", $row['unbandate']); echo "<font color=\"beer\"> <table width=\"100%\"border=\"1\" align=\"center\"><tr> <color #FF0000><td align=\"center\" width=\"20%\">$banip</td></color> <color #FF0000><td align=\"center\" width=\"20%\">$bandate г.</td></color> <color #FF0000><td align=\"center\" width=\"20%\">$bannedby</td></color> <color #FF0000><td align=\"center\" width=\"20%\">$banreason</td></color> <color #FF0000><td align=\"center\" width=\"20%\">$unbandate г.</td></color> </tr></table></font>"; $u++; } } ?>