/** * Manages all models. */ public function actionAdmin() { $model=new Board('search'); $model->unsetAttributes(); // clear any default values if(isset($_GET['Board'])) $model->attributes=$_GET['Board']; $this->render('admin',array( 'model'=>$model, )); }
/** * Manages all models. */ public function actionAdmin() { if ($this->menu_use[1]) { $model = new Board('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Board'])) { $model->attributes = $_GET['Board']; } $this->render('admin', array('model' => $model)); } else { $this->redirect(array('site/index')); } }