当前位置: 首页>>代码示例>>PHP>>正文


PHP CForm::setName方法代码示例

本文整理汇总了PHP中CForm::setName方法的典型用法代码示例。如果您正苦于以下问题:PHP CForm::setName方法的具体用法?PHP CForm::setName怎么用?PHP CForm::setName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CForm的用法示例。


在下文中一共展示了CForm::setName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CSubmit

$createForm->addVar('eventsource', $this->data['eventsource']);
$createForm->addItem(new CSubmit('form', _('Create action')));
$actionWidget->addPageHeader(_('CONFIGURATION OF ACTIONS'), $createForm);
// create widget header
$sourceComboBox = new CComboBox('eventsource', $this->data['eventsource'], 'submit()');
$sourceComboBox->addItem(EVENT_SOURCE_TRIGGERS, _('Triggers'));
$sourceComboBox->addItem(EVENT_SOURCE_DISCOVERY, _('Discovery'));
$sourceComboBox->addItem(EVENT_SOURCE_AUTO_REGISTRATION, _('Auto registration'));
$sourceComboBox->addItem(EVENT_SOURCE_INTERNAL, _x('Internal', 'event source'));
$filterForm = new CForm('get');
$filterForm->addItem(array(_('Event source'), SPACE, $sourceComboBox));
$actionWidget->addHeader(_('Actions'), $filterForm);
$actionWidget->addHeaderRowNumber();
// create form
$actionForm = new CForm();
$actionForm->setName('actionForm');
// create table
$actionTable = new CTableInfo(_('No actions found.'));
$actionTable->setHeader(array(new CCheckBox('all_items', null, "checkAll('" . $actionForm->getName() . "', 'all_items', 'g_actionid');"), make_sorting_header(_('Name'), 'name', $this->data['sort'], $this->data['sortorder']), _('Conditions'), _('Operations'), make_sorting_header(_('Status'), 'status', $this->data['sort'], $this->data['sortorder'])));
foreach ($this->data['actions'] as $action) {
    $conditions = array();
    order_result($action['filter']['conditions'], 'conditiontype', ZBX_SORT_DOWN);
    foreach ($action['filter']['conditions'] as $condition) {
        $conditions[] = get_condition_desc($condition['conditiontype'], $condition['operator'], $condition['value']);
        $conditions[] = BR();
    }
    sortOperations($this->data['eventsource'], $action['operations']);
    $operations = array();
    foreach ($action['operations'] as $operation) {
        $operations[] = get_operation_descr(SHORT_DESCRIPTION, $operation);
    }
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:configuration.action.list.php

示例2: CForm

// append host summary to widget header
if (!empty($this->data['hostid'])) {
    if (!empty($this->data['parent_discoveryid'])) {
        $triggersWidget->addItem(get_header_host_table('triggers', $this->data['hostid'], $this->data['parent_discoveryid']));
    } else {
        $triggersWidget->addItem(get_header_host_table('triggers', $this->data['hostid']));
    }
}
if (!empty($this->data['parent_discoveryid'])) {
    $triggersWidget->addPageHeader(_('CONFIGURATION OF TRIGGER PROTOTYPES'));
} else {
    $triggersWidget->addPageHeader(_('CONFIGURATION OF TRIGGERS'));
}
// create form
$triggersForm = new CForm();
$triggersForm->setName('triggersForm');
$triggersForm->addVar('hostid', $this->data['hostid']);
$triggersForm->addVar('action', $this->data['action']);
if ($this->data['parent_discoveryid']) {
    $triggersForm->addVar('parent_discoveryid', $this->data['parent_discoveryid']);
}
foreach ($this->data['g_triggerid'] as $triggerid) {
    $triggersForm->addVar('g_triggerid[' . $triggerid . ']', $triggerid);
}
// create form list
$triggersFormList = new CFormList('triggersFormList');
// append severity to form list
$severityDiv = new CSeverity(array('id' => 'priority_div', 'name' => 'priority', 'value' => $this->data['priority']));
$triggersFormList->addRow(array(_('Severity'), SPACE, new CVisibilityBox('visible[priority]', isset($this->data['visible']['priority']), 'priority_div', _('Original'))), $severityDiv);
// append dependencies to form list
if (empty($this->data['parent_discoveryid'])) {
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:configuration.triggers.massupdate.php

示例3: CWidget

** 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.
**/
$mediaTypeWidget = new CWidget();
// create new media type button
$createForm = new CForm('get');
$createForm->addItem(new CSubmit('form', _('Create media type')));
$mediaTypeWidget->addPageHeader(_('CONFIGURATION OF MEDIA TYPES'), $createForm);
$mediaTypeWidget->addHeader(_('Media types'));
$mediaTypeWidget->addHeaderRowNumber();
// create form
$mediaTypeForm = new CForm();
$mediaTypeForm->setName('mediaTypesForm');
// create table
$mediaTypeTable = new CTableInfo(_('No media types found.'));
$mediaTypeTable->setHeader(array(new CCheckBox('all_media_types', null, "checkAll('" . $mediaTypeForm->getName() . "', 'all_media_types', 'mediatypeids');"), $this->data['displayNodes'] ? _('Node') : null, make_sorting_header(_('Name'), 'description'), make_sorting_header(_('Type'), 'type'), _('Status'), _('Used in actions'), _('Details')));
foreach ($this->data['mediatypes'] as $mediaType) {
    switch ($mediaType['typeid']) {
        case MEDIA_TYPE_EMAIL:
            $details = _('SMTP server') . NAME_DELIMITER . '"' . $mediaType['smtp_server'] . '", ' . _('SMTP helo') . NAME_DELIMITER . '"' . $mediaType['smtp_helo'] . '", ' . _('SMTP email') . NAME_DELIMITER . '"' . $mediaType['smtp_email'] . '"';
            break;
        case MEDIA_TYPE_EXEC:
            $details = _('Script name') . NAME_DELIMITER . '"' . $mediaType['exec_path'] . '"';
            break;
        case MEDIA_TYPE_SMS:
            $details = _('GSM modem') . NAME_DELIMITER . '"' . $mediaType['gsm_modem'] . '"';
            break;
        case MEDIA_TYPE_JABBER:
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:administration.mediatypes.list.php

示例4: CWidget

** (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.
**/
$proxyWidget = new CWidget();
$proxyWidget->addPageHeader(_('CONFIGURATION OF PROXIES'));
// create form
$proxyForm = new CForm();
$proxyForm->setName('proxyForm');
$proxyForm->addVar('form', $this->data['form']);
$proxyForm->addVar('form_refresh', $this->data['form_refresh']);
if (!empty($this->data['proxyid'])) {
    $proxyForm->addVar('proxyid', $this->data['proxyid']);
}
// create form list
$proxyFormList = new CFormList('proxyFormList');
$nameTextBox = new CTextBox('host', $this->data['name'], ZBX_TEXTBOX_STANDARD_SIZE, 'no', 64);
$nameTextBox->attr('autofocus', 'autofocus');
$proxyFormList->addRow(_('Proxy name'), $nameTextBox);
// append status to form list
$statusBox = new CComboBox('status', $this->data['status'], 'submit()');
$statusBox->addItem(HOST_STATUS_PROXY_ACTIVE, _('Active'));
$statusBox->addItem(HOST_STATUS_PROXY_PASSIVE, _('Passive'));
$proxyFormList->addRow(_('Proxy mode'), $statusBox);
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:administration.proxy.edit.php

示例5: CWidget

**
** 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.
**/
$discoveryWidget = new CWidget();
// create new discovery rule button
$createForm = new CForm('get');
$createForm->cleanItems();
$createForm->addItem(new CSubmit('form', _('Create discovery rule')));
$discoveryWidget->addPageHeader(_('CONFIGURATION OF DISCOVERY RULES'), $createForm);
$discoveryWidget->addHeader(_('Discovery rules'));
$discoveryWidget->addHeaderRowNumber();
// create form
$discoveryForm = new CForm();
$discoveryForm->setName('druleForm');
// create table
$discoveryTable = new CTableInfo(_('No discovery rules found.'));
$discoveryTable->setHeader(array(new CCheckBox('all_drules', null, "checkAll('" . $discoveryForm->getName() . "', 'all_drules', 'g_druleid');"), make_sorting_header(_('Name'), 'name', $this->data['sort'], $this->data['sortorder']), _('IP range'), _('Delay'), _('Checks'), _('Status')));
foreach ($data['drules'] as $drule) {
    array_push($drule['description'], new CLink($drule['name'], '?form=update&druleid=' . $drule['druleid']));
    $status = new CCol(new CLink(discovery_status2str($drule['status']), '?g_druleid[]=' . $drule['druleid'] . '&action=' . ($drule['status'] == DRULE_STATUS_ACTIVE ? 'drule.massdisable' : 'drule.massenable'), discovery_status2style($drule['status'])));
    $discoveryTable->addRow(array(new CCheckBox('g_druleid[' . $drule['druleid'] . ']', null, null, $drule['druleid']), $drule['description'], $drule['iprange'], $drule['delay'], !empty($drule['checks']) ? implode(', ', $drule['checks']) : '', $status));
}
// create go buttons
$goComboBox = new CComboBox('action');
$goOption = new CComboItem('drule.massenable', _('Enable selected'));
$goOption->setAttribute('confirm', _('Enable selected discovery rules?'));
$goComboBox->addItem($goOption);
$goOption = new CComboItem('drule.massdisable', _('Disable selected'));
$goOption->setAttribute('confirm', _('Disable selected discovery rules?'));
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:configuration.discovery.list.php

示例6: dirname

**
** 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.
**/
require_once dirname(__FILE__) . '/js/configuration.action.edit.js.php';
$actionWidget = new CWidget(null, 'action-edit');
$actionWidget->addPageHeader(_('CONFIGURATION OF ACTIONS'));
// create form
$actionForm = new CForm();
$actionForm->setName('action.edit');
$actionForm->addVar('form', $this->data['form']);
$actionForm->addVar('form_refresh', $this->data['form_refresh']);
$actionForm->addVar('eventsource', $this->data['eventsource']);
if (!empty($this->data['actionid'])) {
    $actionForm->addVar('actionid', $this->data['actionid']);
}
/*
 * Action tab
 */
$actionFormList = new CFormList('actionlist');
$nameTextBox = new CTextBox('name', $this->data['action']['name'], ZBX_TEXTBOX_STANDARD_SIZE);
$nameTextBox->attr('autofocus', 'autofocus');
$actionFormList->addRow(_('Name'), $nameTextBox);
$actionFormList->addRow(_('Default subject'), new CTextBox('def_shortdata', $this->data['action']['def_shortdata'], ZBX_TEXTBOX_STANDARD_SIZE));
$actionFormList->addRow(_('Default message'), new CTextArea('def_longdata', $this->data['action']['def_longdata']));
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.action.edit.php

示例7: CWidget

<?php

/*
** Zabbix
** Copyright (C) 2001-2013 Zabbix SIA
**
** 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.
**/
$scriptWidget = new CWidget();
// create form
$scriptForm = new CForm();
$scriptForm->setName('scriptForm');
// append tabs to form
$scriptTab = new CTabView();
$scriptTab->addTab('scriptTab', _s('Result of "%s"', $this->data['info']['name']), new CSpan($this->data['message'], 'pre fixedfont'));
$scriptForm->addItem($scriptTab);
$scriptWidget->addItem($scriptForm);
return $scriptWidget;
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:30,代码来源:general.script.execute.php

示例8: CWidget

** (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.
**/
$userGroupWidget = new CWidget();
$userGroupWidget->addPageHeader(_('CONFIGURATION OF USER GROUPS'));
// create form
$userGroupForm = new CForm();
$userGroupForm->setName('userGroupsForm');
$userGroupForm->addVar('form', $this->data['form']);
$userGroupForm->addVar('group_rights', $this->data['group_rights']);
if (isset($this->data['usrgrpid'])) {
    $userGroupForm->addVar('usrgrpid', $this->data['usrgrpid']);
}
/*
 * User group tab
*/
$userGroupFormList = new CFormList('userGroupFormList');
$nameTextBox = new CTextBox('gname', $this->data['name'], ZBX_TEXTBOX_STANDARD_SIZE);
$nameTextBox->attr('autofocus', 'autofocus');
$userGroupFormList->addRow(_('Group name'), $nameTextBox);
// append groups to form list
$groupsComboBox = new CComboBox('selusrgrp', $this->data['selected_usrgrp'], 'submit()');
$groupsComboBox->addItem(0, _('All'));
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:administration.usergroups.edit.php

示例9: CWidget

** 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.
**/
$discoveryWidget = new CWidget('hat_discovery');
// create header form
$discoveryHeaderForm = new CForm('get');
$discoveryHeaderForm->setName('slideHeaderForm');
$discoveryHeaderForm->addVar('fullscreen', $this->data['fullscreen']);
$discoveryWidget->addPageHeader(_('STATUS OF DISCOVERY'), get_icon('fullscreen', array('fullscreen' => $this->data['fullscreen'])));
$discoveryRulesComboBox = $this->data['pageFilter']->getDiscoveryCB();
$discoveryHeaderForm->addItem(array(_('Discovery rule') . SPACE, $discoveryRulesComboBox));
$discoveryWidget->addHeader(_('Discovery rules'), $discoveryHeaderForm);
// create table
$discoveryTable = new CTableInfo(_('No discovered devices found.'));
$discoveryTable->makeVerticalRotation();
$discoveredDeviceCol = make_sorting_header(_('Discovered device'), 'ip', $this->data['sort'], $this->data['sortorder']);
$discoveredDeviceCol->addClass('left');
$header = array($discoveredDeviceCol, new CCol(_('Monitored host'), 'left'), new CCol(array(_('Uptime') . '/', _('Downtime')), 'left'));
foreach ($this->data['services'] as $name => $foo) {
    $header[] = new CCol($name, 'vertical_rotation');
}
$discoveryTable->setHeader($header, 'vertical_header');
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:monitoring.discovery.php

示例10: CWidget

** 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.
**/
$sysmapWidget = new CWidget();
// create header buttons
$createForm = new CForm('get');
$createForm->cleanItems();
$createForm->addItem(new CSubmit('form', _('Create map')));
$createForm->addItem(new CButton('form', _('Import'), 'redirect("conf.import.php?rules_preset=map")'));
$sysmapWidget->addPageHeader(_('CONFIGURATION OF NETWORK MAPS'), $createForm);
// create form
$sysmapForm = new CForm();
$sysmapForm->setName('frm_maps');
$sysmapWidget->addHeader(_('Maps'));
$sysmapWidget->addHeaderRowNumber();
// create table
$sysmapTable = new CTableInfo(_('No maps found.'));
$sysmapTable->setHeader(array(new CCheckBox('all_maps', null, "checkAll('" . $sysmapForm->getName() . "', 'all_maps', 'maps');"), $this->data['displayNodes'] ? _('Node') : null, make_sorting_header(_('Name'), 'name'), make_sorting_header(_('Width'), 'width'), make_sorting_header(_('Height'), 'height'), _('Edit')));
foreach ($this->data['maps'] as $map) {
    $sysmapTable->addRow(array(new CCheckBox('maps[' . $map['sysmapid'] . ']', null, null, $map['sysmapid']), $this->data['displayNodes'] ? $map['nodename'] : null, new CLink($map['name'], 'sysmap.php?sysmapid=' . $map['sysmapid']), $map['width'], $map['height'], new CLink(_('Edit'), 'sysmaps.php?form=update&sysmapid=' . $map['sysmapid'] . '#form')));
}
// create go button
$goComboBox = new CComboBox('go');
$goComboBox->addItem('export', _('Export selected'));
$goOption = new CComboItem('delete', _('Delete selected'));
$goOption->setAttribute('confirm', _('Delete selected maps?'));
$goComboBox->addItem($goOption);
$goButton = new CSubmit('goButton', _('Go') . ' (0)');
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:configuration.sysmap.list.php

示例11: itemTypeInterface

            $itemInterfaceType = itemTypeInterface($item['type']);
            if (!($itemInterfaceType === false || $itemInterfaceType === INTERFACE_TYPE_ANY)) {
                $locked = 1;
                break;
            }
        }
        $interfaces[$hinum]['locked'] = $locked;
    }
}
$clear_templates = array_intersect($clear_templates, array_keys($original_templates));
$clear_templates = array_diff($clear_templates, array_keys($templateIds));
natcasesort($templateIds);
// whether this is a discovered host
$isDiscovered = get_request('hostid') && $dbHost['flags'] == ZBX_FLAG_DISCOVERY_CREATED && get_request('form') == 'update';
$frmHost = new CForm();
$frmHost->setName('web.hosts.host.php.');
$frmHost->addVar('form', get_request('form', 1));
$frmHost->addVar('clear_templates', $clear_templates);
$hostList = new CFormList('hostlist');
if ($_REQUEST['hostid'] > 0 && get_request('form') != 'clone') {
    $frmHost->addVar('hostid', $_REQUEST['hostid']);
}
if ($_REQUEST['groupid'] > 0) {
    $frmHost->addVar('groupid', $_REQUEST['groupid']);
}
// LLD rule link
if ($isDiscovered) {
    $hostList->addRow(_('Discovered by'), new CLink($dbHost['discoveryRule']['name'], 'host_prototypes.php?parent_discoveryid=' . $dbHost['discoveryRule']['itemid'], 'highlight underline weight_normal'));
}
$hostTB = new CTextBox('host', $host, ZBX_TEXTBOX_STANDARD_SIZE, $isDiscovered);
$hostTB->setAttribute('maxlength', 64);
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:configuration.host.edit.php

示例12: CWidget

** (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.
**/
$hostGroupWidget = new CWidget();
$hostGroupWidget->addPageHeader(_('CONFIGURATION OF HOST GROUPS'));
// create form
$hostGroupForm = new CForm();
$hostGroupForm->setName('hostgroupForm');
$hostGroupForm->addVar('form', $this->data['form']);
if (isset($this->data['groupid'])) {
    $hostGroupForm->addVar('groupid', $this->data['groupid']);
}
// create hostgroup form list
$hostGroupFormList = new CFormList('hostgroupFormList');
$nameTextBox = new CTextBox('name', $this->data['name'], ZBX_TEXTBOX_STANDARD_SIZE, $this->data['groupid'] && $this->data['group']['flags'] == ZBX_FLAG_DISCOVERY_CREATED, 64);
$nameTextBox->attr('autofocus', 'autofocus');
$hostGroupFormList->addRow(_('Group name'), $nameTextBox);
// append groups and hosts to form list
$groupsComboBox = new CComboBox('twb_groupid', $this->data['twb_groupid'], 'submit()');
$groupsComboBox->addItem('0', _('All'));
foreach ($this->data['db_groups'] as $group) {
    $groupsComboBox->addItem($group['groupid'], $group['name']);
}
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:configuration.hostgroups.edit.php

示例13: CForm

        $createGraphButton->setEnabled(false);
        $createForm->addItem($createGraphButton);
    }
    $graphWidget->addPageHeader(_('CONFIGURATION OF GRAPHS'), $createForm);
    $filterForm = new CForm('get');
    $filterForm->addItem(array(_('Group') . SPACE, $this->data['pageFilter']->getGroupsCB(true)));
    $filterForm->addItem(array(SPACE . _('Host') . SPACE, $this->data['pageFilter']->getHostsCB(true)));
    $graphWidget->addHeader(_('Graphs'), $filterForm);
    if (!empty($this->data['hostid'])) {
        $graphWidget->addItem(get_header_host_table('graphs', $this->data['hostid']));
    }
}
$graphWidget->addHeaderRowNumber();
// create form
$graphForm = new CForm();
$graphForm->setName('graphForm');
$graphForm->addVar('hostid', $this->data['hostid']);
if (!empty($this->data['parent_discoveryid'])) {
    $graphForm->addVar('parent_discoveryid', $this->data['parent_discoveryid']);
}
// create table
$graphTable = new CTableInfo(!empty($this->data['parent_discoveryid']) ? _('No graph prototypes found.') : _('No graphs found.'));
$graphTable->setHeader(array(new CCheckBox('all_graphs', null, "checkAll('" . $graphForm->getName() . "', 'all_graphs', 'group_graphid');"), $this->data['displayNodes'] ? _('Node') : null, !empty($this->data['hostid']) ? null : _('Hosts'), make_sorting_header(_('Name'), 'name'), _('Width'), _('Height'), make_sorting_header(_('Graph type'), 'graphtype')));
foreach ($this->data['graphs'] as $graph) {
    $graphid = $graph['graphid'];
    $hostList = null;
    if (empty($this->data['hostid'])) {
        $hostList = array();
        foreach ($graph['hosts'] as $host) {
            $hostList[$host['name']] = $host['name'];
        }
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:configuration.graph.list.php

示例14: CTextBox

 $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
 order_result($hosts, $sortfield, $sortorder);
 $paging = getPagingLine($hosts, array('hostid'));
 $hosts = API::Host()->get(array('hostids' => zbx_objectValues($hosts, 'hostid'), 'output' => API_OUTPUT_EXTEND, 'selectParentTemplates' => array('hostid', 'name'), 'selectInterfaces' => API_OUTPUT_EXTEND, 'selectItems' => API_OUTPUT_COUNT, 'selectDiscoveries' => API_OUTPUT_COUNT, 'selectTriggers' => API_OUTPUT_COUNT, 'selectGraphs' => API_OUTPUT_COUNT, 'selectApplications' => API_OUTPUT_COUNT, 'selectHttpTests' => API_OUTPUT_COUNT, 'selectDiscoveryRule' => array('itemid', 'name'), 'selectHostDiscovery' => array('ts_delete')));
开发者ID:micromachine,项目名称:RackTables-ZABBIX-bridge,代码行数:31,代码来源:hosts.php

示例15: dirname

**
** 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.
**/
require_once dirname(__FILE__) . '/js/configuration.slideconf.edit.js.php';
$slideWidget = new CWidget();
$slideWidget->addPageHeader(_('CONFIGURATION OF SLIDE SHOWS'));
// create form
$slideForm = new CForm();
$slideForm->setName('slideForm');
$slideForm->addVar('form', $this->data['form']);
$slideForm->addVar('slides', $this->data['slides_without_delay']);
if (!empty($this->data['slideshowid'])) {
    $slideForm->addVar('slideshowid', $this->data['slideshowid']);
}
// create slide form list
$slideFormList = new CFormList('slideFormList');
$slideFormList->addRow(_('Name'), new CTextBox('name', $this->data['name'], ZBX_TEXTBOX_STANDARD_SIZE));
$slideFormList->addRow(_('Default delay (in seconds)'), new CNumericBox('delay', $this->data['delay'], 5, 'no', false, false));
// append slide table
$slideTable = new CTableInfo(_('No slides defined.'), 'formElementTable');
$slideTable->setAttribute('style', 'min-width: 500px;');
$slideTable->setAttribute('id', 'slideTable');
$slideTable->setHeader(array(new CCol(SPACE, null, null, '15'), new CCol(SPACE, null, null, '15'), new CCol(_('Screen'), null, null, '140'), new CCol(_('Delay'), null, null, '70'), new CCol(_('Action'), null, null, '50')));
$i = 1;
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:configuration.slideconf.edit.php


注:本文中的CForm::setName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。