<?php
header('Content-Type: application/json');

// get parameters from client
$maestroID = $_POST["maestroID"];


include "./../lib/json_builder.php";
include "./../lib/connect_db.php";

$jsonBuilder = new JsonBuilder();
$dbConnector = new DBConnector();

$isConnected = $dbConnector->connectDB();
if (!$isConnected) {
	$jsonBuilder->setErrorMessage("DB connection : failed");
	$jsonBuilder->sendResultFail();
	exit;
}


include "./../db/db_method_container.php";
include "./../db/menu_collection.php";

$menuCollection = new MenuCollection($dbConnector->getMysqli());
$allowEditEntercode = $menuCollection->getAllowEditEntercode($maestroID);

$jsonBuilder->setData("allowEditEntercode", $allowEditEntercode);
$jsonBuilder->sendResultSuccess();
?>