blob: 7be13ae88becdb77dd607fc50845fa66d353f1bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
<?php
if (empty($import_adminkey) or isset($_REQUEST['import_adminkey']) or $import_adminkey != $adminkey) die('bla');
$options['title'] = 'Extended Player Info';
$options['requireconfirmation'] = false;
$i = 0;
$options['vars'][$i]['name'] = 'v_pid';
$options['vars'][$i]['type'] = 'player';
$options['vars'][$i]['prompt'] = 'Player?';
$options['vars'][$i]['caption'] = 'Player:';
$i++;
if (isset($_REQUEST['pid'])) {
$pid = $_REQUEST['pid'];
}else {
$results = adminselect($options);
$pid = $results['v_pid'];
}
$is_admin = true;
include('pages/players_info.php');
echo '<br>';
$sql_ips = "SELECT INET_NTOA(p.ip) AS ip, COUNT(p.id) AS matches, MIN(m.time) AS first, MAX(m.time) AS last FROM uts_player AS p, uts_match AS m WHERE p.pid = ".$pid." AND m.id = p.matchid GROUP BY ip ORDER BY ip";
$q_ips = mysql_query($sql_ips) or die("Can't get ip's: " . mysql_error());
echo '
<table class = "box" border="0" cellpadding="1" cellspacing="2" width="720">
<tbody>
<tr>
<td class="heading" colspan="5" align="center">IP\'s used</td>
</tr>
<tr>
<td class="smheading" width="80" align = "center">IP</td>
<td class="smheading" width="180" align = "left">Hostname</td>
<td class="smheading" width="60" align = "center">Matches</td>
<td class="smheading" width="200" align = "left">First</td>
<td class="smheading" width="200" align = "left">Last</td>
</tr>';
while ($r_ips = mysql_fetch_assoc($q_ips)) {
echo '
<tr>
<td class="grey" align = "center">'.$r_ips['ip'].'</td>
<td class="grey" align = "left">'.gethostbyaddr($r_ips['ip']).'</td>
<td class="grey" align = "center">'.$r_ips['matches'].'</td>
<td class="grey" align = "left">'.mdate($r_ips['first']).'</td>
<td class="grey" align = "left">'.mdate($r_ips['last']).'</td>
</tr>';
}
echo '
</tbody>
</table>
<div class="opnote">* Hostnames are real time and might have been different at the time of playing. *</div>
<br>';
mysql_free_result($q_ips);
$sql_fakes = "SELECT INET_NTOA(p1.ip) AS ip, pi.name FROM uts_player AS p1, uts_player AS p2, uts_pinfo AS pi WHERE p1.pid = ".$pid." AND p1.ip = p2.ip AND p1.pid <> p2.pid AND pi.id = p2.pid GROUP BY pi.name";
$q_fakes = mysql_query($sql_fakes) or die("Can't retrieve fake nicks: " . mysql_error());
echo '
<table class = "box" border="0" cellpadding="1" cellspacing="2" width="480">
<tbody>
<tr>
<td class="heading" colspan="2" align="center">Possible aliasses</td>
</tr>
<tr>
<td class="smheading" width="120" align = "center">Nick</td>
<td class="smheading" width="360" align = "center">IP</td>
</tr>';
if (mysql_num_rows($q_fakes) == 0) {
echo '
<tr>
<td class="grey" align = "center" colspan="2">No other names found</td>
</tr>';
}
else {
while($r_fakes = mysql_fetch_assoc($q_fakes)) {
echo '
<tr>
<td class="grey" align = "center">'.$r_fakes[ip].'</td>
<td class="grey" align = "center">'.$r_fakes[name].'</td>
</tr>';
}
}
echo '
</tbody>
</table><br>';
?>
|