$logo_title,
'border' => '0',
]
);
?>
|
id = 'header_table';
$table->class = 'none';
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->head = [];
$table->data = [];
$table->style['clippy'] = $table->style[1] = $table->style[4] = $table->style[5] = $table->style[6] = $table->style[8] = $table->style[9] = $table->style['qr'] = $table->style['notifications'] = 'width: 22px; text-align:center; height: 22px; padding-right: 9px;padding-left: 9px;';
$table->style[7] = 'width: 20px; padding-right: 9px;';
$table->style['searchbar'] = 'width: 180px; min-width: 180px;';
$table->style[11] = 'padding-left: 10px; padding-right: 5px;width: 16px;';
$table->width = '100%';
$table->styleTable = 'margin: auto; margin-top: 0px;';
$table->rowclass[0] = '';
$acl_head_search = true;
if ($config['acl_enterprise'] == 1 && !users_is_admin()) {
$acl_head_search = db_get_sql(
"SELECT sec FROM tusuario
INNER JOIN tusuario_perfil ON tusuario.id_user = tusuario_perfil.id_usuario
INNER JOIN tprofile_view ON tprofile_view.id_profile = tusuario_perfil.id_perfil
WHERE tusuario.id_user = '".$config['id_user']."' AND (sec = '*' OR sec = 'head_search')"
);
}
if ($acl_head_search) {
$table->data[0][11] = ui_print_help_tip(__('Blank characters are used as AND conditions'), true);
// Search bar
$search_bar = '';
$table->data[0]['searchbar'] = $search_bar;
}
if ($config['show_qr_code_header'] == 0) {
$show_qr_code_header = 'display: none;';
} else {
$show_qr_code_header = 'display: inline;';
}
$table->data[0]['qr'] = '';
echo "';
?>
data[0]['clippy'] = ''.html_print_image(
'images/clippy_icon.png',
true,
[
'id' => 'clippy',
'class' => 'clippy',
'alt' => __('%s assistant', get_product_name()),
'title' => __(
'%s assistant',
get_product_name()
),
]
).'';
}
// ======= Autorefresh code =============================
$autorefresh_txt = '';
$autorefresh_additional = '';
$ignored_params = [
'agent_config' => false,
'code' => false,
];
if (!isset($_GET['sec2'])) {
$_GET['sec2'] = '';
}
if (!isset($_GET['refr'])) {
$_GET['refr'] = null;
}
$select = db_process_sql("SELECT autorefresh_white_list,time_autorefresh FROM tusuario WHERE id_user = '".$config['id_user']."'");
$autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
if ($autorefresh_list !== null && array_search($_GET['sec2'], $autorefresh_list) !== false) {
$do_refresh = true;
if ($_GET['sec2'] == 'operation/agentes/pandora_networkmap') {
if ((!isset($_GET['tab'])) || ($_GET['tab'] != 'view')) {
$do_refresh = false;
}
}
if ($do_refresh) {
$autorefresh_img = html_print_image('images/header_refresh.png', true, ['class' => 'bot', 'alt' => 'lightning', 'title' => __('Configure autorefresh')]);
if ($_GET['refr']) {
$autorefresh_txt .= ' ('.date('i:s', $config['refr']).')';
}
$ignored_params['refr'] = '';
$values = get_refresh_time_array();
$autorefresh_additional = '';
$autorefresh_additional .= html_print_select($values, 'ref', '', '', __('Select'), '0', true, false, false);
$autorefresh_additional .= '';
unset($values);
$autorefresh_link_open_img = '';
if ($_GET['refr']) {
$autorefresh_link_open_txt = '';
} else {
$autorefresh_link_open_txt = '';
}
$autorefresh_link_close = '';
} else {
$autorefresh_img = html_print_image('images/header_refresh_disabled.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]);
$ignored_params['refr'] = false;
$autorefresh_link_open_img = '';
$autorefresh_link_open_txt = '';
$autorefresh_link_close = '';
}
} else {
$autorefresh_img = html_print_image('images/header_refresh_disabled.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]);
$ignored_params['refr'] = false;
$autorefresh_link_open_img = '';
$autorefresh_link_open_txt = '';
$autorefresh_link_close = '';
}
$table->data[0][1] = $autorefresh_link_open_img.$autorefresh_img.$autorefresh_link_close;
$table->data[0][2] = $autorefresh_link_open_txt.$autorefresh_txt.$autorefresh_link_close.$autorefresh_additional;
// ======================================================
$pandora_management = check_acl($config['id_user'], 0, 'PM');
// Main help icon
if (!$config['disable_help']) {
$table->data[0][4] = '';
}
$notifications_numbers = notifications_get_counters();
$table->data[0]['notifications'] = notifications_print_ball(
$notifications_numbers['notifications'],
$notifications_numbers['last_id']
);
// Logout
$table->data[0][5] = '';
$table->data[0][5] .= html_print_image('images/header_logout.png', true, ['alt' => __('Logout'), 'class' => 'bot', 'title' => __('Logout')]);
$table->data[0][5] .= '';
// User
if (is_user_admin($config['id_user']) == 1) {
$table->data[0][6] = html_print_image('images/header_user_admin.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']);
} else {
$table->data[0][6] = html_print_image('images/header_user.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']);
}
$table->data[0][6] = ''.$table->data[0][6].'';
$table->data[0][7] = ' ('.$config['id_user'].')';
// Chat messages
$table->data[0][8] = "";
$table->data[0][8] .= "";
$table->data[0][8] .= html_print_image('images/header_chat.png', true, ['title' => __('New chat message')]);
$table->data[0][8] .= '';
$table->data[0][8] .= '';
html_print_table($table);
unset($table);
?>
|