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


PHP CComboBox类代码示例

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


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

示例1: newComboFilterArray

function newComboFilterArray($array, $name, $value)
{
    $cmbRange = new CComboBox($name, $value, 'javascript: submit();');
    $cmbRange->additem('', 'Selecione...');
    foreach ($array as $k => $v) {
        $cmbRange->additem($k, $v);
    }
    return $cmbRange;
}
开发者ID:zubayr,项目名称:zabbix-extras,代码行数:9,代码来源:zbxe_visual_imp.php

示例2: newComboAPI

function newComboAPI($Data, $keyField, $showField, $selected_value, $name, $reloadScript = 'javascript: submit();', $fristBlank = true)
{
    $cmbRange = new CComboBox($name, $selected_value, $reloadScript);
    if ($fristBlank == true) {
        $cmbRange->additem("0", "");
    }
    for ($i = 0; $i < count($Data); $i++) {
        $cmbRange->additem($Data[$i][$keyField], $Data[$i][$showField]);
    }
    return $cmbRange;
}
开发者ID:zubayr,项目名称:zabbix-extras,代码行数:11,代码来源:zbxe-ir.php

示例3: make_operation_box_footer

function make_operation_box_footer($hostids, $form_name)
{
    $box = new CComboBox("script");
    $hostScripts = API::Script()->getScriptsByHosts($hostids);
    $scripts = array();
    foreach ($hostScripts as $hostid => $hscripts) {
        foreach ($hscripts as $script) {
            if (!in_array($script, $scripts) && check_script($form_name, $script['name'])) {
                array_push($scripts, $script);
            }
        }
    }
    foreach ($scripts as $script) {
        $option = new CComboItem($script['scriptid'], $script['name']);
        $box->addItem($option);
    }
    $button = new CButton('execute', _('Execute'), "return executeScriptOnMultipleHosts('{$form_name}', 'script', 'hostids[]', 'Execute');");
    $button->setAttribute('id', 'executeButton');
    return array($box, $button);
}
开发者ID:sogaoh,项目名称:hyclops,代码行数:20,代码来源:additional_blocks_func.inc.php

示例4: md5

        if (isset($macrosData[$exprPart['expression']])) {
            continue;
        }
        $fname = 'test_data_' . md5($exprPart['expression']);
        $macrosData[$exprPart['expression']] = get_request($fname, '');
        $info = get_item_function_info($exprPart['expression']);
        if (!is_array($info) && isset($definedErrorPhrases[$info])) {
            $allowedTesting = false;
            $control = new CTextBox($fname, $macrosData[$exprPart['expression']], 30);
            $control->setAttribute('disabled', 'disabled');
        } else {
            $octet = $info['value_type'] == 'HHMMSS';
            $validation = $info['validation'];
            if (substr($validation, 0, COMBO_PATTERN_LENGTH) == COMBO_PATTERN) {
                $vals = explode(',', substr($validation, COMBO_PATTERN_LENGTH, zbx_strlen($validation) - COMBO_PATTERN_LENGTH - 4));
                $control = new CComboBox($fname, $macrosData[$exprPart['expression']]);
                foreach ($vals as $v) {
                    $control->addItem($v, $v);
                }
            } else {
                $control = new CTextBox($fname, $macrosData[$exprPart['expression']], 30);
            }
            $fields[$fname] = array($info['type'], O_OPT, null, $validation, 'isset({test_expression})', $exprPart['expression']);
        }
        $data_table->addRow(new CRow(array($exprPart['expression'], is_array($info) || !isset($definedErrorPhrases[$info]) ? $info['value_type'] : new CCol($definedErrorPhrases[$info], 'disaster'), $control)));
    }
}
//---------------------------------- CHECKS ------------------------------------
$fields['test_expression'] = array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null);
if (!check_fields($fields)) {
    $test = false;
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:tr_testexpr.php

示例5: dirname

**/
require_once dirname(__FILE__) . '/include/config.inc.php';
$page['title'] = _('Configuration of trigger displaying options');
$page['file'] = 'adm.triggerdisplayoptions.php';
$page['hist_arg'] = array();
require_once dirname(__FILE__) . '/include/page_header.php';
$fields = array('problem_unack_color' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'problem_ack_color' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'ok_unack_color' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'ok_ack_color' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'problem_unack_style' => array(T_ZBX_INT, O_OPT, null, IN('1'), null), 'problem_ack_style' => array(T_ZBX_INT, O_OPT, null, IN('1'), null), 'ok_unack_style' => array(T_ZBX_INT, O_OPT, null, IN('1'), null), 'ok_ack_style' => array(T_ZBX_INT, O_OPT, null, IN('1'), null), 'ok_period' => array(T_ZBX_INT, O_OPT, null, null, 'isset({save})'), 'blink_period' => array(T_ZBX_INT, O_OPT, null, null, 'isset({save})'), 'save' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), 'form' => array(T_ZBX_STR, O_OPT, P_SYS, null, null), 'form_refresh' => array(T_ZBX_INT, O_OPT, null, null, null));
check_fields($fields);
if (isset($_REQUEST['save'])) {
    $configs = array('ok_period' => get_request('ok_period'), 'blink_period' => get_request('blink_period'), 'problem_unack_color' => get_request('problem_unack_color'), 'problem_ack_color' => get_request('problem_ack_color'), 'ok_unack_color' => get_request('ok_unack_color'), 'ok_ack_color' => get_request('ok_ack_color'), 'problem_unack_style' => get_request('problem_unack_style', 0), 'problem_ack_style' => get_request('problem_ack_style', 0), 'ok_unack_style' => get_request('ok_unack_style', 0), 'ok_ack_style' => get_request('ok_ack_style', 0));
    $result = update_config($configs);
    show_messages($result, _('Configuration updated'), _('Cannot update configuration'));
}
$form = new CForm();
$form->cleanItems();
$cmbConf = new CComboBox('configDropDown', 'adm.triggerdisplayoptions.php', 'redirect(this.options[this.selectedIndex].value);');
$cmbConf->addItems(array('adm.gui.php' => _('GUI'), 'adm.housekeeper.php' => _('Housekeeping'), 'adm.images.php' => _('Images'), 'adm.iconmapping.php' => _('Icon mapping'), 'adm.regexps.php' => _('Regular expressions'), 'adm.macros.php' => _('Macros'), 'adm.valuemapping.php' => _('Value mapping'), 'adm.workingtime.php' => _('Working time'), 'adm.triggerseverities.php' => _('Trigger severities'), 'adm.triggerdisplayoptions.php' => _('Trigger displaying options'), 'adm.other.php' => _('Other')));
$form->addItem($cmbConf);
$cnf_wdgt = new CWidget();
$cnf_wdgt->addPageHeader(_('CONFIGURATION OF ZABBIX'), $form);
$data = array();
$data['form_refresh'] = get_request('form_refresh', 0);
// form has been submitted
if ($data['form_refresh']) {
    $data['ok_period'] = get_request('ok_period');
    $data['blink_period'] = get_request('blink_period');
    $data['problem_unack_color'] = get_request('problem_unack_color');
    $data['problem_ack_color'] = get_request('problem_ack_color');
    $data['ok_unack_color'] = get_request('ok_unack_color');
    $data['ok_ack_color'] = get_request('ok_ack_color');
    $data['problem_unack_style'] = get_request('problem_unack_style');
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:adm.triggerdisplayoptions.php

示例6: CCol

            $ack_cb_col = new CCol($ack_cb);
            $ack_cb_col->setColSpan(2);
            $row = new CRow(array(SPACE, $config['event_ack_enable'] ? $ack_cb_col : null, $status, $clock, zbx_date2age($row_event['clock']), zbx_date2age($next_clock, $row_event['clock']), $config['event_ack_enable'] ? $ack : NULL, is_show_all_nodes() ? SPACE : null, $empty_col), 'odd_row');
            $row->setAttribute('data-parentid', $trigger['triggerid']);
            $row->addStyle('display: none;');
            $table->addRow($row);
            if ($i > $config['event_show_max']) {
                break;
            }
        }
    }
}
//----- GO ------
$footer = null;
if ($config['event_ack_enable']) {
    $goBox = new CComboBox('go');
    $goBox->addItem('bulkacknowledge', S_BULK_ACKNOWLEDGE);
    // goButton name is necessary!!!
    $goButton = new CButton('goButton', S_GO . ' (0)');
    $goButton->setAttribute('id', 'goButton');
    $show_event_col ? zbx_add_post_js('chkbxRange.pageGoName = "events";') : zbx_add_post_js('chkbxRange.pageGoName = "triggers";');
    $footer = get_table_header(array($goBox, $goButton));
}
//----
$table = array($paging, $table, $paging, $footer);
$m_form->addItem($table);
$trigg_wdgt->addItem($m_form);
$trigg_wdgt->show();
zbx_add_post_js('blink.init();');
zbx_add_post_js("var switcher = new CSwitcher('{$switcherName}');");
$jsmenu = new CPUMenu(null, 170);
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:tr_status.php

示例7: CLink

                default:
                    $style = null;
                    $url = 'hosts.php?form=update&hostid=' . $hostid . '&groupid=' . $groupid;
                    break;
            }
            $hosts_output[] = new CLink($host['host'], $url, $style);
            $hosts_output[] = ', ';
        }
        array_pop($hosts_output);
        foreach ($group['hosts'] as $hostid => $host) {
            $host['status'] == HOST_STATUS_TEMPLATE ? $tpl_count++ : $host_count++;
        }
        $table->addRow(array(new CCheckBox('groups[' . $groupid . ']', NULL, NULL, $groupid), new CLink($group['name'], 'hostgroups.php?form=update&groupid=' . $groupid), array(array(new CLink(S_HOSTS, 'hosts.php?groupid=' . $groupid), ' (' . $host_count . ')'), BR(), array(new CLink(S_TEMPLATES, 'templates.php?groupid=' . $groupid, 'unknown'), ' (' . $tpl_count . ')')), new CCol(empty($hosts_output) ? '-' : $hosts_output, 'wraptext')));
    }
    $row_count = $table->getNumRows();
    //----- GO ------
    $goBox = new CComboBox('go');
    $goBox->addItem('activate', S_ACTIVATE_SELECTED);
    $goBox->addItem('disable', S_DISABLE_SELECTED);
    $goBox->addItem('delete', S_DELETE_SELECTED);
    // goButton name is necessary!!!
    $goButton = new CButton('goButton', S_GO . ' (0)');
    $goButton->setAttribute('id', 'goButton');
    zbx_add_post_js('chkbxRange.pageGoName = "groups";');
    $table->setFooter(new CCol(array($goBox, $goButton)));
    //----
    $form->addItem($table);
    $form->show();
    zbx_add_post_js('insert_in_element("numrows","' . $row_count . '");');
}
include_once 'include/page_footer.php';
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:hostgroups.php

示例8: unset

            $problemTrigger['description'] = $triggers[$problemTrigger['triggerid']]['description'];
        }
        unset($problemTrigger);
    }
    unset($serviceSla);
    $treeData = array();
    createServiceMonitoringTree($services, $slaData, $period, $treeData);
    $tree = new CServiceTree('service_status_tree', $treeData, array('caption' => _('Service'), 'status' => _('Status'), 'reason' => _('Reason'), 'sla' => _('Problem time'), 'sla2' => nbsp(_('SLA') . ' / ' . _('Acceptable SLA'))));
    if ($tree) {
        // creates form for choosing a preset interval
        $r_form = new CForm();
        $r_form->setAttribute('class', 'nowrap');
        $r_form->setMethod('get');
        $r_form->setAttribute('name', 'period_choice');
        $r_form->addVar('fullscreen', $_REQUEST['fullscreen']);
        $period_combo = new CComboBox('period', $period, 'javascript: submit();');
        foreach ($periods as $key => $val) {
            $period_combo->addItem($key, $val);
        }
        $r_form->addItem(array(_('Period') . SPACE, $period_combo));
        $srv_wdgt = new CWidget('hat_services', 'service-list service-mon');
        $srv_wdgt->addPageHeader(_('IT SERVICES'), get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen'])));
        $srv_wdgt->addHeader(_('IT services'), $r_form);
        $srv_wdgt->addItem(BR());
        $srv_wdgt->addItem($tree->getHTML());
        $srv_wdgt->show();
    } else {
        error(_('Cannot format Tree. Check logic structure in service links.'));
    }
}
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:srv_status.php

示例9: CCheckBox

// SPACE added to extend CB width in Chrome
$cbMain = new CCheckBox('maintenance', $maintenance, null, '1');
if (!$filterEnable) {
    $cbMain->setAttribute('disabled', 'disabled');
}
$dashForm->addRow(S_HOSTS, array($cbMain, S_SHOW_HOSTS_IN_MAINTENANCE));
// Trigger
$severity = zbx_toHash($severity);
$trgSeverities = array();
$severities = array(TRIGGER_SEVERITY_NOT_CLASSIFIED, TRIGGER_SEVERITY_INFORMATION, TRIGGER_SEVERITY_WARNING, TRIGGER_SEVERITY_AVERAGE, TRIGGER_SEVERITY_HIGH, TRIGGER_SEVERITY_DISASTER);
foreach ($severities as $snum => $sever) {
    $cb = new CCheckBox('trgSeverity[' . $sever . ']', isset($severity[$sever]), '', 1);
    $cb->setEnabled($filterEnable);
    $trgSeverities[] = array($cb, getSeverityCaption($sever));
    $trgSeverities[] = BR();
}
array_pop($trgSeverities);
$dashForm->addRow(S_TRIGGERS_WITH_SEVERITY, $trgSeverities);
$config = select_config();
$cb = new CComboBox('extAck', $extAck);
$cb->addItems(array(EXTACK_OPTION_ALL => S_O_ALL, EXTACK_OPTION_BOTH => S_O_SEPARATED, EXTACK_OPTION_UNACK => S_O_UNACKNOWLEDGED_ONLY));
$cb->setEnabled($filterEnable && $config['event_ack_enable']);
if (!$config['event_ack_enable']) {
    $cb->setAttribute('title', S_EVENT_ACKNOWLEDGING_DISABLED);
}
$dashForm->addRow(S_PROBLEM_DISPLAY, $cb);
//-----
$dashForm->addItemToBottomRow(new CButton('save', S_SAVE));
$dashboard_wdgt->addItem($dashForm);
$dashboard_wdgt->show();
include_once 'include/page_footer.php';
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:dashconf.php

示例10: array

$service = API::Service()->get(array('output' => array('serviceid', 'name', 'showsla', 'goodsla'), 'serviceids' => $_REQUEST['serviceid']));
$service = reset($service);
if (!$service) {
    access_deny();
}
$form = new CForm();
$form->setMethod('get');
$form->addVar('serviceid', $_REQUEST['serviceid']);
$cmbPeriod = new CComboBox('period', $period, 'submit();');
$cmbPeriod->addItem('daily', _('Daily'));
$cmbPeriod->addItem('weekly', _('Weekly'));
$cmbPeriod->addItem('monthly', _('Monthly'));
$cmbPeriod->addItem('yearly', _('Yearly'));
$form->addItem(array(SPACE . _('Period') . SPACE, $cmbPeriod));
if ($period != 'yearly') {
    $cmbYear = new CComboBox('year', $year, 'submit();');
    for ($y = date('Y') - YEAR_LEFT_SHIFT; $y <= date('Y'); $y++) {
        $cmbYear->addItem($y, $y);
    }
    $form->addItem(array(SPACE . _('Year') . SPACE, $cmbYear));
}
show_table_header(array(_('IT SERVICES AVAILABILITY REPORT'), SPACE . '"', new CLink($service['name'], 'srv_status.php?showgraph=1&serviceid=' . $service['serviceid']), '"'), $form);
$table = new CTableInfo();
$header = array(_('Ok'), _('Problems'), _('Downtime'), _('SLA'), _('Acceptable SLA'));
switch ($period) {
    case 'yearly':
        $from = date('Y') - YEAR_LEFT_SHIFT;
        $to = date('Y');
        array_unshift($header, new CCol(_('Year'), 'center'));
        function get_time($y)
        {
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:report3.php

示例11: CForm

$itemForm = new CForm();
$itemForm->setName('itemForm');
$itemForm->addVar('group_itemid', $this->data['group_itemid']);
$itemForm->addVar('hostid', $this->data['hostid']);
$itemForm->addVar('go', 'copy_to');
// create form list
$itemFormList = new CFormList('itemFormList');
// append type to form list
$copyTypeComboBox = new CComboBox('copy_type', $this->data['copy_type'], 'submit()');
$copyTypeComboBox->addItem(0, _('Hosts'));
$copyTypeComboBox->addItem(1, _('Host groups'));
$itemFormList->addRow(_('Target type'), $copyTypeComboBox);
// append targets to form list
$targetList = array();
if ($this->data['copy_type'] == 0) {
    $groupComboBox = new CComboBox('copy_groupid', $this->data['copy_groupid'], 'submit()');
    foreach ($this->data['groups'] as $group) {
        $groupComboBox->addItem($group['groupid'], $group['name']);
    }
    $itemFormList->addRow(_('Group'), $groupComboBox);
    foreach ($this->data['hosts'] as $host) {
        array_push($targetList, array(new CCheckBox('copy_targetid[' . $host['hostid'] . ']', uint_in_array($host['hostid'], $this->data['copy_targetid']), null, $host['hostid']), SPACE, $host['name'], BR()));
    }
} else {
    foreach ($this->data['groups'] as $group) {
        array_push($targetList, array(new CCheckBox('copy_targetid[' . $group['groupid'] . ']', uint_in_array($group['groupid'], $this->data['copy_targetid']), null, $group['groupid']), SPACE, $group['name'], BR()));
    }
}
$itemFormList->addRow(_('Target'), !empty($targetList) ? $targetList : SPACE);
// append tabs to form
$itemTab = new CTabView();
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:configuration.item.copy.php

示例12: while

while ($hostgroup = DBfetch($res)) {
    $hostsgroups[$hostgroup['hostid']] = $hostgroup['groupid'];
}
$params = array('nodeids' => get_current_nodeid(), 'pattern' => $search, 'extend_pattern' => true, 'count' => 1);
$hosts_count = CHost::get($params);
$overalCount = $hosts_count['rowscount'];
$viewCount = count($hosts);
$header = array(is_show_all_nodes() ? new CCol(S_NODE) : null, new CCol(S_HOSTS), new CCol(S_IP), new CCol(S_DNS), new CCol(S_LATEST_DATA), new CCol(S_TRIGGERS), new CCol(S_EVENTS), $admin ? new CCol(S_EDIT, 'center') : null);
$table = new CTableInfo();
$table->setHeader($header);
foreach ($hosts as $num => $host) {
    $hostid = $host['hostid'];
    $groupid = isset($hostsgroups[$hostid]) ? $hostsgroups[$hostid] : 0;
    $link = 'groupid=' . $groupid . '&hostid=' . $hostid;
    if ($admin) {
        $pageBox = new CComboBox('hostpages_' . $hostid);
        $pageBox->addItem('hosts.php?form=update&config=0&' . $link, S_HOST);
        $pageBox->addItem('items.php?' . $link, S_ITEMS);
        $pageBox->addItem('triggers.php?' . $link, S_TRIGGERS);
        $pageBox->addItem('graphs.php?' . $link, S_GRAPHS);
        $pageGo = new CButton('pagego', S_GO, "javascript: " . " redirect(\$('hostpages_{$hostid}').options[\$('hostpages_{$hostid}').selectedIndex].value);");
        $pageSelect = array($pageBox, SPACE, $pageGo);
    } else {
        $pageSelect = null;
    }
    $caption = make_decoration($host['host'], $search);
    $hostip = make_decoration($host['ip'], $search);
    $hostdns = make_decoration($host['dns'], $search);
    $table->addRow(array(get_node_name_by_elid($hostid), $caption, $hostip, $hostdns, new CLink(S_GO, 'latest.php?' . $link), new CLink(S_GO, 'tr_status.php?' . $link), new CLink(S_GO, 'events.php?' . $link), $pageSelect));
}
$table->setFooter(new CCol(S_DISPLAYING . SPACE . $viewCount . SPACE . S_OF_SMALL . SPACE . $overalCount . SPACE . S_FOUND_SMALL));
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:search.php

示例13: stage3

 function stage3()
 {
     $table = new CTable(null, 'requirements');
     $table->setAlign('center');
     $DB['TYPE'] = $this->getConfig('DB_TYPE');
     $cmbType = new CComboBox('type', $DB['TYPE'], 'this.form.submit();');
     $frontendSetup = new FrontendSetup();
     $databases = $frontendSetup->getSupportedDatabases();
     foreach ($databases as $id => $name) {
         $cmbType->addItem($id, $name);
     }
     $table->addRow(array(new CCol(_('Database type'), 'header'), $cmbType));
     switch ($DB['TYPE']) {
         case ZBX_DB_SQLITE3:
             $database = new CTextBox('database', $this->getConfig('DB_DATABASE', 'zabbix'));
             $database->attr('onchange', "disableSetupStepButton('#next_2')");
             $table->addRow(array(new CCol(_('Database file'), 'header'), $database));
             break;
         default:
             $server = new CTextBox('server', $this->getConfig('DB_SERVER', 'localhost'));
             $server->attr('onchange', "disableSetupStepButton('#next_2')");
             $table->addRow(array(new CCol(_('Database host'), 'header'), $server));
             $port = new CNumericBox('port', $this->getConfig('DB_PORT', '0'), 5, 'no', false, false);
             $port->attr('style', '');
             $port->attr('onchange', "disableSetupStepButton('#next_2'); validateNumericBox(this, 'false', 'false');");
             $table->addRow(array(new CCol(_('Database port'), 'header'), array($port, ' 0 - use default port')));
             $database = new CTextBox('database', $this->getConfig('DB_DATABASE', 'zabbix'));
             $database->attr('onchange', "disableSetupStepButton('#next_2')");
             $table->addRow(array(new CCol(_('Database name'), 'header'), $database));
             if ($DB['TYPE'] == ZBX_DB_DB2) {
                 $schema = new CTextBox('schema', $this->getConfig('DB_SCHEMA', ''));
                 $schema->attr('onchange', "disableSetupStepButton('#next_2')");
                 $table->addRow(array(new CCol(_('Database schema'), 'header'), $schema));
             }
             $user = new CTextBox('user', $this->getConfig('DB_USER', 'root'));
             $user->attr('onchange', "disableSetupStepButton('#next_2')");
             $table->addRow(array(new CCol(_('User'), 'header'), $user));
             $password = new CPassBox('password', $this->getConfig('DB_PASSWORD', ''));
             $password->attr('onchange', "disableSetupStepButton('#next_2')");
             $table->addRow(array(new CCol(_('Password'), 'header'), $password));
             break;
     }
     global $ZBX_MESSAGES;
     if (!empty($ZBX_MESSAGES)) {
         $lst_error = new CList(null, 'messages');
         foreach ($ZBX_MESSAGES as $msg) {
             $lst_error->addItem($msg['message'], $msg['type']);
         }
         $table = array($table, $lst_error);
     }
     return array(new CDiv(new CDiv(array('Please create database manually, and set the configuration parameters for connection to this database.', BR(), BR(), 'Press "Test connection" button when done.', BR(), $table), 'vertical_center'), 'table_wraper'), new CDiv(array(isset($_REQUEST['retry']) ? !$this->DISABLE_NEXT_BUTTON ? new CSpan(array(_('OK'), BR()), 'ok') : new CSpan(array(_('Fail'), BR()), 'fail') : null, new CSubmit('retry', 'Test connection')), 'info_bar'));
 }
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:52,代码来源:setup.inc.php

示例14: array

        if (!str_in_array($new_opcondition['conditiontype'], $allowedOpConditions)) {
            $new_opcondition['conditiontype'] = $allowedOpConditions[0];
        }
        $rowCondition = array();
        $conditionTypeComboBox = new CComboBox('new_opcondition[conditiontype]', $new_opcondition['conditiontype'], 'submit()');
        foreach ($allowedOpConditions as $opcondition) {
            $conditionTypeComboBox->addItem($opcondition, condition_type2str($opcondition));
        }
        array_push($rowCondition, $conditionTypeComboBox);
        $operationConditionComboBox = new CComboBox('new_opcondition[operator]');
        foreach (get_operators_by_conditiontype($new_opcondition['conditiontype']) as $operationCondition) {
            $operationConditionComboBox->addItem($operationCondition, condition_operator2str($operationCondition));
        }
        array_push($rowCondition, $operationConditionComboBox);
        if ($new_opcondition['conditiontype'] == CONDITION_TYPE_EVENT_ACKNOWLEDGED) {
            $operationConditionValueComboBox = new CComboBox('new_opcondition[value]', $new_opcondition['value']);
            $operationConditionValueComboBox->addItem(0, _('Not Ack'));
            $operationConditionValueComboBox->addItem(1, _('Ack'));
            $rowCondition[] = $operationConditionValueComboBox;
        }
        $newOperationConditionTable->addRow($rowCondition);
        $newOperationConditionFooter = array(new CSubmit('add_opcondition', _('Add'), null, 'link_menu'), SPACE . SPACE, new CSubmit('cancel_new_opcondition', _('Cancel'), null, 'link_menu'));
        $newOperationsTable->addRow(array(_('Operation condition'), new CDiv(array($newOperationConditionTable, $newOperationConditionFooter), 'objectgroup inlineblock border_dotted ui-corner-all')));
    }
    $footer = array(new CSubmit('add_operation', $this->data['new_operation']['action'] == 'update' ? _('Update') : _('Add'), null, 'link_menu'), SPACE . SPACE, new CSubmit('cancel_new_operation', _('Cancel'), null, 'link_menu'));
    $operationFormList->addRow(_('Operation details'), new CDiv(array($newOperationsTable, $footer), 'objectgroup inlineblock border_dotted ui-corner-all'));
}
// append tabs to form
$actionTabs = new CTabView();
if (!isset($_REQUEST['form_refresh'])) {
    $actionTabs->setSelected(0);
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.action.edit.php

示例15: CComboBox

** 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.
**/
// header
$imageComboBox = new CComboBox('imagetype', $this->data['imagetype'], 'submit();');
$imageComboBox->addItem(IMAGE_TYPE_ICON, _('Icon'));
$imageComboBox->addItem(IMAGE_TYPE_BACKGROUND, _('Background'));
$imageComboBoxForm = new CForm();
$imageComboBoxForm->addItem(_('Type') . SPACE);
$imageComboBoxForm->addItem($imageComboBox);
$this->data['widget']->addHeader(_('Images'), $imageComboBoxForm);
// form
$imageForm = new CForm();
$imageForm->setName('imageForm');
$imageForm->addItem(BR());
$imageTable = new CTable(_('No images found.'), 'header_wide padding_standard');
$count = 0;
$imageRow = new CRow();
foreach ($this->data['images'] as $image) {
    $img = $image['imagetype'] == IMAGE_TYPE_BACKGROUND ? new CLink(new CImg('imgstore.php?width=200&height=200&iconid=' . $image['imageid'], 'no image'), 'image.php?imageid=' . $image['imageid']) : new CImg('imgstore.php?iconid=' . $image['imageid'], 'no image');
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:administration.general.image.list.php


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