';
printStats();
$fullsize = memory_get_usage();
unset($cache);
$cachesize = $fullsize - memory_get_usage();
if ($cachesize < 0) {
$cachesize = 0;
} // Silly PHP!
echo(' Cached data in memory is '.formatStorage($cachesize).'. Page memory usage is '.formatStorage($fullsize).', peaked at '. formatStorage(memory_get_peak_usage()) .'.');
echo(' Generated in ' . $gentime . ' seconds.');
}
if (isset($pagetitle) && is_array($pagetitle)) {
# if prefix is set, put it in front
if ($config['page_title_prefix']) {
array_unshift($pagetitle, $config['page_title_prefix']);
}
# if suffix is set, put it in the back
if ($config['page_title_suffix']) {
$pagetitle[] = $config['page_title_suffix'];
}
# create and set the title
$title = join(" - ", $pagetitle);
echo("");
}
?>
'error', 'message' => "RRD Log Directory is missing ($rrd_dir). Graphing may fail."];
}
$temp_dir = Config::get('temp_dir');
if (!is_dir($temp_dir)) {
$msg_box[] = ['type' => 'error', 'message' => "Temp Directory is missing ($temp_dir). Graphing may fail."];
} elseif (!is_writable($temp_dir)) {
$msg_box[] = ['type' => 'error', 'message' => "Temp Directory is not writable ($temp_dir). Graphing may fail."];
}
if (dbFetchCell("SELECT COUNT(*) FROM `devices` WHERE `last_polled` <= DATE_ADD(NOW(), INTERVAL - 15 minute) AND `ignore` = 0 AND `disabled` = 0 AND status = 1", array()) > 0) {
$msg_box[] = ['type' => 'warning', 'message' => "It appears as though you have some devices that haven't completed polling within the last 15 minutes, you may want to check that out :)",'title' => 'Devices unpolled'];
}
foreach (dbFetchRows('SELECT `notifications`.* FROM `notifications` WHERE NOT exists( SELECT 1 FROM `notifications_attribs` WHERE `notifications`.`notifications_id` = `notifications_attribs`.`notifications_id` AND `notifications_attribs`.`user_id` = ?) AND `severity` > 1', array(Auth::id())) as $notification) {
$msg_box[] = [
'type' => 'error',
'message' => "${notification['body']}",
'title' => $notification['title']
];
}
if (is_array($msg_box)) {
echo "
";
foreach ($msg_box as $message) {
Toastr::add($message['type'], $message['message'], $message['title']);
}
echo Toastr::render();
}
if ($no_refresh !== true && $config['page_refresh'] != 0) {
$refresh = $config['page_refresh'] * 1000;
echo('');
} else {
echo('');
}
?>