<?php

/* 
 * ROMAN DIGITAL - Autor: Américo Patetta
 */

//set_include_path("../../");
//include_once("server/class/Delivery.php");
@session_start();

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

// if (isset($paramObj->user) && isset($paramObj->pass)) {
//     $idDelivery = $paramObj->user;
//     $pass = $paramObj->pass;

//     $delivery = new Delivery($idDelivery);
//     if ($delivery->appValidate($pass)) {
//         $ack['error'] = 0;
//         $ack['userId'] = $delivery->idDelivery;
//         $ack['user'] = $delivery->nombre;
//         $ack['iniciales'] = $delivery->iniciales;
//         $ack['idLocal'] = $delivery->localActual;
//         $ack['token'] = session_id();
//         $delivery->updateToken($ack['token']);
//     } else {
//         $ack['error'] = -2;
//         $ack['userId'] = "";
//     }
// } else {
//     $idDelivery = null;
//     $pass = null;
//     $ack['error'] = -1;
//     $ack['userId'] = "";
// }

$ack['code'] = 1234;

header('Content-Type: application/json; charset=utf-8');
echo json_encode($ack);
