1<?php
2/*
3** Zabbix
4** Copyright (C) 2001-2021 Zabbix SIA
5**
6** This program is free software; you can redistribute it and/or modify
7** it under the terms of the GNU General Public License as published by
8** the Free Software Foundation; either version 2 of the License, or
9** (at your option) any later version.
10**
11** This program is distributed in the hope that it will be useful,
12** but WITHOUT ANY WARRANTY; without even the implied warranty of
13** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14** GNU General Public License for more details.
15**
16** You should have received a copy of the GNU General Public License
17** along with this program; if not, write to the Free Software
18** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19**/
20
21
22define('ZABBIX_VERSION',		'4.0.30');
23define('ZABBIX_API_VERSION',	'4.0.30');
24define('ZABBIX_EXPORT_VERSION',	'4.0');
25define('ZABBIX_DB_VERSION',		4000000);
26
27define('ZABBIX_COPYRIGHT_FROM',	'2001');
28define('ZABBIX_COPYRIGHT_TO',	'2021');
29
30define('ZBX_LOGIN_ATTEMPTS',	5);
31define('ZBX_LOGIN_BLOCK',		30); // sec
32
33define('ZBX_SESSION_NAME', 'zbx_sessionid'); // Session cookie name for Zabbix front-end.
34
35define('ZBX_KIBIBYTE',	'1024');
36define('ZBX_MEBIBYTE',	'1048576');
37define('ZBX_GIBIBYTE',	'1073741824');
38
39define('ZBX_MIN_PERIOD',		60); // 1 minute
40// The maximum period for the time bar control, ~2 years (2 * 365 * 86400) + 86400 + 3600 + 1.
41// Both dates are included to the period, so one second is needed to cover the case from "now" till "now-2y".
42define('ZBX_MAX_PERIOD',		63162001);
43define('ZBX_MIN_INT32',			-2147483648);
44define('ZBX_MAX_INT32',			2147483647);
45define('ZBX_MIN_INT64',			'-9223372036854775808');
46define('ZBX_MAX_INT64',			'9223372036854775807');
47define('ZBX_MAX_UINT64',		'18446744073709551615');
48define('ZBX_MAX_DATE',			2147483647); // 19 Jan 2038 05:14:07
49define('ZBX_PERIOD_DEFAULT_FROM',	'now-1h'); // Default time interval.
50define('ZBX_PERIOD_DEFAULT_TO',		'now');
51define('ZBX_MIN_TIMESHIFT',	-788400000); // Min valid timeshift value in seconds (25 years).
52define('ZBX_MAX_TIMESHIFT',	788400000); // Max valid timeshift value in seconds (25 years).
53
54// Date and time format separators must be synced with setSDateFromOuterObj() in class.calendar.js.
55define('ZBX_FULL_DATE_TIME',	'Y-m-d H:i:s'); // Time selector full date and time presentation format.
56define('ZBX_DATE_TIME',			'Y-m-d H:i'); // Time selector date and time without seconds presentation format.
57
58// the maximum period to display history data for the latest data and item overview pages in seconds
59// by default set to 86400 seconds (24 hours)
60define('ZBX_HISTORY_PERIOD', 86400);
61
62define('ZBX_HISTORY_SOURCE_ELASTIC',	'elastic');
63define('ZBX_HISTORY_SOURCE_SQL',		'sql');
64
65define('ELASTICSEARCH_RESPONSE_PLAIN',			0);
66define('ELASTICSEARCH_RESPONSE_AGGREGATION',	1);
67define('ELASTICSEARCH_RESPONSE_DOCUMENTS',		2);
68
69define('ZBX_WIDGET_ROWS', 20);
70
71define('ZBX_FONTPATH',				realpath('assets/fonts')); // where to search for font (GD > 2.0.18)
72define('ZBX_GRAPH_FONT_NAME',		'DejaVuSans'); // font file name
73define('ZBX_GRAPH_LEGEND_HEIGHT',	120); // when graph height is less then this value, some legend will not show up
74
75define('ZBX_SCRIPT_TIMEOUT',		60); // in seconds
76
77define('GRAPH_YAXIS_SIDE_DEFAULT', 0); // 0 - LEFT SIDE, 1 - RIGHT SIDE
78
79define('ZBX_MAX_IMAGE_SIZE', ZBX_MEBIBYTE);
80
81define('ZBX_UNITS_ROUNDOFF_THRESHOLD',		0.01);
82define('ZBX_UNITS_ROUNDOFF_UPPER_LIMIT',	2);
83define('ZBX_UNITS_ROUNDOFF_MIDDLE_LIMIT',	4);
84define('ZBX_UNITS_ROUNDOFF_LOWER_LIMIT',	6);
85
86define('ZBX_PRECISION_10',	10);
87
88define('ZBX_DEFAULT_INTERVAL', '1-7,00:00-24:00');
89
90define('ZBX_SCRIPT_TYPE_CUSTOM_SCRIPT',	0);
91define('ZBX_SCRIPT_TYPE_IPMI',			1);
92define('ZBX_SCRIPT_TYPE_SSH',			2);
93define('ZBX_SCRIPT_TYPE_TELNET',		3);
94define('ZBX_SCRIPT_TYPE_GLOBAL_SCRIPT',	4);
95
96define('ZBX_SCRIPT_EXECUTE_ON_AGENT',	0);
97define('ZBX_SCRIPT_EXECUTE_ON_SERVER',	1);
98define('ZBX_SCRIPT_EXECUTE_ON_PROXY',	2);
99
100define('ZBX_FLAG_DISCOVERY_NORMAL',		0x0);
101define('ZBX_FLAG_DISCOVERY_RULE',		0x1);
102define('ZBX_FLAG_DISCOVERY_PROTOTYPE',	0x2);
103define('ZBX_FLAG_DISCOVERY_CREATED',	0x4);
104
105define('EXTACK_OPTION_ALL',		0);
106define('EXTACK_OPTION_UNACK',	1);
107define('EXTACK_OPTION_BOTH',	2);
108
109define('TRIGGERS_OPTION_RECENT_PROBLEM',	1);
110define('TRIGGERS_OPTION_ALL',				2);
111define('TRIGGERS_OPTION_IN_PROBLEM',		3);
112
113define('ZBX_FONT_NAME', 'DejaVuSans');
114
115define('ZBX_AUTH_INTERNAL',	0);
116define('ZBX_AUTH_LDAP',		1);
117define('ZBX_AUTH_HTTP_DISABLED',	0);
118define('ZBX_AUTH_HTTP_ENABLED',		1);
119define('ZBX_AUTH_LDAP_DISABLED',	0);
120define('ZBX_AUTH_LDAP_ENABLED',		1);
121define('ZBX_AUTH_FORM_ZABBIX',	0);
122define('ZBX_AUTH_FORM_HTTP',	1);
123define('ZBX_AUTH_CASE_INSENSITIVE',	0);
124define('ZBX_AUTH_CASE_SENSITIVE',	1);
125
126define('ZBX_DB_DB2',		'IBM_DB2');
127define('ZBX_DB_MYSQL',		'MYSQL');
128define('ZBX_DB_ORACLE',		'ORACLE');
129define('ZBX_DB_POSTGRESQL',	'POSTGRESQL');
130
131define('ZBX_DB_MAX_ID', '9223372036854775807');
132
133// maximum number of records for create() or update() API calls
134define('ZBX_DB_MAX_INSERTS', 10000);
135
136// Default db and field character set
137define('ZBX_DB_DEFAULT_CHARSET', 'UTF8');
138define('ZBX_DB_MYSQL_DEFAULT_COLLATION', 'utf8_bin');
139
140define('ZBX_SHOW_TECHNICAL_ERRORS', false);
141
142define('PAGE_TYPE_HTML',				0);
143define('PAGE_TYPE_IMAGE',				1);
144define('PAGE_TYPE_JS',					3); // javascript
145define('PAGE_TYPE_CSS',					4);
146define('PAGE_TYPE_HTML_BLOCK',			5); // simple block of html (as text)
147define('PAGE_TYPE_JSON',				6); // simple JSON
148define('PAGE_TYPE_JSON_RPC',			7); // api call
149define('PAGE_TYPE_TEXT',				9); // simple text
150define('PAGE_TYPE_TEXT_RETURN_JSON',	11); // input plaintext output json
151
152define('ZBX_SESSION_ACTIVE',	0);
153define('ZBX_SESSION_PASSIVE',	1);
154
155define('ZBX_DROPDOWN_FIRST_NONE',	0);
156define('ZBX_DROPDOWN_FIRST_ALL',	1);
157
158define('T_ZBX_STR',			0);
159define('T_ZBX_INT',			1);
160define('T_ZBX_DBL',			2);
161define('T_ZBX_RANGE_TIME',	3);
162define('T_ZBX_CLR',			5);
163define('T_ZBX_DBL_BIG',		9);
164define('T_ZBX_DBL_STR',		10);
165define('T_ZBX_TP',			11);
166define('T_ZBX_TU',			12);
167define('T_ZBX_ABS_TIME',	13);
168
169define('O_MAND',	0);
170define('O_OPT',		1);
171define('O_NO',		2);
172
173define('P_SYS',					0x0001);
174define('P_UNSET_EMPTY',			0x0002);
175define('P_CRLF',				0x0004);
176define('P_ACT',					0x0010);
177define('P_NZERO',				0x0020);
178define('P_NO_TRIM',				0x0040);
179define('P_ALLOW_USER_MACRO',	0x0080);
180define('P_ALLOW_LLD_MACRO',		0x0100);
181define('ZBX_URI_VALID_SCHEMES', 'http,https,ftp,file,mailto,tel,ssh');
182
183// Validate URI against schemes whitelist defined in ZBX_URI_VALID_SCHEMES.
184define('VALIDATE_URI_SCHEMES', true);
185
186//	misc parameters
187define('IMAGE_FORMAT_PNG',	'PNG');
188define('IMAGE_FORMAT_JPEG',	'JPEG');
189define('IMAGE_FORMAT_TEXT',	'JPEG');
190
191define('IMAGE_TYPE_ICON',			1);
192define('IMAGE_TYPE_BACKGROUND',		2);
193
194define('ITEM_CONVERT_WITH_UNITS',	0); // - do not convert empty units
195define('ITEM_CONVERT_NO_UNITS',		1); // - no units
196
197define('ZBX_SORT_UP',	'ASC');
198define('ZBX_SORT_DOWN',	'DESC');
199
200// Maximum number of tags to display.
201define('ZBX_TAG_COUNT_DEFAULT', 3);
202
203define('ZBX_TCP_HEADER_DATA',		"ZBXD");
204define('ZBX_TCP_HEADER_VERSION',	"\1");
205define('ZBX_TCP_HEADER',			ZBX_TCP_HEADER_DATA.ZBX_TCP_HEADER_VERSION);
206define('ZBX_TCP_HEADER_LEN',		5);
207define('ZBX_TCP_DATALEN_LEN',		8);
208
209define('AUDIT_ACTION_ADD',		0);
210define('AUDIT_ACTION_UPDATE',	1);
211define('AUDIT_ACTION_DELETE',	2);
212define('AUDIT_ACTION_LOGIN',	3);
213define('AUDIT_ACTION_LOGOUT',	4);
214define('AUDIT_ACTION_ENABLE',	5);
215define('AUDIT_ACTION_DISABLE',	6);
216
217define('AUDIT_RESOURCE_USER',				0);
218define('AUDIT_RESOURCE_ZABBIX_CONFIG',		2);
219define('AUDIT_RESOURCE_MEDIA_TYPE',			3);
220define('AUDIT_RESOURCE_HOST',				4);
221define('AUDIT_RESOURCE_ACTION',				5);
222define('AUDIT_RESOURCE_GRAPH',				6);
223define('AUDIT_RESOURCE_GRAPH_ELEMENT',		7);
224define('AUDIT_RESOURCE_USER_GROUP',			11);
225define('AUDIT_RESOURCE_APPLICATION',		12);
226define('AUDIT_RESOURCE_TRIGGER',			13);
227define('AUDIT_RESOURCE_HOST_GROUP',			14);
228define('AUDIT_RESOURCE_ITEM',				15);
229define('AUDIT_RESOURCE_IMAGE',				16);
230define('AUDIT_RESOURCE_VALUE_MAP',			17);
231define('AUDIT_RESOURCE_IT_SERVICE',			18);
232define('AUDIT_RESOURCE_MAP',				19);
233define('AUDIT_RESOURCE_SCREEN',				20);
234define('AUDIT_RESOURCE_SCENARIO',			22);
235define('AUDIT_RESOURCE_DISCOVERY_RULE',		23);
236define('AUDIT_RESOURCE_SLIDESHOW',			24);
237define('AUDIT_RESOURCE_SCRIPT',				25);
238define('AUDIT_RESOURCE_PROXY',				26);
239define('AUDIT_RESOURCE_MAINTENANCE',		27);
240define('AUDIT_RESOURCE_REGEXP',				28);
241define('AUDIT_RESOURCE_MACRO',				29);
242define('AUDIT_RESOURCE_TEMPLATE',			30);
243define('AUDIT_RESOURCE_TRIGGER_PROTOTYPE',	31);
244define('AUDIT_RESOURCE_ICON_MAP',			32);
245define('AUDIT_RESOURCE_DASHBOARD',			33);
246define('AUDIT_RESOURCE_CORRELATION',		34);
247define('AUDIT_RESOURCE_GRAPH_PROTOTYPE',	35);
248define('AUDIT_RESOURCE_ITEM_PROTOTYPE',		36);
249define('AUDIT_RESOURCE_HOST_PROTOTYPE',		37);
250
251define('CONDITION_TYPE_HOST_GROUP',			0);
252define('CONDITION_TYPE_HOST',				1);
253define('CONDITION_TYPE_TRIGGER',			2);
254define('CONDITION_TYPE_TRIGGER_NAME',		3);
255define('CONDITION_TYPE_TRIGGER_SEVERITY',	4);
256define('CONDITION_TYPE_TIME_PERIOD',		6);
257define('CONDITION_TYPE_DHOST_IP',			7);
258define('CONDITION_TYPE_DSERVICE_TYPE',		8);
259define('CONDITION_TYPE_DSERVICE_PORT',		9);
260define('CONDITION_TYPE_DSTATUS',			10);
261define('CONDITION_TYPE_DUPTIME',			11);
262define('CONDITION_TYPE_DVALUE',				12);
263define('CONDITION_TYPE_TEMPLATE',			13);
264define('CONDITION_TYPE_EVENT_ACKNOWLEDGED',	14);
265define('CONDITION_TYPE_APPLICATION',		15);
266define('CONDITION_TYPE_SUPPRESSED',			16);
267define('CONDITION_TYPE_DRULE',				18);
268define('CONDITION_TYPE_DCHECK',				19);
269define('CONDITION_TYPE_PROXY',				20);
270define('CONDITION_TYPE_DOBJECT',			21);
271define('CONDITION_TYPE_HOST_NAME',			22);
272define('CONDITION_TYPE_EVENT_TYPE',			23);
273define('CONDITION_TYPE_HOST_METADATA',		24);
274define('CONDITION_TYPE_EVENT_TAG',			25);
275define('CONDITION_TYPE_EVENT_TAG_VALUE',	26);
276
277define('CONDITION_OPERATOR_EQUAL',		0);
278define('CONDITION_OPERATOR_NOT_EQUAL',	1);
279define('CONDITION_OPERATOR_LIKE',		2);
280define('CONDITION_OPERATOR_NOT_LIKE',	3);
281define('CONDITION_OPERATOR_IN',			4);
282define('CONDITION_OPERATOR_MORE_EQUAL',	5);
283define('CONDITION_OPERATOR_LESS_EQUAL',	6);
284define('CONDITION_OPERATOR_NOT_IN',		7);
285define('CONDITION_OPERATOR_REGEXP',		8);
286define('CONDITION_OPERATOR_NOT_REGEXP',	9);
287define('CONDITION_OPERATOR_YES',		10);
288define('CONDITION_OPERATOR_NO',			11);
289
290// correlation statuses
291define('ZBX_CORRELATION_ENABLED',		0);
292define('ZBX_CORRELATION_DISABLED',		1);
293
294// correlation condition types
295define('ZBX_CORR_CONDITION_OLD_EVENT_TAG',			0);
296define('ZBX_CORR_CONDITION_NEW_EVENT_TAG',			1);
297define('ZBX_CORR_CONDITION_NEW_EVENT_HOSTGROUP',	2);
298define('ZBX_CORR_CONDITION_EVENT_TAG_PAIR',			3);
299define('ZBX_CORR_CONDITION_OLD_EVENT_TAG_VALUE',	4);
300define('ZBX_CORR_CONDITION_NEW_EVENT_TAG_VALUE',	5);
301
302// correlation operation types
303define('ZBX_CORR_OPERATION_CLOSE_OLD',	0);
304define('ZBX_CORR_OPERATION_CLOSE_NEW',	1);
305
306// event type action condition values
307define('EVENT_TYPE_ITEM_NOTSUPPORTED',		0);
308define('EVENT_TYPE_LLDRULE_NOTSUPPORTED',	2);
309define('EVENT_TYPE_TRIGGER_UNKNOWN',		4);
310
311define('HOST_STATUS_MONITORED',		0);
312define('HOST_STATUS_NOT_MONITORED',	1);
313define('HOST_STATUS_TEMPLATE',		3);
314define('HOST_STATUS_PROXY_ACTIVE',	5);
315define('HOST_STATUS_PROXY_PASSIVE',	6);
316
317define('HOST_ENCRYPTION_NONE',			1);
318define('HOST_ENCRYPTION_PSK',			2);
319define('HOST_ENCRYPTION_CERTIFICATE',	4);
320
321define('HOST_COMPRESSION_ON', 1);
322
323define('PSK_MIN_LEN',	32);
324
325define('HOST_MAINTENANCE_STATUS_OFF',	0);
326define('HOST_MAINTENANCE_STATUS_ON',	1);
327
328define('INTERFACE_SECONDARY',	0);
329define('INTERFACE_PRIMARY',		1);
330
331define('INTERFACE_USE_DNS',	0);
332define('INTERFACE_USE_IP',	1);
333
334define('INTERFACE_TYPE_ANY',		-1);
335define('INTERFACE_TYPE_UNKNOWN',	0);
336define('INTERFACE_TYPE_AGENT',		1);
337define('INTERFACE_TYPE_SNMP',		2);
338define('INTERFACE_TYPE_IPMI',		3);
339define('INTERFACE_TYPE_JMX',		4);
340
341define('SNMP_BULK_DISABLED',	0);
342define('SNMP_BULK_ENABLED',		1);
343
344define('MAINTENANCE_STATUS_ACTIVE',		0);
345define('MAINTENANCE_STATUS_APPROACH',	1);
346define('MAINTENANCE_STATUS_EXPIRED',	2);
347
348define('HOST_AVAILABLE_UNKNOWN',	0);
349define('HOST_AVAILABLE_TRUE',		1);
350define('HOST_AVAILABLE_FALSE',		2);
351
352define('MAINTENANCE_TAG_EVAL_TYPE_AND_OR',	0);
353define('MAINTENANCE_TAG_EVAL_TYPE_OR',		2);
354define('MAINTENANCE_TAG_OPERATOR_EQUAL',	0);
355define('MAINTENANCE_TAG_OPERATOR_LIKE',		2);
356
357define('MAINTENANCE_TYPE_NORMAL',	0);
358define('MAINTENANCE_TYPE_NODATA',	1);
359
360define('TIMEPERIOD_TYPE_ONETIME',	0);
361define('TIMEPERIOD_TYPE_HOURLY',	1);
362define('TIMEPERIOD_TYPE_DAILY',		2);
363define('TIMEPERIOD_TYPE_WEEKLY',	3);
364define('TIMEPERIOD_TYPE_MONTHLY',	4);
365define('TIMEPERIOD_TYPE_YEARLY',	5);
366
367// report periods
368define('REPORT_PERIOD_TODAY',			0);
369define('REPORT_PERIOD_YESTERDAY',		1);
370define('REPORT_PERIOD_CURRENT_WEEK',	2);
371define('REPORT_PERIOD_CURRENT_MONTH',	3);
372define('REPORT_PERIOD_CURRENT_YEAR',	4);
373define('REPORT_PERIOD_LAST_WEEK',		5);
374define('REPORT_PERIOD_LAST_MONTH',		6);
375define('REPORT_PERIOD_LAST_YEAR',		7);
376
377define('SYSMAP_LABEL_ADVANCED_OFF',	0);
378define('SYSMAP_LABEL_ADVANCED_ON',	1);
379
380define('SYSMAP_PROBLEMS_NUMBER',			0);
381define('SYSMAP_SINGLE_PROBLEM',				1);
382define('SYSMAP_PROBLEMS_NUMBER_CRITICAL',	2);
383
384define('MAP_LABEL_TYPE_LABEL',		0);
385define('MAP_LABEL_TYPE_IP',			1);
386define('MAP_LABEL_TYPE_NAME',		2);
387define('MAP_LABEL_TYPE_STATUS',		3);
388define('MAP_LABEL_TYPE_NOTHING',	4);
389define('MAP_LABEL_TYPE_CUSTOM',		5);
390
391define('MAP_LABEL_LOC_DEFAULT', -1);
392define('MAP_LABEL_LOC_BOTTOM',	0);
393define('MAP_LABEL_LOC_LEFT',	1);
394define('MAP_LABEL_LOC_RIGHT',	2);
395define('MAP_LABEL_LOC_TOP',		3);
396
397define('SYSMAP_ELEMENT_TYPE_HOST',		0);
398define('SYSMAP_ELEMENT_TYPE_MAP',		1);
399define('SYSMAP_ELEMENT_TYPE_TRIGGER',	2);
400define('SYSMAP_ELEMENT_TYPE_HOST_GROUP',3);
401define('SYSMAP_ELEMENT_TYPE_IMAGE',		4);
402
403define('SYSMAP_ELEMENT_SUBTYPE_HOST_GROUP',				0);
404define('SYSMAP_ELEMENT_SUBTYPE_HOST_GROUP_ELEMENTS',	1);
405
406define('SYSMAP_ELEMENT_AREA_TYPE_FIT',		0);
407define('SYSMAP_ELEMENT_AREA_TYPE_CUSTOM',	1);
408
409define('SYSMAP_ELEMENT_AREA_VIEWTYPE_GRID', 0);
410
411define('SYSMAP_ELEMENT_ICON_ON',			0);
412define('SYSMAP_ELEMENT_ICON_OFF',			1);
413define('SYSMAP_ELEMENT_ICON_MAINTENANCE',	3);
414define('SYSMAP_ELEMENT_ICON_DISABLED',		4);
415
416define('SYSMAP_SHAPE_TYPE_RECTANGLE',		0);
417define('SYSMAP_SHAPE_TYPE_ELLIPSE',			1);
418define('SYSMAP_SHAPE_TYPE_LINE',			2);
419
420define('SYSMAP_SHAPE_BORDER_TYPE_NONE',		0);
421define('SYSMAP_SHAPE_BORDER_TYPE_SOLID',	1);
422define('SYSMAP_SHAPE_BORDER_TYPE_DOTTED',	2);
423define('SYSMAP_SHAPE_BORDER_TYPE_DASHED',	3);
424
425define('SYSMAP_SHAPE_LABEL_HALIGN_CENTER',	0);
426define('SYSMAP_SHAPE_LABEL_HALIGN_LEFT',	1);
427define('SYSMAP_SHAPE_LABEL_HALIGN_RIGHT',	2);
428
429define('SYSMAP_SHAPE_LABEL_VALIGN_MIDDLE',	0);
430define('SYSMAP_SHAPE_LABEL_VALIGN_TOP',		1);
431define('SYSMAP_SHAPE_LABEL_VALIGN_BOTTOM',	2);
432
433define('SYSMAP_HIGHLIGHT_OFF',	0);
434define('SYSMAP_HIGHLIGHT_ON',	1);
435
436define('SYSMAP_GRID_SHOW_ON',	1);
437define('SYSMAP_GRID_SHOW_OFF',	0);
438
439define('SYSMAP_EXPAND_MACROS_OFF',	0);
440define('SYSMAP_EXPAND_MACROS_ON',	1);
441
442define('SYSMAP_GRID_ALIGN_ON',	1);
443define('SYSMAP_GRID_ALIGN_OFF',	0);
444
445define('PUBLIC_SHARING',	0);
446define('PRIVATE_SHARING',	1);
447
448define('ZBX_ITEM_DELAY_DEFAULT',			'30s');
449define('ZBX_ITEM_FLEXIBLE_DELAY_DEFAULT',	'50s');
450define('ZBX_ITEM_SCHEDULING_DEFAULT',		'wd1-5h9-18');
451
452define('ITEM_TYPE_ZABBIX',			0);
453define('ITEM_TYPE_SNMPV1',			1);
454define('ITEM_TYPE_TRAPPER',			2);
455define('ITEM_TYPE_SIMPLE',			3);
456define('ITEM_TYPE_SNMPV2C',			4);
457define('ITEM_TYPE_INTERNAL',		5);
458define('ITEM_TYPE_SNMPV3',			6);
459define('ITEM_TYPE_ZABBIX_ACTIVE',	7);
460define('ITEM_TYPE_AGGREGATE',		8);
461define('ITEM_TYPE_HTTPTEST',		9);
462define('ITEM_TYPE_EXTERNAL',		10);
463define('ITEM_TYPE_DB_MONITOR',		11);
464define('ITEM_TYPE_IPMI',			12);
465define('ITEM_TYPE_SSH',				13);
466define('ITEM_TYPE_TELNET',			14);
467define('ITEM_TYPE_CALCULATED',		15);
468define('ITEM_TYPE_JMX',				16);
469define('ITEM_TYPE_SNMPTRAP',		17);
470define('ITEM_TYPE_DEPENDENT',		18);
471define('ITEM_TYPE_HTTPAGENT',		19);
472
473define('ZBX_DEPENDENT_ITEM_MAX_LEVELS',	3);
474define('ZBX_DEPENDENT_ITEM_MAX_COUNT',	999);
475
476define('ITEM_VALUE_TYPE_FLOAT',		0);
477define('ITEM_VALUE_TYPE_STR',		1); // aka Character
478define('ITEM_VALUE_TYPE_LOG',		2);
479define('ITEM_VALUE_TYPE_UINT64',	3);
480define('ITEM_VALUE_TYPE_TEXT',		4);
481
482define('ITEM_DATA_TYPE_DECIMAL',		0);
483define('ITEM_DATA_TYPE_OCTAL',			1);
484define('ITEM_DATA_TYPE_HEXADECIMAL',	2);
485define('ITEM_DATA_TYPE_BOOLEAN',		3);
486
487define('ZBX_DEFAULT_KEY_DB_MONITOR',			'db.odbc.select[<unique short description>,dsn]');
488define('ZBX_DEFAULT_KEY_DB_MONITOR_DISCOVERY',	'db.odbc.discovery[<unique short description>,dsn]');
489define('ZBX_DEFAULT_KEY_SSH',					'ssh.run[<unique short description>,<ip>,<port>,<encoding>]');
490define('ZBX_DEFAULT_KEY_TELNET',				'telnet.run[<unique short description>,<ip>,<port>,<encoding>]');
491
492define('ZBX_DEFAULT_JMX_ENDPOINT',	'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi');
493
494define('SYSMAP_ELEMENT_USE_ICONMAP_ON',		1);
495define('SYSMAP_ELEMENT_USE_ICONMAP_OFF',	0);
496
497define('ZBX_ICON_PREVIEW_HEIGHT',	24);
498define('ZBX_ICON_PREVIEW_WIDTH',	24);
499
500define('ITEM_STATUS_ACTIVE',		0);
501define('ITEM_STATUS_DISABLED',		1);
502
503/**
504 * Starting from Zabbix 2.2 items could not have ITEM_STATUS_NOTSUPPORTED status
505 * this constant is left for importing data from versions 1.8 and 2.0.
506 */
507define('ITEM_STATUS_NOTSUPPORTED',	3);
508
509define('ITEM_STATE_NORMAL',			0);
510define('ITEM_STATE_NOTSUPPORTED',	1);
511
512define('ITEM_SNMPV3_SECURITYLEVEL_NOAUTHNOPRIV',	0);
513define('ITEM_SNMPV3_SECURITYLEVEL_AUTHNOPRIV',		1);
514define('ITEM_SNMPV3_SECURITYLEVEL_AUTHPRIV',		2);
515
516define('ITEM_AUTHTYPE_PASSWORD',	0);
517define('ITEM_AUTHTYPE_PUBLICKEY',	1);
518
519define('ITEM_AUTHPROTOCOL_MD5', 0);
520define('ITEM_AUTHPROTOCOL_SHA', 1);
521
522define('ITEM_PRIVPROTOCOL_DES', 0);
523define('ITEM_PRIVPROTOCOL_AES', 1);
524
525define('ITEM_LOGTYPE_INFORMATION',		1);
526define('ITEM_LOGTYPE_WARNING',			2);
527define('ITEM_LOGTYPE_ERROR',			4);
528define('ITEM_LOGTYPE_FAILURE_AUDIT',	7);
529define('ITEM_LOGTYPE_SUCCESS_AUDIT',	8);
530define('ITEM_LOGTYPE_CRITICAL',			9);
531define('ITEM_LOGTYPE_VERBOSE',			10);
532
533define('ITEM_DELAY_FLEXIBLE',	0);
534define('ITEM_DELAY_SCHEDULING',	1);
535
536// item pre-processing
537define('ZBX_PREPROC_MULTIPLIER',	1);
538define('ZBX_PREPROC_RTRIM',			2);
539define('ZBX_PREPROC_LTRIM',			3);
540define('ZBX_PREPROC_TRIM',			4);
541define('ZBX_PREPROC_REGSUB',		5);
542define('ZBX_PREPROC_BOOL2DEC',		6);
543define('ZBX_PREPROC_OCT2DEC',		7);
544define('ZBX_PREPROC_HEX2DEC',		8);
545define('ZBX_PREPROC_DELTA_VALUE',	9);
546define('ZBX_PREPROC_DELTA_SPEED',	10);
547define('ZBX_PREPROC_XPATH',			11);
548define('ZBX_PREPROC_JSONPATH',		12);
549
550define('GRAPH_ITEM_DRAWTYPE_LINE',			0);
551define('GRAPH_ITEM_DRAWTYPE_FILLED_REGION',	1);
552define('GRAPH_ITEM_DRAWTYPE_BOLD_LINE',		2);
553define('GRAPH_ITEM_DRAWTYPE_DOT',			3);
554define('GRAPH_ITEM_DRAWTYPE_DASHED_LINE',	4);
555define('GRAPH_ITEM_DRAWTYPE_GRADIENT_LINE',	5);
556define('GRAPH_ITEM_DRAWTYPE_BOLD_DOT',		6);
557
558define('MAP_LINK_DRAWTYPE_LINE',			0);
559define('MAP_LINK_DRAWTYPE_BOLD_LINE',		2);
560define('MAP_LINK_DRAWTYPE_DOT',				3);
561define('MAP_LINK_DRAWTYPE_DASHED_LINE',		4);
562
563define('SERVICE_ALGORITHM_NONE',	0); // do not calculate
564define('SERVICE_ALGORITHM_MAX',		1); // problem, if one children has a problem
565define('SERVICE_ALGORITHM_MIN',		2); // problem, if all children have problems
566
567define('SERVICE_SLA', '99.9000');
568
569define('SERVICE_SHOW_SLA_OFF',	0);
570define('SERVICE_SHOW_SLA_ON',	1);
571
572define('SERVICE_STATUS_OK', 0);
573
574define('TRIGGER_MULT_EVENT_DISABLED',	0);
575define('TRIGGER_MULT_EVENT_ENABLED',	1);
576
577define('ZBX_TRIGGER_CORRELATION_NONE',	0);
578define('ZBX_TRIGGER_CORRELATION_TAG',	1);
579
580define('ZBX_TRIGGER_MANUAL_CLOSE_NOT_ALLOWED',	0);
581define('ZBX_TRIGGER_MANUAL_CLOSE_ALLOWED',		1);
582
583define('ZBX_RECOVERY_MODE_EXPRESSION',			0);
584define('ZBX_RECOVERY_MODE_RECOVERY_EXPRESSION',	1);
585define('ZBX_RECOVERY_MODE_NONE',				2);
586
587define('TRIGGER_STATUS_ENABLED',	0);
588define('TRIGGER_STATUS_DISABLED',	1);
589
590define('TRIGGER_VALUE_FALSE',	0);
591define('TRIGGER_VALUE_TRUE',	1);
592
593define('TRIGGER_STATE_NORMAL',	0);
594define('TRIGGER_STATE_UNKNOWN',	1);
595
596define('TRIGGER_SEVERITY_NOT_CLASSIFIED',	0);
597define('TRIGGER_SEVERITY_INFORMATION',		1);
598define('TRIGGER_SEVERITY_WARNING',			2);
599define('TRIGGER_SEVERITY_AVERAGE',			3);
600define('TRIGGER_SEVERITY_HIGH',				4);
601define('TRIGGER_SEVERITY_DISASTER',			5);
602define('TRIGGER_SEVERITY_COUNT',			6);
603
604define('EVENT_CUSTOM_COLOR_DISABLED',	0);
605define('EVENT_CUSTOM_COLOR_ENABLED',	1);
606
607define('ALERT_STATUS_NOT_SENT', 0);
608define('ALERT_STATUS_SENT',		1);
609define('ALERT_STATUS_FAILED',	2);
610define('ALERT_STATUS_NEW',		3);
611
612define('ALERT_TYPE_MESSAGE',	0);
613define('ALERT_TYPE_COMMAND',	1);
614
615define('MEDIA_STATUS_ACTIVE',	0);
616define('MEDIA_STATUS_DISABLED',	1);
617
618define('MEDIA_TYPE_STATUS_ACTIVE',		0);
619define('MEDIA_TYPE_STATUS_DISABLED',	1);
620
621define('MEDIA_TYPE_EMAIL',		0);
622define('MEDIA_TYPE_EXEC',		1);
623define('MEDIA_TYPE_SMS',		2);
624define('MEDIA_TYPE_JABBER',		3);
625define('MEDIA_TYPE_EZ_TEXTING',	100);
626
627define('SMTP_CONNECTION_SECURITY_NONE',		0);
628define('SMTP_CONNECTION_SECURITY_STARTTLS',	1);
629define('SMTP_CONNECTION_SECURITY_SSL_TLS',	2);
630
631define('SMTP_AUTHENTICATION_NONE',		0);
632define('SMTP_AUTHENTICATION_NORMAL',	1);
633
634define('EZ_TEXTING_LIMIT_USA',		0);
635define('EZ_TEXTING_LIMIT_CANADA',	1);
636
637define('ACTION_DEFAULT_SUBJ_AUTOREG', 'Auto registration: {HOST.HOST}');
638define('ACTION_DEFAULT_SUBJ_DISCOVERY', 'Discovery: {DISCOVERY.DEVICE.STATUS} {DISCOVERY.DEVICE.IPADDRESS}');
639define('ACTION_DEFAULT_SUBJ_ACKNOWLEDGE', 'Updated problem: {EVENT.NAME}');
640define('ACTION_DEFAULT_SUBJ_PROBLEM', 'Problem: {EVENT.NAME}');
641define('ACTION_DEFAULT_SUBJ_RECOVERY', 'Resolved: {EVENT.NAME}');
642
643define('ACTION_DEFAULT_MSG_AUTOREG', "Host name: {HOST.HOST}\nHost IP: {HOST.IP}\nAgent port: {HOST.PORT}");
644define('ACTION_DEFAULT_MSG_DISCOVERY', "Discovery rule: {DISCOVERY.RULE.NAME}\n\n".
645		"Device IP: {DISCOVERY.DEVICE.IPADDRESS}\nDevice DNS: {DISCOVERY.DEVICE.DNS}\n".
646		"Device status: {DISCOVERY.DEVICE.STATUS}\nDevice uptime: {DISCOVERY.DEVICE.UPTIME}\n\n".
647		"Device service name: {DISCOVERY.SERVICE.NAME}\nDevice service port: {DISCOVERY.SERVICE.PORT}\n".
648		"Device service status: {DISCOVERY.SERVICE.STATUS}\nDevice service uptime: {DISCOVERY.SERVICE.UPTIME}"
649);
650define('ACTION_DEFAULT_MSG_ACKNOWLEDGE',
651		"{USER.FULLNAME} {EVENT.UPDATE.ACTION} problem at {EVENT.UPDATE.DATE} {EVENT.UPDATE.TIME}.\n".
652		"{EVENT.UPDATE.MESSAGE}\n\n".
653		"Current problem status is {EVENT.STATUS}, acknowledged: {EVENT.ACK.STATUS}."
654);
655define('ACTION_DEFAULT_MSG_PROBLEM', "Problem started at {EVENT.TIME} on {EVENT.DATE}\nProblem name: {EVENT.NAME}\n".
656		"Host: {HOST.NAME}\nSeverity: {EVENT.SEVERITY}\n\nOriginal problem ID: {EVENT.ID}\n{TRIGGER.URL}");
657define('ACTION_DEFAULT_MSG_RECOVERY', "Problem has been resolved at {EVENT.RECOVERY.TIME} on {EVENT.RECOVERY.DATE}\n".
658		"Problem name: {EVENT.NAME}\nHost: {HOST.NAME}\nSeverity: {EVENT.SEVERITY}\n\n".
659		"Original problem ID: {EVENT.ID}\n{TRIGGER.URL}");
660
661define('ACTION_STATUS_ENABLED',		0);
662define('ACTION_STATUS_DISABLED',	1);
663
664define('ACTION_PAUSE_SUPPRESSED_FALSE',		0);
665define('ACTION_PAUSE_SUPPRESSED_TRUE',		1);
666
667define('OPERATION_TYPE_MESSAGE',			0);
668define('OPERATION_TYPE_COMMAND',			1);
669define('OPERATION_TYPE_HOST_ADD',			2);
670define('OPERATION_TYPE_HOST_REMOVE',		3);
671define('OPERATION_TYPE_GROUP_ADD',			4);
672define('OPERATION_TYPE_GROUP_REMOVE',		5);
673define('OPERATION_TYPE_TEMPLATE_ADD',		6);
674define('OPERATION_TYPE_TEMPLATE_REMOVE',	7);
675define('OPERATION_TYPE_HOST_ENABLE',		8);
676define('OPERATION_TYPE_HOST_DISABLE',		9);
677define('OPERATION_TYPE_HOST_INVENTORY',		10);
678define('OPERATION_TYPE_RECOVERY_MESSAGE',	11);
679define('OPERATION_TYPE_ACK_MESSAGE',		12);
680
681define('ACTION_OPERATION',					0);
682define('ACTION_RECOVERY_OPERATION',			1);
683define('ACTION_ACKNOWLEDGE_OPERATION',		2);
684
685define('CONDITION_EVAL_TYPE_AND_OR',		0);
686define('CONDITION_EVAL_TYPE_AND',			1);
687define('CONDITION_EVAL_TYPE_OR',			2);
688define('CONDITION_EVAL_TYPE_EXPRESSION', 	3);
689
690// screen
691define('SCREEN_RESOURCE_GRAPH',				0);
692define('SCREEN_RESOURCE_SIMPLE_GRAPH',		1);
693define('SCREEN_RESOURCE_MAP',				2);
694define('SCREEN_RESOURCE_PLAIN_TEXT',		3);
695define('SCREEN_RESOURCE_HOST_INFO',		4);
696define('SCREEN_RESOURCE_TRIGGER_INFO',		5);
697define('SCREEN_RESOURCE_SERVER_INFO',		6);
698define('SCREEN_RESOURCE_CLOCK',				7);
699define('SCREEN_RESOURCE_SCREEN',			8);
700define('SCREEN_RESOURCE_TRIGGER_OVERVIEW',	9);
701define('SCREEN_RESOURCE_DATA_OVERVIEW',		10);
702define('SCREEN_RESOURCE_URL',				11);
703define('SCREEN_RESOURCE_ACTIONS',			12);
704define('SCREEN_RESOURCE_EVENTS',			13);
705define('SCREEN_RESOURCE_HOSTGROUP_TRIGGERS',14);
706define('SCREEN_RESOURCE_SYSTEM_STATUS',		15);
707define('SCREEN_RESOURCE_HOST_TRIGGERS',		16);
708// used in Monitoring > Latest data > Graph (history.php)
709define('SCREEN_RESOURCE_HISTORY',			17);
710define('SCREEN_RESOURCE_CHART',				18);
711define('SCREEN_RESOURCE_LLD_SIMPLE_GRAPH',	19);
712define('SCREEN_RESOURCE_LLD_GRAPH',			20);
713// used in Monitoring > Web > Details (httpdetails.php)
714define('SCREEN_RESOURCE_HTTPTEST_DETAILS',	21);
715// used in Monitoring > Discovery
716define('SCREEN_RESOURCE_DISCOVERY',			22);
717// used in Monitoring > Web
718define('SCREEN_RESOURCE_HTTPTEST',			23);
719// used in Monitoring > Problems
720define('SCREEN_RESOURCE_PROBLEM',			24);
721
722define('SCREEN_SORT_TRIGGERS_DATE_DESC',			0);
723define('SCREEN_SORT_TRIGGERS_SEVERITY_DESC',		1);
724define('SCREEN_SORT_TRIGGERS_HOST_NAME_ASC',		2);
725define('SCREEN_SORT_TRIGGERS_TIME_ASC',				3);
726define('SCREEN_SORT_TRIGGERS_TIME_DESC',			4);
727define('SCREEN_SORT_TRIGGERS_TYPE_ASC',				5);
728define('SCREEN_SORT_TRIGGERS_TYPE_DESC',			6);
729define('SCREEN_SORT_TRIGGERS_STATUS_ASC',			7);
730define('SCREEN_SORT_TRIGGERS_STATUS_DESC',			8);
731define('SCREEN_SORT_TRIGGERS_RECIPIENT_ASC',		11);
732define('SCREEN_SORT_TRIGGERS_RECIPIENT_DESC',		12);
733define('SCREEN_SORT_TRIGGERS_SEVERITY_ASC',			13);
734define('SCREEN_SORT_TRIGGERS_HOST_NAME_DESC',		14);
735define('SCREEN_SORT_TRIGGERS_NAME_ASC',				15);
736define('SCREEN_SORT_TRIGGERS_NAME_DESC',			16);
737
738define('SCREEN_MODE_PREVIEW',	0);
739define('SCREEN_MODE_EDIT',		1);
740define('SCREEN_MODE_SLIDESHOW',		2);
741define('SCREEN_MODE_JS',		3);
742
743define('SCREEN_SIMPLE_ITEM',	0);
744define('SCREEN_DYNAMIC_ITEM',	1);
745
746define('SCREEN_REFRESH_RESPONSIVENESS',	10);
747
748define('SCREEN_SURROGATE_MAX_COLUMNS_MIN', 1);
749define('SCREEN_SURROGATE_MAX_COLUMNS_DEFAULT', 3);
750define('SCREEN_SURROGATE_MAX_COLUMNS_MAX', 100);
751
752define('SCREEN_MIN_SIZE', 1);
753define('SCREEN_MAX_SIZE', 100);
754
755// default, minimum and maximum number of lines for dashboard widgets
756define('ZBX_DEFAULT_WIDGET_LINES', 25);
757define('ZBX_MIN_WIDGET_LINES', 1);
758define('ZBX_MAX_WIDGET_LINES', 100);
759
760// dashboards
761define('DASHBOARD_MAX_COLUMNS',		12);
762define('DASHBOARD_MAX_ROWS',		64);
763define('DASHBOARD_WIDGET_MAX_ROWS',	32);
764
765// alignments
766define('HALIGN_DEFAULT',	0);
767define('HALIGN_CENTER',		0);
768define('HALIGN_LEFT',		1);
769define('HALIGN_RIGHT',		2);
770
771define('VALIGN_DEFAULT',	0);
772define('VALIGN_MIDDLE',		0);
773define('VALIGN_TOP',		1);
774define('VALIGN_BOTTOM',		2);
775
776// info module style
777define('STYLE_HORIZONTAL',	0);
778define('STYLE_VERTICAL',	1);
779
780// view style [Overview, Plaintext]
781define('STYLE_LEFT',	0);
782define('STYLE_TOP',		1);
783
784// time module type
785define('TIME_TYPE_LOCAL',	0);
786define('TIME_TYPE_SERVER',	1);
787define('TIME_TYPE_HOST',	2);
788
789define('FILTER_TASK_SHOW',			0);
790define('FILTER_TASK_HIDE',			1);
791define('FILTER_TASK_MARK',			2);
792define('FILTER_TASK_INVERT_MARK',	3);
793
794define('MARK_COLOR_RED',	1);
795define('MARK_COLOR_GREEN',	2);
796define('MARK_COLOR_BLUE',	3);
797
798define('PROFILE_TYPE_ID',			1);
799define('PROFILE_TYPE_INT',			2);
800define('PROFILE_TYPE_STR',			3);
801
802define('CALC_FNC_MIN', 1);
803define('CALC_FNC_AVG', 2);
804define('CALC_FNC_MAX', 4);
805define('CALC_FNC_ALL', 7);
806define('CALC_FNC_LST', 9);
807
808define('SERVICE_TIME_TYPE_UPTIME',				0);
809define('SERVICE_TIME_TYPE_DOWNTIME',			1);
810define('SERVICE_TIME_TYPE_ONETIME_DOWNTIME',	2);
811
812define('USER_TYPE_ZABBIX_USER',		1);
813define('USER_TYPE_ZABBIX_ADMIN',	2);
814define('USER_TYPE_SUPER_ADMIN',		3);
815
816define('ZBX_NOT_INTERNAL_GROUP',	0);
817define('ZBX_INTERNAL_GROUP',		1);
818
819define('GROUP_STATUS_DISABLED', 1);
820define('GROUP_STATUS_ENABLED',	0);
821
822define('LINE_TYPE_NORMAL',	0);
823define('LINE_TYPE_BOLD',	1);
824
825// IMPORTANT!!! by priority DESC
826define('GROUP_GUI_ACCESS_SYSTEM',	0);
827define('GROUP_GUI_ACCESS_INTERNAL', 1);
828define('GROUP_GUI_ACCESS_LDAP', 	2);
829define('GROUP_GUI_ACCESS_DISABLED', 3);
830
831/**
832 * @see access_deny()
833 */
834define('ACCESS_DENY_OBJECT', 0);
835define('ACCESS_DENY_PAGE', 1);
836
837define('GROUP_DEBUG_MODE_DISABLED', 0);
838define('GROUP_DEBUG_MODE_ENABLED',	1);
839
840define('PERM_READ_WRITE',	3);
841define('PERM_READ',			2);
842define('PERM_DENY',			0);
843define('PERM_NONE',			-1);
844
845define('PARAM_TYPE_TIME',		0);
846define('PARAM_TYPE_COUNTS',		1);
847
848define('ZBX_DEFAULT_AGENT', 'Zabbix');
849define('ZBX_AGENT_OTHER', -1);
850
851define('HTTPTEST_AUTH_NONE',	0);
852define('HTTPTEST_AUTH_BASIC',	1);
853define('HTTPTEST_AUTH_NTLM',	2);
854
855define('HTTPTEST_STATUS_ACTIVE',	0);
856define('HTTPTEST_STATUS_DISABLED',	1);
857
858define('ZBX_HTTPFIELD_HEADER',		0);
859define('ZBX_HTTPFIELD_VARIABLE',	1);
860define('ZBX_HTTPFIELD_POST_FIELD',	2);
861define('ZBX_HTTPFIELD_QUERY_FIELD',	3);
862
863define('ZBX_POSTTYPE_RAW',	0);
864define('ZBX_POSTTYPE_FORM',	1);
865define('ZBX_POSTTYPE_JSON',	2);
866define('ZBX_POSTTYPE_XML',	3);
867
868define('HTTPCHECK_STORE_RAW',	0);
869define('HTTPCHECK_STORE_JSON',	1);
870
871define('HTTPCHECK_ALLOW_TRAPS_OFF',	0);
872define('HTTPCHECK_ALLOW_TRAPS_ON',	1);
873
874define('HTTPCHECK_REQUEST_GET',		0);
875define('HTTPCHECK_REQUEST_POST',	1);
876define('HTTPCHECK_REQUEST_PUT',		2);
877define('HTTPCHECK_REQUEST_HEAD',	3);
878
879define('HTTPSTEP_ITEM_TYPE_RSPCODE',	0);
880define('HTTPSTEP_ITEM_TYPE_TIME',		1);
881define('HTTPSTEP_ITEM_TYPE_IN',			2);
882define('HTTPSTEP_ITEM_TYPE_LASTSTEP',	3);
883define('HTTPSTEP_ITEM_TYPE_LASTERROR',	4);
884
885define('HTTPTEST_STEP_RETRIEVE_MODE_CONTENT',	0);
886define('HTTPTEST_STEP_RETRIEVE_MODE_HEADERS',	1);
887define('HTTPTEST_STEP_RETRIEVE_MODE_BOTH',		2);
888
889define('HTTPTEST_STEP_FOLLOW_REDIRECTS_OFF',	0);
890define('HTTPTEST_STEP_FOLLOW_REDIRECTS_ON',		1);
891
892define('HTTPTEST_VERIFY_PEER_OFF',	0);
893define('HTTPTEST_VERIFY_PEER_ON',	1);
894
895define('HTTPTEST_VERIFY_HOST_OFF',	0);
896define('HTTPTEST_VERIFY_HOST_ON',	1);
897
898define('EVENT_NOT_ACKNOWLEDGED',	'0');
899define('EVENT_ACKNOWLEDGED',		'1');
900
901define('ZBX_ACKNOWLEDGE_SELECTED',	0);
902define('ZBX_ACKNOWLEDGE_PROBLEM',	1);
903
904define('ZBX_PROBLEM_SUPPRESSED_FALSE',	0);
905define('ZBX_PROBLEM_SUPPRESSED_TRUE',	1);
906
907define('ZBX_PROBLEM_UPDATE_NONE',			0x00);
908define('ZBX_PROBLEM_UPDATE_CLOSE',			0x01);
909define('ZBX_PROBLEM_UPDATE_ACKNOWLEDGE',	0x02);
910define('ZBX_PROBLEM_UPDATE_MESSAGE',		0x04);
911define('ZBX_PROBLEM_UPDATE_SEVERITY',		0x08);
912
913define('ZBX_EVENT_HISTORY_PROBLEM_EVENT',		0);
914define('ZBX_EVENT_HISTORY_RECOVERY_EVENT',		1);
915define('ZBX_EVENT_HISTORY_MANUAL_UPDATE',		2);
916define('ZBX_EVENT_HISTORY_ALERT',				3);
917
918define('ZBX_TM_TASK_CLOSE_PROBLEM', 1);
919define('ZBX_TM_TASK_ACKNOWLEDGE',	4);
920define('ZBX_TM_TASK_CHECK_NOW',		6);
921
922define('ZBX_TM_STATUS_NEW',			1);
923define('ZBX_TM_STATUS_INPROGRESS',	2);
924
925define('EVENT_SOURCE_TRIGGERS',				0);
926define('EVENT_SOURCE_DISCOVERY',			1);
927define('EVENT_SOURCE_AUTO_REGISTRATION',	2);
928define('EVENT_SOURCE_INTERNAL', 			3);
929
930define('EVENT_OBJECT_TRIGGER',			0);
931define('EVENT_OBJECT_DHOST',			1);
932define('EVENT_OBJECT_DSERVICE',			2);
933define('EVENT_OBJECT_AUTOREGHOST',		3);
934define('EVENT_OBJECT_ITEM',				4);
935define('EVENT_OBJECT_LLDRULE',			5);
936
937// Problem and event tag constants.
938define('TAG_EVAL_TYPE_AND_OR',	0);
939define('TAG_EVAL_TYPE_OR',		2);
940define('TAG_OPERATOR_LIKE',		0);
941define('TAG_OPERATOR_EQUAL',	1);
942
943define('GRAPH_YAXIS_TYPE_CALCULATED',	0);
944define('GRAPH_YAXIS_TYPE_FIXED',		1);
945define('GRAPH_YAXIS_TYPE_ITEM_VALUE',	2);
946
947define('GRAPH_YAXIS_SIDE_LEFT',		0);
948define('GRAPH_YAXIS_SIDE_RIGHT',	1);
949define('GRAPH_YAXIS_SIDE_BOTTOM',	2);
950
951define('GRAPH_ITEM_SIMPLE',			0);
952define('GRAPH_ITEM_SUM',			2);
953
954define('GRAPH_TYPE_NORMAL',			0);
955define('GRAPH_TYPE_STACKED',		1);
956define('GRAPH_TYPE_PIE',			2);
957define('GRAPH_TYPE_EXPLODED',		3);
958define('GRAPH_TYPE_3D',				4);
959define('GRAPH_TYPE_3D_EXPLODED',	5);
960define('GRAPH_TYPE_BAR',			6);
961define('GRAPH_TYPE_COLUMN',			7);
962define('GRAPH_TYPE_BAR_STACKED',	8);
963define('GRAPH_TYPE_COLUMN_STACKED',	9);
964
965define('SVG_GRAPH_TYPE_LINE',		0);
966define('SVG_GRAPH_TYPE_POINTS',		1);
967define('SVG_GRAPH_TYPE_STAIRCASE',	2);
968
969define('SVG_GRAPH_MISSING_DATA_NONE',			 0);
970define('SVG_GRAPH_MISSING_DATA_CONNECTED',		 1);
971define('SVG_GRAPH_MISSING_DATA_TREAT_AS_ZERO',	 2);
972
973define('SVG_GRAPH_DATA_SOURCE_AUTO',	0);
974define('SVG_GRAPH_DATA_SOURCE_HISTORY',	1);
975define('SVG_GRAPH_DATA_SOURCE_TRENDS',	2);
976
977define('SVG_GRAPH_CUSTOM_TIME',	1);
978
979define('SVG_GRAPH_LEGEND_TYPE_NONE', 0);
980define('SVG_GRAPH_LEGEND_TYPE_SHORT', 1);
981
982define('SVG_GRAPH_LEGEND_LINES_MIN', 1);
983define('SVG_GRAPH_LEGEND_LINES_MAX', 5);
984
985define('SVG_GRAPH_PROBLEMS_SHOW', 1);
986
987define('SVG_GRAPH_SELECTED_ITEM_PROBLEMS', 1);
988
989define('SVG_GRAPH_AXIS_SHOW', 1);
990
991define('SVG_GRAPH_AXIS_UNITS_AUTO', 0);
992define('SVG_GRAPH_AXIS_UNITS_STATIC', 1);
993
994define('SVG_GRAPH_MAX_NUMBER_OF_METRICS', 50);
995
996define('SVG_GRAPH_DEFAULT_WIDTH',         1);
997define('SVG_GRAPH_DEFAULT_POINTSIZE',     3);
998define('SVG_GRAPH_DEFAULT_TRANSPARENCY',  5);
999define('SVG_GRAPH_DEFAULT_FILL',          3);
1000
1001define('BR_DISTRIBUTION_MULTIPLE_PERIODS',	1);
1002define('BR_DISTRIBUTION_MULTIPLE_ITEMS',	2);
1003define('BR_COMPARE_VALUE_MULTIPLE_PERIODS',	3);
1004
1005define('GRAPH_3D_ANGLE', 70);
1006
1007define('GRAPH_STACKED_ALFA', 15); // 0..100 transparency
1008
1009define('GRAPH_ZERO_LINE_COLOR_LEFT',	'AAAAAA');
1010define('GRAPH_ZERO_LINE_COLOR_RIGHT',	'888888');
1011
1012define('GRAPH_TRIGGER_LINE_OPPOSITE_COLOR', '000000');
1013
1014define('ZBX_MAX_TREND_DIFF', 3600);
1015
1016define('ZBX_GRAPH_MAX_SKIP_CELL',	16);
1017define('ZBX_GRAPH_MAX_SKIP_DELAY',	4);
1018
1019define('DOBJECT_STATUS_UP',			0);
1020define('DOBJECT_STATUS_DOWN',		1);
1021define('DOBJECT_STATUS_DISCOVER',	2); // only for events
1022define('DOBJECT_STATUS_LOST',		3); // generated by discovery
1023
1024define('DRULE_STATUS_ACTIVE',		0);
1025define('DRULE_STATUS_DISABLED',		1);
1026
1027define('DSVC_STATUS_ACTIVE',		0);
1028define('DSVC_STATUS_DISABLED',		1);
1029
1030define('SVC_SSH',		0);
1031define('SVC_LDAP',		1);
1032define('SVC_SMTP',		2);
1033define('SVC_FTP',		3);
1034define('SVC_HTTP',		4);
1035define('SVC_POP',		5);
1036define('SVC_NNTP',		6);
1037define('SVC_IMAP',		7);
1038define('SVC_TCP',		8);
1039define('SVC_AGENT',		9);
1040define('SVC_SNMPv1',	10);
1041define('SVC_SNMPv2c',	11);
1042define('SVC_ICMPPING',	12);
1043define('SVC_SNMPv3',	13);
1044define('SVC_HTTPS',		14);
1045define('SVC_TELNET',	15);
1046
1047define('DHOST_STATUS_ACTIVE',	0);
1048define('DHOST_STATUS_DISABLED', 1);
1049
1050define('IM_FORCED',			0);
1051define('IM_ESTABLISHED',	1);
1052define('IM_TREE',			2);
1053
1054define('TRIGGER_EXPRESSION',			0);
1055define('TRIGGER_RECOVERY_EXPRESSION',	1);
1056
1057define('EXPRESSION_TYPE_INCLUDED',		0);
1058define('EXPRESSION_TYPE_ANY_INCLUDED',	1);
1059define('EXPRESSION_TYPE_NOT_INCLUDED',	2);
1060define('EXPRESSION_TYPE_TRUE',			3);
1061define('EXPRESSION_TYPE_FALSE',			4);
1062
1063define('HOST_INVENTORY_DISABLED',	-1);
1064define('HOST_INVENTORY_MANUAL',		0);
1065define('HOST_INVENTORY_AUTOMATIC',	1);
1066
1067define('EXPRESSION_HOST_UNKNOWN',			'#ERROR_HOST#');
1068define('EXPRESSION_HOST_ITEM_UNKNOWN',		'#ERROR_ITEM#');
1069define('EXPRESSION_NOT_A_MACRO_ERROR',		'#ERROR_MACRO#');
1070define('EXPRESSION_FUNCTION_UNKNOWN',		'#ERROR_FUNCTION#');
1071define('EXPRESSION_UNSUPPORTED_VALUE_TYPE',	'#ERROR_VALUE_TYPE#');
1072
1073/**
1074 * @deprecated use either a literal space " " or a non-breakable space "&nbsp;" instead
1075 */
1076define('SPACE',	'&nbsp;');
1077
1078/**
1079 * Symbol used to separate name pairs such as "host: item" or "proxy: host".
1080 *
1081 * Should not be used as just a colon.
1082 */
1083define('NAME_DELIMITER', ': ');
1084
1085define('UNKNOWN_VALUE', '');
1086
1087// suffixes
1088define('ZBX_BYTE_SUFFIXES', 'KMGT');
1089define('ZBX_TIME_SUFFIXES', 'smhdw');
1090
1091// preg
1092define('ZBX_PREG_PRINT', '^\x00-\x1F');
1093define('ZBX_PREG_MACRO_NAME', '([A-Z0-9\._]+)');
1094define('ZBX_PREG_MACRO_NAME_LLD', '([A-Z0-9\._]+)');
1095define('ZBX_PREG_INTERNAL_NAMES', '([0-9a-zA-Z_\. \-]+)'); // !!! Don't forget sync code with C !!!
1096define('ZBX_PREG_NUMBER', '([\-+]?[0-9]+[.]?[0-9]*['.ZBX_BYTE_SUFFIXES.ZBX_TIME_SUFFIXES.']?)');
1097define('ZBX_PREG_INT', '([\-+]?[0-9]+['.ZBX_BYTE_SUFFIXES.ZBX_TIME_SUFFIXES.']?)');
1098define('ZBX_PREG_DEF_FONT_STRING', '/^[0-9\.:% ]+$/');
1099define('ZBX_PREG_DNS_FORMAT', '([0-9a-zA-Z_\.\-$]|\{\$?'.ZBX_PREG_MACRO_NAME.'\})*');
1100define('ZBX_PREG_HOST_FORMAT', ZBX_PREG_INTERNAL_NAMES);
1101define('ZBX_PREG_MACRO_NAME_FORMAT', '(\{[A-Z\.]+\})');
1102define('ZBX_PREG_EXPRESSION_LLD_MACROS', '(\{\#'.ZBX_PREG_MACRO_NAME_LLD.'\})');
1103
1104// !!! should be used with "x" modifier
1105define('ZBX_PREG_ITEM_KEY_PARAMETER_FORMAT', '(
1106	(?P>param) # match recursive parameter group
1107	|
1108	(\" # match quoted string
1109		(
1110			((\\\\)+?[^\\\\]) # match any amount of backslash with non-backslash ending
1111			|
1112			[^\"\\\\] # match any character except \ or "
1113		)*? # match \" or any character except "
1114	\")
1115	|
1116	[^\"\[\],][^,\]]*? #match unquoted string - any character except " [ ] and , at beginning and any character except , and ] afterwards
1117	|
1118	() # match empty and only empty part
1119)');
1120define('ZBX_PREG_ITEM_KEY_FORMAT', '([0-9a-zA-Z_\. \-]+? # match key
1121(?P<param>( # name parameter group used in recursion
1122	\[ # match opening bracket
1123		(
1124			\s*?'.ZBX_PREG_ITEM_KEY_PARAMETER_FORMAT .' # match spaces and parameter
1125			(
1126				\s*?,\s*? # match spaces, comma and spaces
1127				'.ZBX_PREG_ITEM_KEY_PARAMETER_FORMAT .' # match parameter
1128			)*? # match spaces, comma, spaces, parameter zero or more times
1129			\s*? #matches spaces
1130		)
1131	\] # match closing bracket
1132))*? # matches non comma separated brackets with parameters zero or more times
1133)');
1134
1135define('ZBX_USER_ONLINE_TIME', 600); // 10min
1136define('ZBX_GUEST_USER','guest');
1137
1138// IPMI
1139define('IPMI_AUTHTYPE_DEFAULT',		-1);
1140define('IPMI_AUTHTYPE_NONE',		0);
1141define('IPMI_AUTHTYPE_MD2',			1);
1142define('IPMI_AUTHTYPE_MD5',			2);
1143define('IPMI_AUTHTYPE_STRAIGHT',	4);
1144define('IPMI_AUTHTYPE_OEM',			5);
1145define('IPMI_AUTHTYPE_RMCP_PLUS',	6);
1146
1147define('IPMI_PRIVILEGE_CALLBACK',	1);
1148define('IPMI_PRIVILEGE_USER',		2);
1149define('IPMI_PRIVILEGE_OPERATOR',	3);
1150define('IPMI_PRIVILEGE_ADMIN',		4);
1151define('IPMI_PRIVILEGE_OEM',		5);
1152
1153define('ZBX_HAVE_IPV6', true);
1154define('ZBX_DISCOVERER_IPRANGE_LIMIT', 65536);
1155
1156define('ZBX_SOCKET_TIMEOUT',        3);            // socket timeout limit
1157define('ZBX_SOCKET_BYTES_LIMIT',    ZBX_MEBIBYTE); // socket response size limit
1158
1159// value is also used in servercheck.js file
1160define('SERVER_CHECK_INTERVAL', 10);
1161
1162define('DATE_TIME_FORMAT_SECONDS_XML', 'Y-m-d\TH:i:s\Z');
1163
1164// XML export|import tags
1165define('XML_TAG_MACRO',				'macro');
1166define('XML_TAG_HOST',				'host');
1167define('XML_TAG_HOSTINVENTORY',		'host_inventory');
1168define('XML_TAG_ITEM',				'item');
1169define('XML_TAG_TRIGGER',			'trigger');
1170define('XML_TAG_GRAPH',				'graph');
1171define('XML_TAG_GRAPH_ELEMENT',		'graph_element');
1172define('XML_TAG_DEPENDENCY',		'dependency');
1173
1174define('ZBX_DEFAULT_IMPORT_HOST_GROUP', 'Imported hosts');
1175
1176// XML import flags
1177// See ZBX-8151. Old version of libxml suffered from setting DTDLOAD and NOENT flags by default, which allowed
1178// performing XXE attacks. Calling libxml_disable_entity_loader(true) also had no affect if flags passed to libxml
1179// calls were 0 - so for better security with legacy libxml we need to call libxml_disable_entity_loader(true) AND
1180// pass the LIBXML_NONET flag. Please keep in mind that LIBXML_NOENT actually EXPANDS entities, opposite to it's name -
1181// so this flag is not needed here.
1182define('LIBXML_IMPORT_FLAGS', LIBXML_NONET);
1183
1184// XML validation
1185define('XML_STRING',		0x01);
1186define('XML_ARRAY',			0x02);
1187define('XML_INDEXED_ARRAY',	0x04);
1188define('XML_REQUIRED',		0x08);
1189
1190// API validation
1191// multiple types
1192define('API_MULTIPLE',				0);
1193// scalar data types
1194define('API_STRING_UTF8',			1);
1195define('API_INT32',					2);
1196define('API_ID',					3);
1197define('API_BOOLEAN',				4);
1198define('API_FLAG',					5);
1199define('API_FLOAT',					6);
1200define('API_UINT64',				7);
1201// arrays
1202define('API_OBJECT',				8);
1203define('API_IDS',					9);
1204define('API_OBJECTS',				10);
1205define('API_STRINGS_UTF8',			11);
1206define('API_INTS32',				12);
1207define('API_FLOATS',				13);
1208define('API_UINTS64',				14);
1209// specific types
1210define('API_HG_NAME',				15);
1211define('API_SCRIPT_NAME',			16);
1212define('API_USER_MACRO',			17);
1213define('API_TIME_PERIOD',			18);
1214define('API_REGEX',					19);
1215define('API_HTTP_POST',				20);
1216define('API_VARIABLE_NAME',			21);
1217define('API_OUTPUT',				22);
1218define('API_TIME_UNIT',				23);
1219define('API_URL',					24);
1220define('API_H_NAME',				25);
1221define('API_RANGE_TIME',			26);
1222define('API_COLOR',					27);
1223define('API_NUMERIC',				28);
1224define('API_SORTORDER',				29);
1225define('API_TRIGGER_EXPRESSION',	30);
1226define('API_JSONRPC_PARAMS',		31);
1227define('API_JSONRPC_ID',			32);
1228
1229// flags
1230define('API_REQUIRED',				0x0001);
1231define('API_NOT_EMPTY',				0x0002);
1232define('API_ALLOW_NULL',			0x0004);
1233define('API_NORMALIZE',				0x0008);
1234define('API_DEPRECATED',			0x0010);
1235define('API_ALLOW_USER_MACRO',		0x0020);
1236define('API_ALLOW_COUNT',			0x0040);
1237define('API_ALLOW_LLD_MACRO',		0x0080);
1238define('API_REQUIRED_LLD_MACRO',	0x0100);
1239
1240// JSON error codes.
1241if (!defined('JSON_ERROR_NONE')) {
1242	define('JSON_ERROR_NONE', 0);
1243}
1244if (!defined('JSON_ERROR_SYNTAX')) {
1245	define('JSON_ERROR_SYNTAX', 4);
1246}
1247
1248// API errors
1249define('ZBX_API_ERROR_INTERNAL',	111);
1250define('ZBX_API_ERROR_PARAMETERS',	100);
1251define('ZBX_API_ERROR_PERMISSIONS',	120);
1252define('ZBX_API_ERROR_NO_AUTH',		200);
1253define('ZBX_API_ERROR_NO_METHOD',	300);
1254
1255define('API_OUTPUT_EXTEND',		'extend');
1256define('API_OUTPUT_COUNT',		'count');
1257
1258define('SEC_PER_MIN',			60);
1259define('SEC_PER_HOUR',			3600);
1260define('SEC_PER_DAY',			86400);
1261define('SEC_PER_WEEK',			604800);
1262define('SEC_PER_MONTH',			2592000);
1263define('SEC_PER_YEAR',			31536000);
1264
1265define('ZBX_JAN_2038', 2145916800);
1266
1267define('DAY_IN_YEAR', 365);
1268
1269define('ZBX_MIN_PORT_NUMBER', 0);
1270define('ZBX_MAX_PORT_NUMBER', 65535);
1271
1272// Layout
1273define('ZBX_LAYOUT_NORMAL',     0);
1274define('ZBX_LAYOUT_FULLSCREEN', 1);
1275define('ZBX_LAYOUT_KIOSKMODE',  2);
1276define('ZBX_LAYOUT_MODE', 'layout-mode');
1277
1278// input fields
1279define('ZBX_TEXTAREA_MACRO_WIDTH',				200);
1280define('ZBX_TEXTAREA_MACRO_VALUE_WIDTH',		250);
1281define('ZBX_TEXTAREA_COLOR_WIDTH',				96);
1282define('ZBX_TEXTAREA_FILTER_SMALL_WIDTH',		150);
1283define('ZBX_TEXTAREA_FILTER_STANDARD_WIDTH',	300);
1284define('ZBX_TEXTAREA_TINY_WIDTH',				75);
1285define('ZBX_TEXTAREA_SMALL_WIDTH',				150);
1286define('ZBX_TEXTAREA_TAG_WIDTH',				218);
1287define('ZBX_TEXTAREA_MEDIUM_WIDTH',				270);
1288define('ZBX_TEXTAREA_STANDARD_WIDTH',			453);
1289define('ZBX_TEXTAREA_BIG_WIDTH',				540);
1290define('ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH',	75);
1291define('ZBX_TEXTAREA_NUMERIC_BIG_WIDTH',		150);
1292define('ZBX_TEXTAREA_2DIGITS_WIDTH',			35);	// please use for date selector only
1293define('ZBX_TEXTAREA_4DIGITS_WIDTH',			50);	// please use for date selector only
1294define('ZBX_TEXTAREA_INTERFACE_IP_WIDTH',		225);
1295define('ZBX_TEXTAREA_INTERFACE_DNS_WIDTH',		175);
1296define('ZBX_TEXTAREA_INTERFACE_PORT_WIDTH',		100);
1297define('ZBX_TEXTAREA_STANDARD_ROWS',			7);
1298
1299// decoration borders
1300define('ZBX_HOST_INTERFACE_WIDTH',				750);
1301
1302// overviews help
1303define('ZBX_OVERVIEW_HELP_MIN_WIDTH',			125);
1304
1305// Maximum width for popups in Actions column for problems.
1306define('ZBX_ACTIONS_POPUP_MAX_WIDTH',			800);
1307
1308// dashboard widgets
1309define('WIDGET_ACTION_LOG',		'actionlog');
1310define('WIDGET_CLOCK',			'clock');
1311define('WIDGET_DATA_OVER',		'dataover');
1312define('WIDGET_DISCOVERY',		'discovery');
1313define('WIDGET_FAV_GRAPHS',		'favgraphs');
1314define('WIDGET_FAV_MAPS',		'favmaps');
1315define('WIDGET_FAV_SCREENS',	'favscreens');
1316define('WIDGET_SVG_GRAPH',		'svggraph');
1317define('WIDGET_GRAPH',			'graph');
1318define('WIDGET_MAP',			'map');
1319define('WIDGET_NAV_TREE',		'navtree');
1320define('WIDGET_PLAIN_TEXT',		'plaintext');
1321define('WIDGET_PROBLEM_HOSTS',	'problemhosts');
1322define('WIDGET_PROBLEMS',		'problems');
1323define('WIDGET_PROBLEMS_BY_SV',	'problemsbysv');
1324define('WIDGET_SYSTEM_INFO',	'systeminfo');
1325define('WIDGET_TRIG_OVER',		'trigover');
1326define('WIDGET_URL',			'url');
1327define('WIDGET_WEB',			'web');
1328
1329// sysmap widget source types
1330define('WIDGET_SYSMAP_SOURCETYPE_MAP',	1);
1331define('WIDGET_SYSMAP_SOURCETYPE_FILTER',	2);
1332
1333// widget select resource field types
1334define('WIDGET_FIELD_SELECT_RES_SYSMAP',		1);
1335define('WIDGET_FIELD_SELECT_RES_ITEM',			2);
1336define('WIDGET_FIELD_SELECT_RES_GRAPH',			3);
1337define('WIDGET_FIELD_SELECT_RES_SIMPLE_GRAPH',  4);
1338
1339// max depth of navigation tree
1340define('WIDGET_NAVIGATION_TREE_MAX_DEPTH', 10);
1341
1342// event details widgets
1343define('WIDGET_HAT_TRIGGERDETAILS',		'hat_triggerdetails');
1344define('WIDGET_HAT_EVENTDETAILS',		'hat_eventdetails');
1345define('WIDGET_HAT_EVENTACTIONS',		'hat_eventactions');
1346define('WIDGET_HAT_EVENTLIST',			'hat_eventlist');
1347// search widget
1348define('WIDGET_SEARCH_HOSTS',			'search_hosts');
1349define('WIDGET_SEARCH_HOSTGROUP',		'search_hostgroup');
1350define('WIDGET_SEARCH_TEMPLATES',		'search_templates');
1351// slideshow
1352define('WIDGET_SLIDESHOW',				'hat_slides');
1353
1354// Dashboard widget dynamic state
1355define('WIDGET_SIMPLE_ITEM',	0);
1356define('WIDGET_DYNAMIC_ITEM',	1);
1357
1358// widget field types
1359define('ZBX_WIDGET_FIELD_TYPE_INT32',			0);
1360define('ZBX_WIDGET_FIELD_TYPE_STR',				1);
1361define('ZBX_WIDGET_FIELD_TYPE_GROUP',			2);
1362define('ZBX_WIDGET_FIELD_TYPE_HOST',			3);
1363define('ZBX_WIDGET_FIELD_TYPE_ITEM',			4);
1364define('ZBX_WIDGET_FIELD_TYPE_ITEM_PROTOTYPE',	5);
1365define('ZBX_WIDGET_FIELD_TYPE_GRAPH',			6);
1366define('ZBX_WIDGET_FIELD_TYPE_GRAPH_PROTOTYPE',	7);
1367define('ZBX_WIDGET_FIELD_TYPE_MAP',				8);
1368
1369define('ZBX_WIDGET_FIELD_RESOURCE_GRAPH',				0);
1370define('ZBX_WIDGET_FIELD_RESOURCE_SIMPLE_GRAPH',		1);
1371
1372// validation
1373define('DB_ID',		"({}>=0&&bccomp({},\"9223372036854775807\")<=0)&&");
1374define('NOT_EMPTY',	"({}!='')&&");
1375define('NOT_ZERO',	"({}!=0)&&");
1376
1377define('ZBX_VALID_OK',		0);
1378define('ZBX_VALID_ERROR',	1);
1379define('ZBX_VALID_WARNING',	2);
1380
1381// user default theme
1382define('THEME_DEFAULT', 'default');
1383
1384// the default theme
1385define('ZBX_DEFAULT_THEME', 'blue-theme');
1386
1387define('ZBX_DEFAULT_URL', 'zabbix.php?action=dashboard.view');
1388
1389// date format context, usable for translators
1390define('DATE_FORMAT_CONTEXT', 'Date format (see http://php.net/date)');
1391
1392// availability report modes
1393define('AVAILABILITY_REPORT_BY_HOST', 0);
1394define('AVAILABILITY_REPORT_BY_TEMPLATE', 1);
1395
1396// monitoring modes
1397define('ZBX_MONITORED_BY_ANY', 0);
1398define('ZBX_MONITORED_BY_SERVER', 1);
1399define('ZBX_MONITORED_BY_PROXY', 2);
1400
1401// queue modes
1402define('QUEUE_OVERVIEW', 0);
1403define('QUEUE_OVERVIEW_BY_PROXY', 1);
1404define('QUEUE_DETAILS', 2);
1405
1406// item count to display in the details queue
1407define('QUEUE_DETAIL_ITEM_COUNT', 500);
1408
1409// target types to copy items/triggers/graphs
1410define('COPY_TYPE_TO_HOST_GROUP',	0);
1411define('COPY_TYPE_TO_HOST',			1);
1412define('COPY_TYPE_TO_TEMPLATE',		2);
1413
1414define('HISTORY_GRAPH', 'showgraph');
1415define('HISTORY_BATCH_GRAPH', 'batchgraph');
1416define('HISTORY_VALUES', 'showvalues');
1417define('HISTORY_LATEST', 'showlatest');
1418
1419// Item history and trends storage modes.
1420define('ITEM_STORAGE_OFF',		0);
1421define('ITEM_STORAGE_CUSTOM',	1);
1422
1423// Item history and trends storage value to define 0 storage period.
1424define('ITEM_NO_STORAGE_VALUE',	0);
1425
1426// configuration -> maps default add icon name
1427define('MAP_DEFAULT_ICON', 'Server_(96)');
1428
1429// CSS styles
1430define('ZBX_STYLE_ACTION_BUTTONS', 'action-buttons');
1431define('ZBX_STYLE_ADM_IMG', 'adm-img');
1432define('ZBX_STYLE_AVERAGE_BG', 'average-bg');
1433define('ZBX_STYLE_ARROW_DOWN', 'arrow-down');
1434define('ZBX_STYLE_ARROW_LEFT', 'arrow-left');
1435define('ZBX_STYLE_ARROW_RIGHT', 'arrow-right');
1436define('ZBX_STYLE_ARROW_UP', 'arrow-up');
1437define('ZBX_STYLE_BLUE', 'blue');
1438define('ZBX_STYLE_BTN_ADD_FAV', 'btn-add-fav');
1439define('ZBX_STYLE_BTN_ALT', 'btn-alt');
1440define('ZBX_STYLE_BTN_BACK_MAP', 'btn-back-map');
1441define('ZBX_STYLE_BTN_BACK_MAP_CONTAINER', 'btn-back-map-container');
1442define('ZBX_STYLE_BTN_BACK_MAP_CONTENT', 'btn-back-map-content');
1443define('ZBX_STYLE_BTN_BACK_MAP_ICON', 'btn-back-map-icon');
1444define('ZBX_STYLE_BTN_CONF', 'btn-conf');
1445define('ZBX_STYLE_BTN_ACTION', 'btn-action');
1446define('ZBX_STYLE_BTN_DASHBRD_CONF', 'btn-dashbrd-conf');
1447define('ZBX_STYLE_BTN_DASHBRD_NORMAL', 'btn-dashbrd-normal');
1448define('ZBX_STYLE_BTN_DEBUG', 'btn-debug');
1449define('ZBX_STYLE_BTN_GREY', 'btn-grey');
1450define('ZBX_STYLE_BTN_INFO', 'btn-info');
1451define('ZBX_STYLE_BTN_LINK', 'btn-link');
1452define('ZBX_STYLE_BTN_KIOSK', 'btn-kiosk');
1453define('ZBX_STYLE_BTN_MAX', 'btn-max');
1454define('ZBX_STYLE_BTN_MIN', 'btn-min');
1455define('ZBX_STYLE_BTN_REMOVE_FAV', 'btn-remove-fav');
1456define('ZBX_STYLE_BTN_SEARCH', 'btn-search');
1457define('ZBX_STYLE_BTN_TIME', 'btn-time');
1458define('ZBX_STYLE_BTN_TIME_LEFT', 'btn-time-left');
1459define('ZBX_STYLE_BTN_TIME_OUT', 'btn-time-out');
1460define('ZBX_STYLE_BTN_TIME_RIGHT', 'btn-time-right');
1461define('ZBX_STYLE_BTN_WIDGET_ACTION', 'btn-widget-action');
1462define('ZBX_STYLE_BTN_WIDGET_COLLAPSE', 'btn-widget-collapse');
1463define('ZBX_STYLE_BTN_WIDGET_DELETE', 'btn-widget-delete');
1464define('ZBX_STYLE_BTN_WIDGET_EDIT', 'btn-widget-edit');
1465define('ZBX_STYLE_BTN_WIDGET_EXPAND', 'btn-widget-expand');
1466define('ZBX_STYLE_BOTTOM', 'bottom');
1467define('ZBX_STYLE_BROWSER_LOGO_CHROME', 'browser-logo-chrome');
1468define('ZBX_STYLE_BROWSER_LOGO_FF', 'browser-logo-ff');
1469define('ZBX_STYLE_BROWSER_LOGO_IE', 'browser-logo-ie');
1470define('ZBX_STYLE_BROWSER_LOGO_OPERA', 'browser-logo-opera');
1471define('ZBX_STYLE_BROWSER_LOGO_SAFARI', 'browser-logo-safari');
1472define('ZBX_STYLE_BROWSER_WARNING_CONTAINER', 'browser-warning-container');
1473define('ZBX_STYLE_BROWSER_WARNING_FOOTER', 'browser-warning-footer');
1474define('ZBX_STYLE_CELL', 'cell');
1475define('ZBX_STYLE_CELL_WIDTH', 'cell-width');
1476define('ZBX_STYLE_CENTER', 'center');
1477define('ZBX_STYLE_CHECKBOX_RADIO', 'checkbox-radio');
1478define('ZBX_STYLE_CLOCK', 'clock');
1479define('ZBX_STYLE_SYSMAP', 'sysmap');
1480define('ZBX_STYLE_NAVIGATIONTREE', 'navtree');
1481define('ZBX_STYLE_CLOCK_SVG', 'clock-svg');
1482define('ZBX_STYLE_CLOCK_FACE', 'clock-face');
1483define('ZBX_STYLE_CLOCK_HAND', 'clock-hand');
1484define('ZBX_STYLE_CLOCK_HAND_SEC', 'clock-hand-sec');
1485define('ZBX_STYLE_CLOCK_LINES', 'clock-lines');
1486define('ZBX_STYLE_COLOR_PICKER', 'color-picker');
1487define('ZBX_STYLE_COLOR_PREVIEW_BOX', 'color-preview-box');
1488define('ZBX_STYLE_COLUMN_TAGS_1', 'column-tags-1');
1489define('ZBX_STYLE_COLUMN_TAGS_2', 'column-tags-2');
1490define('ZBX_STYLE_COLUMN_TAGS_3', 'column-tags-3');
1491define('ZBX_STYLE_COMPACT_VIEW', 'compact-view');
1492define('ZBX_STYLE_CURSOR_POINTER', 'cursor-pointer');
1493define('ZBX_STYLE_DASHBRD_GRID_CONTAINER', 'dashbrd-grid-container');
1494define('ZBX_STYLE_DASHBRD_WIDGET', 'dashbrd-widget');
1495define('ZBX_STYLE_DASHBRD_WIDGET_FLUID', 'dashbrd-widget-fluid');
1496define('ZBX_STYLE_DASHBRD_WIDGET_HEAD', 'dashbrd-widget-head');
1497define('ZBX_STYLE_DASHBRD_WIDGET_FOOT', 'dashbrd-widget-foot');
1498define('ZBX_STYLE_DASHBRD_EDIT', 'dashbrd-edit');
1499define('ZBX_STYLE_DASHBRD_WIDGET_GRAPH_LINK', 'dashbrd-widget-graph-link');
1500define('ZBX_STYLE_DASHED_BORDER', 'dashed-border');
1501define('ZBX_STYLE_DEBUG_OUTPUT', 'debug-output');
1502define('ZBX_STYLE_DISABLED', 'disabled');
1503define('ZBX_STYLE_DISASTER_BG', 'disaster-bg');
1504define('ZBX_STYLE_DRAG_ICON', 'drag-icon');
1505define('ZBX_STYLE_PATTERNSELECT', 'patternselect');
1506define('ZBX_STYLE_PROBLEM_UNACK_FG', 'problem-unack-fg');
1507define('ZBX_STYLE_PROBLEM_ACK_FG', 'problem-ack-fg');
1508define('ZBX_STYLE_OK_UNACK_FG', 'ok-unack-fg');
1509define('ZBX_STYLE_OK_ACK_FG', 'ok-ack-fg');
1510define('ZBX_STYLE_OVERRIDES_LIST', 'overrides-list');
1511define('ZBX_STYLE_OVERRIDES_LIST_ITEM', 'overrides-list-item');
1512define('ZBX_STYLE_OVERRIDES_OPTIONS_LIST', 'overrides-options-list');
1513define('ZBX_STYLE_PLUS_ICON', 'plus-icon');
1514define('ZBX_STYLE_DRAG_DROP_AREA', 'drag-drop-area');
1515define('ZBX_STYLE_TABLE_FORMS_SEPARATOR', 'table-forms-separator');
1516define('ZBX_STYLE_TIME_INPUT', 'time-input');
1517define('ZBX_STYLE_TIME_INPUT_ERROR', 'time-input-error');
1518define('ZBX_STYLE_TIME_QUICK', 'time-quick');
1519define('ZBX_STYLE_TIME_QUICK_RANGE', 'time-quick-range');
1520define('ZBX_STYLE_TIME_SELECTION_CONTAINER', 'time-selection-container');
1521define('ZBX_STYLE_FILTER_BREADCRUMB', 'filter-breadcrumb');
1522define('ZBX_STYLE_FILTER_BTN_CONTAINER', 'filter-btn-container');
1523define('ZBX_STYLE_FILTER_CONTAINER', 'filter-container');
1524define('ZBX_STYLE_FILTER_HIGHLIGHT_ROW_CB', 'filter-highlight-row-cb');
1525define('ZBX_STYLE_FILTER_FORMS', 'filter-forms');
1526define('ZBX_STYLE_FILTER_TRIGGER', 'filter-trigger');
1527define('ZBX_STYLE_FLH_AVERAGE_BG', 'flh-average-bg');
1528define('ZBX_STYLE_FLH_DISASTER_BG', 'flh-disaster-bg');
1529define('ZBX_STYLE_FLH_HIGH_BG', 'flh-high-bg');
1530define('ZBX_STYLE_FLH_INFO_BG', 'flh-info-bg');
1531define('ZBX_STYLE_FLH_NA_BG', 'flh-na-bg');
1532define('ZBX_STYLE_FLH_WARNING_BG', 'flh-warning-bg');
1533define('ZBX_STYLE_FLOAT_LEFT', 'float-left');
1534define('ZBX_STYLE_FORM_INPUT_MARGIN', 'form-input-margin');
1535define('ZBX_STYLE_FORM_NEW_GROUP', 'form-new-group');
1536define('ZBX_STYLE_GRAPH_WRAPPER', 'graph-wrapper');
1537define('ZBX_STYLE_GREEN', 'green');
1538define('ZBX_STYLE_GREEN_BG', 'green-bg');
1539define('ZBX_STYLE_GREY', 'grey');
1540define('ZBX_STYLE_TEAL', 'teal');
1541define('ZBX_STYLE_HEADER_LOGO', 'header-logo');
1542define('ZBX_STYLE_HEADER_TITLE', 'header-title');
1543define('ZBX_STYLE_HIGH_BG', 'high-bg');
1544define('ZBX_STYLE_HOR_LIST', 'hor-list');
1545define('ZBX_STYLE_HOVER_NOBG', 'hover-nobg');
1546define('ZBX_STYLE_ICON_ACKN', 'icon-ackn');
1547define('ZBX_STYLE_ICON_CAL', 'icon-cal');
1548define('ZBX_STYLE_ICON_DEPEND_DOWN', 'icon-depend-down');
1549define('ZBX_STYLE_ICON_DEPEND_UP', 'icon-depend-up');
1550define('ZBX_STYLE_ICON_INFO', 'icon-info');
1551define('ZBX_STYLE_ICON_INVISIBLE', 'icon-invisible');
1552define('ZBX_STYLE_ICON_MAINT', 'icon-maint');
1553define('ZBX_STYLE_ICON_WZRD_ACTION', 'icon-wzrd-action');
1554define('ZBX_STYLE_ICON_NONE', 'icon-none');
1555define('ZBX_STYLE_ACTION_COMMAND', 'icon-action-command');
1556define('ZBX_STYLE_ACTION_ICON_CLOSE', 'icon-action-close');
1557define('ZBX_STYLE_ACTION_ICON_MSG', 'icon-action-msg');
1558define('ZBX_STYLE_ACTION_ICON_MSGS', 'icon-action-msgs');
1559define('ZBX_STYLE_ACTION_ICON_SEV_UP', 'icon-action-severity-up');
1560define('ZBX_STYLE_ACTION_ICON_SEV_DOWN', 'icon-action-severity-down');
1561define('ZBX_STYLE_ACTION_ICON_SEV_CHANGED', 'icon-action-severity-changed');
1562define('ZBX_STYLE_ACTION_MESSAGE', 'icon-action-message');
1563define('ZBX_STYLE_ACTION_ICON_ACK', 'icon-action-ack');
1564define('ZBX_STYLE_PROBLEM_GENERATED', 'icon-problem-generated');
1565define('ZBX_STYLE_PROBLEM_RECOVERY', 'icon-problem-recovery');
1566define('ZBX_STYLE_ACTIONS_NUM_GRAY', 'icon-actions-number-gray');
1567define('ZBX_STYLE_ACTIONS_NUM_YELLOW', 'icon-actions-number-yellow');
1568define('ZBX_STYLE_ACTIONS_NUM_RED', 'icon-actions-number-red');
1569define('ZBX_STYLE_INACTIVE_BG', 'inactive-bg');
1570define('ZBX_STYLE_INFO_BG', 'info-bg');
1571define('ZBX_STYLE_INPUT_COLOR_PICKER', 'input-color-picker');
1572define('ZBX_STYLE_LEFT', 'left');
1573define('ZBX_STYLE_LINK_ACTION', 'link-action');
1574define('ZBX_STYLE_LINK_ALT', 'link-alt');
1575define('ZBX_STYLE_LIST_CHECK_RADIO', 'list-check-radio');
1576define('ZBX_STYLE_LIST_TABLE', 'list-table');
1577define('ZBX_STYLE_LIST_TABLE_FOOTER', 'list-table-footer');
1578define('ZBX_STYLE_LIST_VERTICAL_ACCORDION', 'list-vertical-accordion');
1579define('ZBX_STYLE_LIST_ACCORDION_FOOT', 'list-accordion-foot');
1580define('ZBX_STYLE_LIST_ACCORDION_ITEM', 'list-accordion-item');
1581define('ZBX_STYLE_LIST_ACCORDION_ITEM_OPENED', 'list-accordion-item-opened');
1582define('ZBX_STYLE_LIST_ACCORDION_ITEM_CLOSED', 'list-accordion-item-closed');
1583define('ZBX_STYLE_LIST_ACCORDION_ITEM_HEAD', 'list-accordion-item-head');
1584define('ZBX_STYLE_LIST_ACCORDION_ITEM_BODY', 'list-accordion-item-body');
1585define('ZBX_STYLE_LOCAL_CLOCK', 'local-clock');
1586define('ZBX_STYLE_LOG_NA_BG', 'log-na-bg');
1587define('ZBX_STYLE_LOG_INFO_BG', 'log-info-bg');
1588define('ZBX_STYLE_LOG_WARNING_BG', 'log-warning-bg');
1589define('ZBX_STYLE_LOG_HIGH_BG', 'log-high-bg');
1590define('ZBX_STYLE_LOG_DISASTER_BG', 'log-disaster-bg');
1591define('ZBX_STYLE_LOGO', 'logo');
1592define('ZBX_STYLE_MAP_AREA', 'map-area');
1593define('ZBX_STYLE_MIDDLE', 'middle');
1594define('ZBX_STYLE_MSG_GOOD', 'msg-good');
1595define('ZBX_STYLE_MSG_BAD', 'msg-bad');
1596define('ZBX_STYLE_MSG_WARNING', 'msg-warning');
1597define('ZBX_STYLE_MSG_GLOBAL_FOOTER', 'msg-global-footer');
1598define('ZBX_STYLE_MSG_DETAILS', 'msg-details');
1599define('ZBX_STYLE_MSG_DETAILS_BORDER', 'msg-details-border');
1600define('ZBX_STYLE_NA_BG', 'na-bg');
1601define('ZBX_STYLE_NORMAL_BG', 'normal-bg');
1602define('ZBX_STYLE_NOTIF_BODY', 'notif-body');
1603define('ZBX_STYLE_NOTIF_INDIC', 'notif-indic');
1604define('ZBX_STYLE_NOTIF_INDIC_CONTAINER', 'notif-indic-container');
1605define('ZBX_STYLE_NOTHING_TO_SHOW', 'nothing-to-show');
1606define('ZBX_STYLE_NOWRAP', 'nowrap');
1607define('ZBX_STYLE_WORDWRAP', 'wordwrap');
1608define('ZBX_STYLE_ORANGE', 'orange');
1609define('ZBX_STYLE_OVERLAY_CLOSE_BTN', 'overlay-close-btn');
1610define('ZBX_STYLE_OVERLAY_DESCR', 'overlay-descr');
1611define('ZBX_STYLE_OVERLAY_DESCR_URL', 'overlay-descr-url');
1612define('ZBX_STYLE_OVERFLOW_ELLIPSIS', 'overflow-ellipsis');
1613define('ZBX_STYLE_OBJECT_GROUP', 'object-group');
1614define('ZBX_STYLE_PAGING_BTN_CONTAINER', 'paging-btn-container');
1615define('ZBX_STYLE_PAGING_SELECTED', 'paging-selected');
1616define('ZBX_STYLE_PRELOADER', 'preloader');
1617define('ZBX_STYLE_PAGE_TITLE', 'page-title-general');
1618define('ZBX_STYLE_PROGRESS_BAR_BG', 'progress-bar-bg');
1619define('ZBX_STYLE_PROGRESS_BAR_CONTAINER', 'progress-bar-container');
1620define('ZBX_STYLE_PROGRESS_BAR_LABEL', 'progress-bar-label');
1621define('ZBX_STYLE_RED', 'red');
1622define('ZBX_STYLE_RED_BG', 'red-bg');
1623define('ZBX_STYLE_REL_CONTAINER', 'rel-container');
1624define('ZBX_STYLE_REMOVE_BTN', 'remove-btn');
1625define('ZBX_STYLE_RIGHT', 'right');
1626define('ZBX_STYLE_ROW', 'row');
1627define('ZBX_STYLE_INLINE_SR_ONLY', 'inline-sr-only');
1628define('ZBX_STYLE_SCREEN_TABLE', 'screen-table');
1629define('ZBX_STYLE_SEARCH', 'search');
1630define('ZBX_STYLE_SECOND_COLUMN_LABEL', 'second-column-label');
1631define('ZBX_STYLE_SELECTED', 'selected');
1632define('ZBX_STYLE_SELECTED_ITEM_COUNT', 'selected-item-count');
1633define('ZBX_STYLE_SERVER_NAME', 'server-name');
1634define('ZBX_STYLE_SETUP_CONTAINER', 'setup-container');
1635define('ZBX_STYLE_SETUP_FOOTER', 'setup-footer');
1636define('ZBX_STYLE_SETUP_LEFT', 'setup-left');
1637define('ZBX_STYLE_SETUP_LEFT_CURRENT', 'setup-left-current');
1638define('ZBX_STYLE_SETUP_RIGHT', 'setup-right');
1639define('ZBX_STYLE_SETUP_RIGHT_BODY', 'setup-right-body');
1640define('ZBX_STYLE_SETUP_TITLE', 'setup-title');
1641define('ZBX_STYLE_SIGNIN_CONTAINER', 'signin-container');
1642define('ZBX_STYLE_SIGNIN_LINKS', 'signin-links');
1643define('ZBX_STYLE_SIGNIN_LOGO', 'signin-logo');
1644define('ZBX_STYLE_SIGN_IN_TXT', 'sign-in-txt');
1645define('ZBX_STYLE_STATUS_AVERAGE_BG', 'status-average-bg');
1646define('ZBX_STYLE_STATUS_CONTAINER', 'status-container');
1647define('ZBX_STYLE_STATUS_DARK_GREY', 'status-dark-grey');
1648define('ZBX_STYLE_STATUS_DISABLED_BG', 'status-disabled-bg');
1649define('ZBX_STYLE_STATUS_DISASTER_BG', 'status-disaster-bg');
1650define('ZBX_STYLE_STATUS_GREEN', 'status-green');
1651define('ZBX_STYLE_STATUS_GREY', 'status-grey');
1652define('ZBX_STYLE_STATUS_HIGH_BG', 'status-high-bg');
1653define('ZBX_STYLE_STATUS_INFO_BG', 'status-info-bg');
1654define('ZBX_STYLE_STATUS_NA_BG', 'status-na-bg');
1655define('ZBX_STYLE_STATUS_RED', 'status-red');
1656define('ZBX_STYLE_STATUS_WARNING_BG', 'status-warning-bg');
1657define('ZBX_STYLE_STATUS_YELLOW', 'status-yellow');
1658define('ZBX_STYLE_SVG_GRAPH', 'svg-graph');
1659define('ZBX_STYLE_SVG_GRAPH_PREVIEW', 'svg-graph-preview');
1660define('ZBX_STYLE_SUBFILTER', 'subfilter');
1661define('ZBX_STYLE_SUBFILTER_ENABLED', 'subfilter-enabled');
1662define('ZBX_STYLE_TABLE', 'table');
1663define('ZBX_STYLE_TABLE_FORMS', 'table-forms');
1664define('ZBX_STYLE_TABLE_FORMS_CONTAINER', 'table-forms-container');
1665define('ZBX_STYLE_TABLE_FORMS_SECOND_COLUMN', 'table-forms-second-column');
1666define('ZBX_STYLE_TABLE_FORMS_TD_LEFT', 'table-forms-td-left');
1667define('ZBX_STYLE_TABLE_FORMS_TD_RIGHT', 'table-forms-td-right');
1668define('ZBX_STYLE_TABLE_PAGING', 'table-paging');
1669define('ZBX_STYLE_TABLE_STATS', 'table-stats');
1670define('ZBX_STYLE_TABS_NAV', 'tabs-nav');
1671define('ZBX_STYLE_TAG', 'tag');
1672define('ZBX_STYLE_TFOOT_BUTTONS', 'tfoot-buttons');
1673define('ZBX_STYLE_TD_DRAG_ICON', 'td-drag-icon');
1674define('ZBX_STYLE_TIME_ZONE', 'time-zone');
1675define('ZBX_STYLE_TIMELINE_AXIS', 'timeline-axis');
1676define('ZBX_STYLE_TIMELINE_DATE', 'timeline-date');
1677define('ZBX_STYLE_TIMELINE_DOT', 'timeline-dot');
1678define('ZBX_STYLE_TIMELINE_DOT_BIG', 'timeline-dot-big');
1679define('ZBX_STYLE_TIMELINE_TD', 'timeline-td');
1680define('ZBX_STYLE_TIMELINE_TH', 'timeline-th');
1681define('ZBX_STYLE_TOP', 'top');
1682define('ZBX_STYLE_TOP_NAV', 'top-nav');
1683define('ZBX_STYLE_TOP_NAV_CONTAINER', 'top-nav-container');
1684define('ZBX_STYLE_TOP_NAV_HELP', 'top-nav-help');
1685define('ZBX_STYLE_TOP_NAV_ICONS', 'top-nav-icons');
1686define('ZBX_STYLE_TOP_NAV_PROFILE', 'top-nav-profile');
1687define('ZBX_STYLE_TOP_NAV_GUEST', 'top-nav-guest');
1688define('ZBX_STYLE_TOP_NAV_SIGNOUT', 'top-nav-signout');
1689define('ZBX_STYLE_TOP_NAV_SUPPORT', 'top-nav-support');
1690define('ZBX_STYLE_TOP_NAV_ZBBSHARE', 'top-nav-zbbshare');
1691define('ZBX_STYLE_TOP_SUBNAV', 'top-subnav');
1692define('ZBX_STYLE_TOP_SUBNAV_CONTAINER', 'top-subnav-container');
1693define('ZBX_STYLE_TREEVIEW', 'treeview');
1694define('ZBX_STYLE_TREEVIEW_PLUS', 'treeview-plus');
1695define('ZBX_STYLE_UPPERCASE', 'uppercase');
1696define('ZBX_STYLE_WARNING_BG', 'warning-bg');
1697define('ZBX_STYLE_WIDGET_URL', 'widget-url');
1698define('ZBX_STYLE_BLINK_HIDDEN', 'blink-hidden');
1699define('ZBX_STYLE_YELLOW', 'yellow');
1700define('ZBX_STYLE_FIELD_LABEL_ASTERISK', 'form-label-asterisk');
1701
1702// html layout columns
1703define('ZBX_STYLE_COLUMNS', 'columns-wrapper');
1704define('ZBX_STYLE_COLUMN_5', 'column-5');	// column occupies 5% width of column wrapper.
1705define('ZBX_STYLE_COLUMN_10', 'column-10');	// column occupies 10% width of column wrapper.
1706define('ZBX_STYLE_COLUMN_33', 'column-33'); // column occupies 1/3 width of column wrapper.
1707define('ZBX_STYLE_COLUMN_50', 'column-50'); // column occupies 50% width of column wrapper.
1708define('ZBX_STYLE_COLUMN_90', 'column-90'); // column occupies 90% width of column wrapper.
1709define('ZBX_STYLE_COLUMN_95', 'column-95'); // column occupies 95% width of column wrapper.
1710
1711// server variables
1712define('HTTPS', isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && $_SERVER['HTTPS'] != 'off');
1713
1714// configuration -> hosts (macro inheritance)
1715define('MACRO_TYPE_INHERITED',	0x01);
1716define('MACRO_TYPE_HOSTMACRO',	0x02);
1717define('MACRO_TYPE_BOTH',		0x03);	// MACRO_TYPE_INHERITED | MACRO_TYPE_HOSTMACRO
1718
1719// init $_REQUEST
1720ini_set('variables_order', 'GP');
1721$_REQUEST = $_POST + $_GET;
1722
1723// init precision
1724ini_set('precision', 14);
1725
1726// BC Math scale. bcscale() can be undefined prior requirement check in setup.
1727if (function_exists('bcscale')) {
1728	bcscale(7);
1729}
1730
1731// Number of tags to display in Problems widget and Monitoring > Problems.
1732define('PROBLEMS_SHOW_TAGS_NONE', 0);
1733define('PROBLEMS_SHOW_TAGS_1', 1);
1734define('PROBLEMS_SHOW_TAGS_2', 2);
1735define('PROBLEMS_SHOW_TAGS_3', 3);
1736
1737// Tag name format to display in Problems widget and Monitoring > Problems.
1738define('PROBLEMS_TAG_NAME_FULL',      0);
1739define('PROBLEMS_TAG_NAME_SHORTENED', 1);
1740define('PROBLEMS_TAG_NAME_NONE',      2);
1741
1742/**
1743 * The sandbox attribute enables an extra set of restrictions for the content in the iframe. Default is set to empty
1744 * string, which means all restrictions are applied. To disable, set to FALSE. To set a specific set of restrictions,
1745 * write a custom string.
1746 * https://www.w3.org/TR/2010/WD-html5-20100624/the-iframe-element.html#attr-iframe-sandbox
1747 */
1748define('ZBX_IFRAME_SANDBOX', '');
1749
1750// HTTP headers
1751/*
1752 * Value of HTTP X-Frame-options header.
1753 *
1754 * Supported options:
1755 *  - SAMEORIGIN (string) - compatible with rfc7034.
1756 *  - DENY (string) - compatible with rfc7034.
1757 *  - a list (string) of comma-separated hostnames. If hostname is not between allowed, the SAMEORIGIN option is used.
1758 *  - null - disable X-Frame-options header.
1759 */
1760define('X_FRAME_OPTIONS', 'SAMEORIGIN');
1761