<body>
<div class="weight100 black-line">
собственно линия
</div>
<div class="grid">
расположен контент
</div>
<div class="weight100 black-line">
собственно линия
</div>
</body>
$sql = 'SELECT F_ID, F_Name FROM tbl_department;';
$rawData = Yii::app()->db->createCommand($sql);
$count = Yii::app()->db->createCommand('SELECT COUNT(*) FROM (' . $sql . ') as count_alias')->queryScalar();
$model = new CSqlDataProvider($rawData, array(
'keyField' => 'F_ID',
'totalItemCount' => $count,
'sort' => array(
'attributes' => array(
'F_ID'
),
'defaultOrder' => array(
'F_ID' => CSort::SORT_ASC,
),
),
'pagination' => array(
'pageSize' => 10,
),
));
$this->render('anActionView', array(
'model' => $model,
));
$this->widget('zii.widgets.grid.CGridView', array(
'id' => 'a-grid-id',
'dataProvider' => $model,
'ajaxUpdate' => true,
'filter' => null,
'columns' => array(
array(
'header' => 'Айди',
'name' => 'F_ID',
),
array(
'header' => 'Имя',
'name' => 'F_Name',
),
),
));
array('agentReward', 'checkRewardValidation', 'clientValidate' => 'clientCheckRewardValidation', 'on' => self::SCENARIO_FRONT_CREATE),
public function clientCheckRewardValidation($attribute, $params = array()) {
if (!isset($params['message']))
$params['message'] = 'Value should be 123';
$js = "if(value != '123') { messages.push('".$params['message']."'); }";
return $js;
}
Dim y as byte, f as double
' ... цикл "For y" будет вложен в цикл: For x = 2 To 6
For y = 1 To 7
f = f + y
Next y