check.php auf 30 Spieltage begrenzt zum Debuggen, Tippen optimiert mit ein paar QoL Features, updaten von Tipps hinzugefügt

This commit is contained in:
R40fendt
2025-08-22 19:00:11 +02:00
parent 72ec423120
commit 27862a9f3d
5 changed files with 103 additions and 18 deletions

24
bulitipp/zeitzutippen.php Executable file
View File

@@ -0,0 +1,24 @@
<?php
header("Access-Control-Allow-Origin: *");
include("../../mysqlverbinden.php");
include("../rowforeach.php");
include("inc.php");
$query=srowforeach("SELECT deadline from `buli-paarungen` where spieltag=? ORDER BY `deadline` ASC;", [getmaxspieltag()+1]);
if(count($query)>0){
$unixtime = date_create_from_format('Y-m-d H:i:s', $query[0][0])->getTimestamp()-time();
$hours=(int) date("H", $unixtime);
$days=date("d", $unixtime)-1;
}
$days=0;
$data=[
"spieltag" => getmaxspieltag()+1,
"deadline" => $query[0][0],
"unixtime" => $unixtime,
"hours" => $hours,
"days" => $days
];
echo json_encode($data,JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);