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

@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Page Title -->
<title>Web Infra Reports</title>
<title>Web Infra Reports IT</title>
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
<!-- JQuery -->
@@ -84,7 +84,7 @@
echo "</div><hr style='border-top: 3px solid black'>";
// Active Directory
echo "<h3><span class='font-weight-bold'>Active Directory</span></h3>" ;
echo "<h3><span class='font-weight-bold'>$w_ad</span></h3>" ;
echo "<div class='row'>";
if(isset($row['AD'])){
if($row['AD']=="Y"){
@@ -96,17 +96,17 @@
echo "<div class='col-md-3'><div class='input-group'><span class='input-group-text'><i class='bi bi-pencil-square text-primary'></i></span><input type='text' class='form-control' id='AD' name ='AD' placeholder='Missing' maxlength = '20'></div></div>";
}
if(isset($row['ADlu'])){
echo "<div class='col-md-2 text-end text-bottom'><b>Last Logon</b></div>";
echo "<div class='col-md-2 text-end text-bottom'><b>$w_adlu</b></div>";
$date1=date_create($row['ADlu']);
$diff=date_diff($date1,date_create(date("Y-m-d")));
if($diff->format("%R%a") > 60){
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['ADlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['ADlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}else{
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['ADlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['ADlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}
}else{
if(!(isset($row['AD']) && $row['AD'] !=="Y")){
echo "<div class='col-md-2 text-end text-bottom'><b>Last Logon</b></div>";
echo "<div class='col-md-2 text-end text-bottom'><b>$w_adlu</b></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-warning' disabled value='Missing'></div>";
}
}
@@ -143,15 +143,15 @@
$date1=date_create($row['GLPIlu']);
$diff=date_diff($date1,date_create(date("Y-m-d")));
if(isset($row['GLPIlu']) && $row['GLPIlu'] !== ''){
echo "<div class='col-md-2 text-end text-bottom'><b>Last Inventory</b></div>";
echo "<div class='col-md-2 text-end text-bottom'><b>$w_filu</b></div>";
if($diff->format("%R%a") > 7){
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['GLPIlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['GLPIlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}else{
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['GLPIlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['GLPIlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}
}else{
if(!(isset($row['FI']) && $row['FI'] !=="Y")){
echo "<div class='col-md-2 text-end text-bottom'><b>Last Inventory</b></div>";
echo "<div class='col-md-2 text-end text-bottom'><b>$w_filu</b></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-warning' disabled value='Missing'></div>";
}
}
@@ -171,17 +171,17 @@
echo "<div class='col-md-3'><div class='input-group'><span class='input-group-text'><i class='bi bi-pencil-square text-primary'></i></span><input type='text' class='form-control' id='SCCM' name ='SCCM' placeholder='Missing' maxlength = '20'></div></div>";
}
if(isset($row['SCCMlu'])){
echo "<div class='col-md-2 text-end text-bottom'><b>Last Heartbeat</b></div>";
echo "<div class='col-md-2 text-end text-bottom'><b>$w_sccmlu</b></div>";
$date1=date_create($row['SCCMlu']);
$diff=date_diff($date1,date_create(date("Y-m-d")));
if($diff->format("%R%a") > 7){
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['SCCMlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['SCCMlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}else{
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['SCCMlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['SCCMlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}
}else{
if(!(isset($row['SCCM']) && $row['SCCM'] !=="Y")){
echo "<div class='col-md-2 text-end text-bottom'><b>Last Heartbeat</b></div>";
echo "<div class='col-md-2 text-end text-bottom'><b>$w_sccmlu</b></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-warning' disabled value='Missing'></div>";
}
}
@@ -204,7 +204,7 @@
echo "</div><br>";
// NBU
echo "<h3><span class='font-weight-bold'>NetBackup</span></h3>" ;
echo "<h3><span class='font-weight-bold'>$w_backup</span></h3>" ;
echo "<div class='row'>";
if(isset($row['NBU'])){
if($row['NBU']=="Y"){
@@ -216,13 +216,13 @@
echo "<div class='col-md-3'><div class='input-group'><span class='input-group-text'><i class='bi bi-pencil-square text-primary'></i></span><input type='text' class='form-control' id='NBU' name ='NBU' placeholder='Missing' maxlength = '20'></div></div>";
}
if(isset($row['NBUlu'])){
echo "<div class='col-md-2 text-end text-bottom'><b>Last Backup</b></div>";
echo "<div class='col-md-2 text-end text-bottom'><b>$w_backuplu</b></div>";
$date1=date_create($row['NBUlu']);
$diff=date_diff($date1,date_create(date("Y-m-d")));
if($diff->format("%R%a") > 30){
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['NBUlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['NBUlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}else{
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['NBUlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['NBUlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}
}else{
if(!(isset($row['NBU']) && $row['NBU'] !=="Y")){
@@ -283,7 +283,7 @@
?>
<label for="server"></label><input type='text' class='form-control visually-hidden' name="server" id="server" value='<?php echo $_GET['server']; ?>'>
<hr>
<div style="text-align: center;"><button id="button" type="submit" class="btn btn-primary btn-lg"><i class="bi bi-arrow-clockwise"></i><b> Submit</b></button></div>
<div style="text-align: center;"><button id="button" type="submit" class="btn btn-primary btn-lg"><i class="bi bi-arrow-clockwise"></i><b> <?php echo $w_submit; ?></b></button></div>
</form>
</div>