require_once dirname(__FILE__).'/include/config.inc.php';
require_once dirname(__FILE__).'/include/items.inc.php';
require_once dirname(__FILE__).'/include/graphs.inc.php';
$page['file'] = 'history.php';
$page['title'] = _('History');
$page['scripts'] = ['class.calendar.js', 'gtlc.js', 'flickerfreescreen.js', 'layout.mode.js'];
$page['type'] = detect_page_type(PAGE_TYPE_HTML);
$page['web_layout_mode'] = CViewHelper::loadLayoutMode();
if (hasRequest('plaintext')) {
define('ZBX_PAGE_NO_MENU', true);
define('ZBX_PAGE_DO_JS_REFRESH', 1);
require_once dirname(__FILE__).'/include/page_header.php';
'itemids' => [T_ZBX_INT, O_OPT, P_SYS, DB_ID, null],
'from' => [T_ZBX_RANGE_TIME, O_OPT, P_SYS, null, null],
'to' => [T_ZBX_RANGE_TIME, O_OPT, P_SYS, null, null],
'filter_task' => [T_ZBX_STR, O_OPT, null, IN(FILTER_TASK_SHOW.','.FILTER_TASK_HIDE.','.FILTER_TASK_MARK.','.FILTER_TASK_INVERT_MARK), null],
'filter' => [T_ZBX_STR, O_OPT, null, null, null],
'mark_color' => [T_ZBX_STR, O_OPT, null, IN(MARK_COLOR_RED.','.MARK_COLOR_GREEN.','.MARK_COLOR_BLUE), null],
'plaintext' => [T_ZBX_STR, O_OPT, null, null, null],
'action' => [T_ZBX_STR, O_OPT, P_SYS, IN('"'.HISTORY_GRAPH.'","'.HISTORY_VALUES.'","'.HISTORY_LATEST.'","'.HISTORY_BATCH_GRAPH.'"'), null],
'graphtype' => [T_ZBX_INT, O_OPT, null, IN([GRAPH_TYPE_NORMAL, GRAPH_TYPE_STACKED]), null],
'filter_rst' => [T_ZBX_STR, O_OPT, P_SYS, null, null]
validateTimeSelectorPeriod(getRequest('from'), getRequest('to'));
if ($page['type'] == PAGE_TYPE_JS || $page['type'] == PAGE_TYPE_HTML_BLOCK) {
require_once dirname(__FILE__).'/include/page_footer.php';