18 lines
501 B
PHP
Executable File
18 lines
501 B
PHP
Executable File
<?php
|
|
header("Access-Control-Allow-Origin: *");
|
|
header("Content-Type: application/json");
|
|
|
|
include("./check.php");
|
|
|
|
if(!isset($_GET["userid"])) die("GET userid fehlt");
|
|
$userid = $_GET["userid"];
|
|
|
|
$userquery=srowforeach("SELECT id FROM `buli-user` WHERE id = ?",[$userid]);
|
|
if(count($userquery) == 0) die("User nicht gefunden");
|
|
|
|
$userid = $userquery[0][0];
|
|
|
|
if(count(srowforeach("SELECT id FROM `buli-tipps` WHERE user = ? AND spieltag=?",[$userid,$spieltag])) == 0) echo "false";
|
|
else echo "true";
|
|
|