<?php

namespace WpBookingHotelFrontend\app\controllers;

use WpBookingHotel\Factory;
use WpBookingHotel\Filesystem\Support\StringController;
use WpBookingHotel\Mvc\Controller\ControllerFrontend;
use WpBookingHotel\Mvc\Model\Model;
use WpBookingHotel\Utilities\Utility;
use WpBookingHotelFrontend\app\helpers\ConfigHelper;
use WpBookingHotelFrontend\app\helpers\EmailHelper;

defined('_WPBOOKINGHOTEL_EXEC') or die;

/**
 * Class BlockController
 */
class ReviewController extends ControllerFrontend
{
    public function save_review()
    {
        
        $input = Factory::getInput();
        $data = $input->getData();
        $hotel_id = $input->getInt('hotel_id',0);
        $alias = $input->getString('alias','');
        $link_redirect = $input->getString('link_redirect',"");
        $modelReview = Model::getInstance('review');
        $review = $modelReview->save_review($data);
        header('Location: '.$link_redirect.$alias.'-'.$hotel_id);
        exit();
    }

}
