Esempio n. 1
0
 public function actionPush()
 {
     $model = new Needing();
     if (!empty($_POST)) {
         $model->attributes = $_POST['Needing'];
         $model->start_time = strtotime($_POST['Needing']['start_time']);
         $model->end_time = strtotime($_POST['Needing']['end_time']);
         $model->subject = $_POST['Needing']['subject'];
         $model->detail = $_POST['detail'];
         $model->create_time = time();
         $model->push_user = '******';
         $model->payment = $_POST['Needing']['payment'];
         $model->save();
     }
     $this->render('push', array('model' => $model));
 }