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.
124 lines
3.6 KiB
PHP
124 lines
3.6 KiB
PHP
<?php
|
|
|
|
define('MS1_INSCR_GESTION_ENTRY', true);
|
|
|
|
require_once('php/inc_start_time.php');
|
|
require_once('php/inc_fonctions.php');
|
|
require_once('php/inc_fx_messages.php');
|
|
require_once('php/inc_fx_compte.php');
|
|
require_once('php/inc_fx_promoteur.php');
|
|
require_once('php/inc_fx_inscriptions_gestion.php');
|
|
|
|
global $objDatabase, $vDomaine, $vPage, $vtexte_page;
|
|
|
|
if (!empty($_GET['lang'])) {
|
|
$strLangue = $_GET['lang'];
|
|
} else {
|
|
$strLangue = 'fr';
|
|
}
|
|
|
|
fxInscrGestionInitTextes($strLangue);
|
|
|
|
$vPage = 'mobile.php';
|
|
$strCode = 'mobile';
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['form_action']) && !isset($_SESSION['com_id'])) {
|
|
$strFormAction = base64_decode(urldecode($_POST['form_action']), true);
|
|
if ($strFormAction === 'login') {
|
|
fxLoginCompte($_POST, $strLangue);
|
|
exit;
|
|
}
|
|
}
|
|
|
|
if (!isset($_SESSION['com_id'])) {
|
|
$_SESSION['redirect_after_login'] = $_SERVER['REQUEST_URI'];
|
|
$_SESSION['affiche_pas_connexion'] = 'true';
|
|
|
|
$strMetaTitle = ($strLangue === 'fr') ? 'Inscriptions mobile' : 'Mobile registrations';
|
|
$strMetaDescription = '';
|
|
$strMetaKeywords = '';
|
|
$blnBoutonRetour = false;
|
|
$footer_script = true;
|
|
|
|
require_once('inc_header.php');
|
|
?>
|
|
<div id="page">
|
|
<div id="main">
|
|
<div class="container bg-white p-3 p-xl-4">
|
|
<?php
|
|
if (isset($_SESSION['msg'])) {
|
|
echo fxMessage($_SESSION['msg'], '', $strLangue);
|
|
}
|
|
fxInscrGestionRenderLoginPage($strLangue);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
require_once('inc_footer.php');
|
|
exit;
|
|
}
|
|
|
|
unset($_SESSION['affiche_pas_connexion']);
|
|
|
|
$intEveId = 0;
|
|
|
|
if (!empty($_GET['promoteur_eve_id'])) {
|
|
$intEveId = fxInscrGestionParseEveId($_GET['promoteur_eve_id']);
|
|
}
|
|
|
|
$tabEveIds = fxInscrGestionGetPromoteurEveIds($_SESSION['com_id']);
|
|
|
|
if ($intEveId > 0 && !fxInscrGestionCanAccess($_SESSION['com_id'], $intEveId)) {
|
|
header('Location: ' . $vDomaine . '/mobile');
|
|
exit;
|
|
}
|
|
|
|
if ($intEveId === 0 && count($tabEveIds) === 1) {
|
|
header('Location: ' . $vDomaine . '/mobile?promoteur_eve_id=' . urlencode(base64_encode($tabEveIds[0])));
|
|
exit;
|
|
}
|
|
|
|
$strMetaTitle = ($strLangue === 'fr') ? 'Inscriptions mobile' : 'Mobile registrations';
|
|
$strMetaDescription = '';
|
|
$strMetaKeywords = '';
|
|
$blnBoutonRetour = false;
|
|
$footer_script = ($intEveId > 0);
|
|
$strSousTitre = '';
|
|
|
|
if ($intEveId > 0) {
|
|
$arrEvenement = fxGetEvenementsId($intEveId);
|
|
$strSousTitre = '<br><small class="text-muted">' . fxUnescape($arrEvenement['eve_nom_' . $strLangue]) . '</small>';
|
|
}
|
|
|
|
require_once('inc_header.php');
|
|
|
|
?>
|
|
<div id="page">
|
|
<div id="main">
|
|
<div class="container bg-white p-3 p-xl-4">
|
|
<?php
|
|
if (isset($_SESSION['msg'])) {
|
|
echo fxMessage($_SESSION['msg'], '', $strLangue);
|
|
}
|
|
|
|
if ($intEveId === 0) {
|
|
if (count($tabEveIds) === 0) {
|
|
echo '<div class="alert alert-warning" role="alert">';
|
|
echo ($strLangue === 'fr')
|
|
? 'Aucun acces inscriptions mobile (v2) n\'est actif pour ce compte.'
|
|
: 'No active mobile registration access (v2) for this account.';
|
|
echo '</div>';
|
|
} else {
|
|
fxInscrGestionRenderEventPicker($tabEveIds, $strLangue, fxInscrGestionBaseUrl($strLangue, true));
|
|
}
|
|
} else {
|
|
include('inc_tableau_inscriptions_gestion.php');
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
require_once('inc_footer.php');
|