server/php/basic/public_html/renkan.php
author ymh <ymh.work@gmail.com>
Wed, 09 Sep 2015 18:37:15 +0200
changeset 499 7d374d366b28
parent 442 adb907bba956
permissions -rw-r--r--
Correct strange bug on fill of editor box with a difference of beavior between paperjs 0.9.23 and 0.9.24. Real cause not found, but this correction visually solve the problem

<?php

require_once(realpath(dirname(__FILE__) . "/../resources/config.php"));

require_once(LIBRARY_PATH . "/renkanFunctions.php");

if(isset($_REQUEST['renkanId'])) {
    $renkanId = $_REQUEST['renkanId'];
}
else {
    header("HTTP/1.0 400 Bad Request");
    echo("Missing 'renkanId' parameter");
    return;
}


if ($_SERVER['REQUEST_METHOD'] === 'PUT' || $_SERVER['REQUEST_METHOD'] === 'POST') {

    $json = file_get_contents('php://input');

    saveRenkan($renkanId, $json);
}
else {
    getRenkan($renkanId);
}