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


PHP CTable::setFooter方法代码示例

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


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

示例1: BodyToString

 function BodyToString($destroy = true)
 {
     $table = new CTable(null, 'setup_wizard');
     $table->setAlign('center');
     $table->setHeader(array(new CCol(S_ZABBIX_VER, 'left'), SPACE), 'header');
     $table->addRow(array(SPACE, new CCol($this->stage[$this->getStep()]['title'], 'right')), 'title');
     $table->addRow(array(new CCol($this->getList(), 'left'), new CCol($this->getState(), 'right')), 'center');
     $next = new CButton('next[' . $this->getStep() . ']', S_NEXT . ' >>');
     if ($this->DISABLE_NEXT_BUTTON) {
         $next->setEnabled(false);
     }
     $table->setFooter(array(new CCol(new CButton('cancel', S_CANCEL), 'left'), new CCol(array(isset($this->stage[$this->getStep() - 1]) ? new CButton('back[' . $this->getStep() . ']', '<< ' . S_PREVIOUS) : null, isset($this->stage[$this->getStep() + 1]) ? $next : new CButton('finish', S_FINISH)), 'right')), 'footer');
     return parent::BodyToString($destroy) . $table->ToString();
 }
开发者ID:rennhak,项目名称:zabbix,代码行数:14,代码来源:setup.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: bodyToString

 public function bodyToString()
 {
     $res = parent::bodyToString();
     $tbl = new CTable(null, $this->tableclass);
     $tbl->setCellSpacing(0);
     $tbl->setCellPadding(1);
     $tbl->setAlign($this->align);
     // add first row
     if (!is_null($this->title)) {
         $col = new CCol(null, 'form_row_first');
         $col->setColSpan(2);
         if (isset($this->help)) {
             $col->addItem($this->help);
         }
         if (isset($this->title)) {
             $col->addItem($this->title);
         }
         $tbl->setHeader($col);
     }
     // add last row
     $tbl->setFooter($this->bottom_items);
     // add center rows
     foreach ($this->center_items as $item) {
         $tbl->addRow($item);
     }
     return $res . $tbl->toString();
 }
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:27,代码来源:class.cformtable.php

示例4: bodyToString

 public function bodyToString()
 {
     parent::bodyToString();
     $tbl = new CTable(NULL, $this->tableclass);
     $tbl->setOddRowClass('form_odd_row');
     $tbl->setEvenRowClass('form_even_row');
     $tbl->setCellSpacing(0);
     $tbl->setCellPadding(1);
     $tbl->setAlign($this->align);
     // add first row
     $col = new CCol(NULL, 'form_row_first');
     $col->setColSpan(2);
     if (isset($this->help)) {
         $col->addItem($this->help);
     }
     if (isset($this->title)) {
         $col->addItem($this->title);
     }
     foreach ($this->top_items as $item) {
         $col->addItem($item);
     }
     $tbl->setHeader($col);
     // add last row
     $tbl->setFooter($this->bottom_items);
     // add center rows
     foreach ($this->center_items as $item) {
         $tbl->addRow($item);
     }
     return $tbl->toString();
 }
开发者ID:rennhak,项目名称:zabbix,代码行数:30,代码来源:class.cformtable.php

示例5: CForm

zbx_add_post_js('zabbixRegExp.addExpressions(' . CJs::encodeJson(array_values($this->get('expressions'))) . ');');
$form = new CForm();
$form->attr('id', 'zabbixRegExpForm');
$form->addVar('form', 1);
$form->addVar('regexpid', $this->data['regexpid']);
/*
 * Expressions tab
 */
$exprTab = new CFormList('exprTab');
$nameTextBox = new CTextBox('name', $this->get('name'), ZBX_TEXTBOX_STANDARD_SIZE, false, 128);
$nameTextBox->attr('autofocus', 'autofocus');
$exprTab->addRow(_('Name'), $nameTextBox);
$exprTable = new CTable(null, 'formElementTable formWideTable');
$exprTable->attr('id', 'exprTable');
$exprTable->setHeader(array(_('Expression'), new CCol(_('Expression type'), 'nowrap'), new CCol(_('Case sensitive'), 'nowrap'), SPACE));
$exprTable->setFooter(new CButton('add', _('Add'), null, 'link_menu exprAdd'));
$exprTab->addRow(_('Expressions'), new CDiv($exprTable, 'inlineblock border_dotted objectgroup'));
$exprForm = new CTable(null, 'formElementTable');
$exprForm->addRow(array(_('Expression'), new CTextBox('expressionNew', null, ZBX_TEXTBOX_STANDARD_SIZE)));
$exprForm->addRow(array(_('Expression type'), new CComboBox('typeNew', null, null, expression_type2str())));
$exprForm->addRow(array(_('Delimiter'), new CComboBox('delimiterNew', null, null, expressionDelimiters())), null, 'delimiterNewRow');
$exprForm->addRow(array(_('Case sensitive'), new CCheckBox('case_sensitiveNew')));
$exprFormFooter = array(new CButton('saveExpression', _('Add'), null, 'link_menu'), SPACE, new CButton('cancelExpression', _('Cancel'), null, 'link_menu'));
$exprTab->addRow(null, new CDiv(array($exprForm, $exprFormFooter), 'objectgroup inlineblock border_dotted'), true, 'exprForm');
/*
 * Test tab
 */
$testTab = new CFormList('testTab');
$testTab->addRow(_('Test string'), new CTextArea('test_string', $this->get('test_string')));
$preloaderDiv = new CDiv(null, 'preloader', 'testPreloader');
$preloaderDiv->addStyle('display: none');
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:administration.general.regularexpressions.edit.php

示例6: access_deny

function access_deny()
{
    global $USER_DETAILS;
    include_once 'include/page_header.php';
    if ($USER_DETAILS['alias'] != ZBX_GUEST_USER) {
        show_error_message(S_NO_PERMISSIONS);
    } else {
        $req = new Curl($_SERVER['REQUEST_URI']);
        $req->setArgument('sid', null);
        $table = new CTable(null, 'warning');
        $table->setAlign('center');
        $table->setHeader(new CCol(S_CONFIG_ERROR_YOU_ARE_NOT_LOGGED_IN_HEAD, 'left'), 'header');
        $table->addRow(new CCol(array(S_CONFIG_NOT_LOGGED_IN_ACCESS_DENIED, SPACE, bold(ZBX_GUEST_USER), '. ', S_CONFIG_ERROR_YOU_MUST_LOGIN, BR(), S_CONFIG_NOT_LOGGED_IN_NOTE), 'center'));
        $url = urlencode($req->toString());
        $footer = new CCol(array(new CButton('login', S_LOGIN, "javascript: document.location = 'index.php?request={$url}';"), new CButton('back', S_CANCEL, 'javascript: window.history.back();')), 'left');
        $table->setFooter($footer, 'footer');
        $table->show();
    }
    include_once 'include/page_footer.php';
}
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:20,代码来源:config.inc.php

示例7: define

    define('ZBX_PAGE_NO_MENU', 1);
}
$refresh_rate = 30;
//seconds
$fields = array('warning_msg' => array(T_ZBX_STR, O_OPT, NULL, NULL, NULL), 'message' => array(T_ZBX_STR, O_OPT, NULL, NULL, NULL), 'retry' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, NULL, NULL), 'cancel' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, NULL, NULL));
check_fields($fields, false);
if (isset($_REQUEST['cancel'])) {
    zbx_unsetcookie('ZBX_CONFIG');
    redirect('index.php');
}
//	clear_messages();
$USER_DETAILS['refresh'] = $refresh_rate;
include_once 'include/page_header.php';
unset($USER_DETAILS);
$table = new CTable(null, 'warning');
$table->setAlign('center');
$table->setAttribute('style', 'width: 480px; margin-top: 100px;');
$table->setHeader(array(new CCol(S_ZABBIX . SPACE . ZABBIX_VERSION, 'left')), 'header');
$table->addRow(SPACE);
$warning_msg = isset($_REQUEST['warning_msg']) ? $_REQUEST['warning_msg'] : S_ZABBIX_IS_UNAVAILABLE . '!';
$img = new CImg('./images/general/warning16r.gif', 'warning', 16, 16, 'img');
$img->setAttribute('style', 'border-width: 0px; vertical-align: bottom;');
$msg = new CSpan(bold(SPACE . $warning_msg));
$msg->setAttribute('style', 'line-height: 20px; vertical-align: top;');
$table->addRow(new CCol(array($img, $msg), 'center'));
$table->addRow(SPACE);
$table->setFooter(new CCol(new CButton('retry', S_RETRY, 'javascript: document.location.reload();'), 'left'), 'footer');
$table->show();
zbx_add_post_js('setTimeout("document.location.reload();",' . $refresh_rate * 1000 . ');');
echo SBR;
include_once 'include/page_footer.php';
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:warning.php

示例8: insert_host_form


//.........这里部分代码省略.........
            $trig_lbx->setAttribute('disabled', 'disabled');
            order_result($host_triggers, 'description');
            foreach ($host_triggers as $htrigger) {
                $trig_lbx->addItem($htrigger['triggerid'], $htrigger['description']);
            }
            $host_tbl->addRow(array(S_TRIGGERS, $trig_lbx));
        }
        // Host graphs
        $options = array('inherited' => 0, 'hostids' => $_REQUEST['hostid'], 'select_hosts' => API_OUTPUT_REFER, 'output' => API_OUTPUT_EXTEND);
        $host_graphs = CGraph::get($options);
        if (!empty($host_graphs)) {
            $graphs_lbx = new CListBox('graphs', null, 8);
            $graphs_lbx->setAttribute('disabled', 'disabled');
            order_result($host_graphs, 'name');
            foreach ($host_graphs as $hgraph) {
                if (count($hgraph['hosts']) > 1) {
                    continue;
                }
                $graphs_lbx->addItem($hgraph['graphid'], $hgraph['name']);
            }
            if ($graphs_lbx->ItemsCount() > 1) {
                $host_tbl->addRow(array(S_GRAPHS, $graphs_lbx));
            }
        }
    }
    $host_footer = array();
    $host_footer[] = new CButton('save', S_SAVE);
    if ($_REQUEST['hostid'] > 0 && $_REQUEST['form'] != 'full_clone') {
        array_push($host_footer, SPACE, new CButton('clone', S_CLONE), SPACE, new CButton('full_clone', S_FULL_CLONE), SPACE, new CButtonDelete(S_DELETE_SELECTED_HOST_Q, url_param('form') . url_param('hostid') . url_param('groupid')));
    }
    array_push($host_footer, SPACE, new CButtonCancel(url_param('groupid')));
    $host_footer = new CCol($host_footer);
    $host_footer->setColSpan(2);
    $host_tbl->setFooter($host_footer);
    $host_wdgt = new CWidget();
    $host_wdgt->setClass('header');
    $host_wdgt->addHeader($frm_title);
    $host_wdgt->addItem($host_tbl);
    // } HOST WIDGET
    // TEMPLATES{
    $template_tbl = new CTableInfo(S_NO_TEMPLATES_LINKED, 'tablestripped');
    $template_tbl->setOddRowClass('form_odd_row');
    $template_tbl->setEvenRowClass('form_even_row');
    foreach ($templates as $id => $temp_name) {
        $frmHost->addVar('templates[' . $id . ']', $temp_name);
        $template_tbl->addRow(new CCol(array(new CCheckBox('templates_rem[' . $id . ']', 'no', null, $id), $temp_name)));
    }
    $footer = new CCol(array(new CButton('add_template', S_ADD, "return PopUp('popup.php?dstfrm=" . $frmHost->getName() . "&dstfld1=new_template&srctbl=templates&srcfld1=hostid&srcfld2=host" . url_param($templates, false, 'existed_templates') . "',450,450)", 'T'), SPACE, new CButton('unlink', S_UNLINK), SPACE, new CButton('unlink_and_clear', S_UNLINK_AND_CLEAR)));
    //$footer->setColSpan(2);
    $template_tbl->setFooter($footer);
    $template_wdgt = new CWidget();
    $template_wdgt->setClass('header');
    $template_wdgt->addHeader(S_LINKED_TEMPLATES);
    $template_wdgt->addItem($template_tbl);
    // } TEMPLATES
    // MACROS WIDGET {
    $macros_wdgt = get_macros_widget($_REQUEST['hostid']);
    // } MACROS WIDGET
    // PROFILE WIDGET {
    $profile_tbl = new CTable('', 'tablestripped');
    $profile_tbl->setOddRowClass('form_odd_row');
    $profile_tbl->setEvenRowClass('form_even_row');
    $profile_tbl->addRow(array(S_USE_PROFILE, new CCheckBox('useprofile', $useprofile, 'submit()')));
    if ($useprofile == 'yes') {
        $profile_tbl->addRow(array(S_DEVICE_TYPE, new CTextBox('devicetype', $devicetype, 61)));
        $profile_tbl->addRow(array(S_NAME, new CTextBox('name', $name, 61)));
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:67,代码来源:forms.inc.php

示例9: array

 $host_footer = array();
 $host_footer[] = new CButton('save', S_SAVE);
 if ($templateid > 0 && $_REQUEST['form'] != 'full_clone') {
     $host_footer[] = SPACE;
     $host_footer[] = new CButton('clone', S_CLONE);
     $host_footer[] = SPACE;
     $host_footer[] = new CButton('full_clone', S_FULL_CLONE);
     $host_footer[] = SPACE;
     $host_footer[] = new CButtonDelete(S_DELETE_TEMPLATE_Q, url_param('form') . url_param('templateid') . url_param('groupid'));
     $host_footer[] = SPACE;
     $host_footer[] = new CButtonQMessage('delete_and_clear', S_DELETE_AND_CLEAR, S_DELETE_AND_CLEAR_TEMPLATE_Q, url_param('form') . url_param('templateid') . url_param('groupid'));
 }
 array_push($host_footer, SPACE, new CButtonCancel(url_param('groupid')));
 $host_footer = new CCol($host_footer);
 $host_footer->setColSpan(2);
 $template_tbl->setFooter($host_footer);
 $tplForm_wdgt = new CWidget();
 $tplForm_wdgt->setClass('header');
 $tplForm_wdgt->addHeader($frm_title);
 $tplForm_wdgt->addItem($template_tbl);
 // } TEMPLATE WIDGET
 // MACROS WIDGET {
 $macros_wdgt = get_macros_widget($templateid);
 // } MACROS WIDGET
 $left_table = new CTable();
 $left_table->setCellPadding(4);
 $left_table->setCellSpacing(4);
 $left_table->addRow($tplForm_wdgt);
 $right_table = new CTable();
 $right_table->setCellPadding(4);
 $right_table->setCellSpacing(4);
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:templates.php

示例10: access_deny

function access_deny()
{
    global $USER_DETAILS;
    include_once 'include/page_header.php';
    if ($USER_DETAILS['alias'] != ZBX_GUEST_USER) {
        show_error_message(S_NO_PERMISSIONS);
    } else {
        $req = new Curl($_SERVER['REQUEST_URI']);
        $req->setArgument('sid', null);
        $warning_msg = array('You cannot view this URL as a ', bold(ZBX_GUEST_USER), '. ', 'You must login to view this page.', BR(), 'If you think this message is wrong, ', ' please consult your administrators about getting the necessary permissions.');
        $table = new CTable(null, 'warning');
        $table->setAlign('center');
        $table->setHeader(new CCol('You are not logged in', 'left'), 'header');
        $table->addRow(new CCol($warning_msg));
        $url = urlencode($req->toString());
        $footer = new CCol(array(new CButton('login', S_LOGIN, "javascript: document.location = 'index.php?request={$url}';"), new CButton('back', S_CANCEL, 'javascript: window.history.back();')), 'left');
        $table->setFooter($footer, 'footer');
        $table->show();
    }
    include_once 'include/page_footer.php';
}
开发者ID:phedders,项目名称:zabbix,代码行数:21,代码来源:config.inc.php


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