From f0965c2080ab48beab3cf0b86569e3227111167b Mon Sep 17 00:00:00 2001 From: leiweibau <105860611+leiweibau@users.noreply.github.com> Date: Mon, 1 Aug 2022 21:45:32 +0200 Subject: [PATCH] Change the login Page When a new password is set, the warning changed to an info box --- front/index.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/front/index.php b/front/index.php index 4aae0831..6272222a 100644 --- a/front/index.php +++ b/front/index.php @@ -19,7 +19,7 @@ $config_file_lines_bypass = array_values(preg_grep('/^PIALERT_WEB_PROTECTION\s.* $protection_line = explode("=", $config_file_lines_bypass[0]); $Pia_WebProtection = strtolower(trim($protection_line[1])); -if ($Pia_WebProtection != 'true') +if ($Pia_WebProtection == 'false') { header('Location: /pialert/devices.php'); $_SESSION["login"] = 1; @@ -48,7 +48,15 @@ if ($_SESSION["login"] == 1) if ($_SESSION["login"] != 1) { if (file_exists('../db/setting_darkmode')) {$ENABLED_DARKMODE = True;} - if ($Pia_Password == '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92') {$login_info = 'Defaultpassword "123456" is still active'; + if ($Pia_Password == '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92') { + $login_info = 'Defaultpassword "123456" is still active'; + $login_mode = 'danger'; + $login_headline = 'Password Alert!'; + $login_icon = 'fa-ban'; + } else { + $login_mode = 'info'; + $login_headline = 'Password Information'; + $login_icon = 'fa-info'; } // ################################################## @@ -122,9 +130,9 @@ if ($ENABLED_DARKMODE === True) {
-
+
-

Password Alert!

+

To set a new password run:
./reset_password.sh yournewpassword
in the config folder.

@@ -156,4 +164,4 @@ if ($ENABLED_DARKMODE === True) { +?> \ No newline at end of file