Implement mobile registration functionality and update version code
This commit introduces new routing rules in .htaccess for mobile access, adds mobile-specific PHP includes and logic in compte.php, and enhances the footer scripts for mobile page handling. Additionally, new CSS styles are added to support the mobile registration interface. The version code is incremented to 4.72.670 to reflect these changes, improving the overall user experience for mobile users.
This commit is contained in:
88
mobile.php
Normal file
88
mobile.php
Normal file
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
define('MS1_INSCR_MOBILE_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_mobile.php');
|
||||
|
||||
global $objDatabase, $vDomaine, $vPage;
|
||||
|
||||
$vPage = 'mobile.php';
|
||||
$strCode = 'mobile';
|
||||
|
||||
if (!empty($_GET['lang'])) {
|
||||
$strLangue = $_GET['lang'];
|
||||
} else {
|
||||
$strLangue = 'fr';
|
||||
}
|
||||
|
||||
if (!isset($_SESSION['com_id'])) {
|
||||
$_SESSION['redirect_after_login'] = $_SERVER['REQUEST_URI'];
|
||||
header('Location: ' . $vDomaine . ($strLangue === 'fr' ? '/compte' : '/account'));
|
||||
exit;
|
||||
}
|
||||
|
||||
$intEveId = 0;
|
||||
|
||||
if (!empty($_GET['promoteur_eve_id'])) {
|
||||
$intEveId = (int)base64_decode(urldecode($_GET['promoteur_eve_id']));
|
||||
}
|
||||
|
||||
$tabEveIds = fxInscrMobileGetPromoteurEveIds($_SESSION['com_id']);
|
||||
|
||||
if ($intEveId > 0 && !fxIsPromoteur($_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 événement promoteur n\'est associé à ce compte.'
|
||||
: 'No promoter event is linked to this account.';
|
||||
echo '</div>';
|
||||
} else {
|
||||
fxInscrMobileRenderEventPicker($tabEveIds, $strLangue, fxInscrMobileBaseUrl($strLangue, true));
|
||||
}
|
||||
} else {
|
||||
include('inc_tableau_inscriptions_mobile.php');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
require_once('inc_footer.php');
|
||||
Reference in New Issue
Block a user