terorero merge fix

This commit is contained in:
jokob-sk
2022-08-06 20:33:35 +10:00
parent 8d52ac629d
commit 1093c5dabf
6 changed files with 60 additions and 73 deletions

View File

@@ -181,6 +181,7 @@ if ($ENABLED_DARKMODE === True) {
<div id="myDIV" class="box-body" style="margin-top: 50px; <?php echo $login_display_mode;?>">
<div class="alert alert-<?php echo $login_mode;?> alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><3E></button>
<h4><i class="icon fa <?php echo $login_icon;?>"></i><?php echo $login_headline;?></h4>
<p><?php echo $login_info;?></p>
<p><?php echo $pia_lang['Login_Psw_run'];?><br><span style="border: solid 1px yellow; padding: 2px;">./reset_password.sh <?php echo $pia_lang['Login_Psw_new'];?></span><br><?php echo $pia_lang['Login_Psw_folder'];?></p>

View File

@@ -912,35 +912,6 @@ function getLocations() {
}
//------------------------------------------------------------------------------
// Query Device Data
//------------------------------------------------------------------------------
function getNetworkNodes() {
global $db;
// Device Data
$sql = 'SELECT * FROM network_infrastructure';
$result = $db->query($sql);
// arrays of rows
$tableData = array();
while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
// Push row data
$tableData[] = array('id' => $row['device_id'],
'name' => $row['net_device_name'].'/'.$row['net_device_typ'] );
}
// Control no rows
if (empty($tableData)) {
$tableData = [];
}
// Return json
echo (json_encode ($tableData));
}
//------------------------------------------------------------------------------
// Status Where conditions
//------------------------------------------------------------------------------

View File

@@ -8,6 +8,20 @@
#--------------------------------------------------------------------------- -->
<?php
// ###################################
// ## TimeZone processing start
// ###################################
$config_file = "../config/pialert.conf";
$config_file_lines = file($config_file);
$config_file_lines_timezone = array_values(preg_grep('/^TIMEZONE\s.*/', $config_file_lines));
$timezone_line = explode("'", $config_file_lines_timezone[0]);
$Pia_TimeZone = $timezone_line[1];
date_default_timezone_set($Pia_TimeZone);
// ###################################
// ## TimeZone processing end
// ###################################
// ###################################
// ## GUI settings processing start
// ###################################