diff --git a/include/ysfgatewayinfo.php b/include/ysfgatewayinfo.php index 2de7d0e..011fba9 100644 --- a/include/ysfgatewayinfo.php +++ b/include/ysfgatewayinfo.php @@ -48,7 +48,11 @@ echo ""; echo "$counter"; for ($i = 0; $i < 4; $i++) { - echo"$reflector[$i]"; + if ($i == 0 && defined("ENABLEYSFREFLECTORSWITCHING")) { + echo"$reflector[$i]"; + } else { + echo"$reflector[$i]"; + } } echo "\n"; $counter++; diff --git a/scripts/switchysfreflector.php b/scripts/switchysfreflector.php new file mode 100644 index 0000000..2a12de4 --- /dev/null +++ b/scripts/switchysfreflector.php @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + <?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH + + + + + + + +
+ +'; + } else { + + header('WWW-Authenticate: Basic realm="Dashboard"'); + header('HTTP/1.0 401 Unauthorized'); + echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!'; + exit; + } + } +?> | get your own at: https://github.com/dg9vh/MMDVMHost-Dashboard +
+ + diff --git a/setup.php b/setup.php index abbdeba..3a03061 100644 --- a/setup.php +++ b/setup.php @@ -281,9 +281,13 @@ foreach ($files as $file) {
>
- +
>
+
+ +
>
+
" name="SWITCHNETWORKUSER" class="form-control" placeholder="username" aria-describedby="SWITCHNETWORKUSER"> @@ -329,6 +333,10 @@ foreach ($files as $file) { " name="RESTARTPW" class="form-control" placeholder="password" aria-describedby="RESTARTPW">
+
+ + " name="REBOOTYSFGATEWAY" class="form-control" placeholder="sudo systemctl restart ysfgateway.service" aria-describedby="REBOOTYSFGATEWAY"> +
" name="REBOOTMMDVM" class="form-control" placeholder="sudo systemctl restart mmdvmhost.service" aria-describedby="REBOOTMMDVM"> diff --git a/version.php b/version.php index a5b7166..636de92 100644 --- a/version.php +++ b/version.php @@ -1,3 +1,3 @@