change comments

This commit is contained in:
leiweibau
2022-07-23 22:21:23 +02:00
parent ebb82db529
commit 9cba70ce18
2 changed files with 24 additions and 24 deletions

View File

@@ -5,15 +5,15 @@ if ($_REQUEST['action'] == 'logout') {
session_destroy(); session_destroy();
header('Location: /pialert/index.php'); header('Location: /pialert/index.php');
} }
################################################## // ##################################################
## Login Processing start // ## Login Processing start
################################################## // ##################################################
$config_file = "../config/pialert.conf"; $config_file = "../config/pialert.conf";
$config_file_lines = file($config_file); $config_file_lines = file($config_file);
################################### // ###################################
## PIALERT_WEB_PROTECTION FALSE // ## PIALERT_WEB_PROTECTION FALSE
################################### // ###################################
$config_file_lines_bypass = array_values(preg_grep('/^PIALERT_WEB_PROTECTION\s.*/', $config_file_lines)); $config_file_lines_bypass = array_values(preg_grep('/^PIALERT_WEB_PROTECTION\s.*/', $config_file_lines));
$protection_line = explode("=", $config_file_lines_bypass[0]); $protection_line = explode("=", $config_file_lines_bypass[0]);
@@ -26,9 +26,9 @@ if ($Pia_WebProtection == 'false')
exit; exit;
} }
################################### // ###################################
## PIALERT_WEB_PROTECTION TRUE // ## PIALERT_WEB_PROTECTION TRUE
################################### // ###################################
$config_file_lines = array_values(preg_grep('/^PIALERT_WEB_PASSWORD\s.*/', $config_file_lines)); $config_file_lines = array_values(preg_grep('/^PIALERT_WEB_PASSWORD\s.*/', $config_file_lines));
$password_line = explode("'", $config_file_lines[0]); $password_line = explode("'", $config_file_lines[0]);
@@ -51,9 +51,9 @@ if ($_SESSION["login"] != 1)
if ($Pia_Password == '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92') {$login_info = 'Defaultpassword "123456" is still active'; if ($Pia_Password == '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92') {$login_info = 'Defaultpassword "123456" is still active';
} }
################################################## // ##################################################
## Login Processing end // ## Login Processing end
################################################## // ##################################################
?> ?>
<!DOCTYPE html> <!DOCTYPE html>

View File

@@ -8,23 +8,23 @@
#--------------------------------------------------------------------------- --> #--------------------------------------------------------------------------- -->
<?php <?php
################################### // ###################################
## TimeZone processing start // ## TimeZone processing start
################################### // ###################################
$config_file = "../config/pialert.conf"; $config_file = "../config/pialert.conf";
$config_file_lines = file($config_file); $config_file_lines = file($config_file);
$config_file_lines_timezone = array_values(preg_grep('/^TIMEZONE\s.*/', $config_file_lines)); $config_file_lines_timezone = array_values(preg_grep('/^TIMEZONE\s.*/', $config_file_lines));
$timezone_line = explode("'", $config_file_lines_timezone[0]); $timezone_line = explode("'", $config_file_lines_timezone[0]);
$Pia_TimeZone = $timezone_line[1]; $Pia_TimeZone = $timezone_line[1];
date_default_timezone_set($Pia_TimeZone); date_default_timezone_set($Pia_TimeZone);
################################### // ###################################
## TimeZone processing end // ## TimeZone processing end
################################### // ###################################
################################### // ###################################
## GUI settings processing start // ## GUI settings processing start
################################### // ###################################
if (file_exists('../db/setting_darkmode')) { if (file_exists('../db/setting_darkmode')) {
$ENABLED_DARKMODE = True; $ENABLED_DARKMODE = True;
} }
@@ -38,9 +38,9 @@ foreach (glob("../db/setting_language*") as $filename) {
} }
if (strlen($pia_lang_selected) == 0) {$pia_lang_selected = 'en_us';} if (strlen($pia_lang_selected) == 0) {$pia_lang_selected = 'en_us';}
require 'php/templates/language/'.$pia_lang_selected.'.php'; require 'php/templates/language/'.$pia_lang_selected.'.php';
################################### // ###################################
## GUI settings processing end // ## GUI settings processing end
################################### // ###################################
?> ?>
<!DOCTYPE html> <!DOCTYPE html>