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

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


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/writing_collection.php";

$writingCollection = new WritingCollection($dbConnector->getMysqli());
$systemWritingArray = $writingCollection->getSystemWritingList();

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