This commit is contained in:
LX3JL 2016-02-19 12:23:06 +01:00
parent 3f4df1de89
commit e809e8f2cb
5 changed files with 36 additions and 18 deletions

7
dashboard/changes.txt Normal file → Executable file
View File

@ -1,3 +1,10 @@
xlx db v2.1.3
- "index.php" added support for multiradio repeaters
- "users.php" added support for multiradio repeaters
- "class.reflector.php" added support for multiradio repeaters
- "repeaters.php" added suffix "D" for "dongle"
xlx db v2.1.2
- "index.php" bugfix to correct an error if XLX name is equal to XLX000

2
dashboard/index.php Normal file → Executable file
View File

@ -80,7 +80,7 @@ for ($i=0;$i<count($tmpPeers);$i++) {
</head>
<body>
<div id="top"><img src="./img/header.jpg" alt="XLX Multiprotocol Gateway Reflector" style="margin-top:15px;" />
<br />&nbsp;XLX<?php echo $ServiceName; ?>&nbsp;v<?php echo $XML->GetElement($FILECONTENT, "Version"); ?>&nbsp;-&nbsp;Dashboard v2.1.2&nbsp;&nbsp;/&nbsp;&nbsp;Service uptime: <?php
<br />&nbsp;XLX<?php echo $ServiceName; ?>&nbsp;v<?php echo $XML->GetElement($FILECONTENT, "Version"); ?>&nbsp;-&nbsp;Dashboard v2.1.3&nbsp;&nbsp;/&nbsp;&nbsp;Service uptime: <?php
if (file_exists($PID) && is_readable($PID)) {
echo FormatSeconds(time()-filectime($PID));
}

15
dashboard/pgs/class.reflector.php Normal file → Executable file
View File

@ -114,17 +114,16 @@ class xReflector {
}
}
public function GetSuffixOfRepeater($Repeater) {
public function GetSuffixOfRepeater($Repeater, $LinkedModul, $StartWithIndex = 0) {
$suffix = "";
$found = false;
$i = 0;
$i = $StartWithIndex;
while (!$found && $i < $this->NodeCount()) {
if (strpos($this->Nodes[$i]->GetCallSign(), $Repeater) !== false) {
$suffix = $this->Nodes[$i]->GetSuffix();
$found = true;
if ($this->Nodes[$i]->GetLinkedModule() == $LinkedModul) {
if (strpos($this->Nodes[$i]->GetCallSign(), $Repeater) !== false) {
$suffix = $this->Nodes[$i]->GetSuffix();
$found = true;
}
}
$i++;
}

13
dashboard/pgs/repeaters.php Normal file → Executable file
View File

@ -1,14 +1,14 @@
<table class="listingtable">
<tr>
<th width="25">#</th>
<th width="54">Flag</th>
<th width="60">Flag</th>
<th width="100">DV Station</th>
<th width="60">Band</th>
<th width="154">Last Heard</th>
<th width="156">Linked for</th>
<th width="75">Band</th>
<th width="150">Last Heard</th>
<th width="150">Linked for</th>
<th width="90">Protocol</th>
<th width="66">Module</th>
<th width="130">IP</th>
<th width="65">Module</th>
<th width="125">IP</th>
</tr>
<?php
@ -37,6 +37,7 @@ for ($i=0;$i<$Reflector->NodeCount();$i++) {
case 'A' : echo '23cm'; break;
case 'B' : echo '70cm'; break;
case 'C' : echo '2m'; break;
case 'D' : echo 'dongle'; break;
case 'G' : echo 'Internet-Gateway'; break;
default : echo '';
}

17
dashboard/pgs/users.php Normal file → Executable file
View File

@ -26,7 +26,7 @@ for ($i=0;$i<$Reflector->StationCount();$i++) {
echo '</td>
<td align="center" width="50">';
<td align="center" width="60">';
if (file_exists("./img/flags/".$Reflector->GetFlag($Reflector->Stations[$i]->GetCallSign()).".png")) {
echo '<img src="./img/flags/'.$Reflector->GetFlag($Reflector->Stations[$i]->GetCallSign()).'.png" height="15" />';
@ -35,7 +35,7 @@ for ($i=0;$i<$Reflector->StationCount();$i++) {
<td width="75"><a href="https://www.qrz.com/db/'.$Reflector->Stations[$i]->GetCallsignOnly().'" class="pl" target="_blank">'.$Reflector->Stations[$i]->GetCallsignOnly().'</a></td>
<td width="60">'.$Reflector->Stations[$i]->GetSuffix().'</td>
<td width="50" align="center"><a href="http://www.aprs.fi/'.$Reflector->Stations[$i]->GetCallsignOnly().'" class="pl" target="_blank"><img src="./img/sat.png" /></a></td>
<td width="150">'.$Reflector->Stations[$i]->GetVia();
<td width="127">'.$Reflector->Stations[$i]->GetVia();
if ($Reflector->Stations[$i]->GetPeer() != 'XLX'.$ServiceName) {
echo ' / '.$Reflector->Stations[$i]->GetPeer();
}
@ -79,11 +79,22 @@ for ($i=0;$i<count($Modules);$i++) {
<table width="100" border="0" style="padding:0px;margin:0px;">';
$odd = "";
$UserCheckedArray = array();
for ($j=0;$j<count($Users);$j++) {
if ($odd == "#FFFFFF") { $odd = "#F1FAFA"; } else { $odd = "#FFFFFF"; }
if (in_array($Users[$j], $UserCheckedArray)) {
$CurrentPositions = array_keys($UserCheckedArray,$Users[$j]);
$Displayname = $Users[$j].'-'.$Reflector->GetSuffixOfRepeater($Users[$j], $Modules[$i], max($CurrentPositions)+1);
}
else {
$Displayname = $Users[$j].'-'.$Reflector->GetSuffixOfRepeater($Users[$j], $Modules[$i]);
}
echo '<tr height="25" bgcolor="'.$odd.'" onMouseOver="this.bgColor=\'#FFFFCA\';" onMouseOut="this.bgColor=\''.$odd.'\';">
<td valign="top" style="border-bottom:1px #C1DAD7 solid;"><a href="http://www.aprs.fi/'.$Users[$j].'-'.$Reflector->GetSuffixOfRepeater($Users[$j]).'" class="pl" target="_blank">'.$Users[$j].'-'.$Reflector->GetSuffixOfRepeater($Users[$j]).'</a> </td>
<td valign="top" style="border-bottom:1px #C1DAD7 solid;"><a href="http://www.aprs.fi/'.$Displayname.'" class="pl" target="_blank">'.$Displayname.'</a> </td>
</tr>';
$UserCheckedArray[] = $Users[$j];
}
echo '
</table>