mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
terorero merge fix
This commit is contained in:
@@ -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
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -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
|
||||
// ###################################
|
||||
|
||||
Reference in New Issue
Block a user