';
} else {
echo '
// $(document).ready(function()
// {
// $('#poller_status').load('ajax_poller_status.php');
// });
//
// var auto_refresh = setInterval(
// function ()
// {
// $('#poller_status').load('ajax_poller_status.php');
// }, 10000); // refresh every 10000 milliseconds
//
// Generate UI alerts to be inserted at ##UI_ALERTS##
// Display warning about requiring alerting rebuild
if (get_obs_attrib('alerts_require_rebuild')) {
del_obs_attrib('alerts_require_rebuild');
}
foreach ($alerts as $alert) {
if (isset($alert['markdown']) && $alert['markdown']) {
$alert['text'] = get_markdown_extra($alert['text']);
$alert['title'] = get_markdown_extra($alert['title']);
}
register_html_alert($alert['text'], $alert['title'], $alert['severity']);
}
// No dropdowns on touch gadgets
if (!get_var_true($_SESSION['touch'])) {
register_html_resource('js', 'twitter-bootstrap-hover-dropdown.min.js');
}
// FIXME. change to register_html_resource(), but maybe better to keep them at the bottom? Function has no way to do this right now
register_html_resource('js', 'bootstrap-select.min.js');
?>
##PAGE_PANEL##
';
}
include($page_file);
echo '
';
}
// Register default panel if custom not set
if (!isset($GLOBALS['cache_html']['page_panel'])) {
if (is_file($config['html_dir'] . "/includes/panels/" . $panel_name . ".inc.php")) {
$panel_file = $config['html_dir'] . "/includes/panels/" . $panel_name . ".inc.php";
} else {
$panel_file = $config['html_dir'] . "/includes/panels/default.inc.php"; // default
}
ob_start();
include($panel_file);
$panel_html = ob_get_clean();
register_html_panel($panel_html);
}
}
// HTTP runtime and memory size
$gentime = elapsed_time($runtime_start);
$fullsize = memory_get_usage();
unset($cache);
$cachesize = $fullsize - memory_get_usage();
if ($cachesize < 0) {
$cachesize = 0;
} // Silly PHP!
?>