|
|
|
|
@ -1,8 +1,7 @@
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Liste inscriptions mobile — recherche, filtres, cartes, fiche (MSIN mobile v1).
|
|
|
|
|
* Logique SQL alignée sur fxShowRechercheinscription ; UI codée en dur (pas config_query).
|
|
|
|
|
* Liste inscriptions mobile — recherche, filtres, cartes, fiche.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
function fxInscrMobileIsEntry() {
|
|
|
|
|
@ -40,6 +39,23 @@ function fxInscrMobileEsc($str) {
|
|
|
|
|
return htmlspecialchars((string)$str, ENT_QUOTES, 'UTF-8');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Libellé i18n sans echo parasite. */
|
|
|
|
|
function fxInscrMobileT($clef) {
|
|
|
|
|
return afficheTexte($clef, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fxInscrMobileParseEveId($strRaw) {
|
|
|
|
|
if ($strRaw === null || $strRaw === '') {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
$strDecoded = base64_decode(urldecode($strRaw), true);
|
|
|
|
|
if ($strDecoded === false || $strDecoded === '') {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (int)$strDecoded;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fxInscrMobileParseRequest() {
|
|
|
|
|
$arr = array(
|
|
|
|
|
'rech_prenom' => isset($_GET['rech_prenom']) ? trim($_GET['rech_prenom']) : '',
|
|
|
|
|
@ -54,7 +70,12 @@ function fxInscrMobileParseRequest() {
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (!empty($_GET['sel_rech_epreuve'])) {
|
|
|
|
|
$arr['sel_rech_epreuve'] = intval(base64_decode(urldecode($_GET['sel_rech_epreuve'])));
|
|
|
|
|
$decoded = base64_decode(urldecode($_GET['sel_rech_epreuve']), true);
|
|
|
|
|
if ($decoded !== false && $decoded !== '') {
|
|
|
|
|
$arr['sel_rech_epreuve'] = intval($decoded);
|
|
|
|
|
} else {
|
|
|
|
|
$arr['sel_rech_epreuve'] = intval($_GET['sel_rech_epreuve']);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $arr;
|
|
|
|
|
@ -74,17 +95,6 @@ function fxInscrMobileFilterActiveCount($arrReq) {
|
|
|
|
|
return $int;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fxInscrMobileShouldShowResults($arrReq) {
|
|
|
|
|
return isset($_GET['btn_recherche'])
|
|
|
|
|
|| isset($_GET['pg'])
|
|
|
|
|
|| isset($_GET['apply_filters'])
|
|
|
|
|
|| $arrReq['rech_prenom'] !== ''
|
|
|
|
|
|| $arrReq['rech_nom'] !== ''
|
|
|
|
|
|| $arrReq['rech_no_commande'] !== ''
|
|
|
|
|
|| $arrReq['rech_nom_equipe'] !== ''
|
|
|
|
|
|| fxInscrMobileFilterActiveCount($arrReq) > 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fxInscrMobileBuildWhere($intEveId, $arrReq) {
|
|
|
|
|
global $objDatabase;
|
|
|
|
|
|
|
|
|
|
@ -172,24 +182,12 @@ function fxInscrMobileBibDisplay($arrRow) {
|
|
|
|
|
return fxShowBibNumber($arrRow['no_bib'], $arrRow['epr_id'], 'participant');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fxInscrMobileCollapseToggle($strLangue, $blnCollapsed = true) {
|
|
|
|
|
$strCollapse = ($strLangue === 'fr') ? 'Réduire' : 'Collapse';
|
|
|
|
|
$strExpand = ($strLangue === 'fr') ? 'Développer' : 'Expand';
|
|
|
|
|
$strLabel = $blnCollapsed ? $strExpand : $strCollapse;
|
|
|
|
|
$strIcon = $blnCollapsed ? 'fa-chevron-down' : 'fa-chevron-up';
|
|
|
|
|
|
|
|
|
|
return '<button type="button" class="epr-block-toggle" aria-expanded="' . ($blnCollapsed ? 'false' : 'true') . '"'
|
|
|
|
|
. ' data-label-collapse="' . fxInscrMobileEsc($strCollapse) . '"'
|
|
|
|
|
. ' data-label-expand="' . fxInscrMobileEsc($strExpand) . '"'
|
|
|
|
|
. ' aria-label="' . fxInscrMobileEsc($strLabel) . '"'
|
|
|
|
|
. ' title="' . fxInscrMobileEsc($strLabel) . '">'
|
|
|
|
|
. '<i class="fa ' . $strIcon . '" aria-hidden="true"></i></button>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fxInscrMobileQueryString($arrReq, $intEveId, $arrExtra = array()) {
|
|
|
|
|
/** Paramètres GET pour liens (sans double-encodage). */
|
|
|
|
|
function fxInscrMobileQueryParams($intEveId, $arrReq, $arrExtra = array()) {
|
|
|
|
|
$tab = array(
|
|
|
|
|
'promoteur_eve_id' => urlencode(base64_encode($intEveId)),
|
|
|
|
|
'promoteur_eve_id' => base64_encode((string)$intEveId),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if ($arrReq['rech_prenom'] !== '') {
|
|
|
|
|
$tab['rech_prenom'] = $arrReq['rech_prenom'];
|
|
|
|
|
}
|
|
|
|
|
@ -209,52 +207,80 @@ function fxInscrMobileQueryString($arrReq, $intEveId, $arrExtra = array()) {
|
|
|
|
|
$tab['chk_cancelled'] = 1;
|
|
|
|
|
}
|
|
|
|
|
if ($arrReq['sel_rech_epreuve'] > 0) {
|
|
|
|
|
$tab['sel_rech_epreuve'] = urlencode(base64_encode($arrReq['sel_rech_epreuve']));
|
|
|
|
|
$tab['sel_rech_epreuve'] = base64_encode((string)$arrReq['sel_rech_epreuve']);
|
|
|
|
|
}
|
|
|
|
|
if (!empty($arrExtra)) {
|
|
|
|
|
$tab = array_merge($tab, $arrExtra);
|
|
|
|
|
if (!empty($_GET['lng'])) {
|
|
|
|
|
$tab['lng'] = $_GET['lng'];
|
|
|
|
|
}
|
|
|
|
|
if (!empty($arrReq['pg']) && (int)$arrReq['pg'] > 1) {
|
|
|
|
|
$tab['pg'] = (int)$arrReq['pg'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return http_build_query($tab, '', '&');
|
|
|
|
|
foreach ($arrExtra as $strKey => $mixVal) {
|
|
|
|
|
if ($mixVal === null || $mixVal === '' || ($strKey === 'pec_id' && (int)$mixVal === 0)) {
|
|
|
|
|
unset($tab[$strKey]);
|
|
|
|
|
} else {
|
|
|
|
|
$tab[$strKey] = $mixVal;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $tab;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fxInscrMobileBuildUrl($strBaseUrl, $intEveId, $arrReq, $arrExtra = array()) {
|
|
|
|
|
$tab = fxInscrMobileQueryParams($intEveId, $arrReq, $arrExtra);
|
|
|
|
|
$strQs = http_build_query($tab, '', '&');
|
|
|
|
|
|
|
|
|
|
return $strBaseUrl . ($strQs !== '' ? '?' . $strQs : '');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fxInscrMobilePaginationUrl($strBaseUrl, $intEveId, $arrReq) {
|
|
|
|
|
$tab = fxInscrMobileQueryParams($intEveId, $arrReq, array('pec_id' => null));
|
|
|
|
|
unset($tab['pg'], $tab['pec_id']);
|
|
|
|
|
$strQs = http_build_query($tab, '', '&');
|
|
|
|
|
|
|
|
|
|
return $strBaseUrl . ($strQs !== '' ? '?' . $strQs : '?promoteur_eve_id=' . rawurlencode(base64_encode((string)$intEveId)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fxInscrMobileRenderPagination($strBaseUrl, $intEveId, $arrReq, $intTotal, $intPerPage, $intPage) {
|
|
|
|
|
if ($intTotal <= $intPerPage) {
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return '<div class="inscr-mobile-pager">'
|
|
|
|
|
. fxGetPagination(
|
|
|
|
|
fxInscrMobilePaginationUrl($strBaseUrl, $intEveId, $arrReq),
|
|
|
|
|
$intTotal,
|
|
|
|
|
$intPerPage,
|
|
|
|
|
$intPage
|
|
|
|
|
)
|
|
|
|
|
. '</div>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fxInscrMobileRenderEventPicker($tabEveIds, $strLangue, $strBaseUrl) {
|
|
|
|
|
global $objDatabase, $vDomaine, $vRepertoireFichiers;
|
|
|
|
|
global $objDatabase;
|
|
|
|
|
|
|
|
|
|
$strTitle = ($strLangue === 'fr') ? 'Choisir un événement' : 'Choose an event';
|
|
|
|
|
$strHint = ($strLangue === 'fr')
|
|
|
|
|
? 'Sélectionnez l\'événement pour gérer les inscriptions.'
|
|
|
|
|
: 'Select the event to manage registrations.';
|
|
|
|
|
|
|
|
|
|
echo '<div class="bib-tool-card-header"><h2 class="bib-tool-card-title">' . fxInscrMobileEsc($strTitle) . '</h2></div>';
|
|
|
|
|
echo '<p class="inscr-mobile-hint">' . fxInscrMobileEsc($strHint) . '</p>';
|
|
|
|
|
echo '<div id="module-inscr-mobile" class="epr-wrapper">';
|
|
|
|
|
echo '<div id="module-inscr-mobile" class="inscr-mobile-shell">';
|
|
|
|
|
echo '<div class="inscr-mobile-topbar"><h1 class="inscr-mobile-topbar__title">' . fxInscrMobileEsc($strTitle) . '</h1></div>';
|
|
|
|
|
echo '<div class="inscr-mobile-event-list">';
|
|
|
|
|
|
|
|
|
|
foreach ($tabEveIds as $intEveId) {
|
|
|
|
|
$qry = 'SELECT e.*, t.te_icone FROM inscriptions_evenements e, inscriptions_types_evenements t'
|
|
|
|
|
. ' WHERE t.te_id = e.te_id AND e.eve_actif = 1 AND e.eve_id = ' . intval($intEveId);
|
|
|
|
|
$qry = 'SELECT e.* FROM inscriptions_evenements e WHERE e.eve_actif = 1 AND e.eve_id = ' . intval($intEveId);
|
|
|
|
|
$tabEv = $objDatabase->fxGetRow($qry);
|
|
|
|
|
if ($tabEv === null) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$strUrl = $strBaseUrl . '?promoteur_eve_id=' . urlencode(base64_encode($intEveId));
|
|
|
|
|
if (!empty($_GET['lng'])) {
|
|
|
|
|
$strUrl .= '&lng=' . fxInscrMobileEsc($_GET['lng']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo '<a class="epr-row inscr-mobile-event-card text-decoration-none" href="' . $strUrl . '">';
|
|
|
|
|
echo '<div class="inscr-mobile-event-card__body">';
|
|
|
|
|
echo '<div class="inscr-mobile-event-card__title">' . fxInscrMobileEsc(fxUnescape($tabEv['eve_nom_' . $strLangue])) . '</div>';
|
|
|
|
|
if (trim($tabEv['eve_date_debut']) !== '' && $tabEv['eve_date_debut'] !== '0000-00-00') {
|
|
|
|
|
echo '<div class="inscr-mobile-event-card__meta">' . fxInscrMobileEsc(fxShowDate($tabEv['eve_date_debut'], $strLangue)) . '</div>';
|
|
|
|
|
}
|
|
|
|
|
echo '</div>';
|
|
|
|
|
echo '<div class="inscr-mobile-event-card__chevron"><i class="fa fa-chevron-right" aria-hidden="true"></i></div>';
|
|
|
|
|
$strUrl = fxInscrMobileBuildUrl($strBaseUrl, $intEveId, fxInscrMobileParseRequest(), array());
|
|
|
|
|
echo '<a class="inscr-mobile-event-item" href="' . fxInscrMobileEsc($strUrl) . '">';
|
|
|
|
|
echo '<span class="inscr-mobile-event-item__name">' . fxInscrMobileEsc(fxUnescape($tabEv['eve_nom_' . $strLangue])) . '</span>';
|
|
|
|
|
echo '<i class="fa fa-chevron-right" aria-hidden="true"></i>';
|
|
|
|
|
echo '</a>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo '</div>';
|
|
|
|
|
echo '</div></div>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fxInscrMobileRenderList($intEveId, $strLangue, $strBaseUrl, $arrReq) {
|
|
|
|
|
@ -263,48 +289,40 @@ function fxInscrMobileRenderList($intEveId, $strLangue, $strBaseUrl, $arrReq) {
|
|
|
|
|
$arrEvenement = fxGetEvenementsId($intEveId);
|
|
|
|
|
$strEveNom = fxUnescape($arrEvenement['eve_nom_' . $strLangue]);
|
|
|
|
|
$intFilterCount = fxInscrMobileFilterActiveCount($arrReq);
|
|
|
|
|
$strQs = fxInscrMobileQueryString($arrReq, $intEveId);
|
|
|
|
|
$strBackUrl = fxInscrMobileIsEntry()
|
|
|
|
|
? $strBaseUrl
|
|
|
|
|
: ($vDomaine . ($strLangue === 'fr' ? '/compte/inc_tableau_promoteur' : '/account/inc_tableau_promoteur')
|
|
|
|
|
. '?promoteur_eve_id=' . urlencode(base64_encode($intEveId)));
|
|
|
|
|
. '?promoteur_eve_id=' . rawurlencode(base64_encode((string)$intEveId)));
|
|
|
|
|
|
|
|
|
|
echo '<a class="btn btn-primary rounded-pill inscr-mobile-back" href="' . fxInscrMobileEsc($strBackUrl) . '">';
|
|
|
|
|
echo '<i class="fa fa-chevron-left mr-2" aria-hidden="true"></i>';
|
|
|
|
|
afficheTexte('promoteur_back');
|
|
|
|
|
echo '</a>';
|
|
|
|
|
echo '<div id="module-inscr-mobile" class="inscr-mobile-shell" data-inscr-mobile="1">';
|
|
|
|
|
|
|
|
|
|
echo '<div class="bib-tool-card-header mt-3">';
|
|
|
|
|
echo '<h2 class="bib-tool-card-title">' . afficheTexte('inscr_mobile_title', 0) . '</h2>';
|
|
|
|
|
echo '</div>';
|
|
|
|
|
echo '<p class="inscr-mobile-event-name">' . fxInscrMobileEsc($strEveNom) . '</p>';
|
|
|
|
|
echo '<div class="inscr-mobile-topbar">';
|
|
|
|
|
echo '<a class="inscr-mobile-topbar__back" href="' . fxInscrMobileEsc($strBackUrl) . '"><i class="fa fa-chevron-left"></i></a>';
|
|
|
|
|
echo '<div class="inscr-mobile-topbar__text">';
|
|
|
|
|
echo '<h1 class="inscr-mobile-topbar__title">' . fxInscrMobileEsc(fxInscrMobileT('inscr_mobile_title')) . '</h1>';
|
|
|
|
|
echo '<div class="inscr-mobile-topbar__sub">' . fxInscrMobileEsc($strEveNom) . '</div>';
|
|
|
|
|
echo '</div></div>';
|
|
|
|
|
|
|
|
|
|
echo '<div id="module-inscr-mobile" class="epr-wrapper" data-inscr-mobile="1">';
|
|
|
|
|
// Recherche (repliable — fermée par défaut pour montrer la liste d'abord)
|
|
|
|
|
echo '<details class="inscr-mobile-panel">';
|
|
|
|
|
echo '<summary class="inscr-mobile-panel__head">' . fxInscrMobileEsc(fxInscrMobileT('txt_recherche')) . '</summary>';
|
|
|
|
|
echo '<div class="inscr-mobile-panel__body">';
|
|
|
|
|
echo '<form action="' . fxInscrMobileEsc($strBaseUrl) . '" method="get" class="inscr-mobile-form">';
|
|
|
|
|
echo '<input type="hidden" name="promoteur_eve_id" value="' . fxInscrMobileEsc(base64_encode((string)$intEveId)) . '">';
|
|
|
|
|
|
|
|
|
|
// —— Recherche ——
|
|
|
|
|
echo '<div class="epr-row inscr-mobile-panel">';
|
|
|
|
|
echo '<div class="epr-block inscr-mobile-block-full">';
|
|
|
|
|
echo '<div class="epr-header epr-header--collapsible">';
|
|
|
|
|
echo '<div class="epr-header-start"><span class="epr-header-label">' . afficheTexte('txt_recherche', 0) . '</span></div>';
|
|
|
|
|
echo '</div>';
|
|
|
|
|
echo '<div class="epr-content">';
|
|
|
|
|
echo '<form action="' . fxInscrMobileEsc($strBaseUrl) . '" method="get" id="frm_inscr_mobile_search" class="inscr-mobile-form">';
|
|
|
|
|
echo '<input type="hidden" name="promoteur_eve_id" value="' . urlencode(base64_encode($intEveId)) . '">';
|
|
|
|
|
|
|
|
|
|
echo '<div class="form-group"><label for="rech_prenom">' . afficheTexte('rech_prenom', 0) . '</label>';
|
|
|
|
|
echo '<input class="form-control rounded-0" type="text" id="rech_prenom" name="rech_prenom" value="' . fxInscrMobileEsc($arrReq['rech_prenom']) . '"></div>';
|
|
|
|
|
|
|
|
|
|
echo '<div class="form-group"><label for="rech_nom">' . afficheTexte('rech_nom', 0) . '</label>';
|
|
|
|
|
echo '<input class="form-control rounded-0" type="text" id="rech_nom" name="rech_nom" value="' . fxInscrMobileEsc($arrReq['rech_nom']) . '"></div>';
|
|
|
|
|
|
|
|
|
|
echo '<div class="form-group"><label for="rech_no_commande">' . afficheTexte('rech_no_commande', 0) . '</label>';
|
|
|
|
|
echo '<input class="form-control rounded-0" type="text" id="rech_no_commande" name="rech_no_commande" value="' . fxInscrMobileEsc($arrReq['rech_no_commande']) . '"></div>';
|
|
|
|
|
|
|
|
|
|
echo '<div class="form-group"><label for="rech_nom_equipe">' . afficheTexte('rech_equipe', 0) . '</label>';
|
|
|
|
|
echo '<input class="form-control rounded-0" type="text" id="rech_nom_equipe" name="rech_nom_equipe" value="' . fxInscrMobileEsc($arrReq['rech_nom_equipe']) . '"></div>';
|
|
|
|
|
$arrFields = array(
|
|
|
|
|
'rech_prenom' => 'rech_prenom',
|
|
|
|
|
'rech_nom' => 'rech_nom',
|
|
|
|
|
'rech_no_commande' => 'rech_no_commande',
|
|
|
|
|
'rech_nom_equipe' => 'rech_equipe',
|
|
|
|
|
);
|
|
|
|
|
foreach ($arrFields as $strKey => $strLbl) {
|
|
|
|
|
echo '<label class="inscr-mobile-label" for="' . $strKey . '">' . fxInscrMobileEsc(fxInscrMobileT($strLbl)) . '</label>';
|
|
|
|
|
echo '<input class="form-control form-control-sm rounded-0" type="text" id="' . $strKey . '" name="' . $strKey . '" value="' . fxInscrMobileEsc($arrReq[$strKey]) . '">';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($arrReq['sel_rech_epreuve'] > 0) {
|
|
|
|
|
echo '<input type="hidden" name="sel_rech_epreuve" value="' . urlencode(base64_encode($arrReq['sel_rech_epreuve'])) . '">';
|
|
|
|
|
echo '<input type="hidden" name="sel_rech_epreuve" value="' . fxInscrMobileEsc(base64_encode((string)$arrReq['sel_rech_epreuve'])) . '">';
|
|
|
|
|
}
|
|
|
|
|
if ($arrReq['chk_bib']) {
|
|
|
|
|
echo '<input type="hidden" name="chk_bib" value="1">';
|
|
|
|
|
@ -313,132 +331,124 @@ function fxInscrMobileRenderList($intEveId, $strLangue, $strBaseUrl, $arrReq) {
|
|
|
|
|
echo '<input type="hidden" name="chk_cancelled" value="1">';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo '<button class="btn btn-primary rounded-0 btn-block" type="submit" name="btn_recherche" value="1">' . afficheTexte('txt_recherche', 0) . '</button>';
|
|
|
|
|
echo '</form>';
|
|
|
|
|
echo '</div></div></div>';
|
|
|
|
|
echo '<button class="btn btn-primary btn-sm rounded-0 btn-block mt-2" type="submit" name="btn_recherche" value="1">' . fxInscrMobileEsc(fxInscrMobileT('txt_recherche')) . '</button>';
|
|
|
|
|
echo '</form></div></details>';
|
|
|
|
|
|
|
|
|
|
// —— Filtres ——
|
|
|
|
|
$sqlEpreuves = 'SELECT * FROM inscriptions_epreuves e WHERE e.eve_id = ' . intval($intEveId) . ' AND epr_actif = 1 ORDER BY epr_id';
|
|
|
|
|
// Filtres
|
|
|
|
|
global $objDatabase;
|
|
|
|
|
$tabEpreuves = $objDatabase->fxGetResults($sqlEpreuves);
|
|
|
|
|
$tabEpreuves = $objDatabase->fxGetResults(
|
|
|
|
|
'SELECT * FROM inscriptions_epreuves e WHERE e.eve_id = ' . intval($intEveId) . ' AND epr_actif = 1 ORDER BY epr_id'
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$strFilterBadge = '';
|
|
|
|
|
$strFilterLabel = fxInscrMobileT('inscr_mobile_filters');
|
|
|
|
|
if ($intFilterCount > 0) {
|
|
|
|
|
$strFilterBadge = '<span class="epr-header-summary epr-header-summary--dispo">' . (int)$intFilterCount . '</span>';
|
|
|
|
|
$strFilterLabel .= ' (' . $intFilterCount . ')';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo '<div class="epr-row inscr-mobile-panel">';
|
|
|
|
|
echo '<div class="epr-block inscr-mobile-block-full is-collapsed">';
|
|
|
|
|
echo '<div class="epr-header epr-header--collapsible">';
|
|
|
|
|
echo '<div class="epr-header-start">';
|
|
|
|
|
echo '<span class="epr-header-label">' . afficheTexte('inscr_mobile_filters', 0) . '</span>';
|
|
|
|
|
echo '<span class="epr-header-summaries">' . $strFilterBadge . '</span>';
|
|
|
|
|
echo '</div>';
|
|
|
|
|
echo fxInscrMobileCollapseToggle($strLangue, true);
|
|
|
|
|
echo '</div>';
|
|
|
|
|
echo '<div class="epr-content">';
|
|
|
|
|
echo '<form action="' . fxInscrMobileEsc($strBaseUrl) . '" method="get" id="frm_inscr_mobile_filters" class="inscr-mobile-form">';
|
|
|
|
|
echo '<details class="inscr-mobile-panel">';
|
|
|
|
|
echo '<summary class="inscr-mobile-panel__head">' . fxInscrMobileEsc($strFilterLabel) . '</summary>';
|
|
|
|
|
echo '<div class="inscr-mobile-panel__body">';
|
|
|
|
|
echo '<form action="' . fxInscrMobileEsc($strBaseUrl) . '" method="get" class="inscr-mobile-form">';
|
|
|
|
|
echo '<input type="hidden" name="promoteur_eve_id" value="' . fxInscrMobileEsc(base64_encode((string)$intEveId)) . '">';
|
|
|
|
|
|
|
|
|
|
foreach (array('rech_prenom', 'rech_nom', 'rech_no_commande', 'rech_nom_equipe') as $strKey) {
|
|
|
|
|
if ($arrReq[$strKey] !== '') {
|
|
|
|
|
echo '<input type="hidden" name="' . $strKey . '" value="' . fxInscrMobileEsc($arrReq[$strKey]) . '">';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
echo '<input type="hidden" name="promoteur_eve_id" value="' . urlencode(base64_encode($intEveId)) . '">';
|
|
|
|
|
echo '<input type="hidden" name="apply_filters" value="1">';
|
|
|
|
|
|
|
|
|
|
echo '<div class="form-group"><label for="sel_rech_epreuve">' . afficheTexte('sel_rech_epreuve', 0) . '</label>';
|
|
|
|
|
echo '<select class="form-control rounded-0" id="sel_rech_epreuve" name="sel_rech_epreuve">';
|
|
|
|
|
echo '<label class="inscr-mobile-label" for="sel_rech_epreuve">' . fxInscrMobileEsc(fxInscrMobileT('sel_rech_epreuve')) . '</label>';
|
|
|
|
|
echo '<select class="form-control form-control-sm rounded-0" id="sel_rech_epreuve" name="sel_rech_epreuve">';
|
|
|
|
|
echo '<option value="">—</option>';
|
|
|
|
|
for ($i = 1; $i <= count($tabEpreuves); $i++) {
|
|
|
|
|
$strOpt = fxInscrMobileEpreuveLabel($tabEpreuves[$i]['epr_id'], $strLangue);
|
|
|
|
|
$strSel = ($arrReq['sel_rech_epreuve'] == $tabEpreuves[$i]['epr_id']) ? ' selected' : '';
|
|
|
|
|
echo '<option value="' . urlencode(base64_encode($tabEpreuves[$i]['epr_id'])) . '"' . $strSel . '>' . fxInscrMobileEsc($strOpt) . '</option>';
|
|
|
|
|
$strVal = base64_encode((string)$tabEpreuves[$i]['epr_id']);
|
|
|
|
|
echo '<option value="' . fxInscrMobileEsc($strVal) . '"' . $strSel . '>' . fxInscrMobileEsc($strOpt) . '</option>';
|
|
|
|
|
}
|
|
|
|
|
echo '</select></div>';
|
|
|
|
|
echo '</select>';
|
|
|
|
|
|
|
|
|
|
echo '<div class="form-group form-check">';
|
|
|
|
|
echo '<input class="form-check-input" type="checkbox" id="chk_bib" name="chk_bib" value="1"' . ($arrReq['chk_bib'] ? ' checked' : '') . '>';
|
|
|
|
|
echo '<label class="form-check-label" for="chk_bib">' . afficheTexte('chk_bib', 0) . '</label></div>';
|
|
|
|
|
echo '<label class="inscr-mobile-check mt-2"><input type="checkbox" name="chk_bib" value="1"' . ($arrReq['chk_bib'] ? ' checked' : '') . '> ' . fxInscrMobileEsc(fxInscrMobileT('chk_bib')) . '</label>';
|
|
|
|
|
echo '<label class="inscr-mobile-check"><input type="checkbox" name="chk_cancelled" value="1"' . ($arrReq['chk_cancelled'] ? ' checked' : '') . '> ' . fxInscrMobileEsc(fxInscrMobileT('chk_cancelled')) . '</label>';
|
|
|
|
|
|
|
|
|
|
echo '<div class="form-group form-check">';
|
|
|
|
|
echo '<input class="form-check-input" type="checkbox" id="chk_cancelled" name="chk_cancelled" value="1"' . ($arrReq['chk_cancelled'] ? ' checked' : '') . '>';
|
|
|
|
|
echo '<label class="form-check-label" for="chk_cancelled">' . afficheTexte('chk_cancelled', 0) . '</label></div>';
|
|
|
|
|
echo '<div class="inscr-mobile-form-actions mt-2">';
|
|
|
|
|
$strResetUrl = fxInscrMobileBuildUrl($strBaseUrl, $intEveId, array(
|
|
|
|
|
'rech_prenom' => '', 'rech_nom' => '', 'rech_no_commande' => '', 'rech_nom_equipe' => '',
|
|
|
|
|
'chk_bib' => 0, 'chk_cancelled' => 0, 'sel_rech_epreuve' => 0, 'pg' => 1, 'pec_id' => 0,
|
|
|
|
|
), array('pg' => 1));
|
|
|
|
|
echo '<a class="btn btn-secondary btn-sm rounded-0" href="' . fxInscrMobileEsc($strResetUrl) . '">' . ($strLangue === 'fr' ? 'Réinitialiser' : 'Reset') . '</a>';
|
|
|
|
|
echo '<button class="btn btn-primary btn-sm rounded-0" type="submit" name="apply_filters" value="1">' . fxInscrMobileEsc(fxInscrMobileT('inscr_mobile_apply_filters')) . '</button>';
|
|
|
|
|
echo '</div></form></div></details>';
|
|
|
|
|
|
|
|
|
|
echo '<div class="inscr-mobile-form-actions">';
|
|
|
|
|
echo '<a class="btn btn-secondary rounded-0" href="' . fxInscrMobileEsc($strBaseUrl . '?promoteur_eve_id=' . urlencode(base64_encode($intEveId))) . '">';
|
|
|
|
|
echo ($strLangue === 'fr' ? 'Réinitialiser' : 'Reset');
|
|
|
|
|
echo '</a>';
|
|
|
|
|
echo '<button class="btn btn-primary rounded-0" type="submit" name="btn_recherche" value="1">' . afficheTexte('inscr_mobile_apply_filters', 0) . '</button>';
|
|
|
|
|
echo '</div></form>';
|
|
|
|
|
echo '</div></div></div>';
|
|
|
|
|
// Liste complète dès l'ouverture
|
|
|
|
|
$tabRows = fxInscrMobileFetchRows($intEveId, $arrReq);
|
|
|
|
|
$intNbItemsParPage = 50;
|
|
|
|
|
$intNbTotal = ($tabRows !== null) ? count($tabRows) : 0;
|
|
|
|
|
$intPage = 1;
|
|
|
|
|
$intStart = 1;
|
|
|
|
|
$intEnd = $intNbItemsParPage;
|
|
|
|
|
if (!empty($_GET['pg'])) {
|
|
|
|
|
$intPage = max(1, intval($_GET['pg']));
|
|
|
|
|
}
|
|
|
|
|
if (intval($intPage) > 1) {
|
|
|
|
|
$intStart = ($intPage - 1) * $intNbItemsParPage + 1;
|
|
|
|
|
$intEnd = $intStart + $intNbItemsParPage - 1;
|
|
|
|
|
}
|
|
|
|
|
if ($intEnd > $intNbTotal) {
|
|
|
|
|
$intEnd = $intNbTotal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// —— Résultats ——
|
|
|
|
|
if (fxInscrMobileShouldShowResults($arrReq)) {
|
|
|
|
|
$tabRows = fxInscrMobileFetchRows($intEveId, $arrReq);
|
|
|
|
|
$intNbItemsParPage = 100;
|
|
|
|
|
$intPage = $arrReq['pg'];
|
|
|
|
|
$intNbTotal = ($tabRows !== null) ? count($tabRows) : 0;
|
|
|
|
|
$intStart = ($intPage > 1) ? (($intPage - 1) * $intNbItemsParPage + 1) : 1;
|
|
|
|
|
$intEnd = min($intStart + $intNbItemsParPage - 1, $intNbTotal);
|
|
|
|
|
echo '<div id="inscr-mobile-list" class="inscr-mobile-list-anchor">';
|
|
|
|
|
echo '<div class="inscr-mobile-list-head">';
|
|
|
|
|
if ($strLangue === 'fr') {
|
|
|
|
|
echo '<span>' . (int)$intNbTotal . ' inscription' . ($intNbTotal > 1 ? 's' : '') . '</span>';
|
|
|
|
|
} else {
|
|
|
|
|
echo '<span>' . (int)$intNbTotal . ' registration' . ($intNbTotal !== 1 ? 's' : '') . '</span>';
|
|
|
|
|
}
|
|
|
|
|
if ($intNbTotal > $intNbItemsParPage) {
|
|
|
|
|
$intNbPages = (int)ceil($intNbTotal / $intNbItemsParPage);
|
|
|
|
|
echo '<span class="inscr-mobile-list-head__pg">' . ($strLangue === 'fr' ? 'Page ' : 'Page ') . $intPage . ' / ' . $intNbPages . '</span>';
|
|
|
|
|
}
|
|
|
|
|
echo '</div>';
|
|
|
|
|
|
|
|
|
|
if ($intNbTotal > 0) {
|
|
|
|
|
$intShown = $intEnd - $intStart + 1;
|
|
|
|
|
$intNbPages = (int)ceil($intNbTotal / $intNbItemsParPage);
|
|
|
|
|
echo '<p class="inscr-mobile-results-meta">';
|
|
|
|
|
if ($strLangue === 'fr') {
|
|
|
|
|
echo fxInscrMobileEsc($intShown . ' de ' . $intNbTotal . ' — page ' . $intPage . ' / ' . $intNbPages);
|
|
|
|
|
} else {
|
|
|
|
|
echo fxInscrMobileEsc($intShown . ' of ' . $intNbTotal . ' — page ' . $intPage . ' / ' . $intNbPages);
|
|
|
|
|
}
|
|
|
|
|
echo '</p>';
|
|
|
|
|
if ($intNbTotal > 0) {
|
|
|
|
|
echo '<div class="inscr-mobile-list">';
|
|
|
|
|
for ($j = $intStart; $j <= $intEnd; $j++) {
|
|
|
|
|
$row = $tabRows[$j];
|
|
|
|
|
$strFicheUrl = fxInscrMobileBuildUrl($strBaseUrl, $intEveId, $arrReq, array(
|
|
|
|
|
'pec_id' => (int)$row['pec_id_original'],
|
|
|
|
|
'pg' => $intPage,
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
for ($j = $intStart; $j <= $intEnd; $j++) {
|
|
|
|
|
$row = $tabRows[$j];
|
|
|
|
|
$strFicheUrl = $strBaseUrl . '?' . fxInscrMobileQueryString($arrReq, $intEveId, array(
|
|
|
|
|
'pec_id' => $row['pec_id_original'],
|
|
|
|
|
'pg' => $intPage,
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
$strBib = fxInscrMobileBibDisplay($row);
|
|
|
|
|
$strName = fxUnescape($row['par_nom']) . ', ' . fxUnescape($row['par_prenom']);
|
|
|
|
|
$strRace = fxInscrMobileEpreuveLabel($row['epr_id'], $strLangue);
|
|
|
|
|
$strCardClass = 'epr-row inscr-mobile-result-card';
|
|
|
|
|
if ($row['is_cancelled'] == '1') {
|
|
|
|
|
$strCardClass .= ' inscr-mobile-result-card--cancelled';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo '<div class="' . $strCardClass . '">';
|
|
|
|
|
echo '<div class="epr-header epr-header--collapsible inscr-mobile-result-card__head">';
|
|
|
|
|
echo '<div class="epr-header-start">';
|
|
|
|
|
echo '<span class="epr-header-label">' . fxInscrMobileEsc($strName) . '</span>';
|
|
|
|
|
echo '<span class="epr-header-summaries">';
|
|
|
|
|
if (trim($strBib) !== '') {
|
|
|
|
|
echo '<span class="epr-header-summary epr-header-summary--bib">' . afficheTexte('promoteur_bib_no_participants', 0) . ' ' . fxInscrMobileEsc($strBib) . '</span>';
|
|
|
|
|
}
|
|
|
|
|
if ($row['no_bib_remis'] == 1) {
|
|
|
|
|
echo '<span class="epr-header-summary epr-header-summary--seq">' . afficheTexte('promoteur_bib_enregistre', 0) . '</span>';
|
|
|
|
|
}
|
|
|
|
|
if ($row['is_cancelled'] == '1') {
|
|
|
|
|
echo '<span class="epr-header-summary epr-header-summary--seq-empty">' . afficheTexte('btn_annulerinscriptions', 0) . '</span>';
|
|
|
|
|
}
|
|
|
|
|
echo '</span></div></div>';
|
|
|
|
|
echo '<div class="epr-content inscr-mobile-result-card__body">';
|
|
|
|
|
echo '<div class="inscr-mobile-result-card__race">' . fxInscrMobileEsc($strRace) . '</div>';
|
|
|
|
|
echo '<div class="inscr-mobile-result-card__order">' . fxInscrMobileEsc($row['no_commande']) . '</div>';
|
|
|
|
|
echo '<a class="btn btn-primary rounded-0 btn-block mt-2" href="' . fxInscrMobileEsc($strFicheUrl) . '">';
|
|
|
|
|
echo afficheTexte('inscr_mobile_view_record', 0);
|
|
|
|
|
echo '</a>';
|
|
|
|
|
echo '</div></div>';
|
|
|
|
|
$strBib = fxInscrMobileBibDisplay($row);
|
|
|
|
|
$strName = fxUnescape($row['par_nom']) . ', ' . fxUnescape($row['par_prenom']);
|
|
|
|
|
$strRace = fxInscrMobileEpreuveLabel($row['epr_id'], $strLangue);
|
|
|
|
|
$strCardClass = 'inscr-mobile-list-item';
|
|
|
|
|
if ($row['is_cancelled'] == '1') {
|
|
|
|
|
$strCardClass .= ' inscr-mobile-list-item--cancelled';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($intNbPages > 1) {
|
|
|
|
|
$strPagQs = fxInscrMobileQueryString($arrReq, $intEveId);
|
|
|
|
|
echo fxGetPagination($strBaseUrl . '?' . $strPagQs, $intNbTotal, $intNbItemsParPage, $intPage);
|
|
|
|
|
echo '<a class="' . $strCardClass . '" href="' . fxInscrMobileEsc($strFicheUrl) . '">';
|
|
|
|
|
echo '<div class="inscr-mobile-list-item__main">';
|
|
|
|
|
echo '<div class="inscr-mobile-list-item__name">' . fxInscrMobileEsc($strName) . '</div>';
|
|
|
|
|
echo '<div class="inscr-mobile-list-item__race">' . fxInscrMobileEsc($strRace) . '</div>';
|
|
|
|
|
echo '<div class="inscr-mobile-list-item__meta">';
|
|
|
|
|
echo '<span>' . fxInscrMobileEsc($row['no_commande']) . '</span>';
|
|
|
|
|
if (trim($strBib) !== '') {
|
|
|
|
|
echo '<span class="inscr-mobile-list-item__bib">#' . fxInscrMobileEsc($strBib) . '</span>';
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
echo '<div class="alert alert-danger" role="alert">' . afficheTexte('txt_recherche_no_result', 0) . '</div>';
|
|
|
|
|
if ($row['no_bib_remis'] == 1) {
|
|
|
|
|
echo '<span class="inscr-mobile-badge inscr-mobile-badge--ok">' . fxInscrMobileEsc(fxInscrMobileT('promoteur_bib_enregistre')) . '</span>';
|
|
|
|
|
}
|
|
|
|
|
echo '</div></div>';
|
|
|
|
|
echo '<i class="fa fa-chevron-right inscr-mobile-list-item__arrow" aria-hidden="true"></i>';
|
|
|
|
|
echo '</a>';
|
|
|
|
|
}
|
|
|
|
|
echo '</div>';
|
|
|
|
|
|
|
|
|
|
echo fxInscrMobileRenderPagination($strBaseUrl, $intEveId, $arrReq, $intNbTotal, $intNbItemsParPage, $intPage);
|
|
|
|
|
} else {
|
|
|
|
|
echo '<div class="alert alert-light border inscr-mobile-empty">' . fxInscrMobileEsc(fxInscrMobileT('txt_recherche_no_result')) . '</div>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo '</div>';
|
|
|
|
|
@ -447,7 +457,7 @@ function fxInscrMobileRenderList($intEveId, $strLangue, $strBaseUrl, $arrReq) {
|
|
|
|
|
function fxInscrMobileRenderFiche($intEveId, $strLangue, $strBaseUrl, $arrReq, $arrRow) {
|
|
|
|
|
global $vDomaine;
|
|
|
|
|
|
|
|
|
|
$strListUrl = $strBaseUrl . '?' . fxInscrMobileQueryString($arrReq, $intEveId, array('pg' => $arrReq['pg']));
|
|
|
|
|
$strListUrl = fxInscrMobileBuildUrl($strBaseUrl, $intEveId, $arrReq, array('pec_id' => null, 'pg' => $arrReq['pg']));
|
|
|
|
|
$strEveCode = fxGetEvenementsUrl($arrRow['eve_id']);
|
|
|
|
|
$strBib = fxInscrMobileBibDisplay($arrRow);
|
|
|
|
|
$intParId = $arrRow['par_id'];
|
|
|
|
|
@ -466,72 +476,50 @@ function fxInscrMobileRenderFiche($intEveId, $strLangue, $strBaseUrl, $arrReq, $
|
|
|
|
|
$intRemisVal = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo '<a class="btn btn-primary rounded-pill inscr-mobile-back" href="' . fxInscrMobileEsc($strListUrl) . '">';
|
|
|
|
|
echo '<i class="fa fa-chevron-left mr-2" aria-hidden="true"></i>';
|
|
|
|
|
echo afficheTexte('inscr_mobile_back_list', 0);
|
|
|
|
|
echo '</a>';
|
|
|
|
|
echo '<div id="module-inscr-mobile" class="inscr-mobile-shell inscr-mobile-fiche" data-inscr-mobile="1">';
|
|
|
|
|
|
|
|
|
|
echo '<div class="bib-tool-card-header mt-3">';
|
|
|
|
|
echo '<h2 class="bib-tool-card-title">' . fxInscrMobileEsc(fxUnescape($arrRow['par_nom']) . ', ' . fxUnescape($arrRow['par_prenom'])) . '</h2>';
|
|
|
|
|
echo '</div>';
|
|
|
|
|
echo '<div class="inscr-mobile-topbar">';
|
|
|
|
|
echo '<a class="inscr-mobile-topbar__back" href="' . fxInscrMobileEsc($strListUrl) . '"><i class="fa fa-chevron-left"></i></a>';
|
|
|
|
|
echo '<div class="inscr-mobile-topbar__text">';
|
|
|
|
|
echo '<h1 class="inscr-mobile-topbar__title">' . fxInscrMobileEsc(fxUnescape($arrRow['par_nom']) . ', ' . fxUnescape($arrRow['par_prenom'])) . '</h1>';
|
|
|
|
|
echo '<div class="inscr-mobile-topbar__sub">' . fxInscrMobileEsc(fxInscrMobileEpreuveLabel($arrRow['epr_id'], $strLangue)) . '</div>';
|
|
|
|
|
echo '</div></div>';
|
|
|
|
|
|
|
|
|
|
echo '<div id="module-inscr-mobile" class="epr-wrapper inscr-mobile-fiche" data-inscr-mobile="1">';
|
|
|
|
|
echo '<div class="inscr-mobile-fiche-section">';
|
|
|
|
|
echo '<h2 class="inscr-mobile-fiche-section__title">' . fxInscrMobileEsc(fxInscrMobileT('inscr_mobile_section_info')) . '</h2>';
|
|
|
|
|
echo '<dl class="inscr-mobile-dl">';
|
|
|
|
|
echo '<dt>' . fxInscrMobileEsc(fxInscrMobileT('rech_no_commande')) . '</dt><dd>';
|
|
|
|
|
echo '<a class="btn btn-primary btn-sm rounded-pill" href="' . $vDomaine . '/facture.php?no_panier=' . rawurlencode($arrRow['no_panier']) . '&lang=' . $strLangue . '" target="_blank">' . fxInscrMobileEsc($arrRow['no_commande']) . '</a></dd>';
|
|
|
|
|
echo '<dt>' . fxInscrMobileEsc(fxInscrMobileT('inscr_mobile_details')) . '</dt><dd>';
|
|
|
|
|
echo fxInscrMobileEsc($blnEquipe && fxIsParEquipe($arrRow['pec_id_original'], $arrRow['epr_id'])
|
|
|
|
|
? fxInscrMobileT('promoteur_bib_show_teamates') : fxInscrMobileT('epreuve_individuelle'));
|
|
|
|
|
echo '</dd>';
|
|
|
|
|
echo '<dt>' . fxInscrMobileEsc(fxInscrMobileT('inscr_mobile_modified')) . '</dt><dd>' . fxCheckMAJ($arrRow['pec_id_original'], $intParId, $strLangue) . '</dd>';
|
|
|
|
|
echo '</dl></div>';
|
|
|
|
|
|
|
|
|
|
// Informations
|
|
|
|
|
echo '<div class="epr-row inscr-mobile-panel"><div class="epr-block inscr-mobile-block-full">';
|
|
|
|
|
echo '<div class="epr-header epr-header--collapsible"><div class="epr-header-start">';
|
|
|
|
|
echo '<span class="epr-header-label">' . afficheTexte('inscr_mobile_section_info', 0) . '</span>';
|
|
|
|
|
echo '</div>' . fxInscrMobileCollapseToggle($strLangue, false) . '</div>';
|
|
|
|
|
echo '<div class="epr-content"><dl class="epr-gestion-stats">';
|
|
|
|
|
echo '<div class="epr-gestion-stat"><dt>' . afficheTexte('sel_rech_epreuve', 0) . '</dt><dd>' . fxInscrMobileEsc(fxInscrMobileEpreuveLabel($arrRow['epr_id'], $strLangue)) . '</dd></div>';
|
|
|
|
|
echo '<div class="epr-gestion-stat"><dt>' . afficheTexte('inscr_mobile_details', 0) . '</dt><dd>';
|
|
|
|
|
if ($blnEquipe && fxIsParEquipe($arrRow['pec_id_original'], $arrRow['epr_id'])) {
|
|
|
|
|
afficheTexte('promoteur_bib_show_teamates', 0);
|
|
|
|
|
} else {
|
|
|
|
|
afficheTexte('epreuve_individuelle', 0);
|
|
|
|
|
}
|
|
|
|
|
echo '</dd></div>';
|
|
|
|
|
echo '<div class="epr-gestion-stat"><dt>' . afficheTexte('rech_no_commande', 0) . '</dt><dd>';
|
|
|
|
|
echo '<a class="btn btn-primary rounded-pill btn-sm" href="' . $vDomaine . '/facture.php?no_panier=' . urlencode($arrRow['no_panier']) . '&lang=' . $strLangue . '" target="_blank">';
|
|
|
|
|
echo fxInscrMobileEsc($arrRow['no_commande']) . '</a></dd></div>';
|
|
|
|
|
echo '<div class="epr-gestion-stat"><dt>' . afficheTexte('inscr_mobile_modified', 0) . '</dt><dd>' . fxCheckMAJ($arrRow['pec_id_original'], $intParId, $strLangue) . '</dd></div>';
|
|
|
|
|
echo '</dl></div></div></div>';
|
|
|
|
|
|
|
|
|
|
// Dossard
|
|
|
|
|
echo '<div class="epr-row inscr-mobile-panel"><div class="epr-block inscr-mobile-block-full">';
|
|
|
|
|
echo '<div class="epr-header epr-header--collapsible"><div class="epr-header-start">';
|
|
|
|
|
echo '<span class="epr-header-label">' . afficheTexte('promoteur_bib_number', 0) . '</span>';
|
|
|
|
|
echo '</div>' . fxInscrMobileCollapseToggle($strLangue, false) . '</div>';
|
|
|
|
|
echo '<div class="epr-content">';
|
|
|
|
|
echo '<label class="lbl_hint" for="' . $strBibInputId . $intParId . '">';
|
|
|
|
|
echo $blnEquipe ? afficheTexte('promoteur_bib_no_equipe', 0) : afficheTexte('promoteur_bib_no_participants', 0);
|
|
|
|
|
echo '</label>';
|
|
|
|
|
echo '<div class="inscr-mobile-fiche-section">';
|
|
|
|
|
echo '<h2 class="inscr-mobile-fiche-section__title">' . fxInscrMobileEsc(fxInscrMobileT('promoteur_bib_number')) . '</h2>';
|
|
|
|
|
echo '<div class="inscr-mobile-bib-row">';
|
|
|
|
|
echo '<input class="form-control rounded-0" type="text" id="' . $strBibInputId . $intParId . '" value="' . fxInscrMobileEsc($strBib) . '">';
|
|
|
|
|
echo '<button class="btn btn-primary rounded-0 btn_bib" type="button" data-action="' . $strBibAction . '"'
|
|
|
|
|
. ' data-eve_id="' . urlencode(base64_encode($arrRow['eve_id'])) . '"'
|
|
|
|
|
. ' data-eve_id="' . rawurlencode(base64_encode((string)$arrRow['eve_id'])) . '"'
|
|
|
|
|
. ' data-epr_id="' . (int)$arrRow['epr_id'] . '"'
|
|
|
|
|
. ' data-par_id="' . (int)$intParId . '"'
|
|
|
|
|
. ' data-pec_id="' . (int)$arrRow['pec_id_original'] . '">OK</button>';
|
|
|
|
|
echo '</div></div></div></div>';
|
|
|
|
|
echo '</div></div>';
|
|
|
|
|
|
|
|
|
|
// Check-in
|
|
|
|
|
echo '<div class="epr-row inscr-mobile-panel"><div class="epr-block inscr-mobile-block-full">';
|
|
|
|
|
echo '<div class="epr-header epr-header--collapsible"><div class="epr-header-start">';
|
|
|
|
|
echo '<span class="epr-header-label">' . afficheTexte('promoteur_bib_enregistre', 0) . '</span>';
|
|
|
|
|
echo '</div>' . fxInscrMobileCollapseToggle($strLangue, false) . '</div>';
|
|
|
|
|
echo '<div class="epr-content">';
|
|
|
|
|
echo '<div class="inscr-mobile-fiche-section">';
|
|
|
|
|
echo '<h2 class="inscr-mobile-fiche-section__title">' . fxInscrMobileEsc(fxInscrMobileT('promoteur_bib_enregistre')) . '</h2>';
|
|
|
|
|
echo '<span id="' . (int)$intParId . '">';
|
|
|
|
|
echo '<a class="btn btn-sm rounded-0 btn_remis ' . $strRemisClass . '" href="#" data-action="remis"'
|
|
|
|
|
. ' data-table="' . urlencode(base64_encode('resultats_participants')) . '"'
|
|
|
|
|
. ' data-table="' . rawurlencode(base64_encode('resultats_participants')) . '"'
|
|
|
|
|
. ' data-field="no_bib_remis" data-key="par_id" data-valeur="' . $intRemisVal . '"'
|
|
|
|
|
. ' data-id="' . (int)$intParId . '">' . $strRemisIcon . '</a>';
|
|
|
|
|
echo '</span>';
|
|
|
|
|
echo '<div id="date_' . (int)$intParId . '" class="lbl_hint mt-2">' . fxInscrMobileEsc($arrRow['no_bib_remis_date']) . '</div>';
|
|
|
|
|
echo '<div id="par_' . (int)$intParId . '" class="lbl_hint">' . fxInscrMobileEsc($arrRow['no_bib_remis_par']) . '</div>';
|
|
|
|
|
echo '</div></div></div>';
|
|
|
|
|
echo '<div id="date_' . (int)$intParId . '" class="inscr-mobile-muted">' . fxInscrMobileEsc($arrRow['no_bib_remis_date']) . '</div>';
|
|
|
|
|
echo '<div id="par_' . (int)$intParId . '" class="inscr-mobile-muted">' . fxInscrMobileEsc($arrRow['no_bib_remis_par']) . '</div>';
|
|
|
|
|
echo '</div>';
|
|
|
|
|
|
|
|
|
|
// Actions
|
|
|
|
|
$strStyleEdit = $strStyleCancel = '';
|
|
|
|
|
$strStyleRetablir = ' d-none';
|
|
|
|
|
if ($blnCancelled) {
|
|
|
|
|
@ -539,34 +527,32 @@ function fxInscrMobileRenderFiche($intEveId, $strLangue, $strBaseUrl, $arrReq, $
|
|
|
|
|
$strStyleRetablir = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo '<div class="epr-row inscr-mobile-panel"><div class="epr-block inscr-mobile-block-full">';
|
|
|
|
|
echo '<div class="epr-header epr-header--collapsible"><div class="epr-header-start">';
|
|
|
|
|
echo '<span class="epr-header-label">' . afficheTexte('inscr_mobile_section_actions', 0) . '</span>';
|
|
|
|
|
echo '</div>' . fxInscrMobileCollapseToggle($strLangue, false) . '</div>';
|
|
|
|
|
echo '<div class="epr-content inscr-mobile-actions">';
|
|
|
|
|
echo '<div class="inscr-mobile-fiche-section">';
|
|
|
|
|
echo '<h2 class="inscr-mobile-fiche-section__title">' . fxInscrMobileEsc(fxInscrMobileT('inscr_mobile_section_actions')) . '</h2>';
|
|
|
|
|
echo '<div class="inscr-mobile-actions">';
|
|
|
|
|
|
|
|
|
|
echo '<button class="btn btn-primary rounded-0 btn-block btn_edit_event_promo' . $strStyleEdit . '" type="button"'
|
|
|
|
|
. ' id="modifier_fiche" data-eve_code="' . fxInscrMobileEsc($strEveCode) . '"'
|
|
|
|
|
. ' data-epr_id="' . (int)$arrRow['epr_id'] . '" data-eve_id="' . (int)$arrRow['eve_id'] . '"'
|
|
|
|
|
. ' value="' . (int)$arrRow['pec_id_original'] . '">' . afficheTexte('btn_modifierinscriptions', 0) . '</button>';
|
|
|
|
|
. ' value="' . (int)$arrRow['pec_id_original'] . '">' . fxInscrMobileEsc(fxInscrMobileT('btn_modifierinscriptions')) . '</button>';
|
|
|
|
|
|
|
|
|
|
echo '<button class="btn btn-secondary rounded-0 btn-block btn_cancel_event_promo inscr-mobile-cancel-btn' . $strStyleCancel . '" type="button"'
|
|
|
|
|
. ' id="annuler_fiche" data-eve_code="' . fxInscrMobileEsc($strEveCode) . '"'
|
|
|
|
|
. ' data-epr_id="' . (int)$arrRow['epr_id'] . '" data-eve_id="' . (int)$arrRow['eve_id'] . '"'
|
|
|
|
|
. ' value="' . (int)$arrRow['pec_id_original'] . '">' . afficheTexte('btn_annulerinscriptions', 0) . '</button>';
|
|
|
|
|
. ' value="' . (int)$arrRow['pec_id_original'] . '">' . fxInscrMobileEsc(fxInscrMobileT('btn_annulerinscriptions')) . '</button>';
|
|
|
|
|
|
|
|
|
|
echo '<button class="btn btn-secondary rounded-0 btn-block btn_retablir_event_promo inscr-mobile-cancel-btn' . $strStyleRetablir . '" type="button"'
|
|
|
|
|
. ' id="retablir_fiche" data-eve_code="' . fxInscrMobileEsc($strEveCode) . '"'
|
|
|
|
|
. ' data-epr_id="' . (int)$arrRow['epr_id'] . '" data-eve_id="' . (int)$arrRow['eve_id'] . '"'
|
|
|
|
|
. ' value="' . (int)$arrRow['pec_id_original'] . '">' . afficheTexte('btn_retablirinscriptions', 0) . '</button>';
|
|
|
|
|
. ' value="' . (int)$arrRow['pec_id_original'] . '">' . fxInscrMobileEsc(fxInscrMobileT('btn_retablirinscriptions')) . '</button>';
|
|
|
|
|
|
|
|
|
|
$strRenvoi = ($strLangue === 'fr') ? 'RENVOI' : 'RESEND';
|
|
|
|
|
echo '<button class="btn btn-primary rounded-0 btn-block link_confirmation" type="button"'
|
|
|
|
|
echo '<button class="btn btn-outline-primary rounded-0 btn-block link_confirmation" type="button"'
|
|
|
|
|
. ' data-no_panier="' . fxInscrMobileEsc($arrRow['no_panier']) . '"'
|
|
|
|
|
. ' data-no_commande="' . fxInscrMobileEsc($arrRow['no_commande']) . '"'
|
|
|
|
|
. ' data-lng="' . $strLangue . '">' . fxInscrMobileEsc($strRenvoi) . '</button>';
|
|
|
|
|
|
|
|
|
|
echo '</div></div></div>';
|
|
|
|
|
echo '</div></div>';
|
|
|
|
|
echo '</div>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -577,9 +563,9 @@ function fxInscrMobileRun($intEveId, $strLangue) {
|
|
|
|
|
if ($arrReq['pec_id'] > 0) {
|
|
|
|
|
$arrRow = fxInscrMobileFetchRowByPec($arrReq['pec_id'], $intEveId);
|
|
|
|
|
if ($arrRow === null) {
|
|
|
|
|
echo '<div class="alert alert-danger">' . afficheTexte('txt_recherche_no_result', 0) . '</div>';
|
|
|
|
|
echo '<a class="btn btn-primary rounded-0" href="' . fxInscrMobileEsc($strBaseUrl . '?promoteur_eve_id=' . urlencode(base64_encode($intEveId))) . '">';
|
|
|
|
|
echo afficheTexte('inscr_mobile_back_list', 0) . '</a>';
|
|
|
|
|
echo '<div class="alert alert-danger">' . fxInscrMobileEsc(fxInscrMobileT('txt_recherche_no_result')) . '</div>';
|
|
|
|
|
echo '<a class="btn btn-primary rounded-0" href="' . fxInscrMobileEsc(fxInscrMobileBuildUrl($strBaseUrl, $intEveId, $arrReq, array('pec_id' => null))) . '">';
|
|
|
|
|
echo fxInscrMobileEsc(fxInscrMobileT('inscr_mobile_back_list')) . '</a>';
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
fxInscrMobileRenderFiche($intEveId, $strLangue, $strBaseUrl, $arrReq, $arrRow);
|
|
|
|
|
|