<?php
require_once dirname(__DIR__) . '/safety/ChairmanSafeLoader.php';
$raceDate = isset($_GET['race_date']) ? $_GET['race_date'] : (isset($_GET['date']) ? $_GET['date'] : date('Y-m-d'));
$venue = isset($_GET['venue']) ? $_GET['venue'] : '';
$raceNum = isset($_GET['race_num']) ? intval($_GET['race_num']) : 0;
header('Content-Type: application/json; charset=utf-8');
echo json_encode(ChairmanSafeLoader::payload($raceDate,$venue,$raceNum), JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
