<?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json");
header("Cache-Control: no-cache");

$quelltext = file_get_contents("http://www.chaostreff-dortmund.de/raumstatus.php?txt");
$state = $quelltext == "online\n" ? "true" : "false";

?>
{
    "api":"0.13",
    "space":"Chaostreff-Dortmund",
    "logo":"http://www.chaostreff-dortmund.de/logo/logo_ctdo.svg",
    "icon":{
        "open":"http://status.ctdo.de/img/green.png",
        "closed":"http://status.ctdo.de/img/red.png"
    },
    "state": {
      "open":<?php echo $state; ?>

    },
    "url":"https://www.chaostreff-dortmund.de/",
    "address":"Braunschweigerstr. 22, 44145 Dortmund, Germany",
    "contact":{
        "irc":"irc://irc.hackint.org/#ctdo",
        "twitter":"@ctdo",
        "email":"presse@chaostreff-dortmund.de",
        "ml":"discuss@lists.chaostreff-dortmund.de"
    },
    "issue_report_channels": ["ml"],
    "location": {
      "address":"Braunschweigerstr. 22, 44145 Dortmund, Germany",
      "lat":51.527664,
      "lon":7.465072
    },
    "lat": 51.527664,
    "lon": 7.465072,
    "open":<?php echo $state; ?>
}
