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 Currates();
     if (isset($_POST['Currates'])) {
         //$_POST['Currates']["date"]="CURRENT_TIMESTAMP";
         unset($_POST['Currates']["date"]);
         $model->attributes = $_POST['Currates'];
         if ($model->save()) {
             $this->redirect(array('admin', 'id' => $model->id));
         }
     }
     return $this->render('create', array('model' => $model));
 }