Exemple #1
0
$reset->setType('button');
$reset->setAction('javascript: var url = new Curl(location.href); url.setArgument("filter_rst",1); location.href = url.getUrl();');
$filterForm->addItemToBottomRow(new CButton('filter_set', S_FILTER));
$filterForm->addItemToBottomRow($reset);
$trigg_wdgt->addFlicker($filterForm, get_profile('web.tr_status.filter.state', 0));
/*************** FILTER END ******************/
if ($_REQUEST['fullscreen']) {
    $triggerInfo = new CTriggersInfo();
    $triggerInfo->HideHeader();
    $triggerInfo->show();
}
$m_form = new CForm('acknow.php');
$m_form->setName('tr_status');
$admin_links = $USER_DETAILS['type'] == USER_TYPE_ZABBIX_ADMIN || $USER_DETAILS['type'] == USER_TYPE_SUPER_ADMIN;
$table = new CTableInfo();
$table->showStart();
$header = array();
$show_event_col = $config['event_ack_enable'] && $show_events != EVENTS_OPTION_NOEVENT;
$table->setHeader(array($show_event_col ? new CCheckBox('all_events', false, "checkAll('" . $m_form->GetName() . "','all_events','events');") : NULL, make_sorting_link(S_SEVERITY, 't.priority'), S_STATUS, make_sorting_link(S_LAST_CHANGE, 't.lastchange'), is_show_all_nodes() ? make_sorting_link(S_NODE, 'h.hostid') : null, $_REQUEST['hostid'] > 0 ? null : make_sorting_link(S_HOST, 'h.host'), make_sorting_link(S_NAME, 't.description'), $_REQUEST['show_actions'] ? S_ACTIONS : NULL, $show_event_col ? S_ACKNOWLEDGED : NULL, S_COMMENTS));
$cond = $_REQUEST['hostid'] > 0 ? ' AND h.hostid=' . $_REQUEST['hostid'] . ' ' : '';
switch ($show_triggers) {
    case TRIGGERS_OPTION_ALL:
        $cond .= '';
        break;
    case TRIGGERS_OPTION_NOFALSEFORB:
        $cond .= '';
        break;
    case TRIGGERS_OPTION_ONLYTRUE:
    default:
        $cond .= ' AND ((t.value=' . TRIGGER_VALUE_TRUE . ') OR ((t.value=' . TRIGGER_VALUE_FALSE . ') AND ((' . time() . '-t.lastchange)<' . TRIGGER_FALSE_PERIOD . ')))';
        break;