FreeSTAR-Status-Engine/api/incidents.php

19 lines
354 B
PHP
Raw Normal View History

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