2018-04-13 21:31:03 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (!file_exists("../config.php"))
|
|
|
|
{
|
|
|
|
header("Location: ../");
|
|
|
|
}
|
|
|
|
else{
|
2018-04-13 22:38:10 +02:00
|
|
|
require_once("../config.php");
|
|
|
|
require_once("../classes/constellation.php");
|
2018-04-13 21:31:03 +02:00
|
|
|
|
2018-04-13 22:38:10 +02:00
|
|
|
if (isset($_GET['future']) && $_GET['future'] == true)
|
|
|
|
{
|
2018-04-14 12:37:01 +02:00
|
|
|
$result = $constellation->get_incidents(true);
|
2018-04-13 22:38:10 +02:00
|
|
|
}else{
|
2018-04-14 12:37:01 +02:00
|
|
|
$result = $constellation->get_incidents();
|
2018-04-13 22:38:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
echo json_encode($result);
|
2018-04-13 21:31:03 +02:00
|
|
|
}
|