Fix activation checks across start-date boundaries (#395)

This commit is contained in:
Fabian
2026-10-18 07:20:26 +03:00
committed by GitHub
parent 7f24c4ffdf
commit 17acbd3bc0
5 changed files with 276 additions and 12 deletions
+5 -2
View File
@@ -25,6 +25,9 @@ use App\Utils\AccessLogger;
include('GameEngine/Account.php');
AccessLogger::logRequest();
$serverStartTimestamp = \App\Utils\DateTime::getServerStartTimestamp(START_DATE, START_TIME);
$serverHasStarted = $serverStartTimestamp !== null && time() >= $serverStartTimestamp;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
@@ -56,7 +59,7 @@ AccessLogger::logRequest();
<div id="content" class="activate">
<?php
if(isset($_GET['e']) && (START_DATE < date('d.m.y') || START_DATE == date('d.m.y') && START_TIME <= date('H:i')))
if(isset($_GET['e']) && $serverHasStarted)
{
switch($_GET['e'])
{
@@ -93,4 +96,4 @@ AccessLogger::logRequest();
<?php include("Templates/footer.tpl"); ?>
<div id="ce"></div>
</body>
</html>
</html>