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


PHP CComboItem::setAttribute方法代码示例

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


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

示例1: CForm

$regExpForm = new CForm();
$regExpForm->setName('regularExpressionsForm');
$regExpForm->addItem(BR());
$regExpTable = new CTableInfo(_('No regular expressions found.'));
$regExpTable->setHeader(array(new CCheckBox('all_regexps', null, "checkAll('regularExpressionsForm', 'all_regexps', 'regexpids');"), $this->data['displayNodes'] ? _('Node') : null, _('Name'), _('Expressions')));
$expressions = array();
$values = array();
foreach ($this->data['db_exps'] as $exp) {
    if (!isset($expressions[$exp['regexpid']])) {
        $values[$exp['regexpid']] = 1;
    } else {
        $values[$exp['regexpid']]++;
    }
    if (!isset($expressions[$exp['regexpid']])) {
        $expressions[$exp['regexpid']] = new CTable();
    }
    $expressions[$exp['regexpid']]->addRow(array($values[$exp['regexpid']], ' » ', $exp['expression'], ' [' . expression_type2str($exp['expression_type']) . ']'));
}
foreach ($this->data['regexps'] as $regexpid => $regexp) {
    $regExpTable->addRow(array(new CCheckBox('regexpids[' . $regexp['regexpid'] . ']', null, null, $regexp['regexpid']), $this->data['displayNodes'] ? $regexp['nodename'] : null, new CLink($regexp['name'], 'adm.regexps.php?form=update' . '&regexpid=' . $regexp['regexpid']), isset($expressions[$regexpid]) ? $expressions[$regexpid] : '-'));
}
$goBox = new CComboBox('go');
$goOption = new CComboItem('delete', _('Delete selected'));
$goOption->setAttribute('confirm', _('Delete selected regular expressions?'));
$goBox->addItem($goOption);
$goButton = new CSubmit('goButton', _('Go') . ' (0)');
$goButton->setAttribute('id', 'goButton');
zbx_add_post_js('chkbxRange.pageGoName = "regexpids";');
$regExpTable->setFooter(new CCol(array($goBox, $goButton)));
$regExpForm->addItem($regExpTable);
return $regExpForm;
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:administration.general.regularexpressions.list.php

示例2: CCol

        }
        array_pop($actionLinks);
    } else {
        $actionLinks = '-';
    }
    $actionColumn = new CCol($actionLinks);
    $actionColumn->setAttribute('style', 'white-space: normal;');
    $statusLink = 'media_types.php?go=' . ($mediaType['status'] == MEDIA_TYPE_STATUS_DISABLED ? 'activate' : 'disable') . '&mediatypeids' . SQUAREBRACKETS . '=' . $mediaType['mediatypeid'];
    $status = MEDIA_TYPE_STATUS_ACTIVE == $mediaType['status'] ? new CLink(_('Enabled'), $statusLink, 'enabled') : new CLink(_('Disabled'), $statusLink, 'disabled');
    // append row
    $mediaTypeTable->addRow(array(new CCheckBox('mediatypeids[' . $mediaType['mediatypeid'] . ']', null, null, $mediaType['mediatypeid']), $this->data['displayNodes'] ? $mediaType['nodename'] : null, new CLink($mediaType['description'], '?form=edit&mediatypeid=' . $mediaType['mediatypeid']), media_type2str($mediaType['typeid']), $status, $actionColumn, $details));
}
// create go button
$goComboBox = new CComboBox('go');
$goOption = new CComboItem('activate', _('Enable selected'));
$goOption->setAttribute('confirm', _('Enable selected media types?'));
$goComboBox->addItem($goOption);
$goOption = new CComboItem('disable', _('Disable selected'));
$goOption->setAttribute('confirm', _('Disable selected media types?'));
$goComboBox->addItem($goOption);
$goOption = new CComboItem('delete', _('Delete selected'));
$goOption->setAttribute('confirm', _('Delete selected media types?'));
$goComboBox->addItem($goOption);
$goButton = new CSubmit('goButton', _('Go') . ' (0)');
$goButton->setAttribute('id', 'goButton');
zbx_add_post_js('chkbxRange.pageGoName = "mediatypeids";');
// append table to form
$mediaTypeForm->addItem(array($this->data['paging'], $mediaTypeTable, $this->data['paging'], get_table_header(array($goComboBox, $goButton))));
// append form to widget
$mediaTypeWidget->addItem($mediaTypeForm);
return $mediaTypeWidget;
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:administration.mediatypes.list.php

示例3: CComboBox

        }
    }
    // PAGING FOOTER
    //		$table->addRow(new CCol($paging));
    //		$http_wdgt->addItem($paging);
    //---------
    //----- GO ------
    $goBox = new CComboBox('go');
    $goOption = new CComboItem('activate', S_ACTIVATE_SELECTED);
    $goOption->setAttribute('confirm', S_ENABLE_SELECTED_WEB_SCENARIOS_Q);
    $goBox->addItem($goOption);
    $goOption = new CComboItem('disable', S_DISABLE_SELECTED);
    $goOption->setAttribute('confirm', S_DISABLE_SELECTED_WEB_SCENARIOS_Q);
    $goBox->addItem($goOption);
    $goOption = new CComboItem('clean_history', S_CLEAR_HISTORY_FOR_SELECTED);
    $goOption->setAttribute('confirm', S_DELETE_HISTORY_SELECTED_WEB_SCENARIOS_Q);
    $goBox->addItem($goOption);
    $goOption = new CComboItem('delete', S_DELETE_SELECTED);
    $goOption->setAttribute('confirm', S_DELETE_SELECTED_WEB_SCENARIOS_Q);
    $goBox->addItem($goOption);
    // goButton name is necessary!!!
    $goButton = new CButton('goButton', S_GO . ' (0)');
    $goButton->setAttribute('id', 'goButton');
    zbx_add_post_js('chkbxRange.pageGoName = "group_httptestid";');
    $table->setFooter(new CCol(array($goBox, $goButton)));
    //----
    $form->addItem($table);
    $http_wdgt->addItem($form);
}
$http_wdgt->show();
include_once 'include/page_footer.php';
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:httpconf.php

示例4: CTableInfo

// create table
$maintenanceTable = new CTableInfo(_('No maintenance periods found.'));
$maintenanceTable->setHeader(array(new CCheckBox('all_maintenances', null, "checkAll('" . $maintenanceForm->getName() . "', 'all_maintenances', 'maintenanceids');"), $this->data['displayNodes'] ? _('Node') : null, make_sorting_header(_('Name'), 'name'), make_sorting_header(_('Type'), 'maintenance_type'), _('State'), _('Description')));
foreach ($this->data['maintenances'] as $maintenance) {
    $maintenanceid = $maintenance['maintenanceid'];
    switch ($maintenance['status']) {
        case MAINTENANCE_STATUS_EXPIRED:
            $maintenanceStatus = new CSpan(_x('Expired', 'maintenance status'), 'red');
            break;
        case MAINTENANCE_STATUS_APPROACH:
            $maintenanceStatus = new CSpan(_x('Approaching', 'maintenance status'), 'blue');
            break;
        case MAINTENANCE_STATUS_ACTIVE:
            $maintenanceStatus = new CSpan(_x('Active', 'maintenance status'), 'green');
            break;
    }
    $maintenanceTable->addRow(array(new CCheckBox('maintenanceids[' . $maintenanceid . ']', null, null, $maintenanceid), $this->data['displayNodes'] ? $maintenance['nodename'] : null, new CLink($maintenance['name'], 'maintenance.php?form=update&maintenanceid=' . $maintenanceid), $maintenance['maintenance_type'] ? _('No data collection') : _('With data collection'), $maintenanceStatus, $maintenance['description']));
}
// create go button
$goComboBox = new CComboBox('go');
$goOption = new CComboItem('delete', _('Delete selected'));
$goOption->setAttribute('confirm', _('Delete selected maintenance periods?'));
$goComboBox->addItem($goOption);
$goButton = new CSubmit('goButton', _('Go') . ' (0)');
$goButton->setAttribute('id', 'goButton');
zbx_add_post_js('chkbxRange.pageGoName = "maintenanceids";');
// append table to form
$maintenanceForm->addItem(array($this->data['paging'], $maintenanceTable, $this->data['paging'], get_table_header(array($goComboBox, $goButton))));
// append form to widget
$maintenanceWidget->addItem($maintenanceForm);
return $maintenanceWidget;
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:configuration.maintenance.list.php

示例5: CForm

$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?'));
$goComboBox->addItem($goOption);
$goOption = new CComboItem('drule.massdelete', _('Delete selected'));
$goOption->setAttribute('confirm', _('Delete selected discovery rules?'));
$goComboBox->addItem($goOption);
$goButton = new CSubmit('goButton', _('Go') . ' (0)');
$goButton->setAttribute('id', 'goButton');
zbx_add_post_js('chkbxRange.pageGoName = "g_druleid";');
// append table to form
$discoveryForm->addItem(array($this->data['paging'], $discoveryTable, $this->data['paging'], get_table_header(array($goComboBox, $goButton))));
// append form to widget
$discoveryWidget->addItem($discoveryForm);
return $discoveryWidget;
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:configuration.discovery.list.php

示例6: CForm

}
$screenWidget->addPageHeader(_('CONFIGURATION OF SCREENS'), $createForm);
// header
$screenWidget->addHeader(_('Screens'));
$screenWidget->addHeaderRowNumber();
// create form
$screenForm = new CForm();
$screenForm->setName('screenForm');
$screenForm->addVar('templateid', $this->data['templateid']);
// create table
$screenTable = new CTableInfo(_('No screens found.'));
$screenTable->setHeader(array(new CCheckBox('all_screens', null, "checkAll('" . $screenForm->getName() . "', 'all_screens', 'screens');"), make_sorting_header(_('Name'), 'name', $this->data['sort'], $this->data['sortorder']), _('Dimension (cols x rows)'), _('Screen')));
foreach ($this->data['screens'] as $screen) {
    $screenTable->addRow(array(new CCheckBox('screens[' . $screen['screenid'] . ']', null, null, $screen['screenid']), new CLink($screen['name'], 'screenedit.php?screenid=' . $screen['screenid'] . url_param('templateid')), $screen['hsize'] . ' x ' . $screen['vsize'], new CLink(_('Edit'), '?form=update&screenid=' . $screen['screenid'] . url_param('templateid'))));
}
// create go button
$goComboBox = new CComboBox('action');
if (empty($this->data['templateid'])) {
    $goComboBox->addItem('screen.export', _('Export selected'));
}
$goOption = new CComboItem('screen.massdelete', _('Delete selected'));
$goOption->setAttribute('confirm', _('Delete selected screens?'));
$goComboBox->addItem($goOption);
$goButton = new CSubmit('goButton', _('Go') . ' (0)');
$goButton->setAttribute('id', 'goButton');
zbx_add_post_js('chkbxRange.pageGoName = "screens";');
// append table to form
$screenForm->addItem(array($this->data['paging'], $screenTable, $this->data['paging'], get_table_header(array($goComboBox, $goButton))));
// append form to widget
$screenWidget->addItem($screenForm);
return $screenWidget;
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:configuration.screen.list.php

示例7: CSpan

        $name[] = new CSpan($graph['name']);
        $isCheckboxEnabled = false;
    } else {
        $name[] = new CLink($graph['name'], 'graphs.php?' . 'form=update' . '&graphid=' . $graphid . url_param('parent_discoveryid') . '&hostid=' . $this->data['hostid']);
    }
    $checkBox = new CCheckBox('group_graphid[' . $graphid . ']', null, null, $graphid);
    $checkBox->setEnabled($isCheckboxEnabled);
    $graphTable->addRow(array($checkBox, $this->data['displayNodes'] ? $graph['nodename'] : null, $hostList, $name, $graph['width'], $graph['height'], $graph['graphtype']));
}
// create go buttons
$goComboBox = new CComboBox('go');
if (!$this->data['parent_discoveryid']) {
    $goComboBox->addItem('copy_to', _('Copy selected to ...'));
}
$goOption = new CComboItem('delete', _('Delete selected'));
$goOption->setAttribute('confirm', $this->data['parent_discoveryid'] ? _('Delete selected graph prototypes?') : _('Delete selected graphs?'));
$goComboBox->addItem($goOption);
$goButton = new CSubmit('goButton', _('Go') . ' (0)');
$goButton->attr('id', 'goButton');
zbx_add_post_js('chkbxRange.pageGoName = "group_graphid";');
if ($this->data['parent_discoveryid']) {
    zbx_add_post_js('chkbxRange.prefix = "' . $this->data['parent_discoveryid'] . '";');
    zbx_add_post_js('cookie.prefix = "' . $this->data['parent_discoveryid'] . '";');
} else {
    zbx_add_post_js('chkbxRange.prefix = "' . $this->data['hostid'] . '";');
    zbx_add_post_js('cookie.prefix = "' . $this->data['hostid'] . '";');
}
// append table to form
$graphForm->addItem(array($this->data['paging'], $graphTable, $this->data['paging'], get_table_header(array($goComboBox, $goButton))));
// append form to widget
$graphWidget->addItem($graphForm);
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:configuration.graph.list.php

示例8: CComboBox

            }
            //----- GO ------
            $goBox = new CComboBox('go');
            $goOption = new CComboItem('activate', S_ACTIVATE_SELECTED);
            $goOption->setAttribute('confirm', S_ENABLE_SELECTED_TRIGGERS_Q);
            $goBox->addItem($goOption);
            $goOption = new CComboItem('disable', S_DISABLE_SELECTED);
            $goOption->setAttribute('confirm', S_DISABLE_SELECTED_TRIGGERS_Q);
            $goBox->addItem($goOption);
            $goOption = new CComboItem('massupdate', S_MASS_UPDATE);
            //$goOption->setAttribute('confirm',S_MASS_UPDATE_SELECTED_TRIGGERS_Q);
            $goBox->addItem($goOption);
            $goOption = new CComboItem('copy_to', S_COPY_SELECTED_TO);
            //$goOption->setAttribute('confirm',S_COPY_SELECTED_TRIGGERS_Q);
            $goBox->addItem($goOption);
            $goOption = new CComboItem('delete', S_DELETE_SELECTED);
            $goOption->setAttribute('confirm', S_DELETE_SELECTED_TRIGGERS_Q);
            $goBox->addItem($goOption);
            // goButton name is necessary!!!
            $goButton = new CButton('goButton', S_GO);
            $goButton->setAttribute('id', 'goButton');
            zbx_add_post_js('chkbxRange.pageGoName = "g_triggerid";');
            $footer = get_table_header(array($goBox, $goButton));
            $table = array($paging, $table, $paging, $footer);
            $form->addItem($table);
            $triggers_wdgt->addItem($form);
        }
    }
}
$triggers_wdgt->show();
include_once 'include/page_footer.php';
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:triggers.php

示例9: CLink

            $name[] = ', ';
        }
        array_pop($name);
        $name[] = NAME_DELIMITER;
        $name[] = $application['name'];
    } else {
        $name = new CLink($application['name'], 'applications.php?' . 'form=update' . '&applicationid=' . $application['applicationid'] . '&hostid=' . $application['hostid'] . '&groupid=' . $this->data['groupid']);
    }
    $applicationTable->addRow(array(new CCheckBox('applications[' . $application['applicationid'] . ']', null, null, $application['applicationid']), $this->data['displayNodes'] ? $application['nodename'] : null, $this->data['hostid'] > 0 ? null : $application['host'], $name, array(new CLink(_('Items'), 'items.php?' . 'hostid=' . $application['hostid'] . '&filter_set=1' . '&filter_application=' . urlencode($application['name'])), SPACE . '(' . count($application['items']) . ')')));
}
// create go buttons
$goComboBox = new CComboBox('go');
$goOption = new CComboItem('activate', _('Enable selected'));
$goOption->setAttribute('confirm', _('Enable selected applications?'));
$goComboBox->addItem($goOption);
$goOption = new CComboItem('disable', _('Disable selected'));
$goOption->setAttribute('confirm', _('Disable selected applications?'));
$goComboBox->addItem($goOption);
$goOption = new CComboItem('delete', _('Delete selected'));
$goOption->setAttribute('confirm', _('Delete selected applications?'));
$goComboBox->addItem($goOption);
$goButton = new CSubmit('goButton', _('Go') . ' (0)');
$goButton->setAttribute('id', 'goButton');
zbx_add_post_js('chkbxRange.pageGoName = "applications";');
zbx_add_post_js('chkbxRange.prefix = "' . $this->data['hostid'] . '";');
zbx_add_post_js('cookie.prefix = "' . $this->data['hostid'] . '";');
// append table to form
$applicationForm->addItem(array($this->data['paging'], $applicationTable, $this->data['paging'], get_table_header(array($goComboBox, $goButton))));
// append form to widget
$applicationWidget->addItem($applicationForm);
return $applicationWidget;
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:configuration.application.list.php

示例10: array

    $slides_arr = array();
    while ($slide_data = DBfetch($db_slides)) {
        $slides_arr[] = $slide_data;
    }
    // getting paging element
    $paging = getPagingLine($slides_arr);
    foreach ($slides_arr as $slide_data) {
        if (!slideshow_accessible($slide_data['slideshowid'], PERM_READ_WRITE)) {
            continue;
        }
        $table->addRow(array(new CCheckBox('shows[' . $slide_data['slideshowid'] . ']', NULL, NULL, $slide_data['slideshowid']), new CLink($slide_data['name'], '?config=1&form=update&slideshowid=' . $slide_data['slideshowid'], 'action'), $slide_data['delay'], $slide_data['cnt']));
    }
    // adding paging to widget
    $table->addRow(new CCol($paging));
    $slide_wdgt->addItem($paging);
    // goBox
    $goBox = new CComboBox('go');
    $goOption = new CComboItem('delete', S_DELETE_SELECTED);
    $goOption->setAttribute('confirm', S_DELETE_SELECTED_SLIDESHOWS_Q);
    $goBox->addItem($goOption);
    // goButton name is necessary!!!
    $goButton = new CButton('goButton', S_GO);
    $goButton->setAttribute('id', 'goButton');
    zbx_add_post_js('chkbxRange.pageGoName = "shows";');
    $table->setFooter(new CCol(array($goBox, $goButton)));
    //---------
    $form->addItem($table);
    $slide_wdgt->addItem($form);
}
$slide_wdgt->show();
include_once 'include/page_footer.php';
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:slideconf.php

示例11: CLink

                $name[] = new CLink($real_host['host'], 'graphs.php?' . 'hostid=' . $real_host['hostid'], 'unknown');
                $name[] = ':' . $graph['name'];
            } else {
                $name[] = new CLink($graph['name'], 'graphs.php?graphid=' . $graphid . '&form=update');
            }
            $chkBox = new CCheckBox('group_graphid[' . $graphid . ']', NULL, NULL, $graphid);
            if ($graph['templateid'] > 0) {
                $chkBox->setEnabled(false);
            }
            $table->addRow(array($chkBox, $host_list, $name, $graph['width'], $graph['height'], $graph['graphtype']));
        }
        //----- GO ------
        $goBox = new CComboBox('go');
        $goBox->addItem('copy_to', S_COPY_SELECTED_TO);
        $goOption = new CComboItem('delete', S_DELETE_SELECTED);
        $goOption->setAttribute('confirm', S_DELETE_SELECTED_GRAPHS);
        $goBox->addItem($goOption);
        // goButton name is necessary!!!
        $goButton = new CButton('goButton', S_GO);
        $goButton->setAttribute('id', 'goButton');
        zbx_add_post_js('chkbxRange.pageGoName = "group_graphid";');
        $footer = get_table_header(new CCol(array($goBox, $goButton)));
        //----
        // PAGING FOOTER
        $table = array($paging, $table, $paging, $footer);
        //---------
        $form->addItem($table);
        $graphs_wdgt->addItem($form);
        $graphs_wdgt->show();
    }
}
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:graphs.php

示例12: CCheckBox

        }
        array_pop($hosts_output);
        $hostCount = $groupCounts[$group['groupid']]['hosts'];
        $templateCount = $groupCounts[$group['groupid']]['templates'];
        $table->addRow(array(new CCheckBox('groups[' . $group['groupid'] . ']', NULL, NULL, $group['groupid']), new CLink($group['name'], 'hostgroups.php?form=update&groupid=' . $group['groupid']), array(array(new CLink(S_TEMPLATES, 'templates.php?groupid=' . $group['groupid'], 'unknown'), ' (' . $templateCount . ')'), BR(), array(new CLink(S_HOSTS, 'hosts.php?groupid=' . $group['groupid']), ' (' . $hostCount . ')')), new CCol(empty($hosts_output) ? '-' : $hosts_output, 'wraptext')));
    }
    //----- GO ------
    $goBox = new CComboBox('go');
    $goOption = new CComboItem('activate', S_ACTIVATE_SELECTED_HOSTS);
    $goOption->setAttribute('confirm', S_ENABLE_SELECTED_HOST_GROUPS);
    $goBox->addItem($goOption);
    $goOption = new CComboItem('disable', S_DISABLE_SELECTED_HOSTS);
    $goOption->setAttribute('confirm', S_DISABLE_SELECTED_HOST_GROUPS);
    $goBox->addItem($goOption);
    $goOption = new CComboItem('delete', S_DELETE_SELECTED_GROUPS);
    $goOption->setAttribute('confirm', S_DELETE_SELECTED_HOST_GROUPS);
    $goBox->addItem($goOption);
    // goButton name is necessary!!!
    $goButton = new CButton('goButton', S_GO);
    $goButton->setAttribute('id', 'goButton');
    zbx_add_post_js('chkbxRange.pageGoName = "groups";');
    $footer = get_table_header(array($goBox, $goButton));
    //----
    // PAGING FOOTER
    $table = array($paging, $table, $paging, $footer);
    //---------
    $form->addItem($table);
    $groups_wdgt->addItem($form);
}
$groups_wdgt->show();
include_once 'include/page_footer.php';
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:hostgroups.php

示例13: CLink

                    break;
            }
            $linked_to_output[] = new CLink($linked_to_host['host'], $url, $style);
            $linked_to_output[] = ', ';
        }
        array_pop($linked_to_output);
        $table->addRow(array(new CCheckBox('templates[' . $template['templateid'] . ']', NULL, NULL, $template['templateid']), $templates_output, $applications, $items, $triggers, $graphs, empty($linked_templates_output) ? '-' : new CCol($linked_templates_output, 'wraptext'), empty($linked_to_output) ? '-' : new CCol($linked_to_output, 'wraptext')));
    }
    // GO{
    $goBox = new CComboBox('go');
    $goBox->addItem('export', S_EXPORT_SELECTED);
    $goOption = new CComboItem('delete', S_DELETE_SELECTED);
    $goOption->setAttribute('confirm', S_DELETE_SELECTED_TEMPLATES_Q);
    $goBox->addItem($goOption);
    $goOption = new CComboItem('delete_and_clear', S_DELETE_SELECTED_WITH_LINKED_ELEMENTS);
    $goOption->setAttribute('confirm', S_WARNING_THIS_DELETE_TEMPLATES_AND_CLEAR);
    $goBox->addItem($goOption);
    // goButton name is necessary!!!
    $goButton = new CButton('goButton', S_GO);
    $goButton->setAttribute('id', 'goButton');
    zbx_add_post_js('chkbxRange.pageGoName = "templates";');
    $footer = get_table_header(new CCol(array($goBox, $goButton)));
    // }GO
    // PAGING FOOTER
    $table = array($paging, $table, $paging, $footer);
    //---------
    $form->addItem($table);
    $template_wdgt->addItem($form);
}
$template_wdgt->show();
include_once 'include/page_footer.php';
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:templates.php

示例14: foreach

        order_result($action['operations'], 'operationtype', ZBX_SORT_DOWN);
        foreach ($action['operations'] as $onum => $operation) {
            $operations[] = array(get_operation_desc(SHORT_DESCRITION, $operation), BR());
        }
        if ($action['status'] == ACTION_STATUS_DISABLED) {
            $status = new CLink(S_DISABLED, 'actionconf.php?go=activate&g_actionid%5B%5D=' . $action['actionid'] . url_param('eventsource'), 'disabled');
        } else {
            $status = new CLink(S_ENABLED, 'actionconf.php?go=disable&g_actionid%5B%5D=' . $action['actionid'] . url_param('eventsource'), 'enabled');
        }
        $tblActions->addRow(array(new CCheckBox('g_actionid[' . $action['actionid'] . ']', null, null, $action['actionid']), new CLink($action['name'], 'actionconf.php?form=update&actionid=' . $action['actionid']), $conditions, $operations, $status));
    }
    //----- GO ------
    $goBox = new CComboBox('go');
    $goOption = new CComboItem('activate', S_ENABLE_SELECTED);
    $goOption->setAttribute('confirm', S_ENABLE . ' ' . S_SELECTED_ACTIONS);
    $goBox->addItem($goOption);
    $goOption = new CComboItem('disable', S_DISABLE_SELECTED);
    $goOption->setAttribute('confirm', S_DISABLE . ' ' . S_SELECTED_ACTIONS);
    $goBox->addItem($goOption);
    $goOption = new CComboItem('delete', S_DELETE_SELECTED);
    $goOption->setAttribute('confirm', S_DELETE . ' ' . S_SELECTED_ACTIONS);
    $goBox->addItem($goOption);
    $goButton = new CButton('goButton', S_GO);
    $goButton->setAttribute('id', 'goButton');
    zbx_add_post_js('chkbxRange.pageGoName = "g_actionid";');
    $footer = get_table_header(array($goBox, $goButton));
    $form->addItem(array($paging, $tblActions, $paging, $footer));
    $action_wdgt->addItem($form);
}
$action_wdgt->show();
include_once 'include/page_footer.php';
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:actionconf.php

示例15: CLink

                    $style = 'unknown';
                    $url = 'templates.php?form=update&templateid=' . $linkedToHost['objectid'];
                    break;
                default:
                    $style = null;
                    $url = 'hosts.php?form=update&hostid=' . $linkedToHost['objectid'] . '&groupid=' . $_REQUEST['groupid'];
            }
            if ($linkedToOutput) {
                $linkedToOutput[] = ', ';
            }
            $linkedToOutput[] = new CLink($linkedToHost['name'], $url, $style);
        }
        $table->addRow(array(new CCheckBox('templates[' . $template['templateid'] . ']', null, null, $template['templateid']), $templatesOutput, $applications, $items, $triggers, $graphs, $screens, $discoveries, $httpTests, $linkedTemplatesOutput ? new CCol($linkedTemplatesOutput, 'wraptext') : '-', $linkedToOutput ? new CCol($linkedToOutput, 'wraptext') : '-'));
    }
    $goBox = new CComboBox('action');
    $goBox->addItem('template.export', _('Export selected'));
    $goOption = new CComboItem('template.massdelete', _('Delete selected'));
    $goOption->setAttribute('confirm', _('Delete selected templates?'));
    $goBox->addItem($goOption);
    $goOption = new CComboItem('template.massdeleteclear', _('Delete selected with linked elements'));
    $goOption->setAttribute('confirm', _('Delete and clear selected templates? (Warning: all linked hosts will be cleared!)'));
    $goBox->addItem($goOption);
    $goButton = new CSubmit('goButton', _('Go') . ' (0)');
    $goButton->setAttribute('id', 'goButton');
    zbx_add_post_js('chkbxRange.pageGoName = "templates";');
    $footer = get_table_header(array($goBox, $goButton));
    $form->addItem(array($paging, $table, $paging, $footer));
    $templateWidget->addItem($form);
}
$templateWidget->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:templates.php


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