Added Dashboard-URLs to YSFReflectors via icon. Please be sure to get actual YSFHosts.txt from the registry to make this function work.

This commit is contained in:
Kim Huebel 2018-02-18 13:46:43 +00:00
parent 55b3e3c1f9
commit c829cde3ab
4 changed files with 12 additions and 4 deletions

BIN
images/dashboard.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -846,7 +846,7 @@ function getActiveYSFReflectors() {
$file = fopen(YSFHOSTSPATH."/".YSFHOSTSFILENAME, 'r');
if ($file) {
while (($line = fgetcsv($file, 1000, ";")) !== FALSE) {
array_push($reflectorlist, array($line[1], $line[2], $line[0], $line[5]));
array_push($reflectorlist, array($line[1], $line[6],$line[2], $line[0], $line[5]));
}
}
fclose($file);

View file

@ -47,9 +47,17 @@
foreach ($activeYSFReflectors as $reflector) {
echo "<tr>";
echo "<td>$counter</td>";
for ($i = 0; $i < 4; $i++) {
for ($i = 0; $i < 5; $i++) {
if ($i == 0 && defined("ENABLEYSFREFLECTORSWITCHING")) {
echo"<td><a href=\"scripts/switchysfreflector.php?reflector=$reflector[2]\" title=\"Click to connect to\">$reflector[$i]</a></td>";
echo"<td><a href=\"scripts/switchysfreflector.php?reflector=$reflector[3]\" title=\"Click to connect to\">$reflector[$i]</a>";
$i++;
if ($reflector[$i] !=="") {
if (startsWith($reflector[$i],"http"))
echo ' <a target="_new" href="'.$reflector[$i].'"><img src="images/dashboard.png" /></a>';
else
echo ' <a target="_new" href="http://'.$reflector[$i].'"><img src="images/dashboard.png" /></a>';
}
echo"</td>";
} else {
echo"<td>$reflector[$i]</td>";
}

View file

@ -1,3 +1,3 @@
<?php
define("VERSION", "20180212-1 (".getGitVersion().")");
define("VERSION", "20180218-1 (".getGitVersion().")");
?>