Exemplo n.º 1
0
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new Roster();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['Roster'])) {
         $model->attributes = $_POST['Roster'];
         if ($model->save()) {
             $this->redirect(array('view', 'id' => $model->id));
         }
     }
     $this->render('create', array('model' => $model));
 }
Exemplo n.º 2
0
 public function save_roster()
 {
     $roster = str_replace('\\"', '"', $_POST['roster']);
     $roster = json_decode($roster, true);
     $this->roster->save($roster);
     var_dump($this->roster);
     $this->audit->audit();
     echo "success";
     ob_flush();
     wp_die();
 }