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

17
bulitipp/hatgetippt.php Executable file
View File

@@ -0,0 +1,17 @@
<?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,5])) == 0) echo "false";
else echo "true";