// blinking preview in help popup (only if blinking is enabled)
if ($config['blink_period'] > 0) {
    $row = new CRow(null);
    $row->addItem(new CCol(SPACE, 'normal'));
    for ($i = 0; $i < TRIGGER_SEVERITY_COUNT; $i++) {
        $row->addItem(new CCol(SPACE, getSeverityStyle($i)));
    }
    $col = new CTable('', 'blink overview-mon-severities');
    $col->addRow($row);
    // double div necassary for FireFox
    $col = new CCol(new CDiv(new CDiv($col), 'overview-mon-severities-container'));
    $hintTable->addRow(array($col, _s('Age less than %s', convertUnitsS($config['blink_period']))));
}
$hintTable->addRow(array(new CCol(SPACE), _('No trigger')));
$help = new CHelp();
$help->setHint($hintTable);
// header right
$overviewWidget->addPageHeader(_('OVERVIEW'), array(get_icon('fullscreen', array('fullscreen' => $this->data['fullscreen'])), SPACE, $help));
// header left
$styleComboBox = new CComboBox('view_style', $this->data['view_style'], 'submit()');
$styleComboBox->addItem(STYLE_TOP, _('Top'));
$styleComboBox->addItem(STYLE_LEFT, _('Left'));
$hostLocationForm = new CForm('get');
$hostLocationForm->addVar('groupid', $this->data['groupid']);
$hostLocationForm->additem(array(_('Hosts location'), SPACE, $styleComboBox));
$overviewWidget->addHeader($hostLocationForm);
// filter
$filter = $this->data['filter'];
$filterFormView = new CView('common.filter.trigger', array('overview' => true, 'filter' => array('showTriggers' => $filter['showTriggers'], 'ackStatus' => $filter['ackStatus'], 'showSeverity' => $filter['showSeverity'], 'statusChange' => $filter['statusChange'], 'statusChangeDays' => $filter['statusChangeDays'], 'txtSelect' => $filter['txtSelect'], 'application' => $filter['application'], 'inventory' => $filter['inventory'], 'showMaintenance' => $filter['showMaintenance'], 'hostId' => $this->data['hostid'], 'groupId' => $this->data['groupid'], 'fullScreen' => $this->data['fullscreen'])));
$filterForm = $filterFormView->render();
$overviewWidget->addFlicker($filterForm, CProfile::get('web.overview.filter.state', 0));
        $row->addItem(new CCol(SPACE, 'normal'));
        for ($i = 0; $i < TRIGGER_SEVERITY_COUNT; $i++) {
            $row->addItem(new CCol(SPACE, getSeverityStyle($i)));
        }
        $col = new CTable('', 'blink overview-mon-severities');
        $col->addRow($row);
        // double div necassary for FireFox
        $col = new CCol(new CDiv(new CDiv($col), 'overview-mon-severities-container'));
        $hintTable->addRow(array($col, _s('Age less than %s', convertUnitsS($config['blink_period']))));
    }
    $hintTable->addRow(array(new CCol(SPACE), _('No trigger')));
} else {
    $hintTable->addRow(array(new CCol(SPACE), _('OK or no trigger')));
}
$help = new CHelp('web.view.php', 'right');
$help->setHint($hintTable, '', '', true, false);
// header right
$overviewWidget->addPageHeader(_('OVERVIEW'), array(get_icon('fullscreen', array('fullscreen' => $this->data['fullscreen'])), SPACE, $help));
// header left
$styleComboBox = new CComboBox('view_style', $this->data['view_style'], 'submit()');
$styleComboBox->addItem(STYLE_TOP, _('Top'));
$styleComboBox->addItem(STYLE_LEFT, _('Left'));
$hostLocationForm = new CForm('get');
$hostLocationForm->addVar('groupid', $this->data['groupid']);
$hostLocationForm->additem(array(_('Hosts location'), SPACE, $styleComboBox));
$overviewWidget->addHeader($hostLocationForm);
if ($config['dropdown_first_entry'] || $this->data['pageFilter']->applicationsSelected || $this->data['pageFilter']->groupsSelected) {
    if ($this->data['type'] == SHOW_DATA) {
        $dataTable = getItemsDataOverview(array_keys($this->data['pageFilter']->hosts), $this->data['pageFilter']->application, $this->data['view_style']);
    } elseif ($this->data['type'] == SHOW_TRIGGERS) {
        global $page;
Example #3
0
}
if (isset($_REQUEST['next'])) {
    $help = new CHelp('web.view.php');
    $help_table = new CTableInfo();
    $help_table->setAttribute('style', 'width: 600px;');
    if ($_REQUEST['extlang'] == 'new') {
        $help_table->addRow(array(S_STEP . SPACE . '1:', S_NEW_LOCALE_STEP_1));
        $help_table->addRow(array(S_STEP . SPACE . '2:', S_NEW_LOCALE_STEP_2));
        $help_table->addRow(array(S_STEP . SPACE . '3:', array(S_NEW_LOCALE_STEP_3_1, BR(), S_NEW_LOCALE_STEP_3_2)));
        $help_table->addRow(array(S_STEP . SPACE . '4:', array(S_NEW_LOCALE_STEP_4_1, BR(), S_NEW_LOCALE_STEP_4_2, BR(), S_NEW_LOCALE_STEP_4_3, BR(), S_NEW_LOCALE_STEP_4_4, BR(), S_NEW_LOCALE_STEP_4_5)));
    } else {
        $help_table->addRow(array(S_STEP . SPACE . '1:', S_UPDATE_LOCALE_1));
        $help_table->addRow(array(S_STEP . SPACE . '2:', S_UPDATE_LOCALE_2));
        $help_table->addRow(array(S_STEP . SPACE . '3:', S_UPDATE_LOCALE_3));
    }
    $help->setHint($help_table);
    show_table_header(S_LOCALES);
    $frmLcls = new CFormTable(SPACE . S_CREATE . SPACE . S_LOCALE_SMALL . SPACE . S_FROM_SMALL . SPACE . $ZBX_LOCALES[$_REQUEST['srclang']], 'locales.php?action=1', 'post', null, 'form');
    $frmLcls->setAttribute('id', 'locales');
    $frmLcls->setHelp($help);
    $fileFrom = 'include/locales/' . $_REQUEST['srclang'] . '.inc.php';
    if (preg_match('/^[a-z0-9_]+$/i', $_REQUEST['srclang']) && file_exists($fileFrom)) {
        include $fileFrom;
        if (!isset($TRANSLATION) || !is_array($TRANSLATION)) {
            error('Passed SOURCE is NOT valid PHP file.');
        }
        $transFrom = $TRANSLATION;
    }
    unset($TRANSLATION);
    $frmLcls->addVar('extlang', $_REQUEST['extlang']);
    if (preg_match('/^[a-z0-9_]+$/i', $_REQUEST['extlang']) && $_REQUEST['extlang'] != 'new') {