<?php

	require_once 'cron/class.db.php';

	$reference = (isset($_GET['number']) && $_GET['number'] != '') ? $_GET['number'] : '';
	$phone = (isset($_GET['user']) && $_GET['user'] != '') ? $_GET['user'] : '';

	if ($reference != '' ) {
		DataBase::getInstancia();
		$sql = 'UPDATE reservations SET status_id = 5 WHERE reference_number = \'' . $reference . '\' AND status_id = 2';
		$result = DataBase::execute_query($sql,'S');
		if ($result > 0 ) 
			echo 'Su reserva ha sido cancelada. Booking cancelled.';

	}
?>
