Add parameters back

This commit is contained in:
Vojtěch Sajdl 2018-04-14 12:50:10 +02:00
parent 4b7d8be838
commit 3c75159e2a
No known key found for this signature in database
GPG Key ID: 082BC82518E5F32E

View File

@ -8,12 +8,11 @@ else{
require_once("../config.php");
require_once("../classes/constellation.php");
if (isset($_GET['future']) && $_GET['future'] == true)
{
$result = $constellation->get_incidents(true);
}else{
$result = $constellation->get_incidents();
}
$limit = (isset($_GET['limit'])?$_GET['limit']:5);
$offset = (isset($_GET['offset'])?$_GET['offset']:0);
$timestamp = (isset($_GET['timestamp']))?$_GET['timestamp']:time();
$result = $constellation->get_incidents((isset($_GET['future'])?$_GET['future']:false), $offset, $limit, $timestamp);
echo json_encode($result);
}