$cmbResource->addItem(AUDIT_RESOURCE_SCREEN, S_SCREEN); $cmbResource->addItem(AUDIT_RESOURCE_NODE, S_NODE); $cmbResource->addItem(AUDIT_RESOURCE_SCENARIO, S_SCENARIO); $cmbResource->addItem(AUDIT_RESOURCE_DISCOVERY_RULE, S_DISCOVERY_RULE); $cmbResource->addItem(AUDIT_RESOURCE_SLIDESHOW, S_SLIDESHOW); $cmbResource->addItem(AUDIT_RESOURCE_SCRIPT, S_SCRIPT); $cmbResource->addItem(AUDIT_RESOURCE_PROXY, S_PROXY); $cmbResource->addItem(AUDIT_RESOURCE_MAINTENANCE, S_MAINTENANCE); $cmbResource->addItem(AUDIT_RESOURCE_REGEXP, S_REGULAR_EXPRESSION); $filterForm->addRow(S_RESOURCE, $cmbResource); } //* $clndr_icon = new CImg('images/general/bar/cal.gif', 'calendar', 16, 12, 'pointer'); $clndr_icon->addAction('onclick', "javascript: var pos = getPosition(this); pos.top+=10; pos.left+=16; CLNDR['audit_since'].clndr.clndrshow(pos.top,pos.left);"); $clndr_icon->setAttribute('style', 'vertical-align: middle;'); $nav_clndr = array(new CNumericBox('nav_day', $_REQUEST['nav_time'] > 0 ? date('d', $_REQUEST['nav_time']) : '', 2), new CNumericBox('nav_month', $_REQUEST['nav_time'] > 0 ? date('m', $_REQUEST['nav_time']) : '', 2), new CNumericBox('nav_year', $_REQUEST['nav_time'] > 0 ? date('Y', $_REQUEST['nav_time']) : '', 4), new CNumericBox('nav_hour', $_REQUEST['nav_time'] > 0 ? date('H', $_REQUEST['nav_time']) : '', 2), ':', new CNumericBox('nav_minute', $_REQUEST['nav_time'] > 0 ? date('i', $_REQUEST['nav_time']) : '', 2), $clndr_icon); $filterForm->addRow(S_ACTIONS_BEFORE, $nav_clndr); zbx_add_post_js('create_calendar(null,' . '["nav_day","nav_month","nav_year","nav_hour","nav_minute"],' . '"audit_since");'); zbx_add_post_js('addListener($("filter_icon"),' . '"click",CLNDR[\'audit_since\'].clndr.clndrhide.bindAsEventListener(CLNDR[\'audit_since\'].clndr));'); //*/ $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); $audit_wdgt->addFlicker($filterForm, get_profile('web.audit.filter.state', 1)); //------- $nav = get_thin_table_header($navigation); $audit_wdgt->addItem(array($nav, $table, $nav)); $audit_wdgt->show(); include_once "include/page_footer.php";
function show_thin_table_header($col1, $col2 = SPACE) { $table = get_thin_table_header($col1, $col2); $table->Show(); }
$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(); $jsmenu = new CPUMenu(null, 170); $jsmenu->InsertJavaScript(); include_once "include/page_footer.php";