'Pandora FMS Opensource', "border" => '0'));
}
else {
echo html_print_image('images/pandora_header_logo_enterprise.png', true, array("alt" => 'Pandora FMS Enterprise', "border" => '0', 'width' => '250px'));
}
?>
|
class = "none";
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->head = array ();
$table->data = array ();
$table->style[0] = $table->style[2] = $table->style[4] = 'width: 22px; text-align:center; height: 22px; padding-left: 12px; padding-right: 2px;';
$table->rowclass[0] = '';
$table->styleTable = 'margin: auto; margin-top: 15px;';
// Servers check
$servers = array();
$servers["all"] = (int) db_get_value ('COUNT(id_server)','tserver');
$servers["up"] = (int) servers_check_status ();
$servers["down"] = $servers["all"] - $servers["up"];
if ($servers["up"] == 0) {
//All Servers down or no servers at all
$servers_check_img = html_print_image("images/header_down.png", true, array("alt" => 'cross', "class" => 'bot', 'title' => __('All systems').': '.__('Down')));
$servers_check_txt = __('All systems').': '.__('Down');
}
elseif ($servers["down"] != 0) {
//Some servers down
$servers_check_img = html_print_image("images/header_warning.png", true, array("alt" => 'error', "class" => 'bot', 'title' => $servers["down"].' '.__('servers down')));
$servers_check_txt = $servers["down"].' '.__('servers down');
}
else {
//All servers up
$servers_check_img = html_print_image("images/header_ready.png", true, array("alt" => 'ok', "class" => 'bot', 'title' => __('All systems').': '.__('Ready')));
$servers_check_txt = __('All systems').': '.__('Ready');
}
unset ($servers); // Since this is the header, we don't like to trickle down variables.
$servers_link_open = '';
$servers_link_close = '';
$table->data[0][0] = $servers_link_open . $servers_check_img . $servers_link_close;
$table->data[0][1] = $servers_link_open . $servers_check_txt . $servers_link_close;
// Autorefresh
$autorefresh_img = html_print_image("images/header_refresh.png", true, array("class" => 'bot', "alt" => 'lightning', 'title' => __('Configure autorefresh')));
$autorefresh_txt = __('Autorefresh');
$autorefresh_additional = '';
$ignored_params = array ('agent_config' => false, 'code' => false);
if ($config['enable_refr']) {
$ignored_params['refr'] = 0;
$autorefresh_txt .= ' ('.date ("i:s", $config["refr"]).')';
}
else {
if (!isset($_GET['sec2']))
$_GET['sec2'] = '';
if (($config['refr']) && (($_GET['sec2'] == 'operation/agentes/tactical') || ($_GET['sec2'] == 'operation/agentes/estado_agente') ||
($_GET['sec2'] == 'operation/agentes/group_view') || ($_GET['sec2'] == 'operation/events/events') ||
($_GET['sec2'] == 'enterprise/dashboard/main_dashboard'))) {
$autorefresh_txt .= ' ('.date ("i:s", $config["refr"]).')';
}
else {
$ignored_params['refr'] = '';
$values = array (
'5' => __('5 seconds'),
'10' => __('10 seconds'),
'15' => __('15 seconds'),
'30' => __('30 seconds'),
(string)SECONDS_1MINUTE => __('1 minute'),
(string)SECONDS_2MINUTES => __('2 minutes'),
(string)SECONDS_5MINUTES => __('5 minutes'),
(string)SECONDS_15MINUTES => __('15 minutes'),
(string)SECONDS_30MINUTES => __('30 minutes'),
(string)SECONDS_1HOUR => __('1 hour'));
$autorefresh_additional = '';
$autorefresh_additional .= html_print_select ($values, 'ref', '', '', __('Select'), '0', true, false, false);
$autorefresh_additional .= '';
unset ($values);
}
}
$autorefresh_link_open_img = '';
$autorefresh_link_open_txt = '';
$autorefresh_link_close = '';
$table->data[0][2] = $autorefresh_link_open_img . $autorefresh_img . $autorefresh_link_close;
$table->data[0][3] = $autorefresh_link_open_txt . $autorefresh_txt . $autorefresh_link_close . $autorefresh_additional;
// Maintenance
//$maintenance_txt = __('Maintenance');
if ($config["alert_cnt"] > 0) {
echo '';
ui_require_css_file ('dialog');
$maintenance_link = 'javascript:';
$maintenance_title = __("System alerts detected - Please fix as soon as possible");
$maintenance_class = $maintenance_id = 'show_systemalert_dialog white';
$maintenance_link_open_txt = '';
$maintenance_link_open_img = '';
$maintenance_link_close = '';
$maintenance_img = $maintenance_link_open_img . html_print_image ("images/header_warning.png", true, array ("title" => __('You have %d warning(s)', $config["alert_cnt"]), "id" => "yougotalert", "class" => "bot")) . $maintenance_link_close;
$maintenance_txt = $maintenance_link_open_txt . $maintenance_txt . $maintenance_link_close;
}
else {
$maintenance_img = html_print_image ("images/header_ready.png", true, array ("title" => __('There are not warnings'), "id" => "yougotalert", "class" => "bot"));
}
$table->data[0][4] = $maintenance_img;
//$table->data[0][5] = $maintenance_txt;
html_print_table($table);
unset($table);
?>
|
class = "none";
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->head = array ();
$table->data = array ();
$table->style[0] = $table->style[1] = 'width: 22px; text-align:center; height: 22px; padding-right: 2px;';
$table->rowclass[0] = '';
$table->styleTable = 'margin-top: 15px;';
// Logout
$table->data[0][0] = '';
$table->data[0][0] .= html_print_image("images/header_logout.png", true, array("alt" => __('Logout'), "class" => 'bot', "title" => __('Logout')));
$table->data[0][0] .= '';
// User
if (is_user_admin ($config["id_user"]) == 1)
$table->data[0][1] = html_print_image("images/header_user_admin.png" , true, array("title" => __('Edit my user'), "class" => 'bot', "alt" => 'user'));
else
$table->data[0][1] = html_print_image("images/header_user.png" , true, array("title" => __('Edit my user'), "class" => 'bot', "alt" => 'user'));
$table->data[0][1] = '' . $table->data[0][1] . '';
$table->data[0][2] = ' [' . $config["id_user"] . ']';
html_print_table($table);
unset($table);
?>
|
class = "none";
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->head = array ();
$table->data = array ();
$table->style[0] = $table->style[1] = 'width: 22px; text-align:center; height: 22px; padding-right: 2px;';
$table->style[3] = $table->style[4] = $table->style[5] = 'text-align:right; padding-right: 2px; width: 1px;';
$table->style[6] = 'width: 120px;';
$table->style[7] = 'padding-left: 10px; padding-left: 10px; width: 20px;';
$table->width = "100%";
$table->styleTable = 'margin: auto; margin-top: 15px; padding-right: 5px;';
$table->rowclass[0] = '';
// Main help icon
$table->data[0][3] = ui_print_help_icon ("main_help", true, '', 'images/header_help.png');
// Messages
$msg_cnt = messages_get_count ($config["id_user"]);
if ($msg_cnt > 0) {
echo '';
ui_require_css_file ('dialog');
$table->data[0][4] = '';
$table->data[0][4] .= html_print_image ("images/header_email.png", true, array ("title" => __('You have %d unread message(s)', $msg_cnt), "id" => "yougotmail", "class" => "bot", 'style' => 'width:24px;'));
$table->data[0][4] .= '';
}
else {
$table->data[0][4] = '';
}
// Chat messages
$table->data[0][5] = "";
$table->data[0][5] .= "";
$table->data[0][5] .= html_print_image('images/header_chat.png', true, array('style' => 'width:22px;', "title" => __('New chat message')));
$table->data[0][5] .= "";
$table->data[0][5] .= "";
// Search bar
$search_bar = '';
$table->data[0][6] = $search_bar;
$table->data[0][7] = ui_print_help_tip (__("Blank characters are used as AND conditions"), true);
html_print_table($table);
unset($table);
?>
|