<?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;
}
//clear
$hotelname        = '';
$hoteladdress     = '';
$hotelcity        = '';
$hotelcountrycode = '';
$hotelzip         = '';
$hotelrating      = '';
$hotelimage       = '';
$hoteldescription = '';
$roomsearchtotal  = '';
$hotelat          = '';
$hotelon          = '';

$arrayroomssearch = array();
//OTAS DATA
$ota_element_id   = mysqli_escape_string($conn, $_GET['element_id']);
$hotelat          = mysqli_escape_string($conn, $_GET['latitud']);
$hotelon          = mysqli_escape_string($conn, $_GET['longitud']);

//Variables
$id             = mysqli_escape_string($conn, $_GET['hotelid']);
$hotelid        = mysqli_escape_string($conn, $id);
$hotelname      = mysqli_escape_string($conn, $_GET['hotelname']);
$city_id        = mysqli_escape_string($conn, $_GET['city']);
$ota_priority   = mysqli_escape_string($conn, $_GET['ota_priority']);
$guests         = mysqli_escape_string($conn, $_GET['guests']);

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

//calculate days between checkin y checkout
$diasestadia      = daysDifference($checkout, $checkin);
$totalpersons     = $adults0 + $children0;

?>