From 32e1002a6bc9a8f86a82e8a3cf49f328c42465d9 Mon Sep 17 00:00:00 2001 From: GZod01 Date: Sun, 9 Mar 2025 19:25:30 +0100 Subject: [PATCH] fg --- index.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.php b/index.php index 914aa1b..466a1ec 100644 --- a/index.php +++ b/index.php @@ -168,6 +168,9 @@ if (isset($_GET["admin"])) { } $player_id = $_POST["player_id"]; $score_time = strtotime($_POST["score_time"]); + if($score_time<$sub_event_datas["start_time"]){ + die("WARNING ! score time is before start time refresh"); + } $score = 0; if($is_speedrun){ //TODO: check this if code block when implementing "http request speedrun" (for dev speedrun or other things that can be complete with a special http request) @@ -181,6 +184,7 @@ if (isset($_GET["admin"])) { $bestscore = $get_position_in_classment->fetch_all()[0][0]; } $score = (20000*$bestscore)/($timelength*$position_in_classment); + $score = intval($score); }else{ $score = intval($_POST["score"]); }