<?php
//Function gregorian dates is month, day, year
function daysDifference($endDate, $beginDate)
{
    $date_parts1 = explode("/", $beginDate);
    $date_parts2 = explode("/", $endDate);
    
    $start_date  = gregoriantojd($date_parts1[0], $date_parts1[1], $date_parts1[2]);
    $end_date    = gregoriantojd($date_parts2[0], $date_parts2[1], $date_parts2[2]);
    return $end_date - $start_date;
}

$arrayroomssearch = array();

//Variables
$id           = mysqli_escape_string($conn, $_GET['hotel_id']);
$hotelid      = mysqli_escape_string($conn, $id);
$hotelname    = mysqli_escape_string($conn, $_GET['hotel_name']);
$ota_priority = mysqli_escape_string($conn, $_GET['ota_priority']);
$guests       = mysqli_escape_string($conn, $_GET['guests']);
//$ota_element_id = $_GET['element_id'];

require_once('../data-bgo/booking-data-in-get.php');

//Calculate dates checkin and checkout
$diasestadia      = daysDifference($checkout, $checkin);
$totalpersons     = $adults0 + $children0;
//clear
$hotelname        = '';
$hoteladdress     = '';
$hotelcity        = '';
$hotelcountrycode = '';
$hotelzip         = '';
$hotelrating      = '';
$hotelimage       = '';
$hoteldescription = '';
$roomsearchtotal  = '';
$hotelat          = '';
$hotelon          = '';
?>