From c9a4fabb8dfd7a5e2aa19e474bc267aba4d49d29 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 19:49:42 +0100 Subject: [PATCH 01/22] matchinfo --- matchinfo.php | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 matchinfo.php diff --git a/matchinfo.php b/matchinfo.php new file mode 100644 index 0000000..0a6ee08 --- /dev/null +++ b/matchinfo.php @@ -0,0 +1,38 @@ +"; + echo "Player NameKillsDamage DealtTime SurvivedRank"; + + // Loop through the JSON data to extract player stats + foreach ($jsonData['data']['relationships']['rosters']['data'] as $roster) { + foreach ($jsonData['included'] as $includedItem) { + if ($includedItem['type'] === 'participant' && in_array(['type' => 'participant', 'id' => $includedItem['id']], $roster['relationships']['participants']['data'])) { + $playerStats = $includedItem['attributes']['stats']; + echo ""; + echo "" . htmlspecialchars($playerStats['name']) . ""; + echo "" . htmlspecialchars($playerStats['kills']) . ""; + echo "" . htmlspecialchars($playerStats['damageDealt']) . ""; + echo "" . htmlspecialchars($playerStats['timeSurvived']) . ""; + echo "" . htmlspecialchars($playerStats['winPlace']) . ""; + echo ""; + } + } + } + echo ""; + } else { + echo "JSON file not found for the given match ID."; + } +} else { + echo "No match ID provided."; +} +?> From 8d91c0b3ab446d15d8e9af9f6adac00d5774b738 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 19:52:25 +0100 Subject: [PATCH 02/22] folder --- matchinfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matchinfo.php b/matchinfo.php index 0a6ee08..461a475 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -2,7 +2,7 @@ // Check if a match ID is provided in the GET request if (isset($_GET['matchid'])) { $matchId = $_GET['matchid']; - $filename = $matchId . ".json"; + $filename = "matches/" . $matchId . ".json"; // Check if the JSON file for the given match ID exists if (file_exists($filename)) { From 3f0e396302d5b193455dae010572bd8da1525dd0 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 19:54:28 +0100 Subject: [PATCH 03/22] data sub --- matchinfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matchinfo.php b/matchinfo.php index 461a475..63f49c6 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -2,7 +2,7 @@ // Check if a match ID is provided in the GET request if (isset($_GET['matchid'])) { $matchId = $_GET['matchid']; - $filename = "matches/" . $matchId . ".json"; + $filename = "data/matches/" . $matchId . ".json"; // Check if the JSON file for the given match ID exists if (file_exists($filename)) { From 0b7f39b0c013f330e0b89aabde1dd6671dad1110 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 19:58:16 +0100 Subject: [PATCH 04/22] matchinfo --- matchinfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matchinfo.php b/matchinfo.php index 63f49c6..385e78c 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -8,7 +8,7 @@ if (isset($_GET['matchid'])) { if (file_exists($filename)) { // Read and decode the JSON file $jsonData = json_decode(file_get_contents($filename), true); - + echo $jsonData; // Start building the HTML table echo ""; echo ""; From 712e85eb63bf768c613d2a2b4d22cf613e21efd5 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 20:00:42 +0100 Subject: [PATCH 05/22] s --- matchinfo.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matchinfo.php b/matchinfo.php index 385e78c..638da95 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -8,7 +8,10 @@ if (isset($_GET['matchid'])) { if (file_exists($filename)) { // Read and decode the JSON file $jsonData = json_decode(file_get_contents($filename), true); - echo $jsonData; + echo "
";
+        print_r($jsonData);
+        echo "
"; + // Start building the HTML table echo "
Player NameKillsDamage DealtTime SurvivedRank
"; echo ""; From cb02d0a583327ff253cc6220de51ca885ca147b2 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 20:54:24 +0100 Subject: [PATCH 06/22] data included --- matchinfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matchinfo.php b/matchinfo.php index 638da95..47200a9 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -9,7 +9,7 @@ if (isset($_GET['matchid'])) { // Read and decode the JSON file $jsonData = json_decode(file_get_contents($filename), true); echo "
";
-        print_r($jsonData);
+        print_r($jsonData['data']['included']);
         echo "
"; // Start building the HTML table From 3a78be1ae48366d520e571f8caf07e661cc49dce Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 20:55:20 +0100 Subject: [PATCH 07/22] data --- matchinfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matchinfo.php b/matchinfo.php index 47200a9..b49d7de 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -9,7 +9,7 @@ if (isset($_GET['matchid'])) { // Read and decode the JSON file $jsonData = json_decode(file_get_contents($filename), true); echo "
";
-        print_r($jsonData['data']['included']);
+        print_r($jsonData['included']);
         echo "
"; // Start building the HTML table From e275f2748cbbb134f2d093ba11e72b0c53d0c44c Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 20:57:45 +0100 Subject: [PATCH 08/22] stats --- matchinfo.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/matchinfo.php b/matchinfo.php index b49d7de..587bcbc 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -17,20 +17,20 @@ if (isset($_GET['matchid'])) { echo "
"; // Loop through the JSON data to extract player stats - foreach ($jsonData['data']['relationships']['rosters']['data'] as $roster) { - foreach ($jsonData['included'] as $includedItem) { - if ($includedItem['type'] === 'participant' && in_array(['type' => 'participant', 'id' => $includedItem['id']], $roster['relationships']['participants']['data'])) { - $playerStats = $includedItem['attributes']['stats']; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } - } + + foreach ($jsonData['included'] as $includedItem) { + + $playerStats = $includedItem['attributes']['stats']; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + echo "
Player NameKillsDamage DealtTime SurvivedRank
Player NameKillsDamage DealtTime SurvivedRank
" . htmlspecialchars($playerStats['name']) . "" . htmlspecialchars($playerStats['kills']) . "" . htmlspecialchars($playerStats['damageDealt']) . "" . htmlspecialchars($playerStats['timeSurvived']) . "" . htmlspecialchars($playerStats['winPlace']) . "
" . htmlspecialchars($playerStats['name']) . "" . htmlspecialchars($playerStats['kills']) . "" . htmlspecialchars($playerStats['damageDealt']) . "" . htmlspecialchars($playerStats['timeSurvived']) . "" . htmlspecialchars($playerStats['winPlace']) . "
"; } else { echo "JSON file not found for the given match ID."; @@ -38,4 +38,4 @@ if (isset($_GET['matchid'])) { } else { echo "No match ID provided."; } -?> +?> \ No newline at end of file From f185bdc70b6cdafe09327ade89b7e5bf85ffeeaf Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 20:59:11 +0100 Subject: [PATCH 09/22] patricipent --- matchinfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matchinfo.php b/matchinfo.php index 587bcbc..6ddc9cc 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -19,7 +19,7 @@ if (isset($_GET['matchid'])) { // Loop through the JSON data to extract player stats foreach ($jsonData['included'] as $includedItem) { - + if ($includedItem['type'] == "participant"){ $playerStats = $includedItem['attributes']['stats']; echo ""; echo "" . htmlspecialchars($playerStats['name']) . ""; @@ -28,7 +28,7 @@ if (isset($_GET['matchid'])) { echo "" . htmlspecialchars($playerStats['timeSurvived']) . ""; echo "" . htmlspecialchars($playerStats['winPlace']) . ""; echo ""; - + } } echo ""; From 6934176c1626c1c0f7d48fafbb017182946fa13c Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 20:59:56 +0100 Subject: [PATCH 10/22] s --- matchinfo.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/matchinfo.php b/matchinfo.php index 6ddc9cc..311fab7 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -8,9 +8,6 @@ if (isset($_GET['matchid'])) { if (file_exists($filename)) { // Read and decode the JSON file $jsonData = json_decode(file_get_contents($filename), true); - echo "
";
-        print_r($jsonData['included']);
-        echo "
"; // Start building the HTML table echo ""; From fc1c5f86218f3db6ab5899624db0bf4366577833 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 21:09:20 +0100 Subject: [PATCH 11/22] table --- matchinfo.php | 122 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 88 insertions(+), 34 deletions(-) diff --git a/matchinfo.php b/matchinfo.php index 311fab7..0ca7865 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -1,38 +1,92 @@ "; - echo ""; - - // Loop through the JSON data to extract player stats - - foreach ($jsonData['included'] as $includedItem) { - if ($includedItem['type'] == "participant"){ - $playerStats = $includedItem['attributes']['stats']; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } - } - - echo "
Player NameKillsDamage DealtTime SurvivedRank
" . htmlspecialchars($playerStats['name']) . "" . htmlspecialchars($playerStats['kills']) . "" . htmlspecialchars($playerStats['damageDealt']) . "" . htmlspecialchars($playerStats['timeSurvived']) . "" . htmlspecialchars($playerStats['winPlace']) . "
"; - } else { - echo "JSON file not found for the given match ID."; +// Combine matches from all players +$allMatches = []; +foreach ($playersData as $player) { + foreach ($player['player_matches'] as $match) { + $match['playername'] = $player['playername']; // Add playername to each match for reference + $allMatches[] = $match; } -} else { - echo "No match ID provided."; } -?> \ No newline at end of file + +// Sort matches by createdAt date +usort($allMatches, function ($a, $b) { + return strtotime($b['createdAt']) - strtotime($a['createdAt']); +}); + +// Get the last 5 matches +$lastMatches = array_slice($allMatches, 0, 8); + +?> + + + + + + + + +
+ +
+ +
+
+

Latest Matches

+ + + + + + + + + + "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + } + + echo "
Player NameKillsDamage DealtTime SurvivedRank
" . htmlspecialchars($playerStats['name']) . "" . htmlspecialchars($playerStats['kills']) . "" . htmlspecialchars($playerStats['damageDealt']) . "" . htmlspecialchars($playerStats['timeSurvived']) . "" . htmlspecialchars($playerStats['winPlace']) . "
"; + } else { + echo "JSON file not found for the given match ID."; + } + } else { + echo "No match ID provided."; + } + ?> + + + + + +
+
+ + + + + + \ No newline at end of file From 1a958cb7ca1e7e49ae78d42a70128e143627f96d Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 21:14:18 +0100 Subject: [PATCH 12/22] sortable --- config/clanmembers.json | 1 + matchinfo.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/clanmembers.json b/config/clanmembers.json index 129cecf..9dfb03b 100644 --- a/config/clanmembers.json +++ b/config/clanmembers.json @@ -10,6 +10,7 @@ "SquadKiller101", "Pettie1972", "HeteKip", + "Shepherders", "WackyJacky101" ] } diff --git a/matchinfo.php b/matchinfo.php index 0ca7865..42e51b5 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -37,7 +37,7 @@ $lastMatches = array_slice($allMatches, 0, 8);

Latest Matches

- +
From bdded9b74bda30b175979f7121f29116c43271d5 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 21:34:39 +0100 Subject: [PATCH 13/22] sortable --- matchinfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matchinfo.php b/matchinfo.php index 42e51b5..f267698 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -37,7 +37,7 @@ $lastMatches = array_slice($allMatches, 0, 8);

Latest Matches

-
+
From 9e948a56ed2c4c2ba943ddbb3509911fef52636d Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 21:45:06 +0100 Subject: [PATCH 14/22] table --- matchinfo.php | 78 +++++++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 36 deletions(-) diff --git a/matchinfo.php b/matchinfo.php index f267698..8898567 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -37,47 +37,53 @@ $lastMatches = array_slice($allMatches, 0, 8);

Latest Matches

-
- - - - - - - - - // Check if the JSON file for the given match ID exists - if (file_exists($filename)) { - // Read and decode the JSON file - $jsonData = json_decode(file_get_contents($filename), true); - - foreach ($jsonData['included'] as $includedItem) { - if ($includedItem['type'] == "participant") { - $playerStats = $includedItem['attributes']['stats']; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } + + + + + + + + + + + + + "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; } - - echo "
Player NameKillsDamage DealtTime SurvivedRank
" . htmlspecialchars($playerStats['name']) . "" . htmlspecialchars($playerStats['kills']) . "" . htmlspecialchars($playerStats['damageDealt']) . "" . htmlspecialchars($playerStats['timeSurvived']) . "" . htmlspecialchars($playerStats['winPlace']) . "
Player NameKillsDamage DealtTime SurvivedRank
" . htmlspecialchars($playerStats['name']) . "" . htmlspecialchars($playerStats['kills']) . "" . htmlspecialchars($playerStats['damageDealt']) . "" . htmlspecialchars($playerStats['timeSurvived']) . "" . htmlspecialchars($playerStats['winPlace']) . "
"; - } else { - echo "JSON file not found for the given match ID."; } + + echo ""; } else { - echo "No match ID provided."; + echo "JSON file not found for the given match ID."; } - ?> - + } else { + echo "No match ID provided."; + } + ?> + From d87267f5cfb8883f27450a3f491cb983204658e6 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 21:56:56 +0100 Subject: [PATCH 15/22] ss --- matchinfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matchinfo.php b/matchinfo.php index 8898567..23ca551 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -41,13 +41,13 @@ $lastMatches = array_slice($allMatches, 0, 8); - + Player Name Kills Damage Dealt Time Survived Rank - + From d6a0ad0bc30f6044fa34013472d2e4ae22b12988 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 22:20:42 +0100 Subject: [PATCH 16/22] matchinfo --- matchinfo.php | 81 +++++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 38 deletions(-) diff --git a/matchinfo.php b/matchinfo.php index 23ca551..04a55a4 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -37,52 +37,57 @@ $lastMatches = array_slice($allMatches, 0, 8);

Latest Matches

- - - - - - - - - - - - - "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } + // Check if the JSON file for the given match ID exists + if (file_exists($filename)) { + // Read and decode the JSON file + $jsonData = json_decode(file_get_contents($filename), true); + $matchinfo = $jsonData['data']['attributes']; + $matchdata = $jsonData['data'] + echo "
Player NameKillsDamage DealtTime SurvivedRank
" . htmlspecialchars($playerStats['name']) . "" . htmlspecialchars($playerStats['kills']) . "" . htmlspecialchars($playerStats['damageDealt']) . "" . htmlspecialchars($playerStats['timeSurvived']) . "" . htmlspecialchars($playerStats['winPlace']) . "
"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + + echo "
matchTypedurationgameModemapNamecreatedAtid
" . htmlspecialchars($matchinfo['matchType']) . "" . htmlspecialchars($matchinfo['duration']) . "" . htmlspecialchars($matchinfo['gameMode']) . "" . htmlspecialchars($matchinfo['mapName']) . "" . htmlspecialchars($matchinfo['createdAt']) . "" . htmlspecialchars($$matchdata['id']) . "
"; + + + echo ""; + + foreach ($jsonData['included'] as $includedItem) { + if ($includedItem['type'] == "participant") { + $playerStats = $includedItem['attributes']['stats']; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; } - - echo "
Player NameKillsDamage DealtTime SurvivedRank
" . htmlspecialchars($playerStats['name']) . "" . htmlspecialchars($playerStats['kills']) . "" . htmlspecialchars($playerStats['damageDealt']) . "" . htmlspecialchars($playerStats['timeSurvived']) . "" . htmlspecialchars($playerStats['winPlace']) . "
"; - } else { - echo "JSON file not found for the given match ID."; } + + echo ""; } else { - echo "No match ID provided."; + echo "JSON file not found for the given match ID."; } - ?> + } else { + echo "No match ID provided."; + } + ?> From b702f2e23ec53a6f8f9c8d50156988ec3e612148 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 22:20:56 +0100 Subject: [PATCH 17/22] fix --- matchinfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matchinfo.php b/matchinfo.php index 04a55a4..bff0724 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -51,7 +51,7 @@ $lastMatches = array_slice($allMatches, 0, 8); // Read and decode the JSON file $jsonData = json_decode(file_get_contents($filename), true); $matchinfo = $jsonData['data']['attributes']; - $matchdata = $jsonData['data'] + $matchdata = $jsonData['data']; echo ""; echo ""; echo ""; From abc2ebaded46768a0533ac488b1f07cffcacdf6c Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 22:27:01 +0100 Subject: [PATCH 18/22] matchinfo --- latestmatches.php | 40 ++++++++++++++++++++++++++-------------- matchinfo.php | 2 +- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/latestmatches.php b/latestmatches.php index c2e6524..bc80c0a 100644 --- a/latestmatches.php +++ b/latestmatches.php @@ -7,16 +7,17 @@ error_reporting(E_ALL); + - -
- + +
+
-
-
-

Match Stats

- +
+

Match Stats

+ $player_name"; } } - + echo "
"; $selected_player = $_GET['selected_player'] ?? $players_matches[0]['playername']; @@ -64,17 +65,28 @@ error_reporting(E_ALL); $damage = number_format($match['stats']['damageDealt'], 0, '.', ''); $timeSurvived = $match['stats']['timeSurvived']; $winPlace = $match['stats']['winPlace']; - echo "
"; + echo " + + + + + + + + + "; + } echo "
matchTypedurationgameModemapNamecreatedAtid
" . htmlspecialchars($matchinfo['matchType']) . "
$formattedDate$gameMode$matchType$mapName$kills$damage$timeSurvived$winPlace
" . $formattedDate . "" . $gameMode . "" . $matchType . "" . $mapName . "" . $kills . "" . $damage . "" . $timeSurvived . "" . $winPlace . "

"; } } - ?> -
- + ?> +
+ - + - + + \ No newline at end of file diff --git a/matchinfo.php b/matchinfo.php index bff0724..4748e22 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -59,7 +59,7 @@ $lastMatches = array_slice($allMatches, 0, 8); echo "" . htmlspecialchars($matchinfo['gameMode']) . ""; echo "" . htmlspecialchars($matchinfo['mapName']) . ""; echo "" . htmlspecialchars($matchinfo['createdAt']) . ""; - echo "" . htmlspecialchars($$matchdata['id']) . ""; + echo "" . htmlspecialchars($matchdata['id']) . ""; echo ""; echo ""; From b6c42485899222a43c16c5b39c4be3650f26f9de Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 22:28:59 +0100 Subject: [PATCH 19/22] color --- includes/styles.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/styles.css b/includes/styles.css index a4b3ca0..dfeee63 100644 --- a/includes/styles.css +++ b/includes/styles.css @@ -204,8 +204,8 @@ nav { /* Ensure links stand out */ a { - color: #6699ff; /* Blue color for links */ - text-decoration: underline; /* Underline links for better visibility */ + color: #e69109; /* Blue color for links */ + text-decoration: none; /* Underline links for better visibility */ } /* Specific button styles for .btn class to match the hacker theme */ From 68c5ce0dcc0c7d974e18bed3694c286bd9eecd1b Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 22:33:34 +0100 Subject: [PATCH 20/22] more --- matchinfo.php | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/matchinfo.php b/matchinfo.php index 4748e22..6c634b8 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -65,7 +65,20 @@ $lastMatches = array_slice($allMatches, 0, 8); echo ""; - echo ""; + echo "
Player NameKillsDamage DealtTime SurvivedRank
"; + echo " + + + + + + + + + + + + "; foreach ($jsonData['included'] as $includedItem) { if ($includedItem['type'] == "participant") { @@ -76,11 +89,17 @@ $lastMatches = array_slice($allMatches, 0, 8); echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; } } - echo "
Player NameKillsDamage DealtTime SurvivedRankRevivesWalk DistanceLongest KillDBNOsHeadshot KillsAssists
" . htmlspecialchars($playerStats['damageDealt']) . "" . htmlspecialchars($playerStats['timeSurvived']) . "" . htmlspecialchars($playerStats['winPlace']) . "" . htmlspecialchars($playerStats['revives']) . "" . htmlspecialchars($playerStats['walkDistance']) . "" . htmlspecialchars($playerStats['longestKill']) . "" . htmlspecialchars($playerStats['dBNOs']) . "" . htmlspecialchars($playerStats['headshotKills']) . "" . htmlspecialchars($playerStats['assists']) . "
"; + } else { echo "JSON file not found for the given match ID."; } From 8b51da3b6d7db9196ec561ba31b5c5cd5b0bdbb9 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 22:34:52 +0100 Subject: [PATCH 21/22] les is more --- matchinfo.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/matchinfo.php b/matchinfo.php index 6c634b8..065a7fb 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -73,7 +73,6 @@ $lastMatches = array_slice($allMatches, 0, 8); Time Survived Rank Revives - Walk Distance Longest Kill DBNOs Headshot Kills @@ -90,9 +89,8 @@ $lastMatches = array_slice($allMatches, 0, 8); echo "" . htmlspecialchars($playerStats['timeSurvived']) . ""; echo "" . htmlspecialchars($playerStats['winPlace']) . ""; echo "" . htmlspecialchars($playerStats['revives']) . ""; - echo "" . htmlspecialchars($playerStats['walkDistance']) . ""; echo "" . htmlspecialchars($playerStats['longestKill']) . ""; - echo "" . htmlspecialchars($playerStats['dBNOs']) . ""; + echo "" . htmlspecialchars($playerStats['DBNOs']) . ""; echo "" . htmlspecialchars($playerStats['headshotKills']) . ""; echo "" . htmlspecialchars($playerStats['assists']) . ""; echo ""; From 6ba3cc5906c7c6b7f5d050f9449e72dad1413d40 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 14 Nov 2023 22:37:11 +0100 Subject: [PATCH 22/22] clickable --- last_stats.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/last_stats.php b/last_stats.php index cf95fba..e632cc9 100644 --- a/last_stats.php +++ b/last_stats.php @@ -100,14 +100,14 @@ error_reporting(E_ALL); echo " $player_name - $winratio - $KD_H - $KD_ALL - $kills - $humankills - $matches - $wins - $deaths + $winratio + $KD_H + $KD_ALL + $kills + $humankills + $matches + $wins + $deaths Change Indicator $change