/** * This is the default 'index' action that is invoked * when an action is not explicitly requested by users. */ public function actionIndex() { //$this->layout='//layouts/mainFixed'; // renders the view file 'protected/views/site/index.php' // using the default layout 'protected/views/layouts/main.php' $model = new Nilai('search'); $model->unsetAttributes(); // clear any default values $this->render('index', array('model' => $model)); }
public function actionArsip() { $this->layout = '//layouts/column1'; $model = new Nilai('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Nilai'])) { if ($_GET['Nilai']['nis'] == 0 && $_GET['Nilai']['nis'] != null) { $model->attributes = $_GET['Nilai']; Yii::app()->user->setFlash('warning', 'Data gagal diproses. <b>NIS</b> tidak boleh kosong atau 0'); } else { $model->attributes = $_GET['Nilai']; Yii::app()->user->setFlash('success', 'Data berhasil diproses. Tekan tombol <strong>CETAK</strong> untuk melihat raport!'); } } else { $model->nis = 0; } $this->render('arsip', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { $model = new Nilai('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Nilai'])) { $model->attributes = $_GET['Nilai']; } $this->render('admin', array('model' => $model)); }