From b88c57c397e617d9abb832dd0e2ed2e8fc863398 Mon Sep 17 00:00:00 2001 From: Thijs Stobbelaar Date: Wed, 15 Nov 2023 16:15:43 +0100 Subject: [PATCH 1/2] thing --- matchinfo.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/matchinfo.php b/matchinfo.php index 2cb2182..decf6ef 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -85,7 +85,23 @@ $lastMatches = array_slice($allMatches, 0, 8); $files = glob($directory . $prefix . '*'); if (count($files) == 0) { - echo "No individual player data available (yet) check back in half hour."; + // Get current time + $currentTime = new DateTime(); + $minutes = intval($currentTime->format('i')); + + // Calculate minutes to next update + $minutesToNextUpdate = 30 - ($minutes % 30); + if ($minutesToNextUpdate === 30) { + // If it's exactly on the hour or half-hour, set the next update to 30 minutes + $minutesToNextUpdate = 0; + } + + // Display the message + if ($minutesToNextUpdate > 0) { + echo "Check back in $minutesToNextUpdate minutes. Data is updated every half hour."; + } else { + echo "Data is updating, please check back shortly."; + } } else { -- 2.49.1 From da78c8264329abb94471d53871b34f601a3f3107 Mon Sep 17 00:00:00 2001 From: Thijs Stobbelaar Date: Wed, 15 Nov 2023 16:16:23 +0100 Subject: [PATCH 2/2] 30 matchinfo --- matchinfo.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/matchinfo.php b/matchinfo.php index decf6ef..a8c5a2b 100644 --- a/matchinfo.php +++ b/matchinfo.php @@ -104,9 +104,6 @@ $lastMatches = array_slice($allMatches, 0, 8); } } else { - - - echo ""; echo " -- 2.49.1
Player Name