Paarungsergebnisse vorbereitet
This commit is contained in:
15
bulitipp/ergebnisse.php
Executable file
15
bulitipp/ergebnisse.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
header("Content-Type: application/json");
|
||||
include("./check.php");
|
||||
|
||||
$data=[];
|
||||
|
||||
$paarungsids=srowforeach("SELECT id from `buli-paarungen` where `spieltag`=?;",[getmaxspieltag()]);
|
||||
foreach ($paarungsids as $key => $value) {
|
||||
$paarungsid=$value[0];
|
||||
array_push($data,getResult($paarungsid, getmaxspieltag()));
|
||||
}
|
||||
|
||||
$result=["reload"=>$reload,"data"=>$data];
|
||||
echo json_encode($result, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);
|
||||
6
bulitipp/maxspieltag.php
Executable file
6
bulitipp/maxspieltag.php
Executable file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
header("Content-Type: application/json");
|
||||
include("./check.php");
|
||||
|
||||
echo getmaxspieltag();
|
||||
16
bulitipp/paarungen.php
Executable file
16
bulitipp/paarungen.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include("./check.php");
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
header("Content-Type: application/json");
|
||||
|
||||
if(!isset($_GET["spieltag"])) die("GET spieltag fehlt");
|
||||
$spieltag=$_GET["spieltag"];
|
||||
|
||||
$data=[];
|
||||
foreach (srowforeach("SELECT `heim`,`gast` from `buli-paarungen` where `spieltag`=?;",[$spieltag]) as $key => $value) {
|
||||
array_push($data,[$value[0],$value[1]]);
|
||||
}
|
||||
|
||||
$result=["reload"=>$reload,"data"=>$data];
|
||||
echo json_encode($result, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);
|
||||
|
||||
Reference in New Issue
Block a user