This commit is contained in:
Thijs Stobbelaar 2023-11-15 14:00:47 +01:00
parent a6c251872c
commit c80e935a0a

View file

@ -66,12 +66,11 @@ $lastMatches = array_slice($allMatches, 0, 8);
$jsonData = json_decode(file_get_contents($filename), true);
$matchinfo = $jsonData['data']['attributes'];
$matchdata = $jsonData['data'];
echo "<table class='sortable'><tr><th>matchType</th><th>gameMode</th><th>duration</th><th>gameMode</th><th>mapName</th><th>createdAt</th><th>id</th></tr>";
echo "<table class='sortable'><tr><th>matchType</th><th>gameMode</th><th>duration</th><th>mapName</th><th>createdAt</th><th>id</th></tr>";
echo "<tr>";
echo "<td>" . htmlspecialchars($matchinfo['matchType']) . "</td>";
echo "<td>" . htmlspecialchars($matchinfo['gameMode']) . "</td>";
echo "<td>" . htmlspecialchars($matchinfo['duration']) . "</td>";
echo "<td>" . htmlspecialchars($matchinfo['gameMode']) . "</td>";
echo "<td>" . htmlspecialchars(isset($mapNames[$matchinfo['mapName']]) ? $mapNames[$matchinfo['mapName']] : $matchinfo['mapName']) . "</td>";
echo "<td>" . htmlspecialchars($matchinfo['createdAt']) . "</td>";
echo "<td>" . htmlspecialchars($matchdata['id']) . "</td>";