示例#1
0
 public function add($args)
 {
     $model = new QuizSuggestion();
     $model->setAttributes($args);
     if ($model->save(FALSE)) {
         return $model->id;
     }
     return FALSE;
 }
 public function actionAddSuggestion()
 {
     $args = StringHelper::filterArrayString($_POST);
     $data = QuizSuggestion::model()->add($args);
     if ($data) {
         ResponseHelper::JsonReturnSuccess($data);
     } else {
         ResponseHelper::JsonReturnError('');
     }
 }