$filterForm->SetMethod('get'); $filterForm->AddVar('nav_time', $_REQUEST['nav_time']); if (EVENT_SOURCE_TRIGGERS == $source) { $script = new CScript("javascript: if(CLNDR['events_since'].clndr.setSDateFromOuterObj()){" . "\$('filter_timesince').value = parseInt(CLNDR['events_since'].clndr.sdt.getTime()/1000);}" . "if(CLNDR['events_till'].clndr.setSDateFromOuterObj()){" . "\$('filter_timetill').value = parseInt(CLNDR['events_till'].clndr.sdt.getTime()/1000);}"); $filterForm->AddAction('onsubmit', $script); $filterForm->AddVar('triggerid', $_REQUEST['triggerid']); if (isset($_REQUEST['triggerid']) && $_REQUEST['triggerid'] > 0) { $trigger = expand_trigger_description($_REQUEST['triggerid']); } else { $trigger = ""; } $row = new CRow(array(new CCol(S_TRIGGER, 'form_row_l'), new CCol(array(new CTextBox("trigger", $trigger, 96, 'yes'), new CButton("btn1", S_SELECT, "return PopUp('popup.php?" . "dstfrm=" . $filterForm->GetName() . "&dstfld1=triggerid&dstfld2=trigger" . "&srctbl=triggers&srcfld1=triggerid&srcfld2=description&real_hosts=1');", 'T')), 'form_row_r'))); $filterForm->AddRow($row); $filterForm->AddVar('show_unknown', $show_unknown); $unkcbx = new CCheckBox('show_unk', $show_unknown, null, '1'); $unkcbx->SetAction('javascript: create_var("' . $filterForm->GetName() . '", "show_unknown", (this.checked?1:0), 0); '); $filterForm->AddRow(S_SHOW_UNKNOWN, $unkcbx); $reset = new CButton("filter_rst", S_RESET); $reset->SetType('button'); $reset->SetAction('javascript: var uri = new Curl(location.href); uri.setArgument("filter_rst",1); location.href = uri.getUrl();'); $filterForm->AddItemToBottomRow(new CButton("filter_set", S_FILTER)); $filterForm->AddItemToBottomRow($reset); $p_elements[] = create_filter(S_FILTER, $navigation, $filterForm, 'tr_filter', get_profile('web.events.filter.state', 0)); } else { $p_elements[] = get_thin_table_header(SPACE, $navigation); } //------- $p_elements[] = $table; $p_elements[] = get_thin_table_header(SPACE, $navigation); $events_hat = create_hat($text, $p_elements, $fs_icon, 'hat_events', get_profile('web.events.hats.hat_events.state', 1)); $events_hat->Show();