First version, for githup; UNSTABLE, DO NOT USE!

This commit is contained in:
Fabio Herzig
2026-04-12 21:25:44 +02:00
commit a51fd9dbeb
423 changed files with 58560 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
if (session_status() !== PHP_SESSION_ACTIVE) session_start();
if (
!((isset($_SESSION['access_granted_wk_leitung']) && $_SESSION['access_granted_wk_leitung'] === true) ||
(isset($_SESSION['access_granted_kampfrichter']) && $_SESSION['access_granted_kampfrichter'] === true))
) {
http_response_code(403);
exit;
}
if (!isset($_POST['access'])) {
http_response_code(400);
exit;
}
$access = preg_replace("/[\W]/", "", trim($_POST['access']));
$baseDir = $_SERVER['DOCUMENT_ROOT'];
require $baseDir . "/../scripts/websocket/ws-create-token.php";
$token = generateWSToken($access);
$responseBool = $token != null;
echo json_encode(['success' => $responseBool, 'token' => $token]);