'; $sql_players = "SELECT pi.name, pi.id AS pid FROM uts_player p, uts_pinfo pi WHERE p.pid = pi.id AND p.ip BETWEEN INET_ATON('$ip_from') AND INET_ATON('$ip_to') GROUP BY pid"; $q_players = mysql_query($sql_players) or die(mysql_error()); $j = 0; while ($r_players = mysql_fetch_array($q_players)) { echo ''; echo ''; $sql_recent = "SELECT m.time AS time, m.id AS mid, INET_NTOA(p.ip) AS ip FROM uts_player p, uts_match m WHERE m.id = p.matchid AND p.pid = '${r_players['pid']}' AND p.ip BETWEEN INET_ATON('$ip_from') AND INET_ATON('$ip_to') ORDER BY m.time DESC LIMIT 0,5"; echo ''; } echo'
Players using IPs '.$ip_from.' - '.$ip_to.' and their last 5 matches using these IPs
'; echo ''.$r_players['name'].''; echo ''; $q_recent= mysql_query($sql_recent) or die(mysql_error()); while ($r_recent = mysql_fetch_array($q_recent)) { $j++; $class = ($j%2) ? 'grey' : 'grey2'; echo ''; } echo '
'; echo ''.mdate($r_recent['time']).''; echo ''; echo $r_recent['ip']; echo '
Go Back To Admin Page
'; ?>