matchinfo

This commit is contained in:
Thijs Stobbelaar 2023-11-14 22:27:01 +01:00
parent 936e4c7aa6
commit 3ba34fbe51
2 changed files with 27 additions and 15 deletions

View file

@ -7,13 +7,14 @@ error_reporting(E_ALL);
<!DOCTYPE html>
<html lang="en">
<?php include './includes/head.php'; ?>
<body>
<?php include './includes/navigation.php'; ?>
<header>
<?php include './includes/navigation.php'; ?>
<header>
<img src="./images/banner2.png" alt="banner" class="banner">
</header>
<main>
<main>
<section>
<h2>Match Stats</h2>
<?php
@ -64,7 +65,17 @@ error_reporting(E_ALL);
$damage = number_format($match['stats']['damageDealt'], 0, '.', '');
$timeSurvived = $match['stats']['timeSurvived'];
$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>";
@ -72,9 +83,10 @@ error_reporting(E_ALL);
}
?>
</section>
</main>
</main>
<?php include './includes/footer.php'; ?>
<?php include './includes/footer.php'; ?>
</body>
</html>

View file

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