-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
52 lines (40 loc) · 1.37 KB
/
index.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/* --------------------------------------------------------------
* Load system
* -------------------------------------------------------------- */
require('system.php');
$system = new System;
/* --------------------------------------------------------------
* Get current directory
* -------------------------------------------------------------- */
$base = rtrim(str_replace($_SERVER['DOCUMENT_ROOT'], '', dirname(__FILE__)), '/');
?>
<!doctype html>
<html>
<head>
<title><?php echo $system->os->hostname; ?></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="<?php echo $base . '/static/dark.css'; ?>">
</head>
<body>
<div id="container">
<h1>
<?php echo $system->os->hostname; ?>
<small id="uptime">online for <?php echo $system->uptime->days; ?> days, <?php echo $system->uptime->hours; ?> hours, <?php echo $system->uptime->minutes; ?> minutes </small>
</h1>
<?php
/* --------------------------------------------------------------
* Show widgets
* -------------------------------------------------------------- */
$directory = dirname(__FILE__) . '/widgets';
$widgets = scandir($directory, SCANDIR_SORT_ASCENDING);
foreach ($widgets as $widget) {
if ($widget != '.' && $widget != '..') {
include($directory . '/' . $widget);
}
}
?>
</div>
</body>
</html>