本文整理汇总了PHP中CRow::AddOption方法的典型用法代码示例。如果您正苦于以下问题:PHP CRow::AddOption方法的具体用法?PHP CRow::AddOption怎么用?PHP CRow::AddOption使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRow
的用法示例。
在下文中一共展示了CRow::AddOption方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CCol
} else {
array_push($new_row, $row["source"]);
}
array_push($new_row, new CCol(get_severity_description($row["severity"]), get_severity_style($row["severity"])));
$row["value"] = trim($row["value"], "\r\n");
// array_push($new_row,htmlspecialchars($row["value"]));
array_push($new_row, encode_log($row["value"]));
if (!isset($_REQUEST["plaintext"])) {
$crow = new CRow($new_row);
if (is_null($color_style) && is_array($_REQUEST["itemid"])) {
$min_color = 0x98;
$max_color = 0xf8;
$int_color = ($max_color - $min_color) / count($_REQUEST["itemid"]);
$int_color *= array_search($row["itemid"], $_REQUEST["itemid"]);
$int_color += $min_color;
$crow->AddOption("style", "background-color: " . sprintf("#%X%X%X", $int_color, $int_color, $int_color));
} else {
$crow->SetClass($color_style);
}
$crow->Show();
// to solve memory leak we call 'Show' method for each element
} else {
echo date("Y-m-d H:i:s", $row["clock"]);
echo "\t" . $row["clock"] . "\t" . htmlspecialchars($row["value"]) . "\n";
}
}
if (!isset($_REQUEST["plaintext"])) {
$table->ShowEnd();
} else {
echo "</pre>";
}
示例2: CTextBox
$cmbWeekTo->AddItem($day_num, $day_str);
}
$time_param->AddRow(array(S_FROM, $cmbWeekFrom, new CTextBox('new_service_time[from]', 'H:i', 9)));
$time_param->AddRow(array(S_TILL, $cmbWeekTo, new CTextBox('new_service_time[to]', 'H:i', 9)));
$frmService->AddVar('new_service_time[note]', '');
}
$frmService->AddRow(S_NEW_SERVICE_TIME, array($cmbTimeType, BR(), $time_param, new CButton('add_service_time', 'add', 'javascript: document.forms[0].action += \'?sform=1\'; submit();')));
//trigger
$frmService->AddRow(S_LINK_TO_TRIGGER_Q, new CCheckBox("linktrigger", $linktrigger, "javascript: display_element('trigger_name');", 1));
if ($triggerid > 0) {
$trigger = expand_trigger_description($triggerid);
} else {
$trigger = "";
}
$row = new CRow(array(new CCol(S_TRIGGER, 'form_row_l'), new CCol(array(new CTextBox("trigger", $trigger, 64, 'yes'), new CButton("btn1", S_SELECT, "return PopUp('popup.php?" . "dstfrm=" . $frmService->GetName() . "&dstfld1=triggerid&dstfld2=trigger" . "&srctbl=triggers&srcfld1=triggerid&srcfld2=description&real_hosts=1');", 'T')), 'form_row_r')));
$row->AddOption('id', 'trigger_name');
$row->AddOption('style', $linktrigger == 1 ? '' : 'display: none;');
$frmService->AddRow($row);
$frmService->AddVar("triggerid", $triggerid);
//---------
//sortorder
$frmService->AddRow(S_SORT_ORDER_0_999, new CTextBox("sortorder", $sortorder, 3));
//---------
$frmService->AddItemToBottomRow(new CButton("save_service", S_SAVE, 'javascript: document.forms[0].action += \'?saction=1\';'));
if (isset($service["serviceid"])) {
$frmService->AddItemToBottomRow(SPACE);
$frmService->AddItemToBottomRow(new CButtonDelete("Delete selected service?", url_param("form") . url_param("serviceid") . '&saction=1'));
}
$frmService->AddItemToBottomRow(SPACE);
$cb = new CButton('cancel', S_CANCEL);
$cb->SetType('button');