Beispiel #1
0
     $left_tab->addOption('border', 0);
     $left_tab->addRow(create_hat(S_REGULAR_EXPRESSION, get_regexp_form(), null, 'hat_regexp', get_profile('web.config.hats.hat_regexp.state', 1)));
     $right_tab = new CTable();
     $right_tab->setCellPadding(3);
     $right_tab->setCellSpacing(3);
     $right_tab->addOption('border', 0);
     $right_tab->addRow(create_hat(S_EXPRESSIONS, get_expressions_tab(), null, 'hat_expressions', get_profile('web.config.hats.hat_expressions.state', 1)));
     if (isset($_REQUEST['new_expression'])) {
         $right_tab->addRow(create_hat(S_NEW_EXPRESSION, get_expression_form(), null, 'hat_new_expression', get_profile('web.config.hats.hat_new_expression.state', 1)));
     }
     $td_l = new CCol($left_tab);
     $td_l->AddOption('valign', 'top');
     $td_r = new CCol($right_tab);
     $td_r->AddOption('valign', 'top');
     $outer_table = new CTable();
     $outer_table->AddOption('border', 0);
     $outer_table->SetCellPadding(1);
     $outer_table->SetCellSpacing(1);
     $outer_table->AddRow(array($td_l, $td_r));
     $frmRegExp->Additem($outer_table);
     show_messages();
     $frmRegExp->Show();
 } else {
     echo SBR;
     show_table_header(S_REGULAR_EXPRESSIONS);
     // ----
     $regexps = array();
     $regexpids = array();
     $sql = 'SELECT re.* ' . ' FROM regexps re ' . ' WHERE ' . DBin_node('re.regexpid') . ' ORDER BY re.name';
     $db_regexps = DBselect($sql);
     while ($regexp = DBfetch($db_regexps)) {
Beispiel #2
0
    $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);");
$filtertimetab = new CTable();
$filtertimetab->AddOption('width', '10%');
$filtertimetab->SetCellPadding(0);
$filtertimetab->SetCellSpacing(0);
$filtertimetab->AddRow(array(S_FROM, new CNumericBox('filter_since_day', $_REQUEST['filter_timesince'] > 0 ? date('d', $_REQUEST['filter_timesince']) : '', 2), '/', new CNumericBox('filter_since_month', $_REQUEST['filter_timesince'] > 0 ? date('m', $_REQUEST['filter_timesince']) : '', 2), '/', new CNumericBox('filter_since_year', $_REQUEST['filter_timesince'] > 0 ? date('Y', $_REQUEST['filter_timesince']) : '', 4), new CNumericBox('filter_since_hour', $_REQUEST['filter_timesince'] > 0 ? date('H', $_REQUEST['filter_timesince']) : '', 2), ':', new CNumericBox('filter_since_minute', $_REQUEST['filter_timesince'] > 0 ? date('i', $_REQUEST['filter_timesince']) : '', 2), $clndr_icon));
zbx_add_post_js('create_calendar(null,["filter_since_day","filter_since_month","filter_since_year","filter_since_hour","filter_since_minute"],"audit_since");');
$clndr_icon->AddAction('onclick', "javascript: var pos = getPosition(this); pos.top+=10; pos.left+=16; CLNDR['audit_till'].clndr.clndrshow(pos.top,pos.left);");
$filtertimetab->AddRow(array(S_TILL, new CNumericBox('filter_till_day', $_REQUEST['filter_timetill'] > 0 ? date('d', $_REQUEST['filter_timetill']) : '', 2), '/', new CNumericBox('filter_till_month', $_REQUEST['filter_timetill'] > 0 ? date('m', $_REQUEST['filter_timetill']) : '', 2), '/', new CNumericBox('filter_till_year', $_REQUEST['filter_timetill'] > 0 ? date('Y', $_REQUEST['filter_timetill']) : '', 4), new CNumericBox('filter_till_hour', $_REQUEST['filter_timetill'] > 0 ? date('H', $_REQUEST['filter_timetill']) : '', 2), ':', new CNumericBox('filter_till_minute', $_REQUEST['filter_timetill'] > 0 ? date('i', $_REQUEST['filter_timetill']) : '', 2), $clndr_icon));
zbx_add_post_js('create_calendar(null,["filter_till_day","filter_till_month","filter_till_year","filter_till_hour","filter_till_minute"],"audit_till");');
zbx_add_post_js('addListener($("filter_icon"),"click",CLNDR[\'audit_since\'].clndr.clndrhide.bindAsEventListener(CLNDR[\'audit_since\'].clndr));' . 'addListener($("filter_icon"),"click",CLNDR[\'audit_till\'].clndr.clndrhide.bindAsEventListener(CLNDR[\'audit_till\'].clndr));');
$row_count++;
$filterForm->addRow(S_PERIOD, $filtertimetab);
//*/
$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));
Beispiel #3
0
$refresh_rate = 30;
//seconds
$fields = array("warning_msg" => array(T_ZBX_STR, O_OPT, NULL, NULL, NULL), "message" => array(T_ZBX_STR, O_OPT, NULL, NULL, NULL), "retry" => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, NULL, NULL), "cancel" => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, NULL, NULL));
check_fields($fields, false);
if (isset($_REQUEST['cancel'])) {
    zbx_unsetcookie('ZBX_CONFIG');
    redirect('index.php');
    exit;
}
//	clear_messages();
$USER_DETAILS["refresh"] = $refresh_rate;
include_once "include/page_header.php";
unset($USER_DETAILS);
insert_showhint_javascript();
$table = new CTable(null, 'warning');
$table->SetAlign('center');
$table->AddOption('style', 'width: 480px; margin-top: 100px;');
$table->SetHeader(array(new CCol(S_ZABBIX_VER, 'left'), SPACE), 'header');
$table->AddRow(SPACE);
$warning_msg = isset($_REQUEST['warning_msg']) ? $_REQUEST['warning_msg'] : S_ZABBIX_IS_UNAVAILABLE . '!';
$img = new CImg('./images/general/warning16r.gif', 'warning', 16, 16, 'img');
$img->addOption('style', 'border-width: 0px; vertical-align: bottom;');
$msg = new CSpan(bold(SPACE . $warning_msg));
$msg->AddOption('style', 'line-height: 20px; vertical-align: top;');
$table->AddRow(new CCol(array($img, $msg), 'center'));
$table->AddRow(SPACE);
$table->SetFooter(new CCol(new CButton('retry', S_RETRY, 'javascript: document.location.reload();'), 'left'), 'footer');
$table->Show();
zbx_add_post_js('setTimeout("document.location.reload();",' . $refresh_rate * 1000 . ');');
echo SBR;
include_once "include/page_footer.php";