Remove test.php and enhance null safety and sorting across components

- Deleted `test.php` as it was no longer in use.
- Enhanced null safety checks in `Inventory.php`, `StdOut-detail.php`, `Backups.php`, and `SwitchsSAN.php` to prevent potential warnings.
- Refactored `SwitchsSAN.php` to improve sorting logic for ports based on errors, vFabric, and Port ID.
- Added seasonal snow effect script in `all.php` with toggle functionality for user engagement.
- Updated navigation bar (`navbar.html`) to include a new VIO page link.
- Introduced a new `VIO.php` page to display VIO monitoring details with table export and sorting features.
This commit is contained in:
2026-03-31 11:33:57 +02:00
parent d5b45dbc22
commit 10c228f255
47 changed files with 950 additions and 702 deletions

View File

@@ -1,6 +1,18 @@
<?php
// LANGUAGE MANAGEMENT
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
$lang = $_GET['lang'] ?? $_SESSION['lang'] ?? 'fr'; // "en" as default
$allowed_langs = ['en', 'fr'];
if (!in_array($lang, $allowed_langs)) {
$lang = 'fr'; // DEFAULT failback
}
$_SESSION['lang'] = $lang;
include $_SERVER['DOCUMENT_ROOT'] . "/include/" . $lang . ".php";
// CONSTANTS //
$BaseUrl = "http://".$_SERVER['SERVER_NAME'];
$BaseUrl = "https://".$_SERVER['SERVER_NAME'];
$root = $_SERVER['DOCUMENT_ROOT'];
$bdnuss = "http://web-bdnuss-sys-dev.appliarmony.net";
$opwsinf = "https://wsopinf.appliarmony.net";
@@ -323,7 +335,7 @@
}
// --- exposer des constantes pour le reste du code ---
// Priorité: si on a REMOTE_USER on lutilise; sinon on retombe sur le cookie existant; sinon vide/anonyme.
// Priorité: si on a REMOTE_USER, on lutilise; sinon on retombe sur le cookie existant; sinon vide/anonyme.
$currentUser = $hasUser ? $user : ($cookie['user'] ?? 'Anonymous');
$currentIp = $hasUser ? $ip : ($cookie['ip'] ?? ($_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR'] ?? ''));
@@ -404,7 +416,7 @@
const month = now.getMonth() + 1; // JS compte les mois de 0 à 11, donc on ajoute 1
const day = now.getDate();
// La condition : (Mois = 12 ET Jour >= 15) OU (Mois = 1 ET Jour <= 5)
// La condition : (Mois = 12 ET Jour >= 15) OU (Mois = 1 ET Jour 5)
const isSeason = (month === 12 && day >= 15) || (month === 1 && day <= 5);
const canvas = document.getElementById('snow-canvas');
@@ -556,3 +568,5 @@