-
diff --git a/include/peers.php b/include/peers.php new file mode 100644 index 0000000..b238b5b --- /dev/null +++ b/include/peers.php @@ -0,0 +1,101 @@ +GetElement($INPUT, "reflectorlist"); + $Reflectors = $XML->GetAllElements($Reflectorlist, "reflector"); +} + +fclose($Result); +?> + +
# | +XLX Peer | +Last Heard | +Linked for | +Protocol | +Module | IP'; +} + +?> +||
---|---|---|---|---|---|---|---|
'.($i+1).' | '; + + $Name = $Reflector->Peers[$i]->GetCallSign(); + $URL = ''; + + for ($j=1;$j'.$Name.' | '; + } else { + echo ''.$Name.' | '; + } + echo ' +'.date("d.m.Y H:i", $Reflector->Peers[$i]->GetLastHeardTime()).' | +'.FormatSeconds(time()-$Reflector->Peers[$i]->GetConnectTime()).' s | +'.$Reflector->Peers[$i]->GetProtocol().' | +'.$Reflector->Peers[$i]->GetLinkedModule().' | '; + if ($PageOptions['PeerPage']['IPModus'] != 'HideIP') { + echo ''; + $Bytes = explode(".", $Reflector->Peers[$i]->GetIP()); + $MC = $PageOptions['RepeatersPage']['MasqueradeCharacter']; + if ($Bytes !== false && count($Bytes) == 4) { + switch ($PageOptions['PeerPage']['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->Peers[$i]->GetIP().''; + } + } else { + $ipstr = $Reflector->Peers[$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 '