Пример #1
0
 /**
  * Manages all models.
  */
 public function actionIndex($id = null)
 {
     if (isset($id)) {
         $model = $this->loadModel($id);
     } else {
         $model = new LaporanHarian();
     }
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['LaporanHarian'])) {
         $model->attributes = $_POST['LaporanHarian'];
         if ($model->save()) {
             $this->redirect(array('index', 'id' => $model->id));
         }
     }
     $this->render('index', array('model' => $model));
 }