<?
include ('logue.php');
include ('entete2.php');


$sql_dc = "SELECT ip FROM matgraph_ip GROUP BY ip HAVING Count(*) > 2 ORDER BY date_connexion DESC";
$res_dc = mysql_query($sql_dc)or die('erreur sql<br>'.$sql_dc.'<br>'.mysql_error());

while( $row_dc = mysql_fetch_array($res_dc) ) {

	//
	$sql_ip = "SELECT * FROM matgraph_ip WHERE ip = '$row_dc[ip]'";
	$res_ip = mysql_query($sql_ip)or die('erreur sql<br>'.$sql_ip.'<br>'.mysql_error());

	while( $row_ip = mysql_fetch_array($res_ip) ) {

		//
		$sql_info = "SELECT login FROM matgraph_users WHERE id = $row_ip[idlogin]";
		$res_info = mysql_query($sql_info)or die('erreur sql<br>'.$sql_info.'<br>'.mysql_error());

		$row_info = mysql_fetch_array($res_info);

		$sql_info2 = "SELECT date FROM matgraph_users WHERE idjoueur = $row_ip[idlogin] ORDER BY date DESC LIMIT 1";
		$res_info2 = mysql_query($sql_info2)or die('erreur sql<br>'.$sql_info2.'<br>'.mysql_error());

		$row_info2 = mysql_fetch_array($res_info2);

		echo "<br><br>Ip : $row_dc[ip]<br>Joueur : $row_info[login]<br>";
		echo "Browser : $row_ip[browser]<br>Hote : $row_ip[hote]<br>";
		echo "Date connexion : $row_ip[date_connexion] Dernier refresh : $row_info2[date]";
		echo "<br>Ancien login : $row_ip[alogin]<br>Md5 de ce login : ".md5($row_info[login]);

	}

}



?>