<?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Methods: POST");

include_once '../config/database.php';
include_once '../objects/installation.php';
// session_start();
 
$database = new Database();
$db = $database->getConnection();

$installation = new Installation($db);
$data = json_decode(file_get_contents("php://input"));

$installation->id_no = $data->id_no;
$installation->getOneRowByIDNO();

$sales = array(
	"id_no" => $installation->id_no,
	"slot_id" => $installation->slot_id,
    "pon_port" => $installation->pon_port,
	"odb" => $installation->odb,
    "service_port" => $installation->service_port

);
echo json_encode($sales);

?>