mirror of
https://github.com/ShaYmez/xlxd.git
synced 2025-08-03 22:02:27 -04:00
Don't die if API server is not reachable. Instead just show reflector
names without hyler links
This commit is contained in:
parent
6fd164b65b
commit
d885444f95
@ -2,18 +2,20 @@
|
|||||||
|
|
||||||
$Result = @fopen($CallingHome['ServerURL']."?do=GetReflectorList", "r");
|
$Result = @fopen($CallingHome['ServerURL']."?do=GetReflectorList", "r");
|
||||||
|
|
||||||
if (!$Result) die("HEUTE GIBTS KEIN BROT");
|
|
||||||
|
|
||||||
$INPUT = "";
|
$INPUT = "";
|
||||||
while (!feof ($Result)) {
|
|
||||||
|
if ($Result) {
|
||||||
|
|
||||||
|
while (!feof ($Result)) {
|
||||||
$INPUT .= fgets ($Result, 1024);
|
$INPUT .= fgets ($Result, 1024);
|
||||||
|
}
|
||||||
|
|
||||||
|
$XML = new ParseXML();
|
||||||
|
$Reflectorlist = $XML->GetElement($INPUT, "reflectorlist");
|
||||||
|
$Reflectors = $XML->GetAllElements($Reflectorlist, "reflector");
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose($Result);
|
fclose($Result);
|
||||||
|
|
||||||
$XML = new ParseXML();
|
|
||||||
$Reflectorlist = $XML->GetElement($INPUT, "reflectorlist");
|
|
||||||
$Reflectors = $XML->GetAllElements($Reflectorlist, "reflector");
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<table class="listingtable">
|
<table class="listingtable">
|
||||||
<tr>
|
<tr>
|
||||||
@ -50,7 +52,7 @@ for ($i=0;$i<$Reflector->PeerCount();$i++) {
|
|||||||
$URL = $XML->GetElement($Reflectors[$j], "dashboardurl");
|
$URL = $XML->GetElement($Reflectors[$j], "dashboardurl");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($URL) {
|
if ($Result && $URL) {
|
||||||
echo '
|
echo '
|
||||||
<td><a href="'.$URL.'" target="_blank" class="listinglink" title="Visit the Dashboard of '.$Name.'" style="text-decoration:none;color:#000000;">'.$Name.'</a></td>';
|
<td><a href="'.$URL.'" target="_blank" class="listinglink" title="Visit the Dashboard of '.$Name.'" style="text-decoration:none;color:#000000;">'.$Name.'</a></td>';
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user