diff --git a/scripts/halt.php b/scripts/halt.php
index bd5a45c..c4fdb7c 100644
--- a/scripts/halt.php
+++ b/scripts/halt.php
@@ -8,6 +8,14 @@ $start = $time;
include "../config/config.php";
include "../include/tools.php";
include "../include/functions.php";
+if (!isset($_SERVER['PHP_AUTH_USER'])) {
+ header('WWW-Authenticate: Basic realm="Dashboard"');
+ header('HTTP/1.0 401 Unauthorized');
+ echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
+ exit;
+} else {
+ if ($_SERVER['PHP_AUTH_USER'] == HALTUSER && $_SERVER['PHP_AUTH_PW'] == HALTPW) {
+ $fileName = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
?>
@@ -58,7 +66,15 @@ $time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
-echo '';
+echo '';
+ } 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/scripts/log.php b/scripts/log.php
index 7cfc8d5..1991de7 100644
--- a/scripts/log.php
+++ b/scripts/log.php
@@ -9,7 +9,14 @@ include "../config/config.php";
include "../include/tools.php";
include "../include/functions.php";
-$fileName = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
+if (!isset($_SERVER['PHP_AUTH_USER'])) {
+ header('WWW-Authenticate: Basic realm="Dashboard"');
+ header('HTTP/1.0 401 Unauthorized');
+ echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
+ exit;
+} else {
+ if ($_SERVER['PHP_AUTH_USER'] == VIEWLOGUSER && $_SERVER['PHP_AUTH_PW'] == VIEWLOGPW) {
+ $fileName = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
?>
@@ -81,7 +88,6 @@ while (!$file->eof()) {
// Unset the file to call __destruct(), closing the file handle.
$file = null;
-
?>
@@ -99,6 +105,14 @@ $time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo '';
+ } 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
-
-