foreach
This commit is contained in:
parent
395c1e3d25
commit
9e63046aff
1 changed files with 18 additions and 18 deletions
|
|
@ -61,27 +61,27 @@ $ogDescription = "Dive into the detailed match stats of DTCH Clan in PUBG. Explo
|
|||
echo "<table border='1' class='sortable'>";
|
||||
echo "<tr><th>Match Date</th><th>Game Mode</th><th>Match Type</th><th>Map</th><th>Kills</th><th>Damage Dealt</th><th>Time Survived</th><th>win Place</th></tr>";
|
||||
foreach ($players_matches as $match) {
|
||||
foreach($match['stats'] as $stats)
|
||||
if ($stats['name'] === $selected_player) {
|
||||
foreach ($match['stats'] as $stats) {
|
||||
if ($stats['name'] === $selected_player) {
|
||||
|
||||
|
||||
if (isset($_GET['filter_by_match_type'])) {
|
||||
if ($_GET['filter_by_match_type'] !== 'all' && $match['matchType'] !== $_GET['filter_by_match_type']) {
|
||||
continue;
|
||||
if (isset($_GET['filter_by_match_type'])) {
|
||||
if ($_GET['filter_by_match_type'] !== 'all' && $match['matchType'] !== $_GET['filter_by_match_type']) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
$date = new DateTime($match['createdAt']);
|
||||
$date->modify('+1 hours');
|
||||
$formattedDate = $date->format('m-d H:i:s');
|
||||
$date = new DateTime($match['createdAt']);
|
||||
$date->modify('+1 hours');
|
||||
$formattedDate = $date->format('m-d H:i:s');
|
||||
|
||||
$matchType = $match['matchType'];
|
||||
$gameMode = $match['gameMode'];
|
||||
$mapName = isset($mapNames[$match['mapName']]) ? $mapNames[$match['mapName']] : $match['mapName'];
|
||||
$kills = $stats['kills'];
|
||||
$damage = number_format($stats['damageDealt'], 0, '.', '');
|
||||
$timeSurvived = $stats['timeSurvived'];
|
||||
$winPlace = $stats['winPlace'];
|
||||
echo "<tr>
|
||||
$matchType = $match['matchType'];
|
||||
$gameMode = $match['gameMode'];
|
||||
$mapName = isset($mapNames[$match['mapName']]) ? $mapNames[$match['mapName']] : $match['mapName'];
|
||||
$kills = $stats['kills'];
|
||||
$damage = number_format($stats['damageDealt'], 0, '.', '');
|
||||
$timeSurvived = $stats['timeSurvived'];
|
||||
$winPlace = $stats['winPlace'];
|
||||
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>
|
||||
|
|
@ -95,8 +95,8 @@ $ogDescription = "Dive into the detailed match stats of DTCH Clan in PUBG. Explo
|
|||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
echo "</table><br>";
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue