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

View File

@@ -6,26 +6,28 @@ include("./check.php");
if(!isset($_GET["spieltag"])) die("GET spieltag fehlt");
$spieltag = $_GET["spieltag"];
if($spieltag==""||$spieltag=="null") die('{"error":"GET spieltag leer"}');
$data=[];
foreach(srowforeach("SELECT `user`, `tipp1`, `tipp2`, `tipp3`, `tipp4`, `tipp5`, `tipp6`, `tipp7`, `tipp8`, `tipp9` from `buli-tipps` where `spieltag`=?;",[$spieltag]) as $key=>$tippquery){
$userid=$tippquery[0];
$tippids=[$tippquery[1],$tippquery[2],$tippquery[3],$tippquery[4],$tippquery[5],$tippquery[6],$tippquery[7],$tippquery[8],$tippquery[9]];
foreach($tippids as $tippid){
$tipp=srowforeach("SELECT `paarung`, `score1`, `score2` FROM `buli-tipp` WHERE `id` = ?",[$tippid]);
if(deadline($spieltag))
foreach(srowforeach("SELECT `user`, `tipp1`, `tipp2`, `tipp3`, `tipp4`, `tipp5`, `tipp6`, `tipp7`, `tipp8`, `tipp9` from `buli-tipps` where `spieltag`=?;",[$spieltag]) as $key=>$tippquery){
$userid=$tippquery[0];
$tippids=[$tippquery[1],$tippquery[2],$tippquery[3],$tippquery[4],$tippquery[5],$tippquery[6],$tippquery[7],$tippquery[8],$tippquery[9]];
foreach($tippids as $tippid){
$tipp=srowforeach("SELECT `paarung`, `score1`, `score2` FROM `buli-tipp` WHERE `id` = ?",[$tippid]);
array_push($data, [
"user" => $userid,
"tipp" => [
"paarungsid" => $tipp[0][0],
"heim" => $tipp[0][1],
"gast" => $tipp[0][2]
]
]);
array_push($data, [
"user" => $userid,
"tipp" => [
"paarungsid" => $tipp[0][0],
"heim" => $tipp[0][1],
"gast" => $tipp[0][2]
]
]);
}
}
}