public function actionAdmin($id = null) { $model = new Bankbook('search'); $model->unsetAttributes(); // clear any default values if ($id !== null) { $model->account_id = $id; } if (isset($_POST['Bankbook']['file'])) { $model->import((int) $_POST['Bankbook']['account_id']); //Yii::app()->end(); } $this->render('admin', array('model' => $model)); }