Files
ms1inscription-v5/ajax_inscr_gestion_qr.php
stephan 8f428a5c18 Refactor event management system to transition from mobile to gestion
This commit updates the event management system by replacing references to mobile inscriptions with gestion inscriptions. It includes changes to AJAX endpoints, helper functions, and UI elements to reflect this transition. The updates enhance the overall structure and maintainability of the codebase while ensuring that user access and permissions are properly managed for the new gestion interface.
2026-06-27 12:10:19 -04:00

43 lines
1.1 KiB
PHP

<?php
session_start();
require_once 'php/inc_fonctions.php';
require_once 'php/inc_fx_inscriptions_gestion.php';
global $vDomaine;
$strLangue = 'fr';
if (!empty($_REQUEST['lang'])) {
$strLangue = $_REQUEST['lang'];
}
$vPage = 'compte.php';
$vtexte_page = obtenirTextepage($vPage, $strLangue, 2);
header('Content-Type: application/json; charset=utf-8');
if (!isset($_SESSION['com_id'])) {
echo json_encode(array('state' => 'error', 'message' => fxInscrGestionT('inscr_gestion_qr_invalid')));
exit;
}
$intEveId = 0;
if (!empty($_REQUEST['promoteur_eve_id'])) {
$intEveId = fxInscrGestionParseEveId($_REQUEST['promoteur_eve_id']);
}
if ($intEveId <= 0 || !fxInscrGestionCanScan($_SESSION['com_id'], $intEveId)) {
echo json_encode(array('state' => 'error', 'message' => fxInscrGestionT('inscr_gestion_qr_invalid')));
exit;
}
$strRaw = '';
if (!empty($_REQUEST['qr'])) {
$strRaw = $_REQUEST['qr'];
} elseif (!empty($_REQUEST['t'])) {
$strRaw = $_REQUEST['t'];
}
echo json_encode(fxInscrGestionResolveQrScan($strRaw, $intEveId, $strLangue));