<?php

set_include_path("../../");
include_once("server/class/bocatti/managers/DeliveryManager.php");

$jsonParams = file_get_contents('php://input');
$paramObj = json_decode($jsonParams);

$idLocal = (isset($paramObj->idDelivery)) ? $paramObj->idDelivery : null;
$dd = array();

if(!($idLocal === null)){
    $dm = new DeliveryManager();
    $dm->setDeliveryId($idLocal);
    $dd = $dm->getDeliveryStatus();     
    $error = ($dd)?0:-2;
} else {
    $error = -1;
}

$response['error'] = $error;
$response['content'] = $dd;

// //enviar los davehiculos armados
header("Content-Type: text/html;charset=utf-8");
echo json_encode($response);