deadline feature

This commit is contained in:
2026-04-10 15:51:30 +03:00
parent 174fa73c2c
commit d7b6a58407
22 changed files with 2839 additions and 2 deletions
@@ -0,0 +1,18 @@
<?php
/**
* Auth check for AJAX endpoints.
* Include this at the top of every ajax handler.
* Sets $currentUserId from session or returns 401 JSON.
*/
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
if (empty($_SESSION['iduserlogin'])) {
header('Content-Type: application/json');
http_response_code(401);
echo json_encode(['success' => false, 'message' => 'Non autorizzato. Effettua il login.']);
exit;
}
$currentUserId = (int)$_SESSION['iduserlogin'];