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


PHP CForm::additem方法代码示例

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


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

示例1: CCol

        $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;
        $dataTable = getTriggersOverview(array_keys($this->data['pageFilter']->hosts), $this->data['pageFilter']->application, $page['file'], $this->data['view_style']);
    }
} else {
    $dataTable = new CTableInfo(_('No items found.'));
}
$overviewWidget->addItem($dataTable);
return $overviewWidget;
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:monitoring.overview.php

示例2: CCol

    if (isset($_REQUEST['new_operation'])) {
        $right_tab->addRow(create_hat(S_EDIT_OPERATION, get_act_new_oper_form($action), null, 'hat_new_oper'));
    }
    if (isset($_REQUEST['new_opcondition'])) {
        $right_tab->addRow(create_hat(S_NEW . SPACE . S_OPERATION_CONDITION, get_oper_new_cond_form($action), null, 'hat_new_oper_cond'));
    }
    $td_l = new CCol($left_tab);
    $td_l->setAttribute('valign', 'top');
    $td_r = new CCol($right_tab);
    $td_r->setAttribute('valign', 'top');
    $outer_table = new CTable();
    $outer_table->setAttribute('border', 0);
    $outer_table->setCellPadding(1);
    $outer_table->setCellSpacing(1);
    $outer_table->addRow(array($td_l, $td_r));
    $frmAction->additem($outer_table);
    show_messages();
    $frmAction->Show();
    //*/
} else {
    $form = new CForm();
    $form->setMethod('get');
    $cmbSource = new CComboBox('eventsource', $_REQUEST['eventsource'], 'submit()');
    $cmbSource->addItem(EVENT_SOURCE_TRIGGERS, S_TRIGGERS);
    $cmbSource->addItem(EVENT_SOURCE_DISCOVERY, S_DISCOVERY);
    $form->addItem(array(S_EVENT_SOURCE, SPACE, $cmbSource));
    $row_count = 0;
    $numrows = new CSpan(null, 'info');
    $numrows->setAttribute('name', 'numrows');
    $header = get_table_header(array(S_ACTIONS_BIG, new CSpan(SPACE . SPACE . '|' . SPACE . SPACE, 'divider'), S_FOUND . ': ', $numrows));
    show_table_header($header, $form);
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:actionconf.php

示例3: array

        $groupids = get_request('groupids', array());
    }
    $group_tb = new CTweenBox($frmMaintenance, 'groupids', $groupids, 10);
    foreach ($all_groups as $group) {
        $group_tb->addItem($group['groupid'], $group['name']);
    }
    $tblGlink->addRow($group_tb->Get(S_IN . SPACE . S_MAINTENANCE, S_OTHER . SPACE . S_GROUPS));
    $right_tab->addRow(new CFormElement(S_GROUPS_IN_MAINTENANCE, $tblGlink));
    // }}} MAINTENANCE GROUPS
    $td_l = new CCol($left_tab);
    $td_l->setAttribute('valign', 'top');
    $td_r = new CCol($right_tab);
    $td_r->setAttribute('valign', 'top');
    $outer_table = new CTable();
    $outer_table->addRow(array($td_l, $td_r));
    $frmMaintenance->additem($outer_table);
    show_messages();
    $maintenance_wdgt->addItem($frmMaintenance);
} else {
    // Table HEADER
    $form = new CForm(null, 'get');
    $form->addItem(array(S_GROUP . SPACE, $pageFilter->getGroupsCB()));
    $numrows = new CDiv();
    $numrows->setAttribute('name', 'numrows');
    $maintenance_wdgt->addHeader(S_MAINTENANCE_PERIODS_BIG, $form);
    $maintenance_wdgt->addHeader($numrows);
    // ----
    $sortfield = getPageSortField('name');
    $sortorder = getPageSortOrder();
    $options = array('extendoutput' => 1, 'editable' => 1, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'limit' => $config['search_limit'] + 1);
    if ($pageFilter->groupsSelected) {
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:maintenance.php

示例4: CWidget

$help->setHint($help_table);
$over_wdgt = new CWidget();
// Header
$url = 'overview.php?fullscreen=' . ($_REQUEST['fullscreen'] ? '0' : '1');
$fs_icon = new CDiv(SPACE, 'fullscreen');
$fs_icon->setAttribute('title', $_REQUEST['fullscreen'] ? S_NORMAL . ' ' . S_VIEW : S_FULLSCREEN);
$fs_icon->addAction('onclick', new CScript("javascript: document.location = '" . $url . "';"));
$over_wdgt->addHeader(S_OVERVIEW_BIG, array($fs_icon, $help));
// 2nd heder
$form_l = new CForm();
$form_l->setMethod('get');
$form_l->addVar('groupid', $_REQUEST['groupid']);
$cmbStyle = new CComboBox('view_style', $_REQUEST['view_style'], 'submit()');
$cmbStyle->addItem(STYLE_TOP, S_TOP);
$cmbStyle->addItem(STYLE_LEFT, S_LEFT);
$form_l->additem(array(S_HOSTS_LOCATION . SPACE, $cmbStyle));
$over_wdgt->addHeader($form_l, $form);
//	show_table_header(S_OVERVIEW_BIG,$form);
//-------------
if ($_REQUEST['type'] == SHOW_DATA) {
    COpt::profiling_start('get_items_data_overview');
    $table = get_items_data_overview($PAGE_HOSTS['hostids'], $_REQUEST['view_style']);
    COpt::profiling_stop('get_items_data_overview');
} else {
    if ($_REQUEST['type'] == SHOW_TRIGGERS) {
        COpt::profiling_start('get_triggers_overview');
        $table = get_triggers_overview($PAGE_HOSTS['hostids'], $_REQUEST['view_style']);
        COpt::profiling_stop('get_triggers_overview');
    }
}
$over_wdgt->addItem($table);
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:overview.php

示例5: CCol

     $right_tab->setCellSpacing(3);
     $right_tab->setAttribute('border', 0);
     $right_tab->addRow(create_hat(S_EXPRESSIONS, get_expressions_tab(), null, 'hat_expressions'));
     if (isset($_REQUEST['new_expression'])) {
         $right_tab->addRow(create_hat(S_NEW_EXPRESSION, get_expression_form(), null, 'hat_new_expression'));
     }
     $td_l = new CCol($left_tab);
     $td_l->setAttribute('valign', 'top');
     $td_r = new CCol($right_tab);
     $td_r->setAttribute('valign', 'top');
     $outer_table = new CTable();
     $outer_table->setAttribute('border', 0);
     $outer_table->setCellPadding(1);
     $outer_table->setCellSpacing(1);
     $outer_table->addRow(array($td_l, $td_r));
     $frmRegExp->additem($outer_table);
     show_messages();
     $cnf_wdgt->addItem($frmRegExp);
 } else {
     $cnf_wdgt->addItem(BR());
     $cnf_wdgt->addHeader(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)) {
         $regexp['expressions'] = array();
         $regexps[$regexp['regexpid']] = $regexp;
         $regexpids[$regexp['regexpid']] = $regexp['regexpid'];
     }
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:config.php


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