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


PHP CTableInfo::show方法代码示例

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


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

示例1: CTableInfo

} else {
    $table = new CTableInfo(S_NO_MEDIA_TYPES_DEFINED);
    $table->setHeader(array(make_sorting_link(S_TYPE, 'mt.type'), make_sorting_link(S_DESCRIPTION, 'mt.description'), S_DETAILS));
    $result = DBselect('SELECT mt.* ' . ' FROM media_type mt' . ' WHERE ' . DBin_node('mt.mediatypeid') . order_by('mt.type,mt.description'));
    while ($row = DBfetch($result)) {
        switch ($row['type']) {
            case MEDIA_TYPE_EMAIL:
                $details = S_SMTP_SERVER . ": '" . $row['smtp_server'] . "', " . S_SMTP_HELO . ": '" . $row['smtp_helo'] . "', " . S_SMTP_EMAIL . ": '" . $row['smtp_email'] . "'";
                break;
            case MEDIA_TYPE_EXEC:
                $details = S_SCRIPT_NAME . ": '" . $row['exec_path'] . "'";
                break;
            case MEDIA_TYPE_SMS:
                $details = S_GSM_MODEM . ": '" . $row['gsm_modem'] . "'";
                break;
            case MEDIA_TYPE_JABBER:
                $details = S_JABBER_IDENTIFIER . ": '" . $row['username'] . "'";
                break;
            default:
                $details = '';
        }
        $table->addRow(array(media_type2str($row['type']), new CLink($row["description"], "?&form=update&mediatypeid=" . $row["mediatypeid"], 'action'), $details));
        $row_count++;
    }
    $table->show();
}
zbx_add_post_js('insert_in_element("numrows","' . $row_count . '");');
?>

<?php 
include_once "include/page_footer.php";
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:media_types.php

示例2: CSpan

     }
     if ($header_host['available'] == HOST_AVAILABLE_TRUE) {
         $available = new CSpan(S_AVAILABLE, 'off');
     } else {
         if ($header_host['available'] == HOST_AVAILABLE_FALSE) {
             $available = new CSpan(S_NOT_AVAILABLE, 'on');
         } else {
             if ($header_host['available'] == HOST_AVAILABLE_UNKNOWN) {
                 $available = new CSpan(S_UNKNOWN, 'unknown');
             }
         }
     }
     $tbl_header_host = new CTableInfo();
     $tbl_header_host->addRow(array(new CLink(bold(S_HOST_LIST), 'hosts.php?hostid=' . $header_host['hostid'] . url_param('groupid')), $description, $items, $graphs, array(bold(S_DNS . ': '), $dns), array(bold(S_IP . ': '), $ip), array(bold(S_PORT . ': '), $port), array(bold(S_STATUS . ': '), $status), array(bold(S_AVAILABILITY . ': '), $available)));
     $tbl_header_host->setClass('infobox');
     $tbl_header_host->show();
 }
 // --->>> SELECTED HOST HEADER INFORMATION <<<---
 $form = new CForm('triggers.php');
 $form->setName('triggers');
 $form->setMethod('post');
 $form->addVar('hostid', $_REQUEST['hostid']);
 $table = new CTableInfo(S_NO_TRIGGERS_DEFINED);
 $table->setHeader(array(new CCheckBox('all_triggers', NULL, "checkAll('" . $form->GetName() . "','all_triggers','g_triggerid');"), make_sorting_link(S_SEVERITY, 't.priority'), make_sorting_link(S_STATUS, 't.status'), $_REQUEST['hostid'] > 0 ? NULL : make_sorting_link(S_HOST, 'h.host'), make_sorting_link(S_NAME, 't.description'), S_EXPRESSION, S_ERROR));
 $options = array('select_hosts' => 1, 'editable' => 1, 'extendoutput' => 1);
 if ($showdisabled == 0) {
     $options += array('status' => TRIGGER_STATUS_ENABLED);
 }
 if ($PAGE_HOSTS['selected'] > 0) {
     $options += array('hostids' => $PAGE_HOSTS['selected']);
 } else {
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:triggers.php


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