/**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new Contenido();
     if (isset($_POST['Contenido'])) {
         $model->attributes = $_POST['Contenido'];
         if ($model->validate()) {
             $model->fecha_creacion = date("Y-m-d H:i:s");
             $model->fecha_modificacion = date("Y-m-d H:i:s");
             if ($model->save()) {
                 $this->redirect(array('view', 'id' => $model->id));
             }
         }
     }
     $this->render('create', array('model' => $model));
 }