本文整理汇总了PHP中CTable::SetAlign方法的典型用法代码示例。如果您正苦于以下问题:PHP CTable::SetAlign方法的具体用法?PHP CTable::SetAlign怎么用?PHP CTable::SetAlign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTable
的用法示例。
在下文中一共展示了CTable::SetAlign方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: redirect
if (isset($_REQUEST['cancel'])) {
$last_page = get_last_history_page();
if (!$last_page) {
$last_page['url'] = 'tr_status.php?hostid=' . get_profile('web.tr_status.hostid', 0);
}
redirect($last_page['url']);
exit;
}
}
}
$msg = $bulk ? ' BULK ACKNOWLEDGE ' : array('"' . expand_trigger_description_by_data($db_data) . '"', BR(), explode_exp($db_data["expression"], 1));
show_table_header(array(S_ALARM_ACKNOWLEDGES_BIG, ' : ', $msg));
echo SBR;
if (!$bulk) {
$table = new CTable(NULL, "ack_msgs");
$table->SetAlign("center");
$db_acks = get_acknowledges_by_eventid($db_data["eventid"]);
while ($db_ack = DBfetch($db_acks)) {
$db_user = get_user_by_userid($db_ack["userid"]);
$table->AddRow(array(new CCol($db_user["alias"], "user"), new CCol(date("d-m-Y h:i:s A", $db_ack["clock"]), "time")), "title");
$msgCol = new CCol(zbx_nl2br($db_ack['message']));
$msgCol->SetColspan(2);
$table->AddRow($msgCol, "msg");
}
/**/
if ($table->GetNumRows() > 0) {
$table->Show();
echo SBR;
}
}
insert_new_message_form($events, $bulk);
示例2: array
$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');
exit;
}
// clear_messages();
$USER_DETAILS["refresh"] = $refresh_rate;
include_once "include/page_header.php";
unset($USER_DETAILS);
insert_showhint_javascript();
$table = new CTable(null, 'warning');
$table->SetAlign('center');
$table->AddOption('style', 'width: 480px; margin-top: 100px;');
$table->SetHeader(array(new CCol(S_ZABBIX_VER, 'left'), SPACE), '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->addOption('style', 'border-width: 0px; vertical-align: bottom;');
$msg = new CSpan(bold(SPACE . $warning_msg));
$msg->AddOption('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";