1
0
mirror of https://github.com/ShaYmez/xlxd.git synced 2024-12-23 01:55:49 -05:00

Don't die if API server is not reachable. Instead just show reflector

names without hyler links
This commit is contained in:
phl0 2016-07-31 18:39:31 +02:00
parent 6fd164b65b
commit d885444f95
No known key found for this signature in database
GPG Key ID: 48EA1E640798CA9A

View File

@ -2,18 +2,20 @@
$Result = @fopen($CallingHome['ServerURL']."?do=GetReflectorList", "r");
if (!$Result) die("HEUTE GIBTS KEIN BROT");
$INPUT = "";
if ($Result) {
while (!feof ($Result)) {
$INPUT .= fgets ($Result, 1024);
}
fclose($Result);
$XML = new ParseXML();
$Reflectorlist = $XML->GetElement($INPUT, "reflectorlist");
$Reflectors = $XML->GetAllElements($Reflectorlist, "reflector");
}
fclose($Result);
?>
<table class="listingtable">
<tr>
@ -50,7 +52,7 @@ for ($i=0;$i<$Reflector->PeerCount();$i++) {
$URL = $XML->GetElement($Reflectors[$j], "dashboardurl");
}
}
if ($URL) {
if ($Result && $URL) {
echo '
<td><a href="'.$URL.'" target="_blank" class="listinglink" title="Visit the Dashboard of&nbsp;'.$Name.'" style="text-decoration:none;color:#000000;">'.$Name.'</a></td>';
} else {