/**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new Reservation();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['Reservation'])) {
         $model->attributes = $_POST['Reservation'];
         $model->setAttribute('confirmreservation', true);
         if ($model->save()) {
             Yii::app()->session['reservationid'] = $model->id;
             $this->redirect(array('reservationDetails/create'));
         }
     }
     $this->render('create', array('model' => $model));
 }