buli-punkte und hatgetippt hinzugefügt

This commit is contained in:
R40fendt
2025-05-15 13:50:15 +02:00
parent f2a6179244
commit b0c810ac94
3 changed files with 383 additions and 0 deletions

16
bulitipp/buli-punkte.php Executable file
View File

@@ -0,0 +1,16 @@
<?php
$result=[];
foreach (srowforeach("SELECT paarung, score1, score2 from `buli-results` where spieltag=?;", [$spieltag]) as $key => $value) {
$id = $value[0];
$score1 = $value[1];
$score2 = $value[2];
$tipp = getTipp($name, $spieltag, $id);
$paarungQuery = srowforeach("SELECT heim, gast from `buli-paarungen` where id=?;", [$id])[0];
$heim = $paarungQuery[0];
$gast = $paarungQuery[1];
$punkte = ps($name, $spieltag, $id);
$result[]=["id"=>$id,"result"=>[$score1,$score2],"tipp"=>$tipp,"heim"=>$heim,"gast"=>$gast,"punkte"=>$punkte];
}
echo json_encode($result, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);