本文整理汇总了PHP中CCol::SetRowSpan方法的典型用法代码示例。如果您正苦于以下问题:PHP CCol::SetRowSpan方法的具体用法?PHP CCol::SetRowSpan怎么用?PHP CCol::SetRowSpan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCol
的用法示例。
在下文中一共展示了CCol::SetRowSpan方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_screen
//.........这里部分代码省略.........
$value = new CCol(trigger_value2str($event['value']), get_trigger_value_style($event['value']));
// $row = zbx_array_merge($triggers[$row['triggerid']],$row);
// if((1 == $hide_unknown) && (!event_initial_time($row,$hide_unknown))) continue;
$item->addRow(array(zbx_date2str(S_EVENTS_TRIGGERS_EVENTS_HISTORY_LIST_DATE_FORMAT, $event['clock']), get_node_name_by_elid($event['objectid']), $host['host'], new CLink($trigger['description'], 'tr_events.php?triggerid=' . $event['objectid'] . '&eventid=' . $event['eventid']), $value, new CCol(get_severity_description($trigger['priority']), get_severity_style($trigger['priority']))));
}
$item = array($item);
if ($editmode == 1) {
array_push($item, new CLink(S_CHANGE, $action));
}
} else {
$item = array(SPACE);
if ($editmode == 1) {
array_push($item, BR(), new CLink(S_CHANGE, $action));
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
$str_halign = 'def';
if ($halign == HALIGN_CENTER) {
$str_halign = 'cntr';
}
if ($halign == HALIGN_LEFT) {
$str_halign = 'left';
}
if ($halign == HALIGN_RIGHT) {
$str_halign = 'right';
}
$str_valign = 'def';
if ($valign == VALIGN_MIDDLE) {
$str_valign = 'mdl';
}
if ($valign == VALIGN_TOP) {
$str_valign = 'top';
}
if ($valign == VALIGN_BOTTOM) {
$str_valign = 'bttm';
}
if ($editmode == 1 && !$item_form) {
$item = new CDiv($item, 'draggable');
$item->setAttribute('id', 'position_' . $r . '_' . $c);
if ($editmode == 1) {
$item->setAttribute('onclick', 'javascript: ' . $onclick_action);
}
}
$new_col = new CCol($item, $str_halign . '_' . $str_valign);
if ($colspan) {
$new_col->SetColSpan($colspan);
}
if ($rowspan) {
$new_col->SetRowSpan($rowspan);
}
array_push($new_cols, $new_col);
}
if ($editmode == 1) {
$rmv_icon = new Cimg('images/general/opened.gif', NULL, NULL, NULL, 'pointer');
if ($empty_screen_row) {
$rmv_row_link = "javascript: location.href = 'screenedit.php?config=1&screenid={$screenid}&rmv_row={$r}';";
} else {
$rmv_row_link = "javascript: if(Confirm('" . S_THIS_SCREEN_ROW_NOT_EMPTY . '. ' . S_DELETE_IT_Q . "')){" . " location.href = 'screenedit.php?config=1&screenid={$screenid}&rmv_row={$r}';}";
}
$rmv_icon->addAction('onclick', $rmv_row_link);
array_push($new_cols, new Ccol($rmv_icon));
}
$table->addRow(new CRow($new_cols));
}
if ($editmode == 1) {
$add_icon = new Cimg('images/general/closed.gif', NULL, NULL, NULL, 'pointer');
$add_icon->addAction('onclick', "javascript: location.href = 'screenedit.php?config=1&screenid={$screenid}&add_row={$row['vsize']}';");
$new_cols = array(new Ccol($add_icon));
for ($c = 0; $c < $row['hsize']; $c++) {
$rmv_icon = new Cimg('images/general/opened.gif', NULL, NULL, NULL, 'pointer');
if (isset($empty_screen_col[$c])) {
$rmv_col_link = "javascript: if(Confirm('" . S_THIS_SCREEN_COLUMN_NOT_EMPTY . '. ' . S_DELETE_IT_Q . "')){" . " location.href = 'screenedit.php?config=1&screenid={$screenid}&rmv_col={$c}';}";
} else {
$rmv_col_link = "javascript: location.href = 'screenedit.php?config=1&screenid={$screenid}&rmv_col={$c}';";
}
$rmv_icon->addAction('onclick', $rmv_col_link);
array_push($new_cols, new Ccol($rmv_icon));
}
array_push($new_cols, new Ccol(new Cimg('images/general/zero.gif', 'zero', 1, 1)));
$table->addRow($new_cols);
}
return $table;
}
示例2: get_screen
//.........这里部分代码省略.........
if ($screenitemid != 0 && $resourcetype == SCREEN_RESOURCE_ACTIONS) {
$item = array(get_history_of_actions($elements));
if ($editmode == 1) {
array_push($item, new CLink(S_CHANGE, $action));
}
} else {
if ($screenitemid != 0 && $resourcetype == SCREEN_RESOURCE_EVENTS) {
$item = array(get_history_of_triggers_events(0, $elements));
if ($editmode == 1) {
array_push($item, new CLink(S_CHANGE, $action));
}
} else {
$item = array(SPACE);
if ($editmode == 1) {
array_push($item, BR(), new CLink(S_CHANGE, $action));
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
$str_halign = 'def';
if ($halign == HALIGN_CENTER) {
$str_halign = 'cntr';
}
if ($halign == HALIGN_LEFT) {
$str_halign = 'left';
}
if ($halign == HALIGN_RIGHT) {
$str_halign = 'right';
}
$str_valign = 'def';
if ($valign == VALIGN_MIDDLE) {
$str_valign = 'mdl';
}
if ($valign == VALIGN_TOP) {
$str_valign = 'top';
}
if ($valign == VALIGN_BOTTOM) {
$str_valign = 'bttm';
}
if ($editmode == 1 && !$item_form) {
$item = new CDiv($item, 'draggable');
$item->setAttribute('id', 'position_' . $r . '_' . $c);
if ($editmode == 1) {
$item->setAttribute('onclick', 'javascript: ' . $onclick_action);
}
}
$new_col = new CCol($item, $str_halign . '_' . $str_valign);
if ($colspan) {
$new_col->SetColSpan($colspan);
}
if ($rowspan) {
$new_col->SetRowSpan($rowspan);
}
array_push($new_cols, $new_col);
}
if ($editmode == 1) {
$rmv_icon = new Cimg('images/general/opened.gif');
if ($empty_screen_row) {
$rmv_row_link = 'javascript: location.href = ' . "'screenedit.php?config=1&screenid=" . $screenid . '&rmv_row=' . $r . "';";
} else {
$rmv_row_link = "javascript: if(Confirm('This screen-row is not empty. Delete it?')){" . " location.href = 'screenedit.php?config=1&screenid=" . $screenid . "&rmv_row=" . $r . "';}";
}
$rmv_icon->addAction('onclick', $rmv_row_link);
array_push($new_cols, new Ccol($rmv_icon));
}
$table->AddRow(new CRow($new_cols));
}
if ($editmode == 1) {
$add_row_link = 'screenedit.php?config=1&screenid=' . $screenid . '&add_row=';
$new_cols = array(new Ccol(new Clink(new Cimg('images/general/closed.gif'), $add_row_link . $row['vsize'])));
for ($c = 0; $c < $row['hsize']; $c++) {
$rmv_icon = new Cimg('images/general/opened.gif');
if (isset($empty_screen_col[$c])) {
$rmv_col_link = "javascript: if(Confirm('This screen-column is not empty. Delete it?')){" . " location.href = 'screenedit.php?config=1&screenid=" . $screenid . "&rmv_col=" . $c . "';}";
} else {
$rmv_col_link = "javascript: location.href = 'screenedit.php?config=1&screenid=" . $screenid . "&rmv_col=" . $c . "';";
}
$rmv_icon->addAction('onclick', $rmv_col_link);
array_push($new_cols, new Ccol($rmv_icon));
}
array_push($new_cols, new Ccol(new Cimg('images/general/zero.gif', 'zero', 1, 1)));
$table->addRow($new_cols);
}
return $table;
}