} if (count($m_disabled)) { print_message('Disabled poller modules:'); print_message(' ' . implode("\n ", $m_disabled)); } exit; } } if (!isset($options['q'])) { print_cli_banner(); $latest['version'] = get_obs_attrib('latest_ver'); $latest['revision'] = get_obs_attrib('latest_rev'); $latest['date'] = get_obs_attrib('latest_rev_date'); if ($latest['revision'] > OBSERVIUM_REV) { print_message("%GThere is a newer revision of Observium available!%n", 'color'); print_message("%GVersion %r" . $latest['version'] . "%G (" . format_unixtime(datetime_to_unixtime($latest['date']), 'jS F Y') . ") is %r" . ($latest['revision'] - OBSERVIUM_REV) . "%G revisions ahead.%n\n", 'color'); } // print_message("%g".OBSERVIUM_PRODUCT." ".OBSERVIUM_VERSION."\n%WPoller%n\n", 'color'); if (OBS_DEBUG) { print_versions(); } } if ($options['h'] == "odd") { $options['n'] = "1"; $options['i'] = "2"; } elseif ($options['h'] == "even") { $options['n'] = "0"; $options['i'] = "2"; } elseif ($options['h'] == "all") { $where = " "; $doing = "all";
include $config['html_dir'] . "/includes/navbar.inc.php"; } } ?> <div class="container"> <?php if ($_SESSION['authenticated']) { if ($_SESSION['userlevel'] > 7) { $latest['version'] = get_obs_attrib('latest_ver'); $latest['revision'] = get_obs_attrib('latest_rev'); $latest['date'] = get_obs_attrib('latest_rev_date'); if ($latest['revision'] > OBSERVIUM_REV + $config['version_check_revs']) { $notifications[] = array('text' => '<h4>There is a newer revision of Observium available!</h4> Version ' . $latest['version'] . ' (' . format_unixtime(datetime_to_unixtime($latest['date']), 'jS F Y') . ') is ' . ($latest['revision'] - OBSERVIUM_REV) . ' revisions ahead.', 'severity' => 'warning'); $alerts[] = array('text' => '<h4>There is a newer revision of Observium available!</h4> Version ' . $latest['version'] . ' (' . format_unixtime(datetime_to_unixtime($latest['date']), 'jS F Y') . ') is ' . ($latest['revision'] - OBSERVIUM_REV) . ' revisions ahead.', 'severity' => 'warning'); } // Warn about lack of mcrypt unless told not to. if ($config['login_remember_me'] || isset($_SESSION['mcrypt_required'])) { check_extension_exists('mcrypt', 'This extension required for use by the "remember me" feature. Please install the php5-mcrypt package on Ubuntu/Debian or the php-mcrypt package on RHEL/CentOS. Alternatively, you can disable this feature by setting $config[\'login_remember_me\'] = FALSE; in your config.'); } // Warning about web_url config, only for ssl if (is_ssl() && preg_match('/^http:/', $config['web_url'])) { $notifications[] = array('text' => 'Setting \'web_url\' for "External Web URL" not set or incorrect, please update on ' . generate_link('Global Settings Edit', array('page' => 'settings', 'section' => 'wui')) . ' page.', 'severity' => 'warning'); } // Warning about need DB schema update $db_version = get_db_version(); $db_version = sprintf("%03d", $db_version + 1); if (is_file($config['install_dir'] . "/update/{$db_version}.sql") || is_file($config['install_dir'] . "/update/{$db_version}.php")) { $notifications[] = array('text' => 'Your database schema is old and needs updating. Run from server console: <pre style="padding: 3px" class="small">' . $config['install_dir'] . '/discovery.php -u</pre>', 'severity' => 'alert');