<?php include "core/menu.php" ?>		
<h1>Informations</h1><br>
<div> </b> 		
<?php 
require_once ( 'config/config.php');
if (! $sock = @fsockopen($ip, $port, $num, $error, 3)) 
echo '<font color=red><img src="img/offline.png" /></font>';
else{ 
echo '<font color=limegreen><img src="img/online.png" /></font>'; 
fclose($sock);
} 
?><br>
<?php
require_once ( 'config/config.php');
$conn = mysql_connect($host, $user, $pass) or die('Connexion &eacute;chou&eacute;: ' . mysql_error());

mysql_select_db($characters, $conn) or die('La s&eacute;lection de la base de donn&eacute;e &agrave; &eacute;chou&eacute;: ' . mysql_error());

$sql = "SELECT Count(Online) FROM `characters` WHERE `online` = 1";
$result = mysql_query($sql, $conn);
$row = mysql_fetch_array($result);
$online = $row["Count(Online)"];

echo "Nombre de joueurs en ligne : $online"; 
mysql_selectdb ("$realmd");
?></a></div>
<br>

<?php
require_once ( 'config/config.php');
$conn = mysql_connect($host, $user, $pass) or die('Connexion &eacute;chou&eacute;: ' . mysql_error());
$max = mysql_query ("select max(`maxplayers`) from uptime");     
$max = mysql_result ($max,0);
echo "Record joueurs en ligne : $max <br>";
?>
<br><?php
require_once ( 'config/config.php');

mysql_connect($host, $user, $pass) or die ("Connexion impossible &agrave; $host");
mysql_selectdb ("$realmd");

$sql = mysql_query ("SELECT * FROM $realmd.`uptime` ORDER BY `starttime` DESC LIMIT 1");  
$uptime_results = mysql_fetch_array($sql);    

if ($uptime_results['uptime'] > 86400) { 
    $uptime =  round(($uptime_results['uptime'] / 24 / 60 / 60),2)." jour(s)";
}
elseif($uptime_results['uptime'] > 3600) { 
    $uptime =  round(($uptime_results['uptime'] / 60 / 60),2)." heure(s)";
}
else { 
    $uptime =  round(($uptime_results['uptime'] / 60),2)." min";
}

echo "Uptime: $uptime </a><br><br>";
//<a href="top.php">Top 3 des joueurs
//<a href="ban.php">Joueurs bannis</a><br></center>           
?>
<br><u><b>Realmlist :</b></u><br>
<?php
require_once ( 'config/config.php');
echo "$realmlist <br>";
echo '<u><b>Version :</b></u><br>';
echo "$version <br>";?>
<a href="online.php">Joueurs en ligne</a><br>
<a href="stats.php">Statistiques</a><br>
 </div>
            <div id="contenu_b"></div>
    </div>
        <div id="menu-v">
				<hr />
<?php include "core/menud.php" ?>
<?php include "core/end.php" ?>
