• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CTable类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: remove

 public static function remove($checked)
 {
     $table = new CTable('members');
     if ($table->delete($checked)) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:ameerthehacker,项目名称:GSCWebsite,代码行数:9,代码来源:members.inc.php


示例2: setDoubleHeader

 public function setDoubleHeader($left, $right)
 {
     $table = new CTable();
     $table->addStyle('width: 100%;');
     $lCol = new CCol($left);
     $lCol->addStyle('text-align: left; border: 0;');
     $rCol = new CCol($right);
     $rCol->addStyle('text-align: right; border: 0;');
     $table->addRow(array($lCol, $rCol));
     $this->_header = new CDiv(null, 'nowrap ui-corner-all ui-widget-header ' . $this->css_class);
     $this->_header->addItem($table);
     return $this->_header;
 }
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:13,代码来源:class.cuiwidget.php


示例3: makeRow

 private function makeRow($id)
 {
     $table = new CTable();
     $tr = $this->makeSImgStr($id);
     $tr->addItem($this->tree[$id]['caption']);
     $table->addRow($tr);
     $tr = new CRow();
     $tr->addItem($table);
     $tr->setAttribute('id', 'id_' . $id);
     $tr->setAttribute('style', $this->tree[$id]['parentid'] != '0' ? 'display: none;' : '');
     foreach ($this->fields as $value) {
         $tr->addItem($this->makeCol($id, $value));
     }
     return $tr;
 }
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:15,代码来源:CTree.php


示例4: get_option

	static function get_option($selectedvalue, $tablename="pays", $colvaluename="id", $colvuename="nom", $where=1) {
		   $option = "";
		   $result = CTable::select($colvaluename . " , " . $colvuename, $tablename, $where, $colvuename); 
		   while($array = mysql_fetch_array($result)) {
		   		$selected = CForm::get_selected($selectedvalue, $array[$colvaluename]);
		   		$option = $option . "<option value='" . $array[$colvaluename] . "'" . $selected . ">" . ucfirst(utf8_encode(substr($array[$colvuename], 0, 25))) . "</option>\n";
		   }
		   return $option;
	}	
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:9,代码来源:CFormPays.php


示例5: get_option

	static function get_option($selectedvalue, $tablename, $colvaluename="id", $colvuename="nom", $where=1, $order = null) {
		   $option = "";
	 	if(!$order) {
		   		$order = $colvuename;
		   }
		   $result = CTable::select($colvaluename . " , " . $colvuename, $tablename, $where, $order); 
		   while($array = mysql_fetch_array($result)) {
		   		$selected = CForm::get_selected($selectedvalue, $array[$colvaluename]);
		   		$option = $option . "<option value='" . $array[$colvaluename] . "'" . $selected . ">" . $array[$colvuename] . "</option>\n";
		   }
		   return $option;
	}	
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:12,代码来源:CForm.php


示例6: makeRow

 private function makeRow($id)
 {
     $table = new CTable();
     $tr = $this->makeSImgStr($id);
     $tr->addItem($this->tree[$id]['caption']);
     $table->addRow($tr);
     $tr = new CRow();
     $tr->addItem($table);
     $tr->setAttribute('id', 'id_' . $id);
     $tr->setAttribute('style', $this->tree[$id]['parentid'] != '0' ? 'display: none;' : '');
     foreach ($this->fields as $key => $value) {
         $style = null;
         if ($value == 'status' && $this->tree[$id]['serviceid'] > 0) {
             switch ($this->tree[$id][$value]) {
                 case TRIGGER_SEVERITY_DISASTER:
                     $this->tree[$id][$value] = S_DISASTER;
                     $style = 'disaster';
                     break;
                 case TRIGGER_SEVERITY_HIGH:
                     $this->tree[$id][$value] = S_HIGH;
                     $style = 'high';
                     break;
                 case TRIGGER_SEVERITY_AVERAGE:
                     $this->tree[$id][$value] = S_AVERAGE;
                     $style = 'average';
                     break;
                 case TRIGGER_SEVERITY_WARNING:
                     $this->tree[$id][$value] = S_WARNING;
                     $style = 'warning';
                     break;
                 case TRIGGER_SEVERITY_INFORMATION:
                 default:
                     $this->tree[$id][$value] = new CSpan(S_OK_BIG, 'green');
                     break;
             }
         }
         $tr->addItem(new CCol($this->tree[$id][$value], $style));
     }
     return $tr;
 }
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:40,代码来源:class.ctree.php


示例7: get

 public function get($caption_l = null, $caption_r = null)
 {
     if (empty($caption_l)) {
         $caption_l = _('In');
     }
     if (empty($caption_r)) {
         $caption_r = _('Other');
     }
     $grp_tab = new CTable();
     $grp_tab->attr('name', $this->name);
     $grp_tab->attr('id', zbx_formatDomId($this->name));
     $grp_tab->setCellSpacing(0);
     $grp_tab->setCellPadding(0);
     if (!is_null($caption_l) || !is_null($caption_r)) {
         $grp_tab->addRow(array($caption_l, SPACE, $caption_r));
     }
     $add_btn = new CButton('add', ' &laquo; ', null, 'formlist');
     $add_btn->setAttribute('onclick', 'javascript: moveListBoxSelectedItem("' . $this->form->getName() . '", "' . $this->varname . '", "' . $this->id_r . '", "' . $this->id_l . '", "add");');
     $rmv_btn = new CButton('remove', ' &raquo; ', null, 'formlist');
     $rmv_btn->setAttribute('onclick', 'javascript: moveListBoxSelectedItem("' . $this->form->getName() . '", "' . $this->varname . '", "' . $this->id_l . '", "' . $this->id_r . '", "rmv");');
     $grp_tab->addRow(array($this->lbox, new CCol(array($add_btn, BR(), $rmv_btn), 'top'), $this->rbox));
     return $grp_tab;
 }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:23,代码来源:class.ctweenbox.php


示例8: get

 public function get($caption_l = S_IN, $caption_r = S_OTHER)
 {
     $grp_tab = new CTable();
     $grp_tab->addOption('name', $this->name);
     $grp_tab->addOption('id', $this->name);
     $grp_tab->setCellSpacing(0);
     $grp_tab->setCellPadding(0);
     if (!is_null($caption_l) || !is_null($caption_r)) {
         $grp_tab->addRow(array($caption_l, SPACE, $caption_r));
     }
     $add_btn = new CButton('add', ' « ');
     //S_ADD);//
     $add_btn->setType('button');
     $add_btn->setAction('javascript: moveListBoxSelectedItem("' . $this->form->GetName() . '","' . $this->varname . '","' . $this->id_r . '","' . $this->id_l . '","add");');
     $rmv_btn = new CButton('remove', ' » ');
     //S_REMOVE);//
     $rmv_btn->setType('button');
     $rmv_btn->setAction('javascript: moveListBoxSelectedItem("' . $this->form->GetName() . '","' . $this->varname . '","' . $this->id_l . '","' . $this->id_r . '","rmv");');
     $grp_tab->addRow(array($this->lbox, new CCol(array($add_btn, BR(), $rmv_btn), 'top'), $this->rbox));
     return $grp_tab;
 }
开发者ID:rennhak,项目名称:zabbix,代码行数:21,代码来源:class.ctweenbox.php


示例9: stage5

 function stage5()
 {
     $dbType = $this->getConfig('DB_TYPE');
     $frontendSetup = new FrontendSetup();
     $databases = $frontendSetup->getSupportedDatabases();
     $table = new CTable(null, 'requirements');
     $table->setAlign('center');
     $table->addRow(array(new CCol(_('Database type'), 'header'), $databases[$dbType]));
     switch ($dbType) {
         case ZBX_DB_SQLITE3:
             $table->addRow(array(new CCol(_('Database file'), 'header'), $this->getConfig('DB_DATABASE')));
             break;
         default:
             $table->addRow(array(new CCol(_('Database server'), 'header'), $this->getConfig('DB_SERVER')));
             $dbPort = $this->getConfig('DB_PORT');
             $table->addRow(array(new CCol(_('Database port'), 'header'), $dbPort == 0 ? _('default') : $dbPort));
             $table->addRow(array(new CCol(_('Database name'), 'header'), $this->getConfig('DB_DATABASE')));
             $table->addRow(array(new CCol(_('Database user'), 'header'), $this->getConfig('DB_USER')));
             $table->addRow(array(new CCol(_('Database password'), 'header'), preg_replace('/./', '*', $this->getConfig('DB_PASSWORD'))));
             if ($dbType == ZBX_DB_DB2) {
                 $table->addRow(array(new CCol(_('Database schema'), 'header'), $this->getConfig('DB_SCHEMA')));
             }
             break;
     }
     $table->addRow(BR());
     $table->addRow(array(new CCol(_('Zabbix server'), 'header'), $this->getConfig('ZBX_SERVER')));
     $table->addRow(array(new CCol(_('Zabbix server port'), 'header'), $this->getConfig('ZBX_SERVER_PORT')));
     $table->addRow(array(new CCol(_('Zabbix server name'), 'header'), $this->getConfig('ZBX_SERVER_NAME')));
     return array('Please check configuration parameters.', BR(), 'If all is correct, press "Next" button, or "Previous" button to change configuration parameters.', BR(), BR(), $table);
 }
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:30,代码来源:setup.inc.php


示例10: foreach

$triggersForm->addVar('hostid', $this->data['hostid']);
$triggersForm->addVar('action', $this->data['action']);
if ($this->data['parent_discoveryid']) {
    $triggersForm->addVar('parent_discoveryid', $this->data['parent_discoveryid']);
}
foreach ($this->data['g_triggerid'] as $triggerid) {
    $triggersForm->addVar('g_triggerid[' . $triggerid . ']', $triggerid);
}
// create form list
$triggersFormList = new CFormList('triggersFormList');
// append severity to form list
$severityDiv = new CSeverity(array('id' => 'priority_div', 'name' => 'priority', 'value' => $this->data['priority']));
$triggersFormList->addRow(array(_('Severity'), SPACE, new CVisibilityBox('visible[priority]', isset($this->data['visible']['priority']), 'priority_div', _('Original'))), $severityDiv);
// append dependencies to form list
if (empty($this->data['parent_discoveryid'])) {
    $dependenciesTable = new CTable(_('No dependencies defined.'), 'formElementTable');
    $dependenciesTable->setAttribute('style', 'min-width: 500px;');
    $dependenciesTable->setAttribute('id', 'dependenciesTable');
    $dependenciesTable->setHeader(array(_('Name'), _('Action')));
    foreach ($this->data['dependencies'] as $dependency) {
        $triggersForm->addVar('dependencies[]', $dependency['triggerid'], 'dependencies_' . $dependency['triggerid']);
        $hostNames = array();
        foreach ($dependency['hosts'] as $host) {
            $hostNames[] = CHtml::encode($host['name']);
            $hostNames[] = ', ';
        }
        array_pop($hostNames);
        if ($dependency['flags'] == ZBX_FLAG_DISCOVERY_NORMAL) {
            $description = new CLink(array($hostNames, NAME_DELIMITER, CHtml::encode($dependency['description'])), 'triggers.php?form=update&hostid=' . $dependency['hostid'] . '&triggerid=' . $dependency['triggerid']);
            $description->setAttribute('target', '_blank');
        } else {
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:configuration.triggers.massupdate.php


示例11: CTable

                                <li><a id="btn-logout" role="button" href="#">Logout</a></li>
                            </ul>
                        </li>                    
                    </ul>
                </div>
            </div>
        </div>
        
        <div class="container-fluid">
            <div class="well well-lg">
                <div class="row">
                    <?php 
if (isset($_GET['id'])) {
    $eventid = $_GET['id'];
    CFeedback::createFeedback($eventid);
    $table = new CTable("feedback" . $eventid, 'table-feedback');
    $response = $table->drawTable(array('#', '', 'Name', 'Department', 'Section', 'Year', 'Email', 'Date Of Birth', 'GSC Member', 'Feedback'), true);
    echo "{$response}";
} else {
    echo "<p>Invalid event index</p>";
    exit;
}
?>
                </div>
         </div>
         <div class="modal fade" id="modal-reply-suggest">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button class="close" data-dismiss="modal">&times;</button>
                        <h4 class="modal-title">Reply</h4>
开发者ID:ameerthehacker,项目名称:GSCWebsite,代码行数:31,代码来源:feedback.php


示例12: CWidget

**
** This program is distributed in the hope that it will be useful,
** 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.
**/
$hostInventoryWidget = new CWidget();
$rForm = new CForm('get');
$rForm->addItem(array(_('Group'), SPACE, $this->data['pageFilter']->getGroupsCB()));
$hostInventoryWidget->addPageHeader(_('HOST INVENTORY'), SPACE);
$hostInventoryWidget->addHeader(_('Hosts'), $rForm);
$filterTable = new CTable('', 'filter filter-center');
// getting inventory fields to make a drop down
$inventoryFields = getHostInventories(true);
// 'true' means list should be ordered by title
$inventoryFieldsComboBox = new CComboBox('filter_field', $this->data['filterField']);
foreach ($inventoryFields as $inventoryField) {
    $inventoryFieldsComboBox->addItem($inventoryField['db_field'], $inventoryField['title']);
}
$exactComboBox = new CComboBox('filter_exact', $this->data['filterExact']);
$exactComboBox->addItem('0', _('like'));
$exactComboBox->addItem('1', _('exactly'));
$filterTable->addRow(array(array(array(bold(_('Field')), SPACE, $inventoryFieldsComboBox), array($exactComboBox, new CTextBox('filter_field_value', $this->data['filterFieldValue'], 20)))), 'host-inventories');
$filter = new CSubmit('filter_set', _('Filter'));
$filter->useJQueryStyle('main');
$reset = new CSubmit('filter_rst', _('Reset'));
$reset->useJQueryStyle();
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:inventory.host.list.php


示例13: show_messages

    show_messages();
    $test = true;
} else {
    $test = false;
}
//------------------------ </ACTIONS> --------------------------
//------------------------ <FORM> ---------------------------
$frm_test = new CFormTable(_('Test'), 'tr_testexpr.php');
$frm_test->setHelp('web.testexpr.service.php');
$frm_test->setTableClass('formlongtable formtable');
$frm_test->addVar('form_refresh', get_request('form_refresh', 1));
$frm_test->addVar('expression', $expression);
/* test data */
$frm_test->addRow(_('Test data'), $data_table);
/* result */
$res_table = new CTable(null, 'tableinfo');
$res_table->setAttribute('id', 'result_list');
$res_table->setOddRowClass('even_row');
$res_table->setEvenRowClass('even_row');
$res_table->setHeader(array(_('Expression'), _('Result')));
ksort($rplcts, SORT_NUMERIC);
foreach ($eHTMLTree as $e) {
    $result = '-';
    if ($allowedTesting && $test && isset($e['expression'])) {
        $result = evalExpressionData($e['expression']['value'], $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);
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:tr_testexpr.php


示例14: CFormList

// create form list
$proxyFormList = new CFormList('proxyFormList');
$nameTextBox = new CTextBox('host', $this->data['name'], ZBX_TEXTBOX_STANDARD_SIZE, 'no', 64);
$nameTextBox->attr('autofocus', 'autofocus');
$proxyFormList->addRow(_('Proxy name'), $nameTextBox);
// append status to form list
$statusBox = new CComboBox('status', $this->data['status'], 'submit()');
$statusBox->addItem(HOST_STATUS_PROXY_ACTIVE, _('Active'));
$statusBox->addItem(HOST_STATUS_PROXY_PASSIVE, _('Passive'));
$proxyFormList->addRow(_('Proxy mode'), $statusBox);
if ($this->data['status'] == HOST_STATUS_PROXY_PASSIVE) {
    if (isset($this->data['interface']['interfaceid'])) {
        $proxyForm->addVar('interface[interfaceid]', $this->data['interface']['interfaceid']);
        $proxyForm->addVar('interface[hostid]', $this->data['interface']['hostid']);
    }
    $interfaceTable = new CTable(null, 'formElementTable');
    $interfaceTable->addRow(array(_('IP address'), _('DNS name'), _('Connect to'), _('Port')));
    $connectByComboBox = new CRadioButtonList('interface[useip]', $this->data['interface']['useip']);
    $connectByComboBox->addValue(_('IP'), 1);
    $connectByComboBox->addValue(_('DNS'), 0);
    $connectByComboBox->useJQueryStyle();
    $interfaceTable->addRow(array(new CTextBox('interface[ip]', $this->data['interface']['ip'], ZBX_TEXTBOX_SMALL_SIZE, 'no', 64), new CTextBox('interface[dns]', $this->data['interface']['dns'], ZBX_TEXTBOX_SMALL_SIZE, 'no', 64), $connectByComboBox, new CTextBox('interface[port]', $this->data['interface']['port'], 18, 'no', 64)));
    $proxyFormList->addRow(_('Interface'), new CDiv($interfaceTable, 'objectgroup inlineblock border_dotted ui-corner-all'));
}
// append hosts to form list
$hostsTweenBox = new CTweenBox($proxyForm, 'hosts', $this->data['hosts']);
foreach ($this->data['dbHosts'] as $host) {
    // show only normal hosts, and discovered hosts monitored by the current proxy
    // for new proxies display only normal hosts
    if ($this->data['proxyid'] && idcmp($this->data['proxyid'], $host['proxy_hostid']) || $host['flags'] == ZBX_FLAG_DISCOVERY_NORMAL) {
        $hostsTweenBox->addItem($host['hostid'], $host['name'], null, empty($host['proxy_hostid']) || !empty($this->data['proxyid']) && bccomp($host['proxy_hostid'], $this->data['proxyid']) == 0 && $host['flags'] == ZBX_FLAG_DISCOVERY_NORMAL);
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:administration.proxy.edit.php


示例15: uint_in_array

}
$admin = uint_in_array($USER_DETAILS['type'], array(USER_TYPE_ZABBIX_ADMIN, USER_TYPE_SUPER_ADMIN));
$rows_per_page = $USER_DETAILS['rows_per_page'];
$search_wdgt = new CWidget('search_wdgt');
$search = get_request('search', '');
// Header
if (zbx_empty($search)) {
    $search = 'Search pattern is empty';
}
$search_wdgt->addHeader(array(S_SEARCH_BIG . ': ', bold($search)), SPACE);
//-------------
$left_tab = new CTable();
$left_tab->setCellPadding(3);
$left_tab->setCellSpacing(3);
$left_tab->setAttribute('border', 0);
$right_tab = new CTable();
$right_tab->setCellPadding(3);
$right_tab->setCellSpacing(3);
$right_tab->setAttribute('border', 0);
// FIND Hosts
$params = array('nodeids' => get_current_nodeid(), 'extendoutput' => true, 'pattern' => $search, 'extend_pattern' => true, 'limit' => $rows_per_page, 'order' => 'host');
$db_hosts = CHost::get($params);
$hosts = selectByPattern($db_hosts, 'host', $search, $rows_per_page);
$hostids = array_keys($hosts);
$hostsgroups = array();
$sql = 'SELECT * FROM hosts_groups hg WHERE ' . DBcondition('hg.hostid', $hostids);
$res = DBselect($sql);
while ($hostgroup = DBfetch($res)) {
    $hostsgroups[$hostgroup['hostid']] = $hostgroup['groupid'];
}
$params = array('nodeids' => get_current_nodeid(), 'pattern' => $search, 'extend_pattern' => true, 'count' => 1);
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:search.php


示例16: CComboBox

         $calcTypeComboBox = new CComboBox('new_operation[evaltype]', $this->data['new_operation']['evaltype'], 'submit()');
         $calcTypeComboBox->addItem(ACTION_EVAL_TYPE_AND_OR, _('AND / OR'));
         $calcTypeComboBox->addItem(ACTION_EVAL_TYPE_AND, _('AND'));
         $calcTypeComboBox->addItem(ACTION_EVAL_TYPE_OR, _('OR'));
         $newOperationsTable->addRow(array(_('Type of calculation'), array($calcTypeComboBox, new CTextBox('preview', $grouped_opconditions, ZBX_TEXTBOX_STANDARD_SIZE, 'yes'))));
     } else {
         $operationConditionsTable->addItem(new CVar('new_operation[evaltype]', ACTION_EVAL_TYPE_AND_OR));
     }
     if (!isset($_REQUEST['new_opcondition'])) {
         $operationConditionsTable->addRow(new CCol(new CSubmit('new_opcondition', _('New'), null, 'link_menu')));
     }
     $newOperationsTable->addRow(array(_('Conditions'), new CDiv($operationConditionsTable, 'objectgroup inlineblock border_dotted ui-corner-all')), 'indent_top');
 }
 // append new operation condition to form list
 if (isset($_REQUEST['new_opcondition'])) {
     $newOperationConditionTable = new CTable(null, 'formElementTable');
     $allowedOpConditions = get_opconditions_by_eventsource($this->data['eventsource']);
     $new_opcondition = get_request('new_opcondition', array());
     if (!is_array($new_opcondition)) {
         $new_opcondition = array();
     }
     if (empty($new_opcondition)) {
         $new_opcondition['conditiontype'] = CONDITION_TYPE_EVENT_ACKNOWLEDGED;
         $new_opcondition['operator'] = CONDITION_OPERATOR_LIKE;
         $new_opcondition['value'] = 0;
     }
     if (!str_in_array($new_opcondition['conditiontype'], $allowedOpConditions)) {
         $new_opcondition['conditiontype'] = $allowedOpConditions[0];
     }
     $rowCondition = array();
     $conditionTypeComboBox = new CComboBox('new_opcondition[conditiontype]', $new_opcondition['conditiontype'], 'submit()');
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.action.edit.php


示例17: dirname

require_once dirname(__FILE__) . '/include/triggers.inc.php';
require_once dirname(__FILE__) . '/include/services.inc.php';
$page['title'] = _('IT services');
$page['file'] = 'srv_status.php';
$page['hist_arg'] = array();
define('ZBX_PAGE_DO_REFRESH', 1);
require_once dirname(__FILE__) . '/include/page_header.php';
$periods = array('today' => _('Today'), 'week' => _('This week'), 'month' => _('This month'), 'year' => _('This year'), 24 => _('Last 24 hours'), 24 * 7 => _('Last 7 days'), 24 * 30 => _('Last 30 days'), 24 * DAY_IN_YEAR => _('Last 365 days'));
// VAR	TYPE	OPTIONAL	FLAGS	VALIDATION	EXCEPTION
$fields = array('serviceid' => array(T_ZBX_INT, O_OPT, P_SYS | P_NZERO, DB_ID, null), 'showgraph' => array(T_ZBX_INT, O_OPT, P_SYS, IN('1'), 'isset({serviceid})'), 'period' => array(T_ZBX_STR, O_OPT, P_SYS, IN('"' . implode('","', array_keys($periods)) . '"'), null), 'fullscreen' => array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), null));
check_fields($fields);
if (isset($_REQUEST['serviceid']) && isset($_REQUEST['showgraph'])) {
    $service = API::Service()->get(array('output' => array('serviceid'), 'serviceids' => getRequest('serviceid')));
    $service = reset($service);
    if ($service) {
        $table = new CTable(null, 'chart');
        $table->addRow(new CImg('chart5.php?serviceid=' . $service['serviceid'] . url_param('path')));
        $table->show();
    } else {
        access_deny();
    }
} else {
    $period = getRequest('period', 7 * 24);
    $period_end = time();
    switch ($period) {
        case 'today':
            $period_start = mktime(0, 0, 0, date('n'), date('j'), date('Y'));
            break;
        case 'week':
            $period_start = strtotime('last sunday');
            break;
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:srv_status.php


示例18: CCol

if ($this->data['type'] == SHOW_TRIGGERS) {
    $hintTable->addRow(array(new CCol(SPACE, 'normal'), _('OK')));
}
for ($i = 0; $i < TRIGGER_SEVERITY_COUNT; $i++) {
    $hintTable->addRow(array(getSeverityCell($i), _('PROBLEM')));
}
$config = select_config();
if ($this->data['type'] == SHOW_TRIGGERS) {
    // blinking preview in help popup (only if blinking is enabled)
    if ($config['blink_period'] > 0) {
        $row = new CRow(null);
        $row->addItem(new CCol(SPACE, 'normal'));
        for ($i = 0; $i < TRIGGER_SEVERITY_COUNT; $i++) {
            $row->addItem(new CCol(SPACE, getSeverityStyle($i)));
        }
        $col = new CTable('', 'blink overview-mon-severities');
        $col->addRow($row);
        // double div necassary for FireFox
        $col = new CCol(new CDiv(new CDiv($col), 'overview-mon-severities-container'));
        $hintTable->addRow(array($col, _s('Age less than %s', convertUnitsS($config['blink_period']))));
    }
    $hintTable->addRow(array(new CCol(SPACE), _('No trigger')));
} else {
    $hintTable->addRow(array(new CCol(SPACE), _('OK or no trigger')));
}
$help = new CHelp('web.view.php', 'right');
$help->setHint($hintTable, '', '', true, false);
// header right
$overviewWidget->addPageHeader(_('OVERVIEW'), array(get_icon('fullscreen', array('fullscreen' => $this->data['fullscreen'])), SPACE, $help));
// header left
$styleComboBox = new CComboBox('view_style', $this->data['view_style'], 'submit()');
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:monitoring.overview.php


示例19: array_push

     array_push($page_header_r_col, new CLink(S_LOGOUT, 'index.php?reconnect=1', 'small_font', null, 'nosid'));
 } else {
     $page_header_r_col[] = array('|', new CLink(S_LOGIN, 'index.php?reconnect=1', 'small_font', null, 'nosid'));
 }
 $logo = new CLink(new CDiv(SPACE, 'zabbix_logo'), 'http://www.zabbix.com/', 'image', null, 'nosid');
 $logo->setTarget('_blank');
 $td_r = new CCol($page_header_r_col, 'page_header_r');
 $td_r->setAttribute('width', '100%');
 $top_page_row = array(new CCol($logo, 'page_header_l'), $td_r);
 unset($logo, $page_header_r_col, $help, $support);
 $table = new CTable(NULL, 'page_header');
 $table->setCellSpacing(0);
 $table->setCellPadding(5);
 $table->addRow($top_page_row);
 $table->show();
 $menu_table = new CTable(NULL, 'menu');
 $menu_table->setCellSpacing(0);
 $menu_table->setCellPadding(5);
 $menu_table->addRow($main_menu);
 $node_form = null;
 if (ZBX_DISTRIBUTED && !defined('ZBX_HIDE_NODE_SELECTION')) {
     insert_js_function('check_all');
     $available_nodes = get_accessible_nodes_by_user($USER_DETAILS, PERM_READ_LIST, PERM_RES_DATA_ARRAY);
     $available_nodes = get_tree_by_parentid($ZBX_LOCALNODEID, $available_nodes, 'masterid');
     //remove parent nodes
     if (!empty($available_nodes)) {
         $node_form = new CForm();
         $node_form->setMethod('get');
         $node_form->setAttribute('id', 'node_form');
         // +++ create Combo Box with selected nodes +++
         $combo_node_list = null;
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:page_header.php


示例20: 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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CTableInfo类代码示例发布时间:2022-05-20
下一篇:
PHP CTabView类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap