BuLi-Tipp Login hinzugefügt und Rangliste angefangen

This commit is contained in:
R40fendt
2025-07-03 21:43:39 +02:00
parent db064b36c0
commit a546ede562
30 changed files with 3483 additions and 0 deletions

34
bulitipp/tipps.php Executable file
View File

@@ -0,0 +1,34 @@
<?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json");
include("./check.php");
if(!isset($_GET["spieltag"])) die("GET spieltag fehlt");
$spieltag = $_GET["spieltag"];
$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]);
array_push($data, [
"user" => $userid,
"tipp" => [
"paarungsid" => $tipp[0][0],
"heim" => $tipp[0][1],
"gast" => $tipp[0][2]
]
]);
}
}
$result=["reload"=>$reload, "data"=>$data];
echo json_encode($result, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);