2017-08-27 23:09:08 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
$Result = @fopen($CallingHome['ServerURL']."?do=GetReflectorList", "r");
|
|
|
|
|
|
|
|
|
|
$INPUT = "";
|
|
|
|
|
|
|
|
|
|
if ($Result) {
|
|
|
|
|
|
|
|
|
|
while (!feof ($Result)) {
|
|
|
|
|
$INPUT .= fgets ($Result, 1024);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$XML = new ParseXML();
|
|
|
|
|
$Reflectorlist = $XML->GetElement($INPUT, "reflectorlist");
|
|
|
|
|
$Reflectors = $XML->GetAllElements($Reflectorlist, "reflector");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fclose($Result);
|
|
|
|
|
?>
|
|
|
|
|
|
2016-07-05 18:29:40 +02:00
|
|
|
<table class="table table-striped table-hover">
|
|
|
|
|
<tr class="table-center">
|
|
|
|
|
<th class="col-md-1">#</th>
|
|
|
|
|
<th class="col-md-2">XLX Peer</th>
|
|
|
|
|
<th class="col-md-2">Last Heard</th>
|
|
|
|
|
<th class="col-md-2">Linked for</th>
|
|
|
|
|
<th class="col-md-2">Protocol</th>
|
|
|
|
|
<th class="col-md-1">Module</th><?php
|
|
|
|
|
|
|
|
|
|
if ($PageOptions['PeerPage']['IPModus'] != 'HideIP') {
|
|
|
|
|
echo '
|
|
|
|
|
<th class="col-md-2">IP</th>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
$Reflector->LoadFlags();
|
|
|
|
|
|
|
|
|
|
for ($i=0;$i<$Reflector->PeerCount();$i++) {
|
|
|
|
|
|
|
|
|
|
echo '
|
|
|
|
|
<tr class="table-center">
|
2017-08-27 23:09:08 +02:00
|
|
|
<td>'.($i+1).'</td>';
|
|
|
|
|
|
2025-10-14 13:25:26 +02:00
|
|
|
$Name = $Reflector->Peers[$i]->GetCallSign();
|
|
|
|
|
$URL = '';
|
2017-08-27 23:09:08 +02:00
|
|
|
|
|
|
|
|
for ($j=1;$j<count($Reflectors);$j++) {
|
|
|
|
|
if ($Name === $XML->GetElement($Reflectors[$j], "name")) {
|
|
|
|
|
$URL = $XML->GetElement($Reflectors[$j], "dashboardurl");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ($Result && (trim($URL) != "")) {
|
2025-10-14 13:25:26 +02:00
|
|
|
echo '<td><a href="' . SafeOutputAttr($URL) . '" target="_blank" class="listinglink" title="Visit the Dashboard of ' . SafeOutputAttr($Name) . '" style="text-decoration:none;color:#000000;">' . SafeOutput($Name) . '</a></td>';
|
2017-08-27 23:09:08 +02:00
|
|
|
} else {
|
2025-10-14 13:25:26 +02:00
|
|
|
echo '<td>' . SafeOutput($Name) . '</td>';
|
2017-08-27 23:09:08 +02:00
|
|
|
}
|
|
|
|
|
echo '
|
2016-07-05 18:29:40 +02:00
|
|
|
<td>'.date("d.m.Y H:i", $Reflector->Peers[$i]->GetLastHeardTime()).'</td>
|
|
|
|
|
<td>'.FormatSeconds(time()-$Reflector->Peers[$i]->GetConnectTime()).' s</td>
|
2025-10-14 13:25:26 +02:00
|
|
|
<td>'.SafeOutput($Reflector->Peers[$i]->GetProtocol()).'</td>
|
|
|
|
|
<td>'.SafeOutput($Reflector->Peers[$i]->GetLinkedModule()).'</td>';
|
2016-07-05 18:29:40 +02:00
|
|
|
if ($PageOptions['PeerPage']['IPModus'] != 'HideIP') {
|
2017-08-27 23:09:08 +02:00
|
|
|
echo '<td>';
|
2016-07-05 18:29:40 +02:00
|
|
|
$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;
|
2025-10-14 13:25:26 +02:00
|
|
|
default : echo '<a href="http://'.SafeOutput($Reflector->Peers[$i]->GetIP()).'" target="_blank" style="text-decoration:none;color:#000000;">'.SafeOutput($Reflector->Peers[$i]->GetIP()).'</a>';
|
2016-07-05 18:29:40 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
echo '</td>';
|
|
|
|
|
}
|
2017-08-27 23:09:08 +02:00
|
|
|
echo '</tr>';
|
2016-07-05 18:29:40 +02:00
|
|
|
if ($i == $PageOptions['PeerPage']['LimitTo']) { $i = $Reflector->PeerCount()+1; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
</table>
|