Source
'Mozilla/5.0 (Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Mobile/15E148 Safari/604.1' => 'Safari 13 (iPhone)',
<?php
/*
** Zabbix
** Copyright (C) 2001-2022 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.
**/
require_once dirname(__FILE__).'/defines.inc.php';
require_once dirname(__FILE__).'/items.inc.php';
function httptest_authentications($type = null) {
$authentication_types = [
HTTPTEST_AUTH_NONE => _('None'),
HTTPTEST_AUTH_BASIC => _('Basic'),
HTTPTEST_AUTH_NTLM => _('NTLM'),
HTTPTEST_AUTH_KERBEROS => _('Kerberos'),
HTTPTEST_AUTH_DIGEST => _('Digest')
];
if (is_null($type)) {
return $authentication_types;
}
elseif (isset($authentication_types[$type])) {
return $authentication_types[$type];
}
else {
return _('Unknown');
}
}
function httptest_status2str($status = null) {
$statuses = [
HTTPTEST_STATUS_ACTIVE => _('Enabled'),
HTTPTEST_STATUS_DISABLED => _('Disabled')
];
if (is_null($status)) {
return $statuses;
}
elseif (isset($statuses[$status])) {
return $statuses[$status];
}
else {
return _('Unknown');
}
}
function httptest_status2style($status) {
$statuses = [