1
0
mirror of https://github.com/ShaYmez/xlxd.git synced 2024-11-19 06:31:50 -05:00
xlxd/dashboard/pgs/reflectors.php
LX1IQ 81d1ee3af1 version 2.3.5
standard dashboard v2.3.5
2017-02-14 07:57:24 +01:00

53 lines
1.6 KiB
PHP
Executable File

<?php
$Result = @fopen($CallingHome['ServerURL']."?do=GetReflectorList", "r");
if (!$Result) die("HEUTE GIBTS KEIN BROT");
$INPUT = "";
while (!feof ($Result)) {
$INPUT .= fgets ($Result, 1024);
}
fclose($Result);
$XML = new ParseXML();
$Reflectorlist = $XML->GetElement($INPUT, "reflectorlist");
$Reflectors = $XML->GetAllElements($Reflectorlist, "reflector");
?>
<table class="listingtable">
<tr>
<th width="40">#</th>
<th width="75">Reflector</th>
<th width="120">Country</th>
<th width="90">Service</th>
<th width="400">Comment</th>
</tr>
<?php
$odd = "";
for ($i=0;$i<count($Reflectors);$i++) {
$NAME = $XML->GetElement($Reflectors[$i], "name");
$COUNTRY = $XML->GetElement($Reflectors[$i], "country");
$LASTCONTACT = $XML->GetElement($Reflectors[$i], "lastcontact");
$COMMENT = $XML->GetElement($Reflectors[$i], "comment");
$DASHBOARDURL = $XML->GetElement($Reflectors[$i], "dashboardurl");
if ($odd == "#FFFFFF") { $odd = "#F1FAFA"; } else { $odd = "#FFFFFF"; }
echo '
<tr height="30" bgcolor="'.$odd.'" onMouseOver="this.bgColor=\'#FFFFCA\';" onMouseOut="this.bgColor=\''.$odd.'\';">
<td align="center">'.($i+1).'</td>
<td><a href="'.$DASHBOARDURL.'" target="_blank" class="listinglink" title="Visit the Dashboard of&nbsp;'.$NAME.'">'.$NAME.'</a></td>
<td>'.$COUNTRY.'</td>
<td align="center" valign="middle"><img src="./img/'; if ($LASTCONTACT<(time()-600)) { echo 'down'; } ELSE { echo 'up'; } echo '.png" height="25" /></td>
<td>'.$COMMENT.'</td>
</tr>';
}
?>
</table>