| '.($i+1).' |
';
list ($Flag, $Name) = $Reflector->GetFlag($Reflector->Nodes[$i]->GetCallSign());
if (file_exists("./img/flags/".$Flag.".png")) {
echo ' '.$Name.'';
}
echo ' |
'.$Reflector->Nodes[$i]->GetCallSign();
echo ' |
'.date("d.m.Y H:i", $Reflector->Nodes[$i]->GetLastHeardTime()).' |
'.FormatSeconds(time()-$Reflector->Nodes[$i]->GetConnectTime()).' s |
'.$Reflector->Nodes[$i]->GetProtocol().' | ';
if ($PageOptions['RepeatersPage']['IPModus'] != 'HideIP') {
echo '';
$Bytes = explode(".", $Reflector->Nodes[$i]->GetIP());
$MC = $PageOptions['RepeatersPage']['MasqueradeCharacter'];
if ($Bytes !== false && count($Bytes) == 4) {
switch ($PageOptions['RepeatersPage']['IPModus']) {
case 'ShowLast1ByteOfIP':
echo $MC.'.'.$MC.'.'.$MC.'.'.$Bytes[3];
break;
case 'ShowLast2ByteOfIP':
echo $MC.'.'.$MC.'.'.$Bytes[2].'.'.$Bytes[3]; break;
case 'ShowLast3ByteOfIP':
echo $MC.'.'.$Bytes[1].'.'.$Bytes[2].'.'.$Bytes[3];
break;
default:
echo $Reflector->Nodes[$i]->GetIP();
}
} else {
$ipstr = $Reflector->Nodes[$i]->GetIP();
$count = substr_count($ipstr, ":");
if ($count > 1) {
if (1 == substr_count($ipstr, "::")) { $ipstr = str_replace("::", str_repeat(":", 9 - $count), $ipstr); }
if (7 == substr_count($ipstr, ":")) {
echo $MC.':'.$MC.':'.$MC.':'.$MC.':'.$MC.':'.$MC;
$Bytes = explode(":", $ipstr);
for( $k=6; $k<8; $k++) { echo (0==strlen($Bytes[$k])) ? ':0' : ':'.$Bytes[$k]; }
}
}
}
echo ' | ';
}
echo '
';
if ($i == $PageOptions['RepeatersPage']['LimitTo']) { $i = $Reflector->NodeCount()+1; }
}
//$Reflector->SetTotalNodes($Reflector->NodeCount());
$logLines = array();
//error_log(print_r("logLines ".count($logLines)."\n", TRUE));
if ($log = fopen("/var/log/reflectors/P25-9846-".date("Y-m-d").".log", 'r')) {
while ($logLine = fgets($log)) {
array_push($logLines, $logLine);
}
fclose($log);
}
//error_log(print_r("logLines ".count($logLines)."\n", TRUE));
$gateways = getLinkedGateways($logLines) ;
//error_log(print_r("gateways ".count($gateways)."\n", TRUE));
//$Reflector->SetTotalNodes($Reflector->NodeCount() + count($p25gateways));
foreach ($gateways as $gateway) {
$i += 1;
echo '