本文整理汇总了PHP中CWidget::addFlicker方法的典型用法代码示例。如果您正苦于以下问题:PHP CWidget::addFlicker方法的具体用法?PHP CWidget::addFlicker怎么用?PHP CWidget::addFlicker使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWidget
的用法示例。
在下文中一共展示了CWidget::addFlicker方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CSpan
$show_host = $PAGE_HOSTS['selected'] == 0;
if (!$filter_enabled) {
$show_applications = 1;
}
if ($showdisabled == 0) {
$where_case[] = 'i.status <> 1';
}
$row_count = 0;
$numrows = new CSpan(null, 'info');
$numrows->setAttribute('name', 'numrows');
$header = array(S_ITEMS_BIG, new CSpan(SPACE . SPACE . '|' . SPACE . SPACE, 'divider'), S_FOUND . ': ', $numrows);
$items_wdgt->addHeader($header, $form);
// show_table_header($header, $form);
// ----------------
// Items Filter
$items_wdgt->addFlicker(get_item_filter_form(), get_profile('web.items.filter.state', 0));
//-----
// <<<--- SELECTED HOST HEADER INFORMATION --->>>
if ($PAGE_HOSTS['selected'] > 0) {
$header_host = CHost::get(array('hostids' => $PAGE_HOSTS['selected'], 'nopermissions' => 1, 'extendoutput' => 1, 'select_triggers' => 1, 'select_graphs' => 1));
$header_host = array_pop($header_host);
$description = array();
if ($header_host['proxy_hostid']) {
$proxy = get_host_by_hostid($header_host['proxy_hostid']);
$description[] = $proxy['host'] . ':';
}
$description[] = $header_host['host'];
$triggers = array(new CLink(S_TRIGGERS, 'triggers.php?groupid=' . $PAGE_GROUPS['selected'] . '&hostid=' . $header_host['hostid']), ' (' . count($header_host['triggerids']) . ')');
$graphs = array(new CLink(S_GRAPHS, 'graphs.php?groupid=' . $PAGE_GROUPS['selected'] . '&hostid=' . $header_host['hostid']), ' (' . count($header_host['graphids']) . ')');
$dns = empty($header_host['dns']) ? '-' : $header_host['dns'];
$ip = empty($header_host['ip']) ? '-' : $header_host['ip'];
示例2: array
$exactComboBox->addItem('0', _('like'));
$exactComboBox->addItem('1', _('exactly'));
$filter_table->addRow(array(array(array(bold(_('Field:')), $inventoryFieldsComboBox), array($exactComboBox, new CTextBox('filter_field_value', $_REQUEST['filter_field_value'], 20)))));
$filter = new CButton('filter', _('Filter'), "javascript: create_var('zbx_filter', 'filter_set', '1', true);");
$filter->useJQueryStyle('main');
$reset = new CButton('reset', _('Reset'), "javascript: clearAllForm('zbx_filter');");
$reset->useJQueryStyle();
$div_buttons = new CDiv(array($filter, SPACE, $reset));
$div_buttons->setAttribute('style', 'padding: 4px 0px;');
$footer_col = new CCol($div_buttons, 'controls');
$filter_table->addRow($footer_col);
$filter_form = new CForm('get');
$filter_form->setAttribute('name', 'zbx_filter');
$filter_form->setAttribute('id', 'zbx_filter');
$filter_form->addItem($filter_table);
$hostinvent_wdgt->addFlicker($filter_form, CProfile::get('web.hostinventories.filter.state', 0));
$hostinvent_wdgt->addHeaderRowNumber();
$table = new CTableInfo(_('No hosts defined.'));
$table->setHeader(array(is_show_all_nodes() ? make_sorting_header(_('Node'), 'hostid') : null, make_sorting_header(_('Host'), 'name'), _('Group'), make_sorting_header(_('Name'), 'pr_name'), make_sorting_header(_('Type'), 'pr_type'), make_sorting_header(_('OS'), 'pr_os'), make_sorting_header(_('Serial number A'), 'pr_serialno_a'), make_sorting_header(_('Tag'), 'pr_tag'), make_sorting_header(_('MAC address A'), 'pr_macaddress_a')));
$hosts = array();
$paging = getPagingLine($hosts);
if ($pageFilter->groupsSelected) {
// which inventory fields we will need for displaying
$requiredInventoryFields = array('name', 'type', 'os', 'serialno_a', 'tag', 'macaddress_a');
// checking if correct inventory field is specified for filter
$possibleInventoryFields = getHostInventories();
$possibleInventoryFields = zbx_toHash($possibleInventoryFields, 'db_field');
if (!empty($_REQUEST['filter_field']) && !empty($_REQUEST['filter_field_value']) && !isset($possibleInventoryFields[$_REQUEST['filter_field']])) {
error(_s('Impossible to filter by inventory field "%s", which does not exist.', $_REQUEST['filter_field']));
} else {
// if we are filtering by field, this field is also required
示例3: CNumericBox
$action = 'javascrip: this.checked ? $("status_change_days").enable() : $("status_change_days").disable()';
$sts_change_days_cb = new CNumericBox('status_change_days', $_REQUEST['status_change_days'], 4);
if (!$_REQUEST['status_change']) {
$sts_change_days_cb->setAttribute('disabled', 'disabled');
}
$sts_change_days_cb->addStyle('vertical-align: middle;');
$cbd = new CCheckBox('status_change', $_REQUEST['status_change'], $action, 1);
$cbd->addStyle('vertical-align: middle;');
$spand = new CSpan(S_DAYS_SMALL);
$spand->addStyle('vertical-align: middle;');
$filterForm->addRow(S_AGE_LESS_THAN, array($cbd, $sts_change_days_cb, $spand));
$filterForm->addRow(S_SHOW_DETAILS, new CCheckBox('show_details', $_REQUEST['show_details'], null, 1));
$filterForm->addRow(S_FILTER_BY_NAME, new CTextBox('txt_select', $_REQUEST['txt_select'], 40));
$filterForm->addItemToBottomRow(new CButton('filter_set', S_FILTER));
$filterForm->addItemToBottomRow(new CButton('filter_rst', S_RESET));
$trigg_wdgt->addFlicker($filterForm, CProfile::get('web.tr_status.filter.state', 0));
/*************** FILTER END ******************/
if ($_REQUEST['fullscreen']) {
$triggerInfo = new CTriggersInfo($_REQUEST['groupid'], $_REQUEST['hostid']);
$triggerInfo->HideHeader();
$triggerInfo->show();
}
$m_form = new CForm('acknow.php');
$m_form->setName('tr_status');
$m_form->addVar('backurl', $page['file']);
$admin_links = $USER_DETAILS['type'] == USER_TYPE_ZABBIX_ADMIN || $USER_DETAILS['type'] == USER_TYPE_SUPER_ADMIN;
$show_event_col = $config['event_ack_enable'] && $_REQUEST['show_events'] != EVENTS_OPTION_NOEVENT;
$table = new CTableInfo();
$switcherName = 'trigger_switchers';
$header_cb = $show_event_col ? new CCheckBox('all_events', false, "checkAll('" . $m_form->GetName() . "','all_events','events');") : new CCheckBox('all_triggers', false, "checkAll('" . $m_form->GetName() . "','all_triggers', 'triggers');");
if ($show_events != EVENTS_OPTION_NOEVENT) {
示例4: CComboBox
}
$r_form->addItem(array(SPACE . _('Server') . SPACE, new CComboBox('server', $selected_server, 'javascript: submit();', $servers), SPACE . _('Server') . SPACE, new CComboBox('priority', $selectedPriority, 'javascript: submit();', $level)));
// add host and group filters to the form
//if ($source == EVENT_SOURCE_TRIGGERS) {
// $r_form->addItem(array(
// SPACE . _('Host') . SPACE,
// $pageFilter->getHostsCB(true)
// ));
//}
$eventsWidget->addHeader(_('Events'), $r_form);
$eventsWidget->addHeaderRowNumber();
$filterForm = null;
//
//if ($source == EVENT_SOURCE_TRIGGERS) {
$filterForm = new CFormTable(null, null, 'get');
$eventsWidget->addFlicker(null, CProfile::get('web.events.filter.state', 0));
$scroll = new CDiv();
$scroll->setAttribute('id', 'scrollbar_cntr');
$eventsWidget->addFlicker($scroll, CProfile::get('web.events.filter.state', 1));
/*
* Display
*/
$table = new CTableInfo(_('No events found.'), 'tableinfo Eventlog');
if (isset($_REQUEST['period'])) {
$_REQUEST['period'] = getRequest('period', ZBX_PERIOD_DEFAULT);
CProfile::update('web.eventlog.period', $_REQUEST['period'], PROFILE_TYPE_INT);
} else {
$_REQUEST['period'] = CProfile::get('web.eventlog.period');
}
$config = select_config();
// source not discovery i.e. trigger
示例5: CTable
$hostsWidget->setRootClass('host-list');
// filter
$filterTable = new CTable('', 'filter');
$filterTable->addRow(array(array(array(bold(_('Name')), SPACE . _('like') . NAME_DELIMITER), new CTextBox('filter_host', $_REQUEST['filter_host'], 20)), array(array(bold(_('DNS')), SPACE . _('like') . NAME_DELIMITER), new CTextBox('filter_dns', $_REQUEST['filter_dns'], 20)), array(array(bold(_('IP')), SPACE . _('like') . NAME_DELIMITER), new CTextBox('filter_ip', $_REQUEST['filter_ip'], 20)), array(bold(_('Port') . NAME_DELIMITER), new CTextBox('filter_port', $_REQUEST['filter_port'], 20))));
$filter = new CButton('filter', _('Filter'), "javascript: create_var('zbx_filter', 'filter_set', '1', true); chkbxRange.clearSelectedOnFilterChange();");
$filter->useJQueryStyle('main');
$reset = new CButton('reset', _('Reset'), "javascript: clearAllForm('zbx_filter');");
$reset->useJQueryStyle();
$divButtons = new CDiv(array($filter, SPACE, $reset));
$divButtons->setAttribute('style', 'padding: 4px 0;');
$filterTable->addRow(new CCol($divButtons, 'center', 4));
$filterForm = new CForm('get');
$filterForm->setAttribute('name', 'zbx_filter');
$filterForm->setAttribute('id', 'zbx_filter');
$filterForm->addItem($filterTable);
$hostsWidget->addFlicker($filterForm, CProfile::get('web.hosts.filter.state', 0));
// table hosts
$form = new CForm();
$form->setName('hosts');
$table = new CTableInfo(_('No hosts found.'));
$table->setHeader(array(new CCheckBox('all_hosts', null, "checkAll('" . $form->getName() . "', 'all_hosts', 'hosts');"), $displayNodes ? _('Node') : null, make_sorting_header(_('Name'), 'name'), _('Applications'), _('Items'), _('Triggers'), _('Graphs'), _('Discovery'), _('Web'), _('Interface'), _('Templates'), make_sorting_header(_('Status'), 'status'), _('Availability')));
// get Hosts
$hosts = array();
$sortfield = getPageSortField('name');
$sortorder = getPageSortOrder();
if ($pageFilter->groupsSelected) {
$hosts = API::Host()->get(array('groupids' => $pageFilter->groupid > 0 ? $pageFilter->groupid : null, 'editable' => true, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'limit' => $config['search_limit'] + 1, 'search' => array('name' => empty($_REQUEST['filter_host']) ? null : $_REQUEST['filter_host'], 'ip' => empty($_REQUEST['filter_ip']) ? null : $_REQUEST['filter_ip'], 'dns' => empty($_REQUEST['filter_dns']) ? null : $_REQUEST['filter_dns']), 'filter' => array('port' => empty($_REQUEST['filter_port']) ? null : $_REQUEST['filter_port'])));
} else {
$hosts = array();
}
// sorting && paging
示例6: valueDistributionFormForMultiplePeriods
$rep_tab->setCellPadding(3);
$rep_tab->setCellSpacing(3);
$rep_tab->setAttribute('border', 0);
switch ($config) {
default:
case 1:
$rep_form = valueDistributionFormForMultiplePeriods($validItems);
break;
case 2:
$rep_form = valueDistributionFormForMultipleItems($validItems, $validPeriods);
break;
case 3:
$rep_form = valueComparisonFormForMultiplePeriods();
break;
}
$rep6_wdgt->addFlicker($rep_form, CProfile::get('web.report6.filter.state', 1));
if (isset($_REQUEST['report_show'])) {
$items = $config == 3 ? array(array('itemid' => get_request('itemid'))) : get_request('items');
if ($isValid && ($config != 3 ? $validItems : true) && ($config == 2 ? $validPeriods : true)) {
$src = 'chart_bar.php?' . 'config=' . $config . url_param('title') . url_param('xlabel') . url_param('ylabel') . url_param('scaletype') . url_param('avgperiod') . url_param('showlegend') . url_param('sorttype') . url_param('report_timesince') . url_param('report_timetill') . url_param('periods') . url_param($items, false, 'items') . url_param('hostids') . url_param('groupids') . url_param('palette') . url_param('palettetype');
$rep_tab->addRow(new CImg($src, 'report'));
}
}
$outer_table = new CTable();
$outer_table->setAttribute('border', 0);
$outer_table->setAttribute('width', '100%');
$outer_table->setCellPadding(1);
$outer_table->setCellSpacing(1);
$tmp_row = new CRow($rep_tab);
$tmp_row->setAttribute('align', 'center');
$outer_table->addRow($tmp_row);
示例7: CWidget
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
$screenWidget = new CWidget();
$screenWidget->addFlicker(new CDiv(null, null, 'scrollbar_cntr'), CProfile::get('web.screens.filter.state', 1));
// header form
$configComboBox = new CComboBox('config', 'screens.php', 'javascript: redirect(this.options[this.selectedIndex].value);');
$configComboBox->addItem('screens.php', _('Screens'));
$configComboBox->addItem('slides.php', _('Slide shows'));
$headerForm = new CForm();
$headerForm->addItem($configComboBox);
if (empty($this->data['screens'])) {
$screenWidget->addPageHeader(_('SCREENS'), $headerForm);
$screenWidget->addItem(BR());
$screenWidget->addItem(new CTableInfo(_('No screens found.')));
$screenBuilder = new CScreenBuilder();
CScreenBuilder::insertScreenStandardJs(array('timeline' => $screenBuilder->timeline));
} else {
if (!isset($this->data['screens'][$this->data['elementIdentifier']])) {
// this means id was fetched from profile and this screen does not exist
示例8: CForm
$filter_form = new CForm();
$filter_form->setMethod('get');
$filter_form->setAttribute('name', 'zbx_filter');
$filter_form->setAttribute('id', 'zbx_filter');
// Botões do formulario de filtro ----------------------------------------------
$reset = new CButton('reset', _('Reset'));
$reset->onClick("javascript: clearAllForm('zbx_filter');");
$filter = new CButton('filter', _zeT("Update Filter"));
$filter->onClick("javascript: submit();");
$footer_col = new CCol(array($filter, SPACE, $reset), 'center');
$footer_col->setColSpan(4);
$filter_table->addRow($footer_col);
$filter_form->addItem($filter_table);
// $filter_form->addVar('report_timesince', date('YmdHis', $report_timesince));
// $filter_form->addVar('report_timetill', date('YmdHis', $report_timetill));
$hostprof_wdgt->addFlicker($filter_form, true);
// FIM Formulario de Filtro =========================================================
insert_js($script);
$numrows = new CDiv();
$numrows->setAttribute('name', 'numrows');
$report = array();
$hostprof_wdgt->addHeader($numrows);
$r_form = new CForm();
// Combo com os formatos de exibição ---------------------------------------
$cmbFormato = new CComboBox('formato', $formato, 'javascript: submit();');
$cmbFormato->additem('html', 'HTML');
$cmbFormato->additem('csv', 'CSV');
// Combo com as opções de relatorios possiveis -----------------------------
$cmbMenus = new CComboBox('submenu', $subMenu, 'javascript: submit();');
// var_dump (zbxeSubMenus ('submenu_05'));
foreach (zbxeSubMenus('sub_report') as $row) {
示例9: CWidget
$rep2_wdgt = new CWidget();
$rep2_wdgt->addPageHeader(_zeT('Not Supported Items Report'));
$filter_form = new CForm();
$filter_form->setMethod('get');
$filter_form->setAttribute('name', 'zbx_filter');
$filter_form->setAttribute('id', 'zbx_filter');
$filter = new CButton('filter', _("Filter"));
$filter->onClick("javascript: submit();");
$reset = new CButton('reset', _('Reset'));
$reset->onClick("javascript: clearAllForm('zbx_filter');");
$footer_col = new CCol(array($filter, SPACE, $reset), 'center');
$footer_col->setColSpan(4);
$filter_table->addRow($footer_col);
$filter_form->addItem($filter_table);
// $filterForm = get_report2_filter($config, $PAGE_GROUPS, $PAGE_HOSTS);
$rep2_wdgt->addFlicker($filter_form, true);
if (isset($hostid)) {
$sql_from = '';
$sql_where = '';
if (0 == $config) {
if ($_REQUEST['groupid'] > 0) {
$sql_from .= ',hosts_groups hg ';
$sql_where .= ' AND hg.hostid=h.hostid AND hg.groupid=' . $_REQUEST['groupid'];
}
if ($_REQUEST['hostid'] > 0) {
$sql_where .= ' AND h.hostid=' . $hostid;
}
} else {
if ($hostid > 0) {
$sql_from .= ',hosts_templates ht ';
$sql_where .= ' AND ht.hostid=h.hostid AND ht.templateid=' . $hostid;
示例10: array
$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), SPACE, 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);
zbx_add_post_js('create_calendar(null,["nav_day","nav_month","nav_year","nav_hour","nav_minute"],"nav_time");');
$filterForm->addRow(S_EVENTS_BEFORE, $nav_clndr);
if (EVENT_SOURCE_TRIGGERS == $source) {
$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);
//-------
$nav = get_thin_table_header($navigation);
$events_wdgt->addFlicker($filterForm, get_profile('web.events.filter.state', 0));
$events_wdgt->addItem(array($nav, $table, $nav));
$events_wdgt->show();
$jsmenu = new CPUMenu(null, 170);
$jsmenu->InsertJavaScript();
include_once "include/page_footer.php";
示例11: CFormTable
$alerts_wdgt->addHeader(S_ACTIONS_BIG);
$alerts_wdgt->addHeader($numrows);
//--------
/************************* FILTER **************************/
/***********************************************************/
$filterForm = new CFormTable();
$filterForm->setAttribute('name', 'zbx_filter');
$filterForm->setAttribute('id', 'zbx_filter');
$row = new CRow(array(new CCol(S_RECIPIENT, 'form_row_l'), new CCol(array(new CTextBox('alias', $_REQUEST['alias'], 32), new CButton('btn1', S_SELECT, "return PopUp('popup.php?" . "dstfrm=" . $filterForm->getName() . "&dstfld1=alias&srctbl=users&srcfld1=alias&real_hosts=1');", 'T')), 'form_row_r')));
$filterForm->addRow($row);
$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);
$alerts_wdgt->addFlicker($filterForm, CProfile::get('web.auditacts.filter.state', 1));
$scroll_div = new CDiv();
$scroll_div->setAttribute('id', 'scrollbar_cntr');
$alerts_wdgt->addFlicker($scroll_div, CProfile::get('web.auditacts.filter.state', 1));
//-------
$table = new CTableInfo(S_NO_ACTIONS_FOUND);
$table->setHeader(array(is_show_all_nodes() ? S_NODES : null, S_TIME, S_TYPE, S_STATUS, S_RETRIES_LEFT, S_RECIPIENTS, S_MESSAGE, S_ERROR));
$effectiveperiod = navigation_bar_calc('web.auditacts.timeline', 0, true);
$bstime = $_REQUEST['stime'];
$from = zbxDateToTime($_REQUEST['stime']);
$till = $from + $effectiveperiod;
$options = array('time_from' => $from, 'time_till' => $till, 'output' => API_OUTPUT_EXTEND, 'select_mediatypes' => API_OUTPUT_EXTEND, 'sortfield' => 'alertid', 'sortorder' => ZBX_SORT_DOWN, 'limit' => $config['search_limit'] + 1);
if ($_REQUEST['alias']) {
$users = CUser::get(array('filter' => array('alias' => $_REQUEST['alias'])));
$options['userids'] = zbx_objectValues($users, 'userid');
}
示例12: CFormTable
$r_form->addItem(array(SPACE . S_HOST . SPACE, $cmbHosts));
$latest_wdgt->addHeader(SPACE, $r_form);
// show_table_header(S_LATEST_DATA_BIG,$r_form);
//-------------
/************************* FILTER **************************/
/***********************************************************/
$filterForm = new CFormTable();
$filterForm->setAttribute('name', 'zbx_filter');
$filterForm->setAttribute('id', 'zbx_filter');
$filterForm->addRow(S_SHOW_ITEMS_WITH_DESCRIPTION_LIKE, new CTextBox('select', $_REQUEST['select'], 20));
$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);
$latest_wdgt->addFlicker($filterForm, get_profile('web.latest.filter.state', 1));
//-------
validate_sort_and_sortorder('i.description', ZBX_SORT_UP);
$_REQUEST['groupbyapp'] = get_request('groupbyapp', get_profile('web.latest.groupbyapp', 1));
update_profile('web.latest.groupbyapp', $_REQUEST['groupbyapp'], PROFILE_TYPE_INT);
$_REQUEST['applications'] = get_request('applications', get_profile('web.latest.applications', array(), PROFILE_TYPE_ARRAY_ID));
if (isset($_REQUEST['open'])) {
if (!isset($_REQUEST['applicationid'])) {
$_REQUEST['applications'] = array();
$show_all_apps = 1;
} else {
if (!uint_in_array($_REQUEST['applicationid'], $_REQUEST['applications'])) {
array_push($_REQUEST['applications'], $_REQUEST['applicationid']);
}
}
} else {
示例13: CTable
$objData['id'] = $_REQUEST['itemid'];
$objData['domid'] = $dom_graph_id;
$objData['loadSBox'] = 0;
$objData['loadImage'] = 0;
$objData['loadScroll'] = 1;
$objData['dynamic'] = 0;
$objData['mainObject'] = 1;
}
//-------------
}
if (!isset($_REQUEST['plaintext'])) {
$right = new CTable();
$right->addRow($header['right']);
$historyWidget->addPageHeader($header['left'], $right);
if (isset($iv_string[$item['value_type']])) {
$historyWidget->addFlicker($filterForm, CProfile::get('web.history.filter.state', 1));
}
$historyWidget->addItem($table);
if (str_in_array($_REQUEST['action'], array('showvalues', 'showgraph'))) {
zbx_add_post_js('timeControl.addObject("' . $dom_graph_id . '",' . zbx_jsvalue($timeline) . ',' . zbx_jsvalue($objData) . ');');
zbx_add_post_js('timeControl.processObjects();');
$scroll_div = new CDiv();
$scroll_div->setAttribute('id', 'scrollbar_cntr');
$historyWidget->addFlicker($scroll_div, CProfile::get('web.history.filter.state', 1));
}
$historyWidget->show();
} else {
$span = new CSpan(null, 'textblackwhite');
foreach ($ptData['header'] as $bnum => $text) {
$span->addItem(array(new CJSscript($text), BR()));
}
示例14: CTable
$hosts_wdgt->setRootClass('host-list');
// filter
$filter_table = new CTable('', 'filter');
$filter_table->addRow(array(array(array(bold(_('Name')), SPACE . _('like') . ': '), new CTextBox('filter_host', $_REQUEST['filter_host'], 20)), array(array(bold(_('DNS')), SPACE . _('like') . ': '), new CTextBox('filter_dns', $_REQUEST['filter_dns'], 20)), array(array(bold(_('IP')), SPACE . _('like') . ': '), new CTextBox('filter_ip', $_REQUEST['filter_ip'], 20)), array(bold(_('Port') . ': '), new CTextBox('filter_port', $_REQUEST['filter_port'], 20))));
$filter = new CButton('filter', _('Filter'), "javascript: create_var('zbx_filter', 'filter_set', '1', true);");
$filter->useJQueryStyle('main');
$reset = new CButton('reset', _('Reset'), "javascript: clearAllForm('zbx_filter');");
$reset->useJQueryStyle();
$div_buttons = new CDiv(array($filter, SPACE, $reset));
$div_buttons->setAttribute('style', 'padding: 4px 0;');
$filter_table->addRow(new CCol($div_buttons, 'center', 4));
$filter_form = new CForm('get');
$filter_form->setAttribute('name', 'zbx_filter');
$filter_form->setAttribute('id', 'zbx_filter');
$filter_form->addItem($filter_table);
$hosts_wdgt->addFlicker($filter_form, CProfile::get('web.hosts.filter.state', 0));
// table hosts
$form = new CForm();
$form->setName('hosts');
$table = new CTableInfo(_('No hosts defined.'));
$table->setHeader(array(new CCheckBox('all_hosts', null, "checkAll('" . $form->getName() . "', 'all_hosts', 'hosts');"), make_sorting_header(_('Name'), 'name'), _('Applications'), _('Items'), _('Triggers'), _('Graphs'), _('Discovery'), _('Interface'), _('Templates'), make_sorting_header(_('Status'), 'status'), _('Availability')));
// get Hosts
$hosts = array();
$sortfield = getPageSortField('name');
$sortorder = getPageSortOrder();
if ($pageFilter->groupsSelected) {
$options = array('editable' => true, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'limit' => $config['search_limit'] + 1, 'search' => array('name' => empty($_REQUEST['filter_host']) ? null : $_REQUEST['filter_host'], 'ip' => empty($_REQUEST['filter_ip']) ? null : $_REQUEST['filter_ip'], 'dns' => empty($_REQUEST['filter_dns']) ? null : $_REQUEST['filter_dns']), 'filter' => array('port' => empty($_REQUEST['filter_port']) ? null : $_REQUEST['filter_port']));
if ($pageFilter->groupid > 0) {
$options['groupids'] = $pageFilter->groupid;
}
$hosts = API::Host()->get($options);
示例15: CForm
$auditWidget->addHeaderRowNumber();
// create filter
$filterForm = new CForm('get');
$filterForm->setAttribute('name', 'zbx_filter');
$filterForm->setAttribute('id', 'zbx_filter');
$filterTable = new CTable('', 'filter');
$filterTable->addRow(array(array(bold(_('Recipient')), SPACE, new CTextBox('alias', $this->data['alias'], 20), new CButton('btn1', _('Select'), 'return PopUp(\'popup.php?dstfrm=' . $filterForm->getName() . '&dstfld1=alias&srctbl=users&srcfld1=alias&real_hosts=1\');', 'T'))));
$filterButton = new CButton('filter', _('Filter'), "javascript: create_var('zbx_filter', 'filter_set', '1', true);");
$filterButton->useJQueryStyle('main');
$resetButton = new CButton('filter_rst', _('Reset'), 'javascript: var uri = new Curl(location.href); uri.setArgument("filter_rst", 1); location.href = uri.getUrl();');
$resetButton->useJQueryStyle();
$buttonsDiv = new CDiv(array($filterButton, SPACE, $resetButton));
$buttonsDiv->setAttribute('style', 'padding: 4px 0px;');
$filterTable->addRow(new CCol($buttonsDiv, 'controls'));
$filterForm->addItem($filterTable);
$auditWidget->addFlicker($filterForm, CProfile::get('web.auditacts.filter.state', 1));
$auditWidget->addFlicker(new CDiv(null, null, 'scrollbar_cntr'), CProfile::get('web.auditacts.filter.state', 1));
// create form
$auditForm = new CForm('get');
$auditForm->setName('auditForm');
// create table
$auditTable = new CTableInfo(_('No actions defined.'));
$auditTable->setHeader(array(is_show_all_nodes() ? _('Nodes') : null, _('Time'), _('Type'), _('Status'), _('Retries left'), _('Recipient(s)'), _('Message'), _('Error')));
foreach ($this->data['alerts'] as $alert) {
$mediatype = array_pop($alert['mediatypes']);
if ($mediatype['mediatypeid'] == 0) {
$mediatype = array('description' => '');
}
if ($alert['status'] == ALERT_STATUS_SENT) {
if ($alert['alerttype'] == ALERT_TYPE_MESSAGE) {
$status = new CSpan(_('sent'), 'green');