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


PHP CFormTable::AddItemToBottomRow方法代码示例

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


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

示例1: DBfetch

            $frmCnct->AddVar("linkid", $_REQUEST["linkid"]);
            $db_link = DBfetch(DBselect('SELECT * FROM sysmaps_link_triggers WHERE linkid=' . $_REQUEST["linkid"] . ' AND triggerid=' . $_REQUEST['triggerid']));
            $triggerid = $_REQUEST['triggerid'];
            $drawtype = $db_link["drawtype"];
            $color = $db_link["color"];
        } else {
            $triggerid = get_request("triggerid", 0);
            $drawtype = get_request("drawtype", 0);
            $color = get_request("color", 0);
        }
        $frmCnct->AddVar("triggerid", $triggerid);
        /* START comboboxes preparations */
        $cmbType = new CComboBox("drawtype", $drawtype);
        foreach (map_link_drawtypes() as $i) {
            $value = map_link_drawtype2str($i);
            $cmbType->AddItem($i, $value);
        }
        $btnSelect = new CButton('btn1', S_SELECT, "return PopUp('popup.php?dstfrm=" . $frmCnct->GetName() . "&dstfld1=triggerid&dstfld2=trigger&srctbl=triggers&srcfld1=triggerid&srcfld2=description');", 'T');
        $btnSelect->SetType('button');
        /* END preparation */
        $description = $triggerid > 0 ? expand_trigger_description($triggerid) : '';
        $frmCnct->AddRow(S_TRIGGER, array(new CTextBox('trigger', $description, 70, 'yes'), SPACE, $btnSelect));
        $frmCnct->AddRow(S_TYPE . ' (' . S_PROBLEM_BIG . ')', $cmbType);
        $frmCnct->AddRow(S_COLOR . ' (' . S_PROBLEM_BIG . ')', new CColor('color', $color));
        $frmCnct->AddItemToBottomRow(new CButton("save", isset($_REQUEST['triggerid']) ? S_SAVE : S_ADD));
        $frmCnct->AddItemToBottomRow(SPACE);
        $frmCnct->AddItemToBottomRow(new CButton("cancel", S_CANCEL, 'javascript: window.close();'));
        $frmCnct->Show();
    }
}
include_once "include/page_footer.php";
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:popup_link_tr.php

示例2: foreach

if (isset($functions[$function]['params'])) {
    foreach ($functions[$function]['params'] as $pid => $pf) {
        $pv = isset($param[$pid]) ? $param[$pid] : null;
        if ($pf['T'] == T_ZBX_INT) {
            if (0 == $pid) {
                if (isset($pf['M']) && is_array($pf['M'])) {
                    $cmbParamType = new CComboBox('paramtype', $paramtype);
                    foreach ($pf['M'] as $mid => $caption) {
                        $cmbParamType->AddItem($mid, $caption);
                    }
                } else {
                    $form->AddVar('paramtype', PARAM_TYPE_SECONDS);
                    $cmbParamType = S_SECONDS;
                }
            } else {
                $cmbParamType = null;
            }
            $form->AddRow(S_LAST_OF . ' ', array(new CNumericBox('param[' . $pid . ']', $pv, 10), $cmbParamType));
        } else {
            $form->AddRow($pf['C'], new CTextBox('param[' . $pid . ']', $pv, 30));
            $form->AddVar('paramtype', PARAM_TYPE_SECONDS);
        }
    }
} else {
    $form->AddVar('paramtype', PARAM_TYPE_SECONDS);
    $form->AddVar('param', 0);
}
$form->AddRow('N', new CTextBox('value', $value, 10));
$form->AddItemToBottomRow(new CButton('insert', S_INSERT));
$form->Show();
include_once "include/page_footer.php";
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:popup_trexpr.php

示例3: CFormTable

$media = get_request('media', -1);
$sendto = get_request('sendto', '');
$mediatypeid = get_request('mediatypeid', 0);
$active = get_request('active', 0);
$period = get_request('period', '1-7,00:00-23:59');
$frmMedia = new CFormTable(S_NEW_MEDIA);
$frmMedia->SetHelp("web.media.php");
$frmMedia->AddVar("media", $media);
$frmMedia->AddVar("dstfrm", $_REQUEST["dstfrm"]);
$cmbType = new CComboBox("mediatypeid", $mediatypeid);
$types = DBselect('SELECT mediatypeid,description ' . ' FROM media_type' . ' WHERE ' . DBin_node('mediatypeid') . ' ORDER BY type');
while ($type = DBfetch($types)) {
    $cmbType->AddItem($type["mediatypeid"], get_node_name_by_elid($type["mediatypeid"]) . $type["description"]);
}
$frmMedia->AddRow(S_TYPE, $cmbType);
$frmMedia->AddRow(S_SEND_TO, new CTextBox("sendto", $sendto, 20));
$frmMedia->AddRow(S_WHEN_ACTIVE, new CTextBox("period", $period, 48));
$frm_row = array();
for ($i = 0; $i <= 5; $i++) {
    array_push($frm_row, array(new CCheckBox("severity[{$i}]", str_in_array($i, $severity) ? 'yes' : 'no', null, $i), get_severity_description($i)), BR());
}
$frmMedia->AddRow(S_USE_IF_SEVERITY, $frm_row);
$cmbStat = new CComboBox("active", $active);
$cmbStat->AddItem(0, S_ENABLED);
$cmbStat->AddItem(1, S_DISABLED);
$frmMedia->AddRow("Status", $cmbStat);
$frmMedia->AddItemToBottomRow(new CButton("add", $media > -1 ? S_SAVE : S_ADD));
$frmMedia->AddItemToBottomRow(SPACE);
$frmMedia->AddItemToBottomRow(new CButtonCancel(null, 'close_window();'));
$frmMedia->Show();
include_once "include/page_footer.php";
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:popup_media.php

示例4: CScript

    $script = new CScript("javascript: if(CLNDR['events_since'].clndr.setSDateFromOuterObj()){" . "\$('filter_timesince').value = parseInt(CLNDR['events_since'].clndr.sdt.getTime()/1000);}" . "if(CLNDR['events_till'].clndr.setSDateFromOuterObj()){" . "\$('filter_timetill').value = parseInt(CLNDR['events_till'].clndr.sdt.getTime()/1000);}");
    $filterForm->AddAction('onsubmit', $script);
    $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);
    $p_elements[] = create_filter(S_FILTER, $navigation, $filterForm, 'tr_filter', get_profile('web.events.filter.state', 0));
} else {
    $p_elements[] = get_thin_table_header(SPACE, $navigation);
}
//-------
$p_elements[] = $table;
$p_elements[] = get_thin_table_header(SPACE, $navigation);
$events_hat = create_hat($text, $p_elements, $fs_icon, 'hat_events', get_profile('web.events.hats.hat_events.state', 1));
$events_hat->Show();
$jsmenu = new CPUMenu(null, 170);
$jsmenu->InsertJavaScript();
include_once "include/page_footer.php";
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:events.php

示例5: CFormTable

    $form = new CFormTable($frm_title, null, "post", "multipart/form-data");
    $form->AddVar('config', $config);
    $form->AddRow(S_IMPORT_FILE, new CFile('import_file'));
    $table = new CTable();
    $table->SetHeader(array(S_ELEMENT, S_EXISTING, S_MISSING), 'bold');
    foreach (array('host' => S_HOST, 'template' => S_TEMPLATE, 'item' => S_ITEM, 'trigger' => S_TRIGGER, 'graph' => S_GRAPH) as $key => $title) {
        $cmbExist = new CComboBox('rules[' . $key . '][exist]', $rules[$key]['exist']);
        $cmbExist->AddItem(0, S_UPDATE);
        $cmbExist->AddItem(1, S_SKIP);
        $cmbMissed = new CComboBox('rules[' . $key . '][missed]', $rules[$key]['missed']);
        $key == 'template' ? '' : $cmbMissed->AddItem(0, S_ADD);
        $cmbMissed->AddItem(1, S_SKIP);
        $table->AddRow(array($title, $cmbExist, $cmbMissed));
    }
    $form->AddRow(S_RULES, $table);
    $form->AddItemToBottomRow(new CButton('import', S_IMPORT));
    $form->Show();
} else {
    echo SBR;
    if ($preview) {
        $table = new CTableInfo(S_NO_DATA_FOR_EXPORT);
        $table->setHeader(array(S_HOST, S_ELEMENTS));
        $table->showStart();
        $hostids = array_keys($hosts);
        $sql = 'SELECT * ' . ' FROM hosts ' . ' WHERE ' . DBcondition('hostid', $hostids) . ' AND status IN (' . HOST_STATUS_MONITORED . ',' . HOST_STATUS_NOT_MONITORED . ',' . HOST_STATUS_TEMPLATE . ')';
        $db_hosts = DBselect($sql);
        while ($host = DBfetch($db_hosts)) {
            $el_table = new CTableInfo(S_ONLY_HOST_INFO);
            $sqls = array(S_TEMPLATE => !isset($templates[$host['hostid']]) ? null : 'SELECT MIN(ht.hostid) as hostid, h.host as info, count(distinct ht.hosttemplateid) as cnt ' . ' FROM hosts h, hosts_templates ht ' . ' WHERE ht.templateid = h.hostid ' . ' GROUP BY h.host', S_ITEM => !isset($items[$host['hostid']]) ? null : 'SELECT hostid, description as info, 1 as cnt ' . ' FROM items' . ' WHERE hostid=' . $host['hostid'], S_TRIGGER => !isset($triggers[$host['hostid']]) ? null : 'SELECT i.hostid, t.description as info, count(distinct i.hostid) as cnt, f.triggerid ' . ' FROM functions f, items i, triggers t' . ' WHERE t.triggerid=f.triggerid' . ' AND f.itemid=i.itemid' . ' GROUP BY f.triggerid, i.hostid, t.description', S_GRAPH => !isset($graphs[$host['hostid']]) ? null : 'SELECT MIN(g.name) as info, i.hostid, count(distinct i.hostid) as cnt, gi.graphid' . ' FROM graphs_items gi, items i, graphs g ' . ' WHERE g.graphid=gi.graphid ' . ' AND gi.itemid=i.itemid' . ' GROUP BY gi.graphid, i.hostid');
            foreach ($sqls as $el_type => $sql) {
                if (!isset($sql)) {
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:exp_imp.php

示例6: CTextBox

                    $usr_test->AddItem($db_user['alias'], $db_user['alias']);
                }
            }
        } else {
            $usr_test = new CTextBox('user', $USER_DETAILS['alias'], null, 'yes');
        }
        $frmAuth->AddRow(S_LOGIN, $usr_test);
        $frmAuth->AddRow(S_USER . SPACE . S_PASSWORD, new CPassBox('user_password'));
        $frmAuth->AddItemToBottomRow(new CButton('save', S_SAVE));
        $frmAuth->AddItemToBottomRow(new CButton('test', S_TEST));
        $frmAuth->Show();
    } else {
        if (ZBX_AUTH_HTTP == $_REQUEST['config']) {
            $form_refresh_http = get_request('form_refresh_http', 0);
            $form_refresh_http++;
            $frmAuth = new CFormTable(S_HTTP_AUTH, 'authentication.php');
            $frmAuth->SetHelp('web.authentication.php');
            $frmAuth->AddVar('form_refresh_http', $form_refresh_http);
            $cmbConfig = new CCombobox('config', ZBX_AUTH_HTTP, 'submit()');
            $cmbConfig->AddItem(ZBX_AUTH_INTERNAL, S_INTERNAL_S);
            $cmbConfig->AddItem(ZBX_AUTH_LDAP, S_LDAP);
            $cmbConfig->AddItem(ZBX_AUTH_HTTP, S_HTTP);
            $frmAuth->AddRow(S_DEFAULT_AUTHENTICATION, $cmbConfig);
            $action = "javascript: if(confirm('Switching HTTP authentication will reset all current sessions! Continue?')) return true; else return false;";
            $frmAuth->AddRow(S_HTTP_AUTH . SPACE . S_ENABLED, new CCheckBox('authentication_type', ZBX_AUTH_HTTP == $config['authentication_type'], $action, ZBX_AUTH_HTTP));
            $frmAuth->AddItemToBottomRow(new CButton('save', S_SAVE));
            $frmAuth->Show();
        }
    }
}
include_once 'include/page_footer.php';
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:authentication.php

示例7: get_screen_item_form


//.........这里部分代码省略.........
                                    // HOSTS info
                                    $caption = '';
                                    $id = 0;
                                    $available_groups = get_accessible_groups_by_user($USER_DETAILS, PERM_READ_ONLY);
                                    if (remove_nodes_from_id($resourceid) > 0) {
                                        $result = DBselect('SELECT DISTINCT n.name as node_name,g.groupid,g.name ' . ' FROM hosts_groups hg, groups g ' . ' LEFT JOIN nodes n ON n.nodeid=' . DBid2nodeid('g.groupid') . ' WHERE ' . DBcondition('g.groupid', $available_groups) . ' AND g.groupid=' . $resourceid);
                                        while ($row = DBfetch($result)) {
                                            $row['node_name'] = isset($row['node_name']) ? '(' . $row['node_name'] . ') ' : '';
                                            $caption = $row['node_name'] . $row['name'];
                                            $id = $resourceid;
                                        }
                                    } else {
                                        if (remove_nodes_from_id($resourceid) == 0) {
                                            $result = DBselect('SELECT DISTINCT n.name as node_name ' . ' FROM nodes n ' . ' WHERE n.nodeid=' . id2nodeid($resourceid));
                                            while ($row = DBfetch($result)) {
                                                $row['node_name'] = isset($row['node_name']) ? '(' . $row['node_name'] . ') ' : '';
                                                $caption = $row['node_name'] . S_MINUS_ALL_GROUPS_MINUS;
                                                $id = $resourceid;
                                            }
                                        }
                                    }
                                    $form->AddVar('resourceid', $id);
                                    $textfield = new CTextbox('caption', $caption, 60, 'yes');
                                    $selectbtn = new Cbutton('select', S_SELECT, "javascript: return PopUp('popup.php?dstfrm=" . $form->getName() . "&dstfld1=resourceid&dstfld2=caption&srctbl=host_group_scr&srcfld1=groupid&srcfld2=name',480,450);");
                                    $selectbtn->setAttribute('onmouseover', "javascript: this.style.cursor = 'pointer';");
                                    $form->AddRow(S_GROUP, array($textfield, SPACE, $selectbtn));
                                } else {
                                    // SCREEN_RESOURCE_CLOCK
                                    $form->addVar('resourceid', 0);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    if (uint_in_array($resourcetype, array(SCREEN_RESOURCE_HOSTS_INFO, SCREEN_RESOURCE_TRIGGERS_INFO))) {
        $cmbStyle = new CComboBox("style", $style);
        $cmbStyle->AddItem(STYLE_HORISONTAL, S_HORIZONTAL);
        $cmbStyle->AddItem(STYLE_VERTICAL, S_VERTICAL);
        $form->AddRow(S_STYLE, $cmbStyle);
    } else {
        if (uint_in_array($resourcetype, array(SCREEN_RESOURCE_TRIGGERS_OVERVIEW, SCREEN_RESOURCE_DATA_OVERVIEW))) {
            $cmbStyle = new CComboBox('style', $style);
            $cmbStyle->AddItem(STYLE_LEFT, S_LEFT);
            $cmbStyle->AddItem(STYLE_TOP, S_TOP);
            $form->AddRow(S_HOSTS_LOCATION, $cmbStyle);
        } else {
            if ($resourcetype == SCREEN_RESOURCE_CLOCK) {
                $cmbStyle = new CComboBox('style', $style);
                $cmbStyle->AddItem(TIME_TYPE_LOCAL, S_LOCAL_TIME);
                $cmbStyle->AddItem(TIME_TYPE_SERVER, S_SERVER_TIME);
                $form->AddRow(S_TIME_TYPE, $cmbStyle);
            } else {
                $form->AddVar('style', 0);
            }
        }
    }
    if (uint_in_array($resourcetype, array(SCREEN_RESOURCE_URL))) {
        $form->AddRow(S_URL, new CTextBox('url', $url, 60));
    } else {
        $form->AddVar('url', '');
    }
    if (uint_in_array($resourcetype, array(SCREEN_RESOURCE_GRAPH, SCREEN_RESOURCE_SIMPLE_GRAPH, SCREEN_RESOURCE_CLOCK, SCREEN_RESOURCE_URL))) {
        $form->AddRow(S_WIDTH, new CNumericBox('width', $width, 5));
        $form->AddRow(S_HEIGHT, new CNumericBox('height', $height, 5));
    } else {
        $form->AddVar('width', 500);
        $form->AddVar('height', 100);
    }
    if (uint_in_array($resourcetype, array(SCREEN_RESOURCE_GRAPH, SCREEN_RESOURCE_SIMPLE_GRAPH, SCREEN_RESOURCE_MAP, SCREEN_RESOURCE_CLOCK, SCREEN_RESOURCE_URL))) {
        $cmbHalign = new CComboBox('halign', $halign);
        $cmbHalign->AddItem(HALIGN_CENTER, S_CENTRE);
        $cmbHalign->AddItem(HALIGN_LEFT, S_LEFT);
        $cmbHalign->AddItem(HALIGN_RIGHT, S_RIGHT);
        $form->AddRow(S_HORIZONTAL_ALIGN, $cmbHalign);
    } else {
        $form->AddVar('halign', 0);
    }
    $cmbValign = new CComboBox('valign', $valign);
    $cmbValign->AddItem(VALIGN_MIDDLE, S_MIDDLE);
    $cmbValign->AddItem(VALIGN_TOP, S_TOP);
    $cmbValign->AddItem(VALIGN_BOTTOM, S_BOTTOM);
    $form->AddRow(S_VERTICAL_ALIGN, $cmbValign);
    $form->AddRow(S_COLUMN_SPAN, new CNumericBox('colspan', $colspan, 2));
    $form->AddRow(S_ROW_SPAN, new CNumericBox('rowspan', $rowspan, 2));
    // dynamic AddOn
    if (uint_in_array($resourcetype, array(SCREEN_RESOURCE_GRAPH, SCREEN_RESOURCE_SIMPLE_GRAPH, SCREEN_RESOURCE_PLAIN_TEXT))) {
        $form->AddRow(S_DYNAMIC_ITEM, new CCheckBox('dynamic', $dynamic, null, 1));
    }
    $form->AddItemToBottomRow(new CButton('save', S_SAVE));
    if (isset($_REQUEST['screenitemid'])) {
        $form->addItemToBottomRow(SPACE);
        $form->addItemToBottomRow(new CButtonDelete(null, url_param('form') . url_param('screenid') . url_param('screenitemid')));
    }
    $form->addItemToBottomRow(SPACE);
    $form->addItemToBottomRow(new CButtonCancel(url_param('screenid')));
    return $form;
}
开发者ID:phedders,项目名称:zabbix,代码行数:101,代码来源:screens.inc.php

示例8: array

    $frmService->AddRow(S_NEW_SERVICE_TIME, array($cmbTimeType, BR(), $time_param, new CButton('add_service_time', 'add', 'javascript: document.forms[0].action += \'?sform=1\'; submit();')));
    //trigger
    $frmService->AddRow(S_LINK_TO_TRIGGER_Q, new CCheckBox("linktrigger", $linktrigger, "javascript: display_element('trigger_name');", 1));
    if ($triggerid > 0) {
        $trigger = expand_trigger_description($triggerid);
    } else {
        $trigger = "";
    }
    $row = new CRow(array(new CCol(S_TRIGGER, 'form_row_l'), new CCol(array(new CTextBox("trigger", $trigger, 64, 'yes'), new CButton("btn1", S_SELECT, "return PopUp('popup.php?" . "dstfrm=" . $frmService->GetName() . "&dstfld1=triggerid&dstfld2=trigger" . "&srctbl=triggers&srcfld1=triggerid&srcfld2=description&real_hosts=1');", 'T')), 'form_row_r')));
    $row->setAttribute('id', 'trigger_name');
    $row->setAttribute('style', $linktrigger == 1 ? '' : 'display: none;');
    $frmService->AddRow($row);
    $frmService->AddVar("triggerid", $triggerid);
    //---------
    //sortorder
    $frmService->AddRow(S_SORT_ORDER_0_999, new CTextBox("sortorder", $sortorder, 3));
    //---------
    $frmService->AddItemToBottomRow(new CButton("save_service", S_SAVE, 'javascript: document.forms[0].action += \'?saction=1\';'));
    if (isset($service["serviceid"])) {
        $frmService->AddItemToBottomRow(SPACE);
        $frmService->AddItemToBottomRow(new CButtonDelete("Delete selected service?", url_param("form") . url_param("serviceid") . '&saction=1'));
    }
    $frmService->AddItemToBottomRow(SPACE);
    $cb = new CButton('cancel', S_CANCEL);
    $cb->SetType('button');
    $cb->SetAction('javascript: self.close();');
    $frmService->AddItemToBottomRow($cb);
    $frmService->Show();
}
//---------------------------------------------  </FORM>  --------------------------------------------
include_once "include/page_footer.php";
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:services_form.php


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