events as $stdClass) { $pos = $pos + 1; if (isset($stdClass->timestamp)) { if ($stdClass->timestamp == $id) { unset($json->events[$pos]->timestamp); unset($json->events[$pos]->datestr); unset($json->events[$pos]->name); unset($json->events[$pos]->description); } } } file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/caldb.json", json_encode($json, JSON_PRETTY_PRINT)); require $_SERVER['DOCUMENT_ROOT'] . "/api/admin/cache_content_reset.php"; require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("ok"); } else { require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("CalDb1: ParseError: Unable to open database, JSON parse failed. Data might be corrupted"); }