/** * Manages all models. */ public function actionAdmin() { $model = new Property('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Property'])) { $model->attributes = $_GET['Property']; } $this->render('admin', array('model' => $model)); }
/** * Manages all Jackpot models. */ public function actionJackpot() { $model = new Property('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['id'])) { $record = Property::model()->findByPk($_GET['id']); $record->jackpot_investment = 1; $record->save(); } elseif (isset($_GET['Property'])) { $model->attributes = $_GET['Property']; } $this->render('jackpot', array('model' => $model)); }