本文整理汇总了PHP中CRow::attr方法的典型用法代码示例。如果您正苦于以下问题:PHP CRow::attr方法的具体用法?PHP CRow::attr怎么用?PHP CRow::attr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRow
的用法示例。
在下文中一共展示了CRow::attr方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: prepareRow
public function prepareRow($item, $class = null, $id = null)
{
if (is_null($item)) {
return null;
}
if (is_object($item) && zbx_strtolower(get_class($item)) == 'ccol') {
if (isset($this->header) && !isset($item->attributes['colspan'])) {
$item->attributes['colspan'] = $this->colnum;
}
$item = new CRow($item, $class, $id);
}
if (is_object($item) && zbx_strtolower(get_class($item)) == 'crow') {
$item->attr('class', $class);
} else {
$item = new CRow($item, $class, $id);
}
if (!isset($item->attributes['class']) || is_array($item->attributes['class'])) {
$class = $this->rownum % 2 ? $this->oddRowClass : $this->evenRowClass;
$item->attr('class', $class);
$item->attr('origClass', $class);
}
return $item;
}
示例2: addRow
public function addRow($item1, $item2 = null, $class = null, $id = null)
{
if (is_object($item1) && zbx_strtolower(get_class($item1)) == 'crow') {
} elseif (is_object($item1) && zbx_strtolower(get_class($item1)) == 'ctable') {
$td = new CCol($item1, 'form_row_c');
$td->setColSpan(2);
$item1 = new CRow($td);
} else {
if (is_string($item1)) {
$item1 = nbsp($item1);
}
if (empty($item1)) {
$item1 = SPACE;
}
if (empty($item2)) {
$item2 = SPACE;
}
$item1 = new CRow(array(new CCol($item1, 'form_row_l'), new CCol($item2, 'form_row_r')), $class);
}
if (!is_null($id)) {
$item1->attr('id', zbx_formatDomId($id));
}
array_push($this->center_items, $item1);
return $item1;
}
示例3: max
if (isset($_REQUEST['page'])) {
$pager_page = $_REQUEST['page'];
}
$pager_page = max($pager_page, 1);
$limit = 25;
$start = $limit * ($pager_page - 1);
$result = DbFetchArray(DBselect("SELECT email.* FROM email_tracker.email_match JOIN email_tracker.email ON email_match.email = email.id WHERE {$timeFilter} {$scheduleFilter} ORDER BY email.received DESC LIMIT {$start},{$limit}"));
//$sql = "SELECT * FROM logs.logs WHERE $timeFilter $serverFilter $priorityFilter ORDER BY `datetime` DESC LIMIT $start,$limit";
//echo $sql;
//$results = mysql_query($sql, $db);
//echo mysql_error($db);
foreach ($result as $row) {
// $status = isset($pMerge[$row['priority']])?$pMerge[$row['priority']]:$row['priority'];
// $class = isset($cMerge[$status])?$cMerge[$status]:$status;
$crow = new CRow(array($row['received'], array(new CDiv($row['subject'], 'email-subject'), new CDiv($row['from'], 'email-from'), new CDiv(implode(' ', explode(',', $row['to'])), 'email-to'))));
$crow->attr('data-emailid', $row['id']);
$table->addRow($crow);
}
$paging = pager($total, $limit, $pager_page);
$t2 = new CTable('', 'email-browser');
$t2->addRow(array(new CDiv('', 'email-above-list'), array(new CDiv(array(new CDiv('', 'email-header')), 'email-viewer'))));
$t2->addRow(array(new CDiv(array($table, $paging), 'email-list'), new CIFrame('', null, null, 'yes', 'email-body')));
//$table = array('<table><tr><td>',,'</td><td>',,'</td></tr></table>');
$eventsWidget->addItem($t2);
$timeline = array('period' => $effectiveperiod, 'usertime' => date(TIMESTAMP_FORMAT, $till));
$objData = array('id' => 'timeline_1', 'loadSBox' => 0, 'loadImage' => 0, 'loadScroll' => 1, 'dynamic' => 0, 'mainObject' => 1, 'periodFixed' => CProfile::get('web.events.timelinefixed', 1), 'sliderMaximumTimePeriod' => ZBX_MAX_PERIOD);
zbx_add_post_js('jqBlink.blink();');
zbx_add_post_js('timeControl.addObject("scroll_events_id", ' . zbx_jsvalue($timeline) . ', ' . zbx_jsvalue($objData) . ');');
zbx_add_post_js('timeControl.processObjects();');
$eventsWidget->show();
require_once dirname(__FILE__) . '/include/page_footer.php';