mirror of https://github.com/ShaYmez/xlxd.git
Add dashboard URL to Peers page
This commit is contained in:
parent
8300a3f044
commit
abc0f9e9bf
|
@ -1,3 +1,20 @@
|
||||||
|
<?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">
|
<table class="listingtable">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="25">#</th>
|
<th width="25">#</th>
|
||||||
|
@ -25,8 +42,16 @@ for ($i=0;$i<$Reflector->PeerCount();$i++) {
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<tr height="30" bgcolor="'.$odd.'" onMouseOver="this.bgColor=\'#FFFFCA\';" onMouseOut="this.bgColor=\''.$odd.'\';">
|
<tr height="30" bgcolor="'.$odd.'" onMouseOver="this.bgColor=\'#FFFFCA\';" onMouseOut="this.bgColor=\''.$odd.'\';">
|
||||||
<td align="center">'.($i+1).'</td>
|
<td align="center">'.($i+1).'</td>';
|
||||||
<td>'.$Reflector->Peers[$i]->GetCallSign().'</td>
|
$Name = $Reflector->Peers[$i]->GetCallSign();
|
||||||
|
for ($j=1;$j<count($Reflectors);$j++) {
|
||||||
|
if ($Name === $XML->GetElement($Reflectors[$j], "name")) {
|
||||||
|
$URL = $XML->GetElement($Reflectors[$j], "dashboardurl");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '
|
||||||
|
<td><a href="'.$URL.'" target="_blank" class="listinglink" title="Visit the Dashboard of '.$Name.'">'.$Name.'</a></td>
|
||||||
<td>'.date("d.m.Y H:i", $Reflector->Peers[$i]->GetLastHeardTime()).'</td>
|
<td>'.date("d.m.Y H:i", $Reflector->Peers[$i]->GetLastHeardTime()).'</td>
|
||||||
<td>'.FormatSeconds(time()-$Reflector->Peers[$i]->GetConnectTime()).' s</td>
|
<td>'.FormatSeconds(time()-$Reflector->Peers[$i]->GetConnectTime()).' s</td>
|
||||||
<td align="center">'.$Reflector->Peers[$i]->GetProtocol().'</td>
|
<td align="center">'.$Reflector->Peers[$i]->GetProtocol().'</td>
|
||||||
|
|
Loading…
Reference in New Issue