1
0
mirror of https://github.com/ShaYmez/xlxd.git synced 2024-12-25 03:47:18 -05:00
xlxd/dashboard/pgs/reflectors.php

54 lines
1.6 KiB
PHP
Raw Normal View History

2016-03-13 14:16:51 -04:00
<?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">
2017-01-24 02:45:11 -05:00
<tr>
2016-03-13 14:16:51 -04:00
<th width="40">#</th>
<th width="75">Reflector</th>
2016-04-05 05:06:58 -04:00
<th width="120">Country</th>
2016-03-13 14:16:51 -04:00
<th width="90">Service</th>
<th width="400">Comment</th>
</tr>
<?php
$odd = "";
for ($i=0;$i<count($Reflectors);$i++) {
2017-01-24 02:45:11 -05:00
2016-03-13 14:16:51 -04:00
$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");
2017-01-24 02:45:11 -05:00
2016-03-13 14:16:51 -04:00
if ($odd == "#FFFFFF") { $odd = "#F1FAFA"; } else { $odd = "#FFFFFF"; }
2017-01-24 02:45:11 -05:00
2016-03-13 14:16:51 -04:00
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>