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


PHP CFormTable::setName方法代码示例

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


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

示例1: unset

                    continue;
                }
                unset($_REQUEST['groupids'][$groupid]);
            }
        }
    }
}
$dashboard_wdgt = new CWidget();
// Header
$dashboard_wdgt->setClass('header');
$dashboard_wdgt->addPageHeader(S_DASHBOARD_CONFIGURATION_BIG, SPACE);
//-------------
// GROUPS
$dashForm = new CFormTable(S_FILTER);
$dashForm->addVar('form_refresh', 1);
$dashForm->setName('dashconf');
$dashForm->setAttribute('id', 'dashform');
if (isset($_REQUEST['form_refresh'])) {
    $filterEnable = get_request('filterEnable', 0);
    $groupids = get_request('groupids', array());
    $groupids = zbx_toHash($groupids);
    $grpswitch = get_request('grpswitch', 0);
    $maintenance = get_request('maintenance', 0);
    $extAck = get_request('extAck', 0);
    $severity = get_request('trgSeverity', array());
    $severity = array_keys($severity);
} else {
    $filterEnable = CProfile::get('web.dashconf.filter.enable', 0);
    $groupids = get_favorites('web.dashconf.groups.groupids');
    $groupids = zbx_objectValues($groupids, 'value');
    $groupids = zbx_toHash($groupids);
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:dashconf.php

示例2: CFormTable

 $graphtype = get_request("graphtype", GRAPH_TYPE_NORMAL);
 $gid = get_request("gid", null);
 $list_name = get_request("list_name", null);
 $itemid = get_request("itemid", 0);
 $color = get_request("color", '009900');
 $drawtype = get_request("drawtype", 0);
 $sortorder = get_request("sortorder", 0);
 $yaxisside = get_request("yaxisside", 1);
 $calc_fnc = get_request("calc_fnc", 2);
 $type = get_request("type", 0);
 $periods_cnt = get_request("periods_cnt", 5);
 $only_hostid = get_request("only_hostid", null);
 $monitored_hosts = get_request('monitored_hosts', null);
 $caption = $itemid ? S_UPD_ITEM_FOR_THE_GRAPH : S_NEW_ITEM_FOR_THE_GRAPH;
 $frmGItem = new CFormTable($caption);
 $frmGItem->setName('graph_item');
 $frmGItem->setHelp("web.graph.item.php");
 $frmGItem->addVar('dstfrm', $_REQUEST['dstfrm']);
 $description = '';
 if ($itemid > 0) {
     $description = get_item_by_itemid($itemid);
     $description = item_description($description);
 }
 $frmGItem->addVar('graphid', $graphid);
 $frmGItem->addVar('gid', $gid);
 $frmGItem->addVar('list_name', $list_name);
 $frmGItem->addVar('itemid', $itemid);
 $frmGItem->addVar('graphtype', $graphtype);
 $frmGItem->addVar('only_hostid', $only_hostid);
 $txtCondVal = new CTextBox('description', $description, 50, 'yes');
 $host_condition = '';
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:popup_gitem.php

示例3: date

insert_js_function('add_period');
insert_js_function('update_period');
$_REQUEST['caption'] = get_request('caption', '');
if (zbx_empty($_REQUEST['caption']) && isset($_REQUEST['report_timesince']) && isset($_REQUEST['report_timetill'])) {
    $_REQUEST['caption'] = date(S_DATE_FORMAT_YMDHMS, $_REQUEST['report_timesince']) . ' - ' . date(S_DATE_FORMAT_YMDHMS, $_REQUEST['report_timetill']);
}
if (isset($_REQUEST['save'])) {
    if (isset($_REQUEST['period_id'])) {
        insert_js("update_period('" . $_REQUEST['period_id'] . "','" . $_REQUEST['dstfrm'] . "','" . $_REQUEST['caption'] . "','" . $_REQUEST['report_timesince'] . "','" . $_REQUEST['report_timetill'] . "','" . $_REQUEST['color'] . "');\n");
    } else {
        insert_js("add_period('" . $_REQUEST['dstfrm'] . "','" . $_REQUEST['caption'] . "','" . $_REQUEST['report_timesince'] . "','" . $_REQUEST['report_timetill'] . "','" . $_REQUEST['color'] . "');\n");
    }
} else {
    echo SBR;
    $frmPd = new CFormTable(S_PERIOD);
    $frmPd->setName('period');
    $frmPd->addVar('dstfrm', $_REQUEST['dstfrm']);
    $config = get_request('config', 1);
    $caption = get_request('caption', '');
    $color = get_request('color', '009900');
    $report_timesince = get_request('report_timesince', time() - 86400);
    $report_timetill = get_request('report_timetill', time());
    $frmPd->addVar('config', $config);
    $frmPd->addVar('report_timesince', $report_timesince);
    $frmPd->addVar('report_timetill', $report_timetill);
    if (isset($_REQUEST['period_id'])) {
        $frmPd->addVar('period_id', $_REQUEST['period_id']);
    }
    $frmPd->addRow(array(new CVisibilityBox('caption_visible', !zbx_empty($caption), 'caption', S_DEFAULT), S_CAPTION), new CTextBox('caption', $caption, 10));
    //		$frmPd->addRow(S_CAPTION, new CTextBox('caption',$caption,10));
    //*
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:popup_period.php

示例4: array

if (isset($_REQUEST['form'])) {
    echo SBR;
    global $USER_DETAILS;
    $groupid = get_request('groupid', 0);
    $hosts = get_request('hosts', array());
    SDII($hosts);
    $frm_title = S_HOST_GROUP;
    if ($groupid > 0) {
        $group = get_hostgroup_by_groupid($_REQUEST['groupid']);
        $name = $group['name'];
        $frm_title .= ' [' . $group['name'] . ']';
    } else {
        $name = '';
    }
    $frmHostG = new CFormTable($frm_title, 'hostgroups.php');
    $frmHostG->setName('hg_form');
    $frmHostG->addRow(S_GROUP_NAME, new CTextBox('gname', $name, 48));
    if ($groupid > 0) {
        $frmHostG->addVar('groupid', $_REQUEST['groupid']);
        // if first time select all hosts for group from db
        if (!isset($_REQUEST['form_refresh'])) {
            $params = array('groupids' => $groupid, 'editable' => 1, 'order' => 'host', 'templated_hosts' => 1);
            $db_hosts = CHost::get($params);
            foreach ($db_hosts as $hostid => $db_host) {
                $hosts[$hostid] = $hostid;
            }
        }
    }
    // select all possible groups
    $params = array('not_proxy_host' => 1, 'order' => 'name', 'editable' => 1, 'extendoutput' => 1);
    $db_groups = CHostGroup::get($params);
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:hostgroups.php

示例5: DBstart

            show_messages($result, _('Trigger added'), _('Cannot add trigger'));
        }
        if ($result) {
            DBstart();
            add_audit($auditAction, AUDIT_RESOURCE_TRIGGER, _('Trigger') . ' [' . $triggerId . '] [' . $trigger['description'] . ']');
            DBend(true);
            unset($_REQUEST['sform']);
            zbx_add_post_js('closeForm("items.php");');
            require_once dirname(__FILE__) . '/include/page_footer.php';
        }
    }
}
//------------------------ <FORM> ---------------------------
if (hasRequest('sform')) {
    $frmTRLog = new CFormTable(_('Trigger'), null, null, null, 'sform');
    $frmTRLog->setName('sform');
    $frmTRLog->addHelpIcon();
    $frmTRLog->setTableClass('formlongtable formtable');
    if (hasRequest('triggerid')) {
        $frmTRLog->addVar('triggerid', getRequest('triggerid'));
    }
    if (hasRequest('triggerid') && !hasRequest('form_refresh')) {
        $result = DBselect('SELECT t.expression,t.description,t.priority,t.comments,t.url,t.status,t.type' . ' FROM triggers t' . ' WHERE t.triggerid=' . zbx_dbstr(getRequest('triggerid')) . ' AND EXISTS (' . 'SELECT NULL' . ' FROM functions f,items i' . ' WHERE t.triggerid=f.triggerid' . ' AND f.itemid=i.itemid ' . ' AND i.value_type IN (' . ITEM_VALUE_TYPE_LOG . ',' . ITEM_VALUE_TYPE_TEXT . ',' . ITEM_VALUE_TYPE_STR . ')' . ')');
        if ($row = DBfetch($result)) {
            $description = $row['description'];
            $expression = explode_exp($row['expression']);
            $type = $row['type'];
            $priority = $row['priority'];
            $comments = $row['comments'];
            $url = $row['url'];
            $status = $row['status'];
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:tr_logform.php

示例6: insert_graph_form

function insert_graph_form()
{
    $frmGraph = new CFormTable(S_GRAPH, null, 'post');
    $frmGraph->setName('frm_graph');
    //$frmGraph->setHelp("web.graphs.graph.php");
    $items = get_request('items', array());
    if (isset($_REQUEST['graphid'])) {
        $frmGraph->addVar('graphid', $_REQUEST['graphid']);
        $options = array('graphids' => $_REQUEST['graphid'], 'extendoutput' => 1);
        $graphs = CGraph::get($options);
        $row = reset($graphs);
        $frmGraph->setTitle(S_GRAPH . ' "' . $row['name'] . '"');
    }
    if (isset($_REQUEST['graphid']) && !isset($_REQUEST['form_refresh'])) {
        $name = $row['name'];
        $width = $row['width'];
        $height = $row['height'];
        $ymin_type = $row['ymin_type'];
        $ymax_type = $row['ymax_type'];
        $yaxismin = $row['yaxismin'];
        $yaxismax = $row['yaxismax'];
        $ymin_itemid = $row['ymin_itemid'];
        $ymax_itemid = $row['ymax_itemid'];
        $showworkperiod = $row['show_work_period'];
        $showtriggers = $row['show_triggers'];
        $graphtype = $row['graphtype'];
        $legend = $row['show_legend'];
        $graph3d = $row['show_3d'];
        $percent_left = $row['percent_left'];
        $percent_right = $row['percent_right'];
        $options = array('graphids' => $_REQUEST['graphid'], 'sortfield' => 'sortorder', 'extendoutput' => 1);
        $items = CGraphItem::get($options);
    } else {
        $name = get_request('name', '');
        $graphtype = get_request('graphtype', GRAPH_TYPE_NORMAL);
        if ($graphtype == GRAPH_TYPE_PIE || $graphtype == GRAPH_TYPE_EXPLODED) {
            $width = get_request('width', 400);
            $height = get_request('height', 300);
        } else {
            $width = get_request('width', 900);
            $height = get_request('height', 200);
        }
        $ymin_type = get_request('ymin_type', GRAPH_YAXIS_TYPE_CALCULATED);
        $ymax_type = get_request('ymax_type', GRAPH_YAXIS_TYPE_CALCULATED);
        $yaxismin = get_request('yaxismin', 0.0);
        $yaxismax = get_request('yaxismax', 100.0);
        $ymin_itemid = get_request('ymin_itemid', 0);
        $ymax_itemid = get_request('ymax_itemid', 0);
        $showworkperiod = get_request('showworkperiod', 0);
        $showtriggers = get_request('showtriggers', 0);
        $legend = get_request('legend', 0);
        $graph3d = get_request('graph3d', 0);
        $visible = get_request('visible');
        $percent_left = 0;
        $percent_right = 0;
        if (isset($visible['percent_left'])) {
            $percent_left = get_request('percent_left', 0);
        }
        if (isset($visible['percent_right'])) {
            $percent_right = get_request('percent_right', 0);
        }
    }
    /* reinit $_REQUEST */
    $_REQUEST['items'] = $items;
    $_REQUEST['name'] = $name;
    $_REQUEST['width'] = $width;
    $_REQUEST['height'] = $height;
    $_REQUEST['ymin_type'] = $ymin_type;
    $_REQUEST['ymax_type'] = $ymax_type;
    $_REQUEST['yaxismin'] = $yaxismin;
    $_REQUEST['yaxismax'] = $yaxismax;
    $_REQUEST['ymin_itemid'] = $ymin_itemid;
    $_REQUEST['ymax_itemid'] = $ymax_itemid;
    $_REQUEST['showworkperiod'] = $showworkperiod;
    $_REQUEST['showtriggers'] = $showtriggers;
    $_REQUEST['graphtype'] = $graphtype;
    $_REQUEST['legend'] = $legend;
    $_REQUEST['graph3d'] = $graph3d;
    $_REQUEST['percent_left'] = $percent_left;
    $_REQUEST['percent_right'] = $percent_right;
    /********************/
    if ($graphtype != GRAPH_TYPE_NORMAL) {
        foreach ($items as $gid => $gitem) {
            if ($gitem['type'] == GRAPH_ITEM_AGGREGATED) {
                unset($items[$gid]);
            }
        }
    }
    $items = array_values($items);
    $icount = count($items);
    for ($i = 0; $i < $icount - 1;) {
        // check if we deletd an item
        $next = $i + 1;
        while (!isset($items[$next]) && $next < $icount - 1) {
            $next++;
        }
        if (isset($items[$next]) && $items[$i]['sortorder'] == $items[$next]['sortorder']) {
            for ($j = $next; $j < $icount; $j++) {
                if ($items[$j - 1]['sortorder'] >= $items[$j]['sortorder']) {
                    $items[$j]['sortorder']++;
//.........这里部分代码省略.........
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:101,代码来源:forms.inc.php

示例7: unset

    if (isset($_REQUEST['new_linktriggers'])) {
        $_REQUEST['linktriggers'] = array_merge($_REQUEST['linktriggers'], $_REQUEST['new_linktriggers']);
        array_unique($_REQUEST['linktriggers']);
        unset($_REQUEST['new_linktriggers']);
    } else {
        if (isset($_REQUEST['remove']) && isset($_REQUEST['del_linktriggers'])) {
            $_REQUEST['linktriggers'] = array_diff($_REQUEST['linktriggers'], $_REQUEST['del_linktriggers']);
            array_unique($_REQUEST['linktriggers']);
            unset($_REQUEST['new_linktriggers']);
        }
    }
}
if (isset($_REQUEST['form'])) {
    echo SBR;
    $frmCnct = new CFormTable(S_NEW_INDICATORS, 'popup_link_tr.php');
    $frmCnct->setName('connector_form');
    $triggers = array();
    if (!empty($_REQUEST['linktriggers'])) {
        $options = array('nodeids' => get_current_nodeid(true), 'triggerids' => $_REQUEST['linktriggers'], 'editable' => 1, 'select_hosts' => array('hostid', 'host'), 'output' => API_OUTPUT_EXTEND);
        $triggers = CTrigger::get($options);
        order_result($triggers, 'description');
    }
    $triggerids = zbx_objectValues($triggers, 'triggerid');
    $frmCnct->addVar('linktriggers', $triggerids);
    $triggerid = get_request('triggerid', 0);
    $drawtype = get_request('drawtype', 0);
    $color = get_request('color', 'DD0000');
    $frmCnct->addVar('mapid', $_REQUEST['mapid']);
    $frmCnct->addVar('triggerid', $triggerid);
    // START comboboxes preparations
    $cmbType = new CComboBox('drawtype', $drawtype);
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:popup_link_tr.php

示例8: CButton

    } else {
        //adding additional hint to button
        $create_scenario_button = new CButton('form', S_CREATE_SCENARIO . ' ' . S_SELECT_HOST_FIRST);
        //and disabling it
        $create_scenario_button->setEnabled('no');
    }
    $form_button->addItem($create_scenario_button);
} else {
    $form_button = null;
}
$http_wdgt = new CWidget();
$http_wdgt->addPageHeader(S_CONFIGURATION_OF_WEB_MONITORING_BIG, $form_button);
$db_hosts = DBselect('select hostid from hosts where ' . DBin_node('hostid'));
if (isset($_REQUEST['form']) && isset($_REQUEST['hostid']) && DBfetch($db_hosts)) {
    $form = new CFormTable(S_SCENARIO);
    $form->setName('form_scenario');
    if ($_REQUEST['groupid'] > 0) {
        $form->addVar('groupid', $_REQUEST['groupid']);
    }
    $form->addVar('hostid', $_REQUEST['hostid']);
    if (isset($_REQUEST['httptestid'])) {
        $form->addVar('httptestid', $_REQUEST['httptestid']);
    }
    $name = get_request('name', '');
    $application = get_request('application', '');
    $delay = get_request('delay', 60);
    $status = get_request('status', HTTPTEST_STATUS_ACTIVE);
    $agent = get_request('agent', '');
    $macros = get_request('macros', array());
    $steps = get_request('steps', array());
    $authentication = get_request('authentication', HTTPTEST_AUTH_NONE);
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:httpconf.php

示例9: array

 $templateid = get_request('templateid', 0);
 $template_name = get_request('template_name', '');
 $newgroup = get_request('newgroup', '');
 $templates = get_request('templates', array());
 $clear_templates = get_request('clear_templates', array());
 $frm_title = S_TEMPLATE;
 if ($templateid > 0) {
     $db_host = get_host_by_hostid($templateid);
     $template_name = $db_host['host'];
     $frm_title .= SPACE . ' [' . $template_name . ']';
     $original_templates = get_templates_by_hostid($templateid);
 } else {
     $original_templates = array();
 }
 $frmHost = new CFormTable($frm_title, 'templates.php');
 $frmHost->setName('tpl_for');
 if ($templateid) {
     $frmHost->addVar('templateid', $templateid);
 }
 if ($templateid > 0 && !isset($_REQUEST['form_refresh'])) {
     // get template groups from db
     $options = array('hostids' => $templateid, 'editable' => 1);
     $groups = CHostGroup::get($options);
     // get template hosts from db
     $params = array('templateids' => $templateid, 'editable' => 1, 'order' => 'host');
     $hosts_linked_to = CHost::get($params);
     $templates = $original_templates;
 } else {
     $groups = get_request('groups', array());
     $hosts_linked_to = get_request('hosts', array());
 }
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:templates.php


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