<?php include "core/menu.php" ?>		
<h1>Bannis</h1>
<?php 
require_once ( 'config/config.php'); ?><br>
<b>Adresses IP bannies :</b><br><br>
<table width="100%" border="1" align="center">
    <tr>  
        <td align="center" width="20%">IP</td>  
        <td align="center" width="20%">Banni depuis</td>  
        <td align="center" width="20%">Banni par</td>  
        <td align="center" width="20%">Raison</td>  
        <td align="center" width="20%">Banni jusqu'a</td>  
    </tr>

<?php  
    require_once('config/config.php');

    mysql_connect($host, $user, $pass) or die('Connexion impossible: ' . mysql_error());
    mysql_select_db($realmd) or die('Impossible de séléctioner cette DB: ' . mysql_error());

    $bannedip = mysql_query('SELECT ip, bandate, bannedby, banreason, unbandate FROM ip_banned ORDER BY bandate DESC LIMIT 100');
    
    $i=0;
    while($row = mysql_fetch_array($bannedip))
    {  
        echo '    <tr>  
                    <td align=\'center\' width=\'20%\'>' . $row['ip'] . '</td>
                    <td align=\'center\' width=\'20%\'>' . date("H:i:s d.m.Y", $row['bandate']) . '</td>  
                    <td align=\'center\' width=\'20%\'>' . $row['bannedby'] . '</td>  
                    <td align=\'center\' width=\'20%\'>' . $row['banreason'] . '</td>  
                    <td align=\'center\' width=\'20%\'>' . date("H:i:s d.m.Y", $row['unbandate']) . '</td>  
                </tr>';  
        $i++;  
    }
?>

</table><br><b>Joueurs bannis :</b><br><br>
<?php
    require_once('config/config.php');
       
    mysql_connect($host, $user, $pass) or die('Connexion impossible: ' . mysql_error());
    mysql_select_db($realmd) or die('Impossible de séléctioner cette DB: ' . mysql_error());
?>

<table width='100%' border='1' align='center'>
    <tr>  
        <td align='center' width='20%'>Compte:</td>  
        <td align='center' width='20%'>Banni depuis:</td>  
        <td align='center' width='20%'>Banni par:</td>  
        <td align='center' width='20%'>Raison:</td>  
        <td align='center' width='20%'>Banni jusqu'a:</td>   
    </tr>
 
<?php  
    $i=0;  
    $data = mysql_query('SELECT account_banned.bandate, account_banned.bannedby, account_banned.banreason, account_banned.unbandate, account.username
                        FROM account_banned, account 
                        WHERE account_banned.active = 1 AND account_banned.id = account.id
                        ORDER BY bandate DESC LIMIT 100');  

    while($row = mysql_fetch_array($data)) 
    {   
        echo '    <tr>  
                    <td align=\'center\' width=\'20%\'>' . $row['username'] . '</td>  
                    <td align=\'center\' width=\'20%\'>' . date("H:i:s d.m.Y", $row['bandate']) . '</td>  
                    <td align=\'center\' width=\'20%\'>' . $row['bannedby'] . '</td>  
                    <td align=\'center\' width=\'20%\'>' . $row['banreason'] . '</td>  
                    <td align=\'center\' width=\'20%\'>' . date("H:i:s d.m.Y", $row['unbandate']) . '</td>  
                </tr>';  

        $i++;  
    } 
?>

</table> 
</table> 
<br>
<br><br></center>            </div>
            <div id="contenu_b"></div>
    </div>
        <div id="menu-v">
				<hr />
<?php include "core/menud.php" ?>
<?php include "core/end.php" ?>
