<?php
header('Cache-Control: no-cache, must-revalidate');
header('Content-type: application/json');

require_once(dirname(__FILE__).'/controllers/BootstrapController.php');

$bsCtrl = new BootstrapController();
$data = json_decode(file_get_contents('php://input'), true);
if (is_array($data)) {
	$data = array_merge($data, $_POST);
} else {
	$data = $_POST;
}
$result = $bsCtrl->bootstrap($_GET, $data);

if (substr($result, 0, 6) == "Fehler") {

	echo "\"{$result}(.)\"";
} else {
	echo $result;
}