/** * 录入 * */ public function actionCreate() { parent::_acl('investAim_create'); $model = new InvestAim(); if (isset($_POST['InvestAim'])) { $model->attributes = $_POST['InvestAim']; if ($model->save()) { AdminLogger::_create(array('catalog' => 'create', 'intro' => '录入投资目的,ID:' . $model->id)); $this->redirect(array('index')); } } $this->render('create', array('model' => $model)); }
public function run() { $city = City::model()->findAll(); $type = InvestType::model()->findAll(); $aim = InvestAim::model()->findAll(); $data = array('city' => $city, 'type' => $type, 'aim' => $aim); $this->render('evaluate', $data); }