Source
($data['web_layout_mode'] == ZBX_LAYOUT_KIOSKMODE ? ' '.ZBX_STYLE_LAYOUT_KIOSKMODE : '').'">';
<?php declare(strict_types = 0);
/*
** Zabbix
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/**
* @var array $data
*/
function local_showHeader(array $data): void {
header('Content-Type: text/html; charset=UTF-8');
header('X-Content-Type-Options: nosniff');
header('X-XSS-Protection: 1; mode=block');
if (strcasecmp($data['config']['x_frame_options'], 'null') != 0) {
$x_frame_options = $data['config']['x_frame_options'];
if (strcasecmp($x_frame_options, 'SAMEORIGIN') == 0) {
header('X-Frame-Options: SAMEORIGIN');
}
elseif (strcasecmp($x_frame_options, 'DENY') == 0) {
header('X-Frame-Options: DENY');
}
else {
header('Content-Security-Policy: frame-ancestors '.$x_frame_options);
}
}
echo (new CPartial('layout.htmlpage.header', [
'javascript' => [
'files' => $data['javascript']['files']
],
'stylesheet' => [
'files' => $data['stylesheet']['files']
],
'page' => [
'title' => $data['page']['title']
],
'user' => [
'lang' => CWebUser::$data['lang'],
'theme' => CWebUser::$data['theme']
],
'web_layout_mode' => $data['web_layout_mode'],
'config' => [
'server_check_interval' => $data['config']['server_check_interval']
]
]))->getOutput();