<h1>每周原创小说支付列表</h1>
<?php $this->widget('admin.widgets.TableCover');?>
<div class="wide form">
<?php echo CHtml::beginForm('','get');?>
<table class="widefat post">
<thead>
<tr>
	<th colspan=4>查询选项</th>
</tr>
</thead>
<tbody>
<tr>
	<td><?php echo setting('creditname');?>：<?php echo Operate::int('credits');?></td>
	<td>书名：<?php echo Operate::string('chaptername');?></td>
	<td>字数：<?php echo Operate::int('t-size');?></td>
</tr>
<tr>
    <td>UID：<?php echo Operate::int('t-uid');?></td>
	<td>用户名：<?php echo Operate::string('t-username');?></td>
	<td>创建时间：<?php echo Operate::date('t-RangeStart_createdate');?>-<?php echo Operate::date('t-RangeEnd_createdate');?></td>
</tr>

<tr><td colspan="4" style="text-align:center"><?php echo CHtml::submitButton('查询');?></td>
</tr>
</tbody>
</table>
<?php echo CHtml::endForm();?>
</div>
<br/>
<?php $this->widget('zii.widgets.grid.CGridView', array(
	'dataProvider'=>$dataProvider,
    'itemsCssClass' => 'widefat post',
    'summaryText'=>'显示{start}-{end}条 总共{count}条',
    'ajaxUpdate' => false,
    'columns' => array(
            'id',
            array(
                'name' => 'bookname',
                'type' => 'raw',
                'value' => 'CHtml::link($data->bookname, array("/admin/original/list", "t-bookid[operate]"=>1,"t-bookid[value]"=>$data->bid), array("target"=>"_blank"))',
            ),
            'bid',
            'credits',
            'price',
            'size',
            'uid',
            'username',
            'createdate',
            'edate',
            'sdate',
            'date',
            array(
                'class' => 'CButtonColumn',
                'header' => '操作',
                'template' => '{chapters}',
                'buttons' => array(
                    'chapters' => array(
                        'label' => '查看章节',
                        'url' => 'Yii::app()->createUrl("/admin/chapters/list", array("id"=>$data->bid,"t-RangeStart_createdate[value]"=>$data->sdate, "t-RangeEnd_createdate[value]"=>$data->edate))'
                    ),
                )
            ),
    ),
));