reworked mode info, added YSFGateway-detection, detect YSF and D-STAR only, when configured to connect locally

This commit is contained in:
dg9vh 2016-09-01 18:22:00 +00:00
parent 244539f0ee
commit 1e2ded406a
2 changed files with 25 additions and 10 deletions

View file

@ -72,21 +72,36 @@ function showMode($mode, $mmdvmconfigs) {
?>
<td><span class="label <?php
if (getEnabled($mode, $mmdvmconfigs) == 1) {
if ($mode == "D-Star Network") {
switch ($mode) {
case "D-Star Network":
if (getConfigItem("D-Star Network", "GatewayAddress", $mmdvmconfigs) == "localhost" || getConfigItem("D-Star Network", "GatewayAddress", $mmdvmconfigs) == "127.0.0.1") {
if (isProcessRunning(IRCDDBGATEWAY)) {
echo "label-success";
} else {
echo "label-danger\" title=\"ircddbgateway is down!";
}
} else {
if ($mode == "D-Star" || $mode =="DMR" || $mode =="DMR Network" || $mode =="System Fusion" || $mode =="System Fusion Network") {
echo "label-default\" title=\"Remote gateway configured - not checked!";
}
break;
case "System Fusion Network":
if (getConfigItem("System Fusion Network", "GwyAddress", $mmdvmconfigs) == "localhost" || getConfigItem("System Fusion Network", "GwyAddress", $mmdvmconfigs) == "127.0.0.1") {
if (isProcessRunning("YSFGateway")) {
echo "label-success";
} else {
echo "label-danger\" title=\"YSFGateway is down!";
}
} else {
echo "label-default\" title=\"Remote gateway configured - not checked!";
}
break;
default:
if (isProcessRunning("MMDVMHost")) {
echo "label-success";
} else {
echo "label-danger\" title=\"MMDVMHost is down!";
}
}
}
} else {
echo "label-default";
}

View file

@ -1,3 +1,3 @@
<?php
define("VERSION", "20160828-1");
define("VERSION", "20160901-1");
?>