matchinfo

This commit is contained in:
Lanta 2023-11-14 22:27:01 +01:00
parent b702f2e23e
commit abc2ebaded
2 changed files with 27 additions and 15 deletions

View file

@ -7,6 +7,7 @@ error_reporting(E_ALL);
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<?php include './includes/head.php'; ?> <?php include './includes/head.php'; ?>
<body> <body>
<?php include './includes/navigation.php'; ?> <?php include './includes/navigation.php'; ?>
@ -64,7 +65,17 @@ error_reporting(E_ALL);
$damage = number_format($match['stats']['damageDealt'], 0, '.', ''); $damage = number_format($match['stats']['damageDealt'], 0, '.', '');
$timeSurvived = $match['stats']['timeSurvived']; $timeSurvived = $match['stats']['timeSurvived'];
$winPlace = $match['stats']['winPlace']; $winPlace = $match['stats']['winPlace'];
echo "<tr><td>$formattedDate</td><td>$gameMode</td><td>$matchType</td><td>$mapName</td><td>$kills</td><td>$damage</td><td>$timeSurvived</td><td>$winPlace</td></tr>"; echo "<tr>
<td><a href='matchinfo.php?matchid=" . $match['id'] . "'>" . $formattedDate . "</a></td>
<td><a href='matchinfo.php?matchid=" . $match['id'] . "'>" . $gameMode . "</a></td>
<td><a href='matchinfo.php?matchid=" . $match['id'] . "'>" . $matchType . "</a></td>
<td><a href='matchinfo.php?matchid=" . $match['id'] . "'>" . $mapName . "</a></td>
<td><a href='matchinfo.php?matchid=" . $match['id'] . "'>" . $kills . "</a></td>
<td><a href='matchinfo.php?matchid=" . $match['id'] . "'>" . $damage . "</a></td>
<td><a href='matchinfo.php?matchid=" . $match['id'] . "'>" . $timeSurvived . "</a></td>
<td><a href='matchinfo.php?matchid=" . $match['id'] . "'>" . $winPlace . "</a></td>
</tr>";
} }
echo "</table><br>"; echo "</table><br>";
@ -77,4 +88,5 @@ error_reporting(E_ALL);
<?php include './includes/footer.php'; ?> <?php include './includes/footer.php'; ?>
</body> </body>
</html> </html>

View file

@ -59,7 +59,7 @@ $lastMatches = array_slice($allMatches, 0, 8);
echo "<td>" . htmlspecialchars($matchinfo['gameMode']) . "</td>"; echo "<td>" . htmlspecialchars($matchinfo['gameMode']) . "</td>";
echo "<td>" . htmlspecialchars($matchinfo['mapName']) . "</td>"; echo "<td>" . htmlspecialchars($matchinfo['mapName']) . "</td>";
echo "<td>" . htmlspecialchars($matchinfo['createdAt']) . "</td>"; echo "<td>" . htmlspecialchars($matchinfo['createdAt']) . "</td>";
echo "<td>" . htmlspecialchars($$matchdata['id']) . "</td>"; echo "<td>" . htmlspecialchars($matchdata['id']) . "</td>";
echo "</tr>"; echo "</tr>";
echo "</table>"; echo "</table>";