-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathstatus.php
32 lines (28 loc) · 838 Bytes
/
status.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
// import main lib
require 'includes/main.php';
// set navtabs
$tabs = [
'Status' => 'status.php',
'Processor usage' => 'status.php?cpu',
'Memory usage' => 'status.php?memory',
'Logs' => 'status.php?log',
];
// hide advanced tabs unless advanced_mode is set
if (@$guru[ 'preferences' ][ 'advanced_mode' ] !== true ) {
unset($tabs[ 'Logs' ]);
}
// select page
if (@isset($_GET[ 'hardware' ]) ) {
$content = content_handle('status', 'hardware');
} elseif (@isset($_GET[ 'cpu' ]) ) {
$content = content_handle('status', 'cpu');
} elseif (@isset($_GET[ 'memory' ]) ) {
$content = content_handle('status', 'memory');
} elseif (@isset($_GET[ 'log' ]) ) {
$content = content_handle('status', 'log');
} else {
$content = content_handle('status', 'status');
}
// serve page
page_handle($content);