2016-07-29 08:41:28 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$Result = @fopen($CallingHome['ServerURL']."?do=GetReflectorList", "r");
|
|
|
|
|
|
|
|
if (!$Result) die("HEUTE GIBTS KEIN BROT");
|
|
|
|
|
|
|
|
$INPUT = "";
|
|
|
|
while (!feof ($Result)) {
|
|
|
|
$INPUT .= fgets ($Result, 1024);
|
|
|
|
}
|
|
|
|
fclose($Result);
|
|
|
|
|
|
|
|
$XML = new ParseXML();
|
|
|
|
$Reflectorlist = $XML->GetElement($INPUT, "reflectorlist");
|
|
|
|
$Reflectors = $XML->GetAllElements($Reflectorlist, "reflector");
|
|
|
|
|
|
|
|
?>
|
2016-02-11 12:51:12 -05:00
|
|
|
<table class="listingtable">
|
2016-07-29 11:42:16 -04:00
|
|
|
<tr>
|
2016-02-11 12:51:12 -05:00
|
|
|
<th width="25">#</th>
|
|
|
|
<th width="100">XLX Peer</th>
|
|
|
|
<th width="154">Last Heard</th>
|
|
|
|
<th width="156">Linked for</th>
|
|
|
|
<th width="90">Protocol</th>
|
2016-03-04 04:57:08 -05:00
|
|
|
<th width="67">Module</th><?php
|
|
|
|
|
|
|
|
if ($PageOptions['PeerPage']['IPModus'] != 'HideIP') {
|
|
|
|
echo '
|
|
|
|
<th width="125">IP</th>';
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
2016-02-11 12:51:12 -05:00
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$odd = "";
|
|
|
|
$Reflector->LoadFlags();
|
|
|
|
|
|
|
|
for ($i=0;$i<$Reflector->PeerCount();$i++) {
|
2016-07-29 08:42:49 -04:00
|
|
|
|
2016-02-11 12:51:12 -05:00
|
|
|
if ($odd == "#FFFFFF") { $odd = "#F1FAFA"; } else { $odd = "#FFFFFF"; }
|
2016-07-29 08:42:49 -04:00
|
|
|
|
2016-02-11 12:51:12 -05:00
|
|
|
echo '
|
2016-07-29 08:42:49 -04:00
|
|
|
<tr height="30" bgcolor="'.$odd.'" onMouseOver="this.bgColor=\'#FFFFCA\';" onMouseOut="this.bgColor=\''.$odd.'\';">
|
2016-07-29 08:41:28 -04:00
|
|
|
<td align="center">'.($i+1).'</td>';
|
|
|
|
$Name = $Reflector->Peers[$i]->GetCallSign();
|
2016-07-29 11:49:58 -04:00
|
|
|
$URL = '';
|
2016-07-29 08:41:28 -04:00
|
|
|
for ($j=1;$j<count($Reflectors);$j++) {
|
|
|
|
if ($Name === $XML->GetElement($Reflectors[$j], "name")) {
|
|
|
|
$URL = $XML->GetElement($Reflectors[$j], "dashboardurl");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2016-07-29 11:49:58 -04:00
|
|
|
if ($URL) {
|
|
|
|
echo '
|
|
|
|
<td><a href="'.$URL.'" target="_blank" class="listinglink" title="Visit the Dashboard of '.$Name.'">'.$Name.'</a></td>'
|
|
|
|
} else {
|
|
|
|
echo '
|
|
|
|
<td>'.$Name.'</td>'
|
|
|
|
}
|
2016-07-29 08:41:28 -04:00
|
|
|
echo '
|
2016-02-11 12:51:12 -05:00
|
|
|
<td>'.date("d.m.Y H:i", $Reflector->Peers[$i]->GetLastHeardTime()).'</td>
|
|
|
|
<td>'.FormatSeconds(time()-$Reflector->Peers[$i]->GetConnectTime()).' s</td>
|
|
|
|
<td align="center">'.$Reflector->Peers[$i]->GetProtocol().'</td>
|
2016-03-04 04:57:08 -05:00
|
|
|
<td align="center">'.$Reflector->Peers[$i]->GetLinkedModule().'</td>';
|
|
|
|
if ($PageOptions['PeerPage']['IPModus'] != 'HideIP') {
|
|
|
|
echo '
|
|
|
|
<td>';
|
|
|
|
$Bytes = explode(".", $Reflector->Peers[$i]->GetIP());
|
|
|
|
if ($Bytes !== false && count($Bytes) == 4) {
|
|
|
|
switch ($PageOptions['PeerPage']['IPModus']) {
|
|
|
|
case 'ShowLast1ByteOfIP' : echo $PageOptions['PeerPage']['MasqueradeCharacter'].'.'.$PageOptions['PeerPage']['MasqueradeCharacter'].'.'.$PageOptions['PeerPage']['MasqueradeCharacter'].'.'.$Bytes[3]; break;
|
|
|
|
case 'ShowLast2ByteOfIP' : echo $PageOptions['PeerPage']['MasqueradeCharacter'].'.'.$PageOptions['PeerPage']['MasqueradeCharacter'].'.'.$Bytes[2].'.'.$Bytes[3]; break;
|
|
|
|
case 'ShowLast3ByteOfIP' : echo $PageOptions['PeerPage']['MasqueradeCharacter'].'.'.$Bytes[1].'.'.$Bytes[2].'.'.$Bytes[3]; break;
|
2016-07-29 08:44:42 -04:00
|
|
|
default : echo $Reflector->Peers[$i]->GetIP();
|
2016-03-04 04:57:08 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '</td>';
|
|
|
|
}
|
|
|
|
echo '
|
|
|
|
</tr>';
|
|
|
|
if ($i == $PageOptions['PeerPage']['LimitTo']) { $i = $Reflector->PeerCount()+1; }
|
2016-02-11 12:51:12 -05:00
|
|
|
}
|
|
|
|
|
2016-07-29 08:42:49 -04:00
|
|
|
?>
|
|
|
|
|
2016-02-11 12:51:12 -05:00
|
|
|
</table>
|