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


PHP CCol::setAttribute方法代码示例

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


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

示例1: valueComparisonFormForMultiplePeriods

/**
 * Create report bar for for "Compare values for multiple periods"
 *
 * @return object $reportForm
 */
function valueComparisonFormForMultiplePeriods()
{
    $config = get_request('config', 1);
    $title = get_request('title', _('Report 3'));
    $xlabel = get_request('xlabel', '');
    $ylabel = get_request('ylabel', '');
    $scaletype = get_request('scaletype', TIMEPERIOD_TYPE_WEEKLY);
    $avgperiod = get_request('avgperiod', TIMEPERIOD_TYPE_DAILY);
    $report_timesince = get_request('report_timesince', date(TIMESTAMP_FORMAT_ZERO_TIME, time() - SEC_PER_DAY));
    $report_timetill = get_request('report_timetill', date(TIMESTAMP_FORMAT_ZERO_TIME));
    $itemId = get_request('itemid', 0);
    $hostids = get_request('hostids', array());
    $hostids = zbx_toHash($hostids);
    $showlegend = get_request('showlegend', 0);
    $palette = get_request('palette', 0);
    $palettetype = get_request('palettetype', 0);
    $reportForm = new CFormTable(null, null, 'get');
    $reportForm->setAttribute('name', 'zbx_report');
    $reportForm->setAttribute('id', 'zbx_report');
    if (isset($_REQUEST['report_show']) && $itemId) {
        $reportForm->addVar('report_show', 'show');
    }
    $reportForm->addVar('config', $config);
    $reportForm->addVar('report_timesince', date(TIMESTAMP_FORMAT, $report_timesince));
    $reportForm->addVar('report_timetill', date(TIMESTAMP_FORMAT, $report_timetill));
    $reportForm->addRow(_('Title'), new CTextBox('title', $title, 40));
    $reportForm->addRow(_('X label'), new CTextBox('xlabel', $xlabel, 40));
    $reportForm->addRow(_('Y label'), new CTextBox('ylabel', $ylabel, 40));
    $reportForm->addRow(_('Legend'), new CCheckBox('showlegend', $showlegend, null, 1));
    $reportForm->addVar('sortorder', 0);
    $groupids = get_request('groupids', array());
    $group_tb = new CTweenBox($reportForm, 'groupids', $groupids, 10);
    $options = array('real_hosts' => true, 'output' => 'extend');
    $db_groups = API::HostGroup()->get($options);
    order_result($db_groups, 'name');
    foreach ($db_groups as $gnum => $group) {
        $groupids[$group['groupid']] = $group['groupid'];
        $group_tb->addItem($group['groupid'], $group['name']);
    }
    $reportForm->addRow(_('Groups'), $group_tb->Get(_('Selected groups'), _('Other groups')));
    $groupid = get_request('groupid', 0);
    $cmbGroups = new CComboBox('groupid', $groupid, 'submit()');
    $cmbGroups->addItem(0, _('All'));
    foreach ($db_groups as $gnum => $group) {
        $cmbGroups->addItem($group['groupid'], $group['name']);
    }
    $td_groups = new CCol(array(_('Group'), SPACE, $cmbGroups));
    $td_groups->setAttribute('style', 'text-align: right;');
    $host_tb = new CTweenBox($reportForm, 'hostids', $hostids, 10);
    $options = array('real_hosts' => true, 'output' => array('hostid', 'name'));
    if ($groupid > 0) {
        $options['groupids'] = $groupid;
    }
    $db_hosts = API::Host()->get($options);
    $db_hosts = zbx_toHash($db_hosts, 'hostid');
    order_result($db_hosts, 'name');
    foreach ($db_hosts as $hnum => $host) {
        $host_tb->addItem($host['hostid'], $host['name']);
    }
    $options = array('real_hosts' => true, 'output' => array('hostid', 'name'), 'hostids' => $hostids);
    $db_hosts2 = API::Host()->get($options);
    order_result($db_hosts2, 'name');
    foreach ($db_hosts2 as $hnum => $host) {
        if (!isset($db_hosts[$host['hostid']])) {
            $host_tb->addItem($host['hostid'], $host['name']);
        }
    }
    $reportForm->addRow(_('Hosts'), $host_tb->Get(_('Selected hosts'), array(_('Other hosts | Group') . SPACE, $cmbGroups)));
    $reporttimetab = new CTable(null, 'calendar');
    $timeSinceRow = createDateSelector('report_timesince', $report_timesince, 'report_timetill');
    array_unshift($timeSinceRow, _('From'));
    $reporttimetab->addRow($timeSinceRow);
    $timeTillRow = createDateSelector('report_timetill', $report_timetill, 'report_timesince');
    array_unshift($timeTillRow, _('Till'));
    $reporttimetab->addRow($timeTillRow);
    $reportForm->addRow(_('Period'), $reporttimetab);
    $scale = new CComboBox('scaletype', $scaletype);
    $scale->addItem(TIMEPERIOD_TYPE_HOURLY, _('Hourly'));
    $scale->addItem(TIMEPERIOD_TYPE_DAILY, _('Daily'));
    $scale->addItem(TIMEPERIOD_TYPE_WEEKLY, _('Weekly'));
    $scale->addItem(TIMEPERIOD_TYPE_MONTHLY, _('Monthly'));
    $scale->addItem(TIMEPERIOD_TYPE_YEARLY, _('Yearly'));
    $reportForm->addRow(_('Scale'), $scale);
    $avgcmb = new CComboBox('avgperiod', $avgperiod);
    $avgcmb->addItem(TIMEPERIOD_TYPE_HOURLY, _('Hourly'));
    $avgcmb->addItem(TIMEPERIOD_TYPE_DAILY, _('Daily'));
    $avgcmb->addItem(TIMEPERIOD_TYPE_WEEKLY, _('Weekly'));
    $avgcmb->addItem(TIMEPERIOD_TYPE_MONTHLY, _('Monthly'));
    $avgcmb->addItem(TIMEPERIOD_TYPE_YEARLY, _('Yearly'));
    $reportForm->addRow(_('Average by'), $avgcmb);
    $itemName = '';
    if ($itemId) {
        $itemName = get_item_by_itemid($itemId);
        $itemName = itemName($itemName);
    }
//.........这里部分代码省略.........
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:101,代码来源:reports.inc.php

示例2: CCol

    if ($result != '-') {
        $style = $result == 'TRUE' ? 'background-color: #ccf; color: #00f;' : 'background-color: #fcc; color: #f00;';
    }
    $col = new CCol($result);
    $col->setAttribute('style', $style);
    $res_table->addRow(new CRow(array($e['list'], $col)));
}
$result = '-';
if ($allowedTesting && $test) {
    $result = evalExpressionData($expression, $macrosData, $octet);
}
$style = 'text-align: center;';
if ($result != '-') {
    $style = $result == 'TRUE' ? 'background-color: #ccf; color: #00f;' : 'background-color: #fcc; color: #f00;';
}
$col = new CCol($result);
$col->setAttribute('style', $style);
$res_table->setFooter(array($outline, $col), $res_table->headerClass);
$frm_test->addRow(_('Result'), $res_table);
// action buttons
$btn_test = new CSubmit('test_expression', _('Test'));
if (!$allowedTesting) {
    $btn_test->setAttribute('disabled', 'disabled');
}
$frm_test->addItemToBottomRow($btn_test);
$frm_test->addItemToBottomRow(SPACE);
$btn_close = new CButton('close', _('Close'), 'javascript: self.close();');
$frm_test->addItemToBottomRow($btn_close);
$frm_test->show();
//------------------------ </FORM> ---------------------------
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:tr_testexpr.php

示例3: array

            $details = '';
            break;
    }
    // action list
    $actionLinks = array();
    if (!empty($mediaType['listOfActions'])) {
        foreach ($mediaType['listOfActions'] as $action) {
            $actionLinks[] = new CLink($action['name'], 'actionconf.php?form=update&actionid=' . $action['actionid']);
            $actionLinks[] = ', ';
        }
        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?'));
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:administration.mediatypes.list.php

示例4: CNumericBox

foreach ($this->data['slides'] as $step => $slides) {
    $name = '';
    if (!empty($slides['screenid'])) {
        $screen = get_screen_by_screenid($slides['screenid']);
        if (!empty($screen['name'])) {
            $name = $screen['name'];
        }
    }
    $delay = new CNumericBox('slides[' . $step . '][delay]', !empty($slides['delay']) ? $slides['delay'] : '', 5, 'no', true, false);
    $delay->setAttribute('placeholder', _('default'));
    $removeButton = new CButton('remove_' . $step, _('Remove'), 'javascript: removeSlide(this);', 'link_menu');
    $removeButton->setAttribute('remove_slide', $step);
    $row = new CRow(array(new CSpan(null, 'ui-icon ui-icon-arrowthick-2-n-s move'), new CSpan($i++ . ':', 'rowNum', 'current_slide_' . $step), $name, $delay, $removeButton), 'sortable', 'slides_' . $step);
    $slideTable->addRow($row);
}
$addButtonColumn = new CCol(empty($this->data['work_slide']) ? new CButton('add', _('Add'), 'return PopUp("popup.php?srctbl=screens&srcfld1=screenid&dstfrm=' . $slideForm->getName() . '&multiselect=1", 450, 450)', 'link_menu') : null, null, 5);
$addButtonColumn->setAttribute('style', 'vertical-align: middle;');
$slideTable->addRow(new CRow($addButtonColumn, null, 'screenListFooter'));
$slideFormList->addRow(_('Slides'), new CDiv($slideTable, 'objectgroup inlineblock border_dotted ui-corner-all'));
// append tabs to form
$slideTab = new CTabView();
$slideTab->addTab('slideTab', _('Slide'), $slideFormList);
$slideForm->addItem($slideTab);
// append buttons to form
if (empty($this->data['slideshowid'])) {
    $slideForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), new CButtonCancel()));
} else {
    $slideForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), array(new CSubmit('clone', _('Clone')), new CButtonDelete(_('Delete slide show?'), url_param('form') . url_param('slideshowid') . url_param('config')), new CButtonCancel())));
}
$slideWidget->addItem($slideForm);
return $slideWidget;
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:configuration.slideconf.edit.php

示例5: createFlicker

 private function createFlicker($col1, $col2 = null)
 {
     $table = new CTable(null, 'textwhite maxwidth middle flicker');
     $table->setCellSpacing(0);
     $table->setCellPadding(1);
     if (!is_null($col2)) {
         $td_r = new CCol($col2, 'flicker_r');
         $td_r->setAttribute('align', 'right');
         $table->addRow(array(new CCol($col1, 'flicker_l'), $td_r));
     } else {
         $td_c = new CCol($col1, 'flicker_c');
         $td_c->setAttribute('align', 'center');
         $table->addRow($td_c);
     }
     return $table;
 }
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:16,代码来源:CWidget.php

示例6: CTable

 if (isset($ZBX_SERVER_NAME) && !zbx_empty($ZBX_SERVER_NAME)) {
     $table = new CTable();
     $table->addStyle('width: 100%;');
     $tableColumn = new CCol(new CSpan($ZBX_SERVER_NAME, 'textcolorstyles'));
     if (is_null($node_form)) {
         $tableColumn->addStyle('padding-right: 5px;');
     } else {
         $tableColumn->addStyle('padding-right: 20px; padding-bottom: 2px;');
     }
     $table->addRow(array($tableColumn, $node_form));
     $node_form = $table;
 }
 // 1st level menu
 $table = new CTable(null, 'maxwidth');
 $r_col = new CCol($node_form, 'right');
 $r_col->setAttribute('style', 'line-height: 1.8em;');
 $table->addRow(array($menu_table, $r_col));
 $page_menu = new CDiv(null, 'textwhite');
 $page_menu->setAttribute('id', 'mmenu');
 $page_menu->addItem($table);
 // 2nd level menu
 $sub_menu_table = new CTable(null, 'sub_menu maxwidth ui-widget-header');
 $menu_divs = array();
 $menu_selected = false;
 foreach ($sub_menus as $label => $sub_menu) {
     $sub_menu_row = array();
     foreach ($sub_menu as $id => $sub_page) {
         if (empty($sub_page['menu_text'])) {
             $sub_page['menu_text'] = SPACE;
         }
         $sub_page['menu_url'] .= '?ddreset=1';
开发者ID:hujingguang,项目名称:work,代码行数:31,代码来源:page_header.php

示例7: show_messages

function show_messages($bool = true, $okmsg = null, $errmsg = null)
{
    global $page, $ZBX_MESSAGES;
    if (!defined('PAGE_HEADER_LOADED')) {
        return null;
    }
    if (defined('ZBX_API_REQUEST')) {
        return null;
    }
    if (!isset($page['type'])) {
        $page['type'] = PAGE_TYPE_HTML;
    }
    $imageMessages = array();
    if (!$bool && !is_null($errmsg)) {
        $msg = _('ERROR') . ': ' . $errmsg;
    } elseif ($bool && !is_null($okmsg)) {
        $msg = $okmsg;
    }
    if (isset($msg)) {
        switch ($page['type']) {
            case PAGE_TYPE_IMAGE:
                // save all of the messages in an array to display them later in an image
                $imageMessages[] = array('text' => $msg, 'color' => !$bool ? array('R' => 255, 'G' => 0, 'B' => 0) : array('R' => 34, 'G' => 51, 'B' => 68));
                break;
            case PAGE_TYPE_XML:
                echo htmlspecialchars($msg) . "\n";
                break;
            case PAGE_TYPE_HTML:
            default:
                $msg_tab = new CTable($msg, $bool ? 'msgok' : 'msgerr');
                $msg_tab->setCellPadding(0);
                $msg_tab->setCellSpacing(0);
                $row = array();
                $msg_col = new CCol(bold($msg), 'msg_main msg');
                $msg_col->setAttribute('id', 'page_msg');
                $row[] = $msg_col;
                if (isset($ZBX_MESSAGES) && !empty($ZBX_MESSAGES)) {
                    $msg_details = new CDiv(_('Details'), 'blacklink');
                    $msg_details->setAttribute('onclick', 'javascript: showHide("msg_messages", IE ? "block" : "table");');
                    $msg_details->setAttribute('title', _('Maximize') . '/' . _('Minimize'));
                    array_unshift($row, new CCol($msg_details, 'clr'));
                }
                $msg_tab->addRow($row);
                $msg_tab->show();
                break;
        }
    }
    if (isset($ZBX_MESSAGES) && !empty($ZBX_MESSAGES)) {
        if ($page['type'] == PAGE_TYPE_IMAGE) {
            foreach ($ZBX_MESSAGES as $msg) {
                // save all of the messages in an array to display them later in an image
                if ($msg['type'] == 'error') {
                    $imageMessages[] = array('text' => $msg['message'], 'color' => array('R' => 255, 'G' => 55, 'B' => 55));
                } else {
                    $imageMessages[] = array('text' => $msg['message'], 'color' => array('R' => 155, 'G' => 155, 'B' => 55));
                }
            }
        } elseif ($page['type'] == PAGE_TYPE_XML) {
            foreach ($ZBX_MESSAGES as $msg) {
                echo '[' . $msg['type'] . '] ' . $msg['message'] . "\n";
            }
        } else {
            $lst_error = new CList(null, 'messages');
            foreach ($ZBX_MESSAGES as $msg) {
                $lst_error->addItem($msg['message'], $msg['type']);
                $bool = $bool && 'error' !== strtolower($msg['type']);
            }
            $msg_show = 6;
            $msg_count = count($ZBX_MESSAGES);
            if ($msg_count > $msg_show) {
                $msg_count = $msg_show * 16;
                $lst_error->setAttribute('style', 'height: ' . $msg_count . 'px;');
            }
            $tab = new CTable(null, $bool ? 'msgok' : 'msgerr');
            $tab->setCellPadding(0);
            $tab->setCellSpacing(0);
            $tab->setAttribute('id', 'msg_messages');
            $tab->setAttribute('style', 'width: 100%;');
            if (isset($msg_tab) && $bool) {
                $tab->setAttribute('style', 'display: none;');
            }
            $tab->addRow(new CCol($lst_error, 'msg'));
            $tab->show();
        }
        $ZBX_MESSAGES = null;
    }
    // draw an image with the messages
    if ($page['type'] == PAGE_TYPE_IMAGE && count($imageMessages) > 0) {
        $imageFontSize = 8;
        // calculate the size of the text
        $imageWidth = 0;
        $imageHeight = 0;
        foreach ($imageMessages as &$msg) {
            $size = imageTextSize($imageFontSize, 0, $msg['text']);
            $msg['height'] = $size['height'] - $size['baseline'];
            // calculate the total size of the image
            $imageWidth = max($imageWidth, $size['width']);
            $imageHeight += $size['height'] + 1;
        }
        unset($msg);
//.........这里部分代码省略.........
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:101,代码来源:func.inc.php

示例8: make_sorting_header

function make_sorting_header($obj, $tabfield, $url = '')
{
    global $page;
    $sortorder = $_REQUEST['sort'] == $tabfield && $_REQUEST['sortorder'] == ZBX_SORT_UP ? ZBX_SORT_DOWN : ZBX_SORT_UP;
    $link = new Curl($url);
    if (empty($url)) {
        $link->formatGetArguments();
    }
    $link->setArgument('sort', $tabfield);
    $link->setArgument('sortorder', $sortorder);
    $url = $link->getUrl();
    if ($page['type'] != PAGE_TYPE_HTML && defined('ZBX_PAGE_MAIN_HAT')) {
        $script = "javascript: return updater.onetime_update('" . ZBX_PAGE_MAIN_HAT . "', '" . $url . "');";
    } else {
        $script = 'javascript: redirect("' . $url . '");';
    }
    zbx_value2array($obj);
    $cont = new CSpan();
    foreach ($obj as $el) {
        if (is_object($el) || $el === SPACE) {
            $cont->addItem($el);
        } else {
            $cont->addItem(new CSpan($el, 'underline'));
        }
    }
    $cont->addItem(SPACE);
    $img = null;
    if (isset($_REQUEST['sort']) && $tabfield == $_REQUEST['sort']) {
        if ($sortorder == ZBX_SORT_UP) {
            $img = new CSpan(SPACE, 'icon_sortdown');
        } else {
            $img = new CSpan(SPACE, 'icon_sortup');
        }
    }
    $col = new CCol(array($cont, $img), 'nowrap hover_grey');
    $col->setAttribute('onclick', $script);
    return $col;
}
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:38,代码来源:func.inc.php

示例9: CSpan

        $value = new CSpan(trigger_value2str($row_event['value']), get_trigger_value_style($row_event['value']));
        if ($config['event_ack_enable']) {
            if ($row_event['acknowledged'] == 1) {
                $acks_cnt = DBfetch(DBselect('SELECT COUNT(*) as cnt FROM acknowledges WHERE eventid=' . $row_event['eventid']));
                $ack = array(new CSpan(S_YES, 'off'), SPACE . '(' . $acks_cnt['cnt'] . SPACE, new CLink(S_SHOW, 'acknow.php?eventid=' . $row_event['eventid'], 'action'), ')');
            } else {
                $ack = new CLink(S_NOT_ACKNOWLEDGED, 'acknow.php?eventid=' . $row_event['eventid'], 'on');
            }
        }
        $description = expand_trigger_description_by_data(array_merge($row, array('clock' => $row_event['clock'])), ZBX_FLAG_EVENT);
        $font = new CTag('font', 'yes');
        $font->setAttribute('color', '#808080');
        $font->addItem(array('&nbsp;-&nbsp;', $description));
        $description = $font;
        $description = new CCol($description);
        $description->setAttribute('style', 'white-space: normal; width: 90%;');
        $clock = new CLink(zbx_date2str(S_DATE_FORMAT_YMDHMS, $row_event['clock']), 'tr_events.php?triggerid=' . $row['triggerid'] . '&eventid=' . $row_event['eventid'], 'action');
        $table->addRow(array($config['event_ack_enable'] ? $row_event['acknowledged'] == 1 ? SPACE : new CCheckBox('events[' . $row_event['eventid'] . ']', 'no', NULL, $row_event['eventid']) : NULL, new CCol(get_severity_description($row['priority']), get_severity_style($row['priority'], $row_event['value'])), $value, $clock, get_node_name_by_elid($row['triggerid']), $host, $description, $actions, $config['event_ack_enable'] ? new CCol($ack, 'center') : NULL, new CLink($row['comments'] == '' ? S_ADD : S_SHOW, 'tr_comments.php?triggerid=' . $row['triggerid'], 'action')));
        $event_limit++;
        if ($event_limit >= $config['event_show_max']) {
            break;
        }
    }
    unset($row, $description, $actions);
}
//----- GO ------
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)');
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:tr_status.php

示例10: PopUp

    $name->setAttribute('name_step', $stepid);
    $name->onClick('return PopUp("popup_httpstep.php?dstfrm=' . $httpForm->getName() . '&list_name=steps&stepid="+jQuery(this).attr("name_step")+"' . url_param($step['name'], false, 'name') . url_param($step['timeout'], false, 'timeout') . url_param($step['url'], false, 'url') . url_param($step['posts'], false, 'posts') . url_param($step['required'], false, 'required') . url_param($step['status_codes'], false, 'status_codes') . '", 600, 410);');
    if (zbx_strlen($step['url']) > 70) {
        $url = new CSpan(substr($step['url'], 0, 35) . SPACE . '...' . SPACE . substr($step['url'], zbx_strlen($step['url']) - 25, 25));
        $url->setHint($step['url']);
    } else {
        $url = $step['url'];
    }
    $removeButton = new CButton('remove_' . $stepid, _('Remove'), 'javascript: removeStep(this);', 'link_menu');
    $removeButton->setAttribute('remove_step', $stepid);
    $row = new CRow(array(new CSpan(null, 'ui-icon ui-icon-arrowthick-2-n-s move'), $numSpan, $name, $step['timeout'] . SPACE . _('sec'), $url, htmlspecialchars($step['required']), $step['status_codes'], $removeButton), 'sortable');
    $row->setAttribute('id', 'steps_' . $stepid);
    $stepsTable->addRow($row);
}
$tmpColumn = new CCol(new CButton('add_step', _('Add'), 'return PopUp("popup_httpstep.php?dstfrm=' . $httpForm->getName() . '", 600, 410);', 'link_menu'), null, 8);
$tmpColumn->setAttribute('style', 'vertical-align: middle;');
$stepsTable->addRow(new CRow($tmpColumn));
$httpStepFormList->addRow(_('Steps'), new CDiv($stepsTable, 'objectgroup inlineblock border_dotted ui-corner-all'));
// append tabs to form
$httpTab = new CTabView(array('remember' => true));
if (!$this->data['form_refresh']) {
    $httpTab->setSelected(0);
}
$httpTab->addTab('scenarioTab', _('Scenario'), $httpFormList);
$httpTab->addTab('stepTab', _('Steps'), $httpStepFormList);
$httpForm->addItem($httpTab);
// append buttons to form
if (!empty($this->data['httptestid'])) {
    $httpForm->addItem(makeFormFooter(array(new CSubmit('save', _('Save'))), array(new CSubmit('clone', _('Clone')), new CButtonDelete(_('Delete scenario?'), url_param('form') . url_param('httptestid') . url_param('hostid')), new CButtonCancel())));
} else {
    $httpForm->addItem(makeFormFooter(array(new CSubmit('save', _('Save'))), array(new CButtonCancel())));
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:configuration.httpconf.edit.php

示例11: getGraphDims

 $scroll_div->setAttribute('id', 'scrollbar_cntr');
 $charts_wdgt->addFlicker($scroll_div, CProfile::get('web.charts.filter.state', 1));
 $graphDims = getGraphDims($_REQUEST['graphid']);
 if ($graphDims['graphtype'] == GRAPH_TYPE_PIE || $graphDims['graphtype'] == GRAPH_TYPE_EXPLODED) {
     $loadSBox = 0;
     $scrollWidthByImage = 0;
     $containerid = 'graph_cont1';
     $src = 'chart6.php?graphid=' . $_REQUEST['graphid'];
 } else {
     $loadSBox = 1;
     $scrollWidthByImage = 1;
     $containerid = 'graph_cont1';
     $src = 'chart2.php?graphid=' . $_REQUEST['graphid'];
 }
 $graph_cont = new CCol();
 $graph_cont->setAttribute('id', $containerid);
 $table->addRow($graph_cont);
 $icon = get_icon('favourite', array('fav' => 'web.favorite.graphids', 'elname' => 'graphid', 'elid' => $_REQUEST['graphid']));
 $fs_icon = get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen']));
 $rst_icon = get_icon('reset', array('id' => $_REQUEST['graphid']));
 array_push($icons, $icon, $rst_icon, $fs_icon);
 // NAV BAR
 $utime = zbxDateToTime($_REQUEST['stime']);
 $starttime = get_min_itemclock_by_graphid($_REQUEST['graphid']);
 if ($utime < $starttime) {
     $starttime = $utime;
 }
 $timeline = array('starttime' => date('YmdHis', $starttime), 'period' => $effectiveperiod, 'usertime' => date('YmdHis', $utime + $effectiveperiod));
 $dom_graph_id = 'graph';
 $objData = array('id' => $_REQUEST['graphid'], 'domid' => $dom_graph_id, 'containerid' => $containerid, 'src' => $src, 'objDims' => $graphDims, 'loadSBox' => $loadSBox, 'loadImage' => 1, 'loadScroll' => 1, 'scrollWidthByImage' => $scrollWidthByImage, 'dynamic' => 1);
 zbx_add_post_js('timeControl.addObject("' . $dom_graph_id . '",' . zbx_jsvalue($timeline) . ',' . zbx_jsvalue($objData) . ');');
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:charts.php

示例12: CForm

** 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.
**/
$regExpForm = new CForm();
$regExpForm->setName('regularExpressionsForm');
$regExpForm->addVar('form', $this->data['form']);
$regExpForm->addVar('form_refresh', $this->data['form_refresh']);
$regExpForm->addVar('regexpid', get_request('regexpid'));
$regExpLeftTable = new CTable();
$regExpLeftTable->addRow(create_hat(_('Regular expression'), get_regexp_form(), null, 'hat_regexp'));
$regExpRightTable = new CTable();
$regExpRightTable->addRow(create_hat(_('Expressions'), get_expressions_tab(), null, 'hat_expressions'));
if (isset($_REQUEST['new_expression'])) {
    $hatTable = create_hat(_('New expression'), get_expression_form(), null, 'hat_new_expression');
    $hatTable->setAttribute('style', 'margin-top: 3px;');
    $regExpRightTable->addRow($hatTable);
}
$regExpLeftColumn = new CCol($regExpLeftTable);
$regExpLeftColumn->setAttribute('valign', 'top');
$regExpRightColumn = new CCol($regExpRightTable);
$regExpRightColumn->setAttribute('valign', 'top');
$regExpOuterTable = new CTable();
$regExpOuterTable->addRow(array($regExpLeftColumn, new CCol('&nbsp;'), $regExpRightColumn));
$regExpForm->addItem($regExpOuterTable);
show_messages();
return $regExpForm;
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:administration.general.regularexpressions.edit.php

示例13: CHelp

$help = new CHelp('web.view.php', 'right');
$help_table = new CTableInfo();
$help_table->setAttribute('style', 'width: 200px');
if ($_REQUEST['type'] == SHOW_TRIGGERS) {
    $help_table->addRow(array(new CCol(SPACE, 'normal'), S_DISABLED));
}
foreach (array(1, 2, 3, 4, 5) as $tr_severity) {
    $help_table->addRow(array(new CCol(get_severity_description($tr_severity), get_severity_style($tr_severity)), S_ENABLED));
}
$help_table->addRow(array(new CCol(SPACE, 'unknown_trigger'), S_UNKNOWN));
if ($_REQUEST['type'] == SHOW_TRIGGERS) {
    $col = new CCol(SPACE, 'unknown_trigger');
    $col->setAttribute('style', 'background-image: url(images/gradients/blink1.gif); ' . 'background-position: top left; background-repeat: repeate;');
    $help_table->addRow(array($col, S_5_MIN));
    $col = new CCol(SPACE, 'unknown_trigger');
    $col->setAttribute('style', 'background-image: url(images/gradients/blink2.gif); ' . 'background-position: top left; background-repeat: repeate;');
    $help_table->addRow(array($col, S_15_MIN));
    $help_table->addRow(array(new CCol(SPACE), S_NO_TRIGGER));
} else {
    $help_table->addRow(array(new CCol(SPACE), S_DISABLED . ' ' . S_OR . ' ' . S_NO_TRIGGER));
}
$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();
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:overview.php

示例14: show_history

function show_history($itemid, $from, $stime, $period)
{
    //$till=date(S_DATE_FORMAT_YMDHMS,time(NULL)-$from*3600);
    //show_table_header(S_TILL.SPACE.$till.' ( '.zbx_date2age($stime,$stime+$period).' )');
    $td = new CCol(get_js_sizeable_graph('graph', 'chart.php?itemid=' . $itemid . url_param($from, false, 'from') . url_param($stime, false, 'stime') . url_param($period, false, 'period')));
    $td->setAttribute('align', 'center');
    $tr = new CRow($td);
    $tr->setAttribute('bgcolor', '#dddddd');
    $table = new CTable();
    $table->setAttribute('width', '100%');
    $table->setAttribute('bgcolor', '#cccccc');
    $table->setAttribute('cellspacing', '1');
    $table->setAttribute('cellpadding', '3');
    $table->addRow($tr);
    $table->show();
}
开发者ID:phedders,项目名称:zabbix,代码行数:16,代码来源:graphs.inc.php

示例15: CCol

    $buttonCol = new CCol(new CButton('addJMXInterface', _('Add'), null, 'link_menu'), 'interface-add-control');
    $col = new CCol($helpTextWhenDragInterfaceJMX);
    $col->setAttribute('colspan', 6);
    $buttonRow = new CRow(array($buttonCol, $col));
    $buttonRow->setAttribute('id', 'JMXIterfacesFooter');
    $ifTab->addRow($buttonRow);
    $hostList->addRow(_('JMX interfaces'), new CDiv($ifTab, 'border_dotted objectgroup inlineblock interface-group'), false, null, 'interface-row');
    // table for IPMI interfaces with footer
    $ifTab = new CTable(null, 'formElementTable');
    $ifTab->setAttribute('id', 'IPMIInterfaces');
    $ifTab->setAttribute('data-type', 'ipmi');
    $helpTextWhenDragInterfaceIPMI = new CSpan(_('Drag here to change the type of the interface to "IPMI" type.'));
    $helpTextWhenDragInterfaceIPMI->addClass('dragHelpText');
    $buttonCol = new CCol(new CButton('addIPMIInterface', _('Add'), null, 'link_menu'), 'interface-add-control');
    $col = new CCol($helpTextWhenDragInterfaceIPMI);
    $col->setAttribute('colspan', 6);
    $buttonRow = new CRow(array($buttonCol, $col));
    $buttonRow->setAttribute('id', 'IPMIIterfacesFooter');
    $ifTab->addRow($buttonRow);
    $hostList->addRow(_('IPMI interfaces'), new CDiv($ifTab, 'border_dotted objectgroup inlineblock interface-group'), false, null, 'interface-row');
} else {
    $interfaces = array();
    $existingInterfaceTypes = array();
    foreach ($dbHost['interfaces'] as $interface) {
        $interface['locked'] = true;
        $existingInterfaceTypes[$interface['type']] = true;
        $interfaces[$interface['interfaceid']] = $interface;
    }
    zbx_add_post_js('hostInterfacesManager.add(' . CJs::encodeJson($interfaces) . ');');
    zbx_add_post_js('hostInterfacesManager.disable()');
    // table for agent interfaces with footer
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:configuration.host.edit.php


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