18 lines
535 B
PHP
Executable File
18 lines
535 B
PHP
Executable File
<?php
|
|
header("Access-Control-Allow-Origin: *");
|
|
include("./check.php");
|
|
|
|
$users=srowforeach("SELECT `username`, `id` FROM `buli-user`;",[]);
|
|
|
|
$data=[];
|
|
for($i=0;$i<getmaxspieltag();$i++){
|
|
$spieltag=$i+1;
|
|
$data[$i]=[];
|
|
foreach ($users as $key => $value) {
|
|
$user=$value[0];
|
|
$userid=$value[1];
|
|
$data[$i][]=["points"=>ts($user,$spieltag),"user"=>["id"=>$userid,"name"=>$user]];
|
|
}
|
|
}
|
|
$result=["reload"=>$reload, "data"=>$data];
|
|
echo json_encode($result, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE); |