
帖子内容
<br/>
<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$post,
	'attributes'=>array(
		'id',
		'postid',
		'bookid',
		'uid',
		'username',
		'subject',
		'content',
		'createdate',
		'lastreply',
		'price',
		'buyer',
		'loginip',
		'replycount',
		'viewcount',
		'bad',
		'good',
		'complaints',
	),
));
?>
<br/>
<br/>
以下是回复
<br/>
<?php
$criteria = new CDbCriteria();
$criteria->compare('isfirst', 0);
$criteria->compare('postid', $post->postid);
$criteria->order = 'id DESC';

$pagination = new CPagination();
$pagination->setPageSize(50);
$dataProvider = new CActiveDataProvider('BookPostReplys');
$dataProvider->setCriteria($criteria);
$dataProvider->setPagination($pagination);

$this->widget('zii.widgets.grid.CGridView', array(
    'itemsCssClass' => 'widefat post',
    'dataProvider'=>$dataProvider,
    'columns' => array(
        'id',
        'content',
        'uid',
        'username',
    ),
));
?>