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:
parent
6fd164b65b
commit
d885444f95
@ -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 '.$Name.'" style="text-decoration:none;color:#000000;">'.$Name.'</a></td>';
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user