mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-03-03 14:46:29 -05:00
- Removed redundant getApiToken function and replaced its usage with getAuthContext in network-api.js, network-events.js, and network-init.js. - Updated cache handling in network-events.js and network-init.js to use CACHE_KEYS constants for better maintainability. - Introduced cache.js for centralized cache management functions and constants, including cache initialization and retrieval. - Added app-init.js for application lifecycle management, including cache orchestration and initialization checks. - Created app_config.php to securely fetch API token and GraphQL port from configuration. - Improved error handling and logging throughout the codebase for better debugging and maintenance.
29 lines
1.2 KiB
PHP
Executable File
29 lines
1.2 KiB
PHP
Executable File
<?php
|
|
#---------------------------------------------------------------------------------#
|
|
# NetAlertX #
|
|
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
|
# #
|
|
# version.php - Templates module Template to display the current version #
|
|
#---------------------------------------------------------------------------------#
|
|
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
|
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
|
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
|
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
|
#---------------------------------------------------------------------------------#
|
|
|
|
$filename = "/app/.VERSION";
|
|
|
|
if(file_exists($filename)) {
|
|
$fileContents = file_get_contents($filename);
|
|
if(trim($fileContents) === 'Dev') {
|
|
echo date('H:i:s') . " - " . $fileContents;
|
|
} else {
|
|
echo trim($fileContents);
|
|
}
|
|
}
|
|
else {
|
|
echo date('H:i:s') . " - N/A";
|
|
}
|
|
|
|
?>
|