Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- body {
- margin: 0;
- background:#ddd;
- }
- h2 {
- margin:5px;
- }
- table {
- border-collapse:collapse;
- background:#333;
- color:#BBB;
- }
- th {
- border-left:1px solid #000;
- border-right:1px solid #000;
- border-bottom:1px solid #000;
- color:#fe5;
- }
- #border {
- border-left:1px solid #000;
- border-right:1px solid #000;
- border-bottom:1px solid #000;
- }
- #border td {
- border-left:1px solid #000;
- border-right:1px solid #000;
- }
- </style>
- <?php
- $host = 'localhost';
- $user = 'root';
- $pass = '';
- $rdb = 'auth';
- $connect = mysql_connect($host,$user,$pass) or die('Нет подключения к базе данных');
- mysql_select_db ($rdb, $connect) or die(mysql_error());
- $ban_account = mysql_query("SET NAMES cp1251");
- $ban_account = mysql_query("SELECT * FROM `account_banned` WHERE `active` = 1 ORDER BY `bandate` DESC LIMIT 100", $connect) or die(mysql_error());
- print "<h2 align=\"center\">Забаненные аккаунты</h2>
- <table cellpadding=\"1\" cellspacing=\"1\" align=\"center\" width=\"800\"><tr>
- <th width=\"30\">№</th>
- <th width=\"100\">Аккаунт</th>
- <th width=\"100\">Бан установлен</th>
- <th width=\"100\">Забанил</th>
- <th>Причина</th>
- <th width=\"100\">Бан закончится</th>
- </tr></table>";
- $id = 1;
- while ($result_account = mysql_fetch_array($ban_account)){
- $accout_id = $result_account['id'];
- $username_sql = mysql_query("SELECT * FROM `account` WHERE `id` = $accout_id LIMIT 1", $connect) or die(mysql_error());
- $result_username = mysql_fetch_array($username_sql);
- $account = $result_username['username'];
- $bandate = date("H:i:s d.m.Y", $result_account['bandate']);
- $bannedby = $result_account['bannedby'];
- $banreason = $result_account['banreason'];
- if ($result_account['bandate'] == $result_account['unbandate'])
- $unbandate = 'Навсегда';
- else
- $unbandate = date("H:i:s d.m.Y", $result_account['unbandate']);
- if ($result_account['bannedby'] == '')
- $bannedby = 'Консоль';
- print "<table cellpadding=\"1\" cellspacing=\"1\" align=\"center\" width=\"800\" id=\"border\"><tr>
- <td width=\"30\" align=\"center\">$id</td>
- <td width=\"100\" align=\"center\">$account</td>
- <td width=\"100\" align=\"center\">$bandate</td>
- <td width=\"100\" align=\"center\">$bannedby</td>
- <td align=\"center\">$banreason</td>
- <td width=\"100\" align=\"center\">$unbandate</td>
- </tr></table>";
- $id++;
- }
- $ban_ip = mysql_query("SET NAMES cp1251");
- $ban_ip = mysql_query("SELECT * FROM `ip_banned` ORDER BY `bandate` DESC LIMIT 100", $connect) or die(mysql_error());
- print "<h2 align=\"center\">Забаненные адреса</h2>
- <table cellpadding=\"1\" cellspacing=\"1\" align=\"center\" width=\"800\"><tr>
- <th width=\"30\">№</th>
- <th width=\"100\">Адрес</th>
- <th width=\"100\">Бан установлен</th>
- <th width=\"100\">Забанил</th>
- <th>Причина</th>
- <th width=\"100\">Бан закончится</th>
- </tr></table>";
- $id = 1;
- while ($result_ip = mysql_fetch_array($ban_ip)){
- $ip = $result_ip['ip'];
- $bandate = date("H:i:s d.m.Y", $result_ip['bandate']);
- $bannedby = $result_ip['bannedby'];
- $banreason = $result_ip['banreason'];
- if ($result_ip['bandate'] == $result_ip['unbandate'])
- $unbandate = 'Навсегда';
- else
- $unbandate = date("H:i:s d.m.Y", $result_ip['unbandate']);
- if ($result_ip['bannedby'] == '')
- $bannedby = 'Консоль';
- print "<table cellpadding=\"1\" cellspacing=\"1\" align=\"center\" width=\"800\" id=\"border\"><tr>
- <td width=\"30\" align=\"center\">$id</td>
- <td width=\"100\" align=\"center\">$ip</td>
- <td width=\"100\" align=\"center\">$bandate</td>
- <td width=\"100\" align=\"center\">$bannedby</td>
- <td align=\"center\">$banreason</td>
- <td width=\"100\" align=\"center\">$unbandate</td>
- </tr></table>";
- $id++;
- }
- mysql_close($connect);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement