public function actionAddlike($id) { Yii::app()->session['nowid'] = $id; $pmodel = $this->loadModel($id); $toptype = Traveltype::model()->findAll(array('select'=>'id,name','condition'=>'pid=0 and id<>26 and id<>27')); $model = new Travel('mysearch'); $model->unsetAttributes(); $this->render('addlike',array( 'model'=>$model, 'pmodel'=>$pmodel, 'toptype'=>$toptype, )); }