Implement promoteur hub integration and UI enhancements
This commit introduces the promoteur hub functionality by adding new checks and redirects based on the user's account type. It updates the account management logic to handle promoteur hub users, ensuring proper navigation and access. Additionally, it enhances the CSS for promoteur hub elements, improving the visual presentation. These changes aim to streamline user experience for promoteur hub accounts and ensure proper access management.
This commit is contained in:
27
compte.php
27
compte.php
@ -23,6 +23,7 @@ require_once('superadm/php/inc_fx_excell.php');
|
||||
require_once('php/inc_fx_liste_attente.php');
|
||||
require_once('php/inc_fx_inscriptions_mobile.php');
|
||||
require_once('php/inc_fx_eve_acces.php');
|
||||
require_once('php/inc_fx_promoteur_hub.php');
|
||||
global $objDatabase, $vPage, $vDomaine;
|
||||
// vérifier les paramètres
|
||||
|
||||
@ -53,11 +54,22 @@ else
|
||||
if (!empty($_GET['code']))
|
||||
$strCode = 'compte_' . $_GET['code'];
|
||||
else {
|
||||
if (isset($_SESSION['com_id']))
|
||||
$strCode = "compte_accueil";
|
||||
else
|
||||
$strCode = "compte_login";
|
||||
if (isset($_SESSION['com_id'])) {
|
||||
if (fxPromoteurHubComUsesV2($_SESSION['com_id'])) {
|
||||
$strCode = 'compte_promoteur_hub';
|
||||
} else {
|
||||
$strCode = 'compte_accueil';
|
||||
}
|
||||
} else {
|
||||
$strCode = 'compte_login';
|
||||
}
|
||||
}
|
||||
|
||||
if ($strCode === 'compte_promoteur_hub' && (!isset($_SESSION['com_id']) || !fxPromoteurHubComUsesV2($_SESSION['com_id']))) {
|
||||
header('Location: ' . $vDomaine . '/' . ($strLangue === 'fr' ? 'compte' : 'account'));
|
||||
exit;
|
||||
}
|
||||
|
||||
$recPage = fxGetPage($strCode);
|
||||
|
||||
if (count($recPage) < 1) {
|
||||
@ -321,7 +333,8 @@ if (isset($_GET['promoteur_eve_id'])) {
|
||||
header('Location: ' . $vDomaine . '/' . $strPage);
|
||||
exit;
|
||||
}
|
||||
} elseif (!fxIsPromoteur($_SESSION['com_id'], $intEveIdbase)) {
|
||||
} elseif (!fxIsPromoteur($_SESSION['com_id'], $intEveIdbase)
|
||||
&& !fxEveAccesComHasV2ForEvent($_SESSION['com_id'], $intEveIdbase)) {
|
||||
header('Location: ' . $vDomaine . '/' . $strPage);
|
||||
exit;
|
||||
}
|
||||
@ -476,6 +489,10 @@ require_once("inc_header.php");
|
||||
case 'compte_annuler_inscription':
|
||||
include_once('annuler_inscription.php');
|
||||
break;
|
||||
case 'compte_promoteur_hub':
|
||||
$blnBoutonRetour = false;
|
||||
echo fxShowPromoteurHub($_SESSION['com_id'], $strLangue);
|
||||
break;
|
||||
case 'compte_accueil':
|
||||
//MSIN-4371
|
||||
if (fxEveAccesCanQrTest($_SESSION['com_id'])) { ?>
|
||||
|
||||
@ -3094,3 +3094,11 @@ a.ms1-trad-link.btn-aide-trad{
|
||||
color:#212529;
|
||||
}
|
||||
}
|
||||
|
||||
.promoteur-hub-card-archived {
|
||||
opacity: 0.72;
|
||||
}
|
||||
|
||||
.promoteur-hub-annonces .ms1-doc-trigger {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@ -1273,6 +1273,14 @@ function fxLoginCompte($infoLogin, $strLangue)
|
||||
else
|
||||
$strPage = 'account';
|
||||
|
||||
if (($arrRetour['state'] ?? '') === 'true' && !empty($infoCompte['com_id'])) {
|
||||
require_once dirname(__FILE__) . '/inc_fx_promoteur_hub.php';
|
||||
if (fxPromoteurHubComUsesV2($infoCompte['com_id'])) {
|
||||
header('Location: ' . fxPromoteurHubUrl($strLangue));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
//header("Location: " . $vDomaine . '/' . $strPage);
|
||||
header("Location: " . fxGetReferer());
|
||||
}
|
||||
@ -1477,7 +1485,13 @@ function fxShowMenuCompte($arrCompteClient, $strLangue)
|
||||
';
|
||||
}
|
||||
|
||||
// menu promoteur
|
||||
// menu promoteur v2 (hub) — comptes migres uniquement
|
||||
if (!function_exists('fxPromoteurHubComUsesV2')) {
|
||||
require_once dirname(__FILE__) . '/inc_fx_promoteur_hub.php';
|
||||
}
|
||||
$strRetour .= fxShowPromoteurHubMenuLink($arrCompteClient, $strLangue);
|
||||
|
||||
// menu promoteur legacy
|
||||
|
||||
if (trim($arrCompteClient['com_eve_promoteur']) != '' || trim($arrCompteClient['com_rapports']) != '') { // si le compte client a des événements dont il est le promoteur
|
||||
$arrEvePromoteur = explode(',', $arrCompteClient['com_eve_promoteur']);
|
||||
|
||||
411
php/inc_fx_promoteur_hub.php
Normal file
411
php/inc_fx_promoteur_hub.php
Normal file
@ -0,0 +1,411 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Hub promoteur — comptes migres acces evenement v2 uniquement.
|
||||
* Legacy (com_eve_promoteur) : comportement inchange, pas de hub.
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/inc_fx_eve_acces.php';
|
||||
|
||||
function fxPromoteurHubComUsesV2($intComId)
|
||||
{
|
||||
return fxEveAccesComHasV2(intval($intComId));
|
||||
}
|
||||
|
||||
function fxPromoteurHubUrl($strLangue = 'fr')
|
||||
{
|
||||
global $vDomaine;
|
||||
|
||||
return $vDomaine . ($strLangue === 'fr' ? '/compte/promoteur' : '/account/promoteur');
|
||||
}
|
||||
|
||||
function fxPromoteurHubParticipantUrl($strLangue = 'fr')
|
||||
{
|
||||
global $vDomaine;
|
||||
|
||||
return $vDomaine . ($strLangue === 'fr' ? '/compte/accueil' : '/account/accueil');
|
||||
}
|
||||
|
||||
function fxPromoteurHubPromoteurTableUrl($intEveId, $strLangue = 'fr')
|
||||
{
|
||||
global $vDomaine;
|
||||
|
||||
$strBase = ($strLangue === 'fr') ? '/compte/inc_tableau_promoteur' : '/account/inc_tableau_promoteur';
|
||||
|
||||
return $vDomaine . $strBase . '?promoteur_eve_id=' . urlencode(base64_encode(intval($intEveId)));
|
||||
}
|
||||
|
||||
function fxPromoteurHubPermKeysWeb()
|
||||
{
|
||||
return array(
|
||||
'inscriptions.view',
|
||||
'inscriptions.edit',
|
||||
'dossards.view',
|
||||
'dossards.manage',
|
||||
'epreuves.view',
|
||||
'epreuves.edit_qte',
|
||||
'rabais.view',
|
||||
'rabais.manage',
|
||||
'emails.send',
|
||||
'reports.chrono',
|
||||
'reports.finances',
|
||||
'reports.finances_membership',
|
||||
'reports.finances_events',
|
||||
'reports.payments',
|
||||
'reports.adhesions',
|
||||
'reports.adhesions_sales',
|
||||
'reports.finances_captains',
|
||||
'reports.custom',
|
||||
'team.view',
|
||||
'team.invite',
|
||||
'team.manage',
|
||||
);
|
||||
}
|
||||
|
||||
function fxPromoteurHubCanAccessPromoteurWeb($intComId, $intEveId)
|
||||
{
|
||||
if (!function_exists('fxIsPromoteur')) {
|
||||
require_once __DIR__ . '/inc_fonctions.php';
|
||||
}
|
||||
|
||||
if (fxIsPromoteur(intval($intComId), intval($intEveId))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!fxEveAccesComHasV2ForEvent(intval($intComId), intval($intEveId))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return fxEveAccesHasAnyPermission(intval($intComId), intval($intEveId), fxPromoteurHubPermKeysWeb());
|
||||
}
|
||||
|
||||
function fxPromoteurHubParseDateTs($strDate)
|
||||
{
|
||||
$strDate = trim((string)$strDate);
|
||||
|
||||
if ($strDate === '' || strpos($strDate, '0000-00-00') === 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return strtotime(substr($strDate, 0, 10));
|
||||
}
|
||||
|
||||
function fxPromoteurHubHighlightUntilTs($strDateDebut, $strDateFin)
|
||||
{
|
||||
$intDebut = fxPromoteurHubParseDateTs($strDateDebut);
|
||||
$intFin = fxPromoteurHubParseDateTs($strDateFin);
|
||||
$intRef = ($intFin > 0) ? max($intDebut, $intFin) : $intDebut;
|
||||
|
||||
if ($intRef <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return strtotime('+14 days', $intRef);
|
||||
}
|
||||
|
||||
function fxPromoteurHubFormatEventDate($arrEvent, $strLangue)
|
||||
{
|
||||
$strDebut = trim($arrEvent['eve_date_debut'] ?? '');
|
||||
$strFin = trim($arrEvent['eve_date_fin'] ?? '');
|
||||
|
||||
if ($strDebut === '' || strpos($strDebut, '0000-00-00') === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$strFmtDebut = date('Y-m-d', fxPromoteurHubParseDateTs($strDebut));
|
||||
$intFin = fxPromoteurHubParseDateTs($strFin);
|
||||
|
||||
if ($intFin <= 0 || $strFmtDebut === date('Y-m-d', $intFin)) {
|
||||
return $strFmtDebut;
|
||||
}
|
||||
|
||||
return $strFmtDebut . ' — ' . date('Y-m-d', $intFin);
|
||||
}
|
||||
|
||||
function fxPromoteurHubGetRoleLabelsByEvent($intComId)
|
||||
{
|
||||
global $objDatabase;
|
||||
|
||||
$arrByEve = array();
|
||||
$tabRows = fxEveAccesListByComId(intval($intComId));
|
||||
|
||||
if (!is_array($tabRows)) {
|
||||
return $arrByEve;
|
||||
}
|
||||
|
||||
for ($i = 1; $i <= count($tabRows); $i++) {
|
||||
$row = $tabRows[$i];
|
||||
if (($row['ea_statut'] ?? '') !== 'actif') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$intEveId = intval($row['eve_id'] ?? 0);
|
||||
if ($intEveId <= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$strLabel = trim($row['role_label_fr'] ?? '');
|
||||
if ($strLabel === '') {
|
||||
$strLabel = trim($row['role_code'] ?? '');
|
||||
}
|
||||
|
||||
if ($strLabel === '') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($arrByEve[$intEveId])) {
|
||||
$arrByEve[$intEveId] = array();
|
||||
}
|
||||
|
||||
if (!in_array($strLabel, $arrByEve[$intEveId], true)) {
|
||||
$arrByEve[$intEveId][] = $strLabel;
|
||||
}
|
||||
}
|
||||
|
||||
return $arrByEve;
|
||||
}
|
||||
|
||||
function fxPromoteurHubGetEvents($intComId, $strLangue = 'fr')
|
||||
{
|
||||
global $objDatabase, $vDomaine, $vRepertoireFichiers;
|
||||
|
||||
$arrHighlight = array();
|
||||
$arrArchived = array();
|
||||
$arrEventIds = fxEveAccesGetEventIds(intval($intComId));
|
||||
|
||||
if (empty($arrEventIds)) {
|
||||
return array('highlight' => $arrHighlight, 'archived' => $arrArchived);
|
||||
}
|
||||
|
||||
$arrIds = array_values(array_unique(array_filter(array_map('intval', $arrEventIds), function ($v) {
|
||||
return $v > 0;
|
||||
})));
|
||||
|
||||
if (empty($arrIds)) {
|
||||
return array('highlight' => $arrHighlight, 'archived' => $arrArchived);
|
||||
}
|
||||
|
||||
$strLang = in_array($strLangue, array('fr', 'en'), true) ? $strLangue : 'fr';
|
||||
$strAlt = ($strLang === 'fr') ? 'en' : 'fr';
|
||||
$arrRoles = fxPromoteurHubGetRoleLabelsByEvent(intval($intComId));
|
||||
$intToday = strtotime(date('Y-m-d'));
|
||||
|
||||
$sql = "
|
||||
SELECT e.eve_id, e.eve_nom_fr, e.eve_nom_en, e.eve_date_debut, e.eve_date_fin,
|
||||
e.eve_lieu_fr, e.eve_lieu_en, e.eve_photo_fr, e.eve_photo_en,
|
||||
t.te_icone
|
||||
FROM inscriptions_evenements e
|
||||
JOIN inscriptions_types_evenements t ON t.te_id = e.te_id
|
||||
WHERE e.eve_actif = 1
|
||||
AND e.eve_id IN (" . implode(',', $arrIds) . ")
|
||||
ORDER BY e.eve_date_debut ASC, e.eve_nom_fr ASC
|
||||
";
|
||||
$tabEvents = $objDatabase->fxGetResults($sql);
|
||||
|
||||
if (!is_array($tabEvents)) {
|
||||
return array('highlight' => $arrHighlight, 'archived' => $arrArchived);
|
||||
}
|
||||
|
||||
for ($i = 1; $i <= count($tabEvents); $i++) {
|
||||
$row = $tabEvents[$i];
|
||||
$intEveId = intval($row['eve_id']);
|
||||
$strNom = trim($row['eve_nom_' . $strLang] ?? '');
|
||||
|
||||
if ($strNom === '') {
|
||||
$strNom = trim($row['eve_nom_' . $strAlt] ?? '');
|
||||
}
|
||||
|
||||
$strLieu = trim($row['eve_lieu_' . $strLang] ?? '');
|
||||
if ($strLieu === '') {
|
||||
$strLieu = trim($row['eve_lieu_' . $strAlt] ?? '');
|
||||
}
|
||||
|
||||
if (intval($row['eve_id']) === 175 && trim($row['eve_photo_' . $strLang] ?? '') !== '') {
|
||||
$strIcon = $vDomaine . $vRepertoireFichiers . '/images/evenements/' . $row['eve_photo_' . $strLang];
|
||||
} else {
|
||||
$strIcon = $vDomaine . '/images/' . ($row['te_icone'] ?? '');
|
||||
}
|
||||
|
||||
$intHighlightUntil = fxPromoteurHubHighlightUntilTs($row['eve_date_debut'] ?? '', $row['eve_date_fin'] ?? '');
|
||||
$blnHighlight = ($intHighlightUntil <= 0) || ($intToday <= $intHighlightUntil);
|
||||
|
||||
$arrItem = array(
|
||||
'eve_id' => $intEveId,
|
||||
'nom' => $strNom,
|
||||
'lieu' => $strLieu,
|
||||
'date_label' => fxPromoteurHubFormatEventDate($row, $strLang),
|
||||
'ts_debut' => fxPromoteurHubParseDateTs($row['eve_date_debut'] ?? ''),
|
||||
'icon' => $strIcon,
|
||||
'roles' => $arrRoles[$intEveId] ?? array(),
|
||||
'url_promoteur' => fxPromoteurHubCanAccessPromoteurWeb($intComId, $intEveId)
|
||||
? fxPromoteurHubPromoteurTableUrl($intEveId, $strLang)
|
||||
: '',
|
||||
'url_mobile' => '',
|
||||
);
|
||||
|
||||
if (!function_exists('fxInscrMobileCanAccess')) {
|
||||
require_once __DIR__ . '/inc_fx_inscriptions_mobile.php';
|
||||
}
|
||||
|
||||
if (fxInscrMobileCanAccess(intval($intComId), $intEveId)) {
|
||||
$arrItem['url_mobile'] = fxInscrMobileBaseUrl($strLang, false)
|
||||
. '?promoteur_eve_id=' . urlencode(base64_encode($intEveId));
|
||||
}
|
||||
|
||||
if ($blnHighlight) {
|
||||
$arrHighlight[] = $arrItem;
|
||||
} else {
|
||||
$arrArchived[] = $arrItem;
|
||||
}
|
||||
}
|
||||
|
||||
usort($arrHighlight, function ($a, $b) {
|
||||
$ta = intval($a['ts_debut'] ?? 0);
|
||||
$tb = intval($b['ts_debut'] ?? 0);
|
||||
if ($ta === $tb) {
|
||||
return strcasecmp($a['nom'], $b['nom']);
|
||||
}
|
||||
if ($ta <= 0) {
|
||||
return 1;
|
||||
}
|
||||
if ($tb <= 0) {
|
||||
return -1;
|
||||
}
|
||||
return $ta <=> $tb;
|
||||
});
|
||||
|
||||
usort($arrArchived, function ($a, $b) {
|
||||
$ta = intval($a['ts_debut'] ?? 0);
|
||||
$tb = intval($b['ts_debut'] ?? 0);
|
||||
if ($ta === $tb) {
|
||||
return strcasecmp($b['nom'], $a['nom']);
|
||||
}
|
||||
return $tb <=> $ta;
|
||||
});
|
||||
|
||||
return array('highlight' => $arrHighlight, 'archived' => $arrArchived);
|
||||
}
|
||||
|
||||
function fxPromoteurHubEsc($str)
|
||||
{
|
||||
return htmlspecialchars((string)$str, ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
|
||||
function fxPromoteurHubRenderEventCard($arrItem, $strLangue, $blnArchived = false)
|
||||
{
|
||||
$strCardClass = 'card box_participant mb-3' . ($blnArchived ? ' promoteur-hub-card-archived' : '');
|
||||
|
||||
$html = '<div class="' . fxPromoteurHubEsc($strCardClass) . '">';
|
||||
$html .= '<div class="card-header d-flex align-items-center flex-wrap">';
|
||||
$html .= '<div class="p-2 mr-2 bg-white d-inline-block"><img src="' . fxPromoteurHubEsc($arrItem['icon']) . '" width="64" alt=""></div>';
|
||||
$html .= '<div class="flex-grow-1">';
|
||||
$html .= '<h2 class="h5 mb-1">' . fxPromoteurHubEsc($arrItem['nom']) . '</h2>';
|
||||
|
||||
if ($arrItem['date_label'] !== '') {
|
||||
$html .= '<div class="text-muted small"><i class="fa fa-calendar-o mr-1" aria-hidden="true"></i>' . fxPromoteurHubEsc($arrItem['date_label']) . '</div>';
|
||||
}
|
||||
|
||||
if ($arrItem['lieu'] !== '') {
|
||||
$html .= '<div class="text-muted small"><i class="fa fa-map-marker mr-1" aria-hidden="true"></i>' . fxPromoteurHubEsc($arrItem['lieu']) . '</div>';
|
||||
}
|
||||
|
||||
if (!empty($arrItem['roles'])) {
|
||||
$html .= '<div class="small mt-1">' . fxPromoteurHubEsc(implode(' · ', $arrItem['roles'])) . '</div>';
|
||||
}
|
||||
|
||||
$html .= '</div></div>';
|
||||
$html .= '<div class="card-body">';
|
||||
|
||||
if ($arrItem['url_promoteur'] !== '') {
|
||||
$html .= '<a class="btn btn-primary rounded-pill mr-2 mb-2" href="' . fxPromoteurHubEsc($arrItem['url_promoteur']) . '">';
|
||||
$html .= '<i class="fa fa-tachometer mr-2" aria-hidden="true"></i>' . fxPromoteurHubEsc(afficheTexte('promoteur_hub_btn_tableau', 0));
|
||||
$html .= '</a>';
|
||||
}
|
||||
|
||||
if ($arrItem['url_mobile'] !== '') {
|
||||
$html .= '<a class="btn btn-outline-primary rounded-pill mr-2 mb-2" href="' . fxPromoteurHubEsc($arrItem['url_mobile']) . '">';
|
||||
$html .= '<i class="fa fa-mobile mr-2" aria-hidden="true"></i>' . fxPromoteurHubEsc(afficheTexte('promoteur_hub_btn_mobile', 0));
|
||||
$html .= '</a>';
|
||||
}
|
||||
|
||||
$html .= '</div></div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function fxPromoteurHubRenderEventSection($arrItems, $strTitleClef, $strLangue, $blnArchived = false)
|
||||
{
|
||||
if (empty($arrItems)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$html = '<h2 class="h4 mt-4 mb-3">' . fxPromoteurHubEsc(afficheTexte($strTitleClef, 0)) . '</h2>';
|
||||
$html .= '<div class="promoteur promoteur-hub-events">';
|
||||
|
||||
foreach ($arrItems as $arrItem) {
|
||||
$html .= fxPromoteurHubRenderEventCard($arrItem, $strLangue, $blnArchived);
|
||||
}
|
||||
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function fxShowPromoteurHub($intComId, $strLangue = 'fr')
|
||||
{
|
||||
$arrBuckets = fxPromoteurHubGetEvents(intval($intComId), $strLangue);
|
||||
$html = '';
|
||||
|
||||
$html .= '<div class="promoteur-hub-toolbar mb-4 d-flex flex-wrap align-items-center justify-content-between">';
|
||||
$html .= '<p class="mb-2 mb-md-0 text-muted">' . fxPromoteurHubEsc(afficheTexte('promoteur_hub_intro', 0)) . '</p>';
|
||||
$html .= '<a class="btn btn-outline-secondary rounded-pill" href="' . fxPromoteurHubEsc(fxPromoteurHubParticipantUrl($strLangue)) . '">';
|
||||
$html .= '<i class="fa fa-user mr-2" aria-hidden="true"></i>' . fxPromoteurHubEsc(afficheTexte('promoteur_hub_link_participant', 0));
|
||||
$html .= '</a>';
|
||||
$html .= '</div>';
|
||||
|
||||
if (function_exists('fxDocRenderBlock')) {
|
||||
$strDoc = fxDocRenderBlock('promoteur_hub_annonces');
|
||||
if ($strDoc !== '') {
|
||||
$html .= '<div class="promoteur-hub-annonces alert alert-info d-flex align-items-start mb-4">';
|
||||
$html .= '<div class="flex-grow-1 mr-2">' . fxPromoteurHubEsc(afficheTexte('promoteur_hub_annonces_titre', 0)) . '</div>';
|
||||
$html .= $strDoc;
|
||||
$html .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$html .= fxPromoteurHubRenderEventSection($arrBuckets['highlight'], 'promoteur_hub_section_highlight', $strLangue, false);
|
||||
$html .= fxPromoteurHubRenderEventSection($arrBuckets['archived'], 'promoteur_hub_section_archived', $strLangue, true);
|
||||
|
||||
if (empty($arrBuckets['highlight']) && empty($arrBuckets['archived'])) {
|
||||
$html .= '<div class="alert alert-warning">' . fxPromoteurHubEsc(afficheTexte('promoteur_hub_empty', 0)) . '</div>';
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function fxShowPromoteurHubMenuLink($arrCompteClient, $strLangue)
|
||||
{
|
||||
global $vDomaine;
|
||||
|
||||
if (!fxPromoteurHubComUsesV2(intval($arrCompteClient['com_id'] ?? 0))) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$arrIds = fxEveAccesGetEventIds(intval($arrCompteClient['com_id']));
|
||||
$intNb = count($arrIds);
|
||||
$strNb = '';
|
||||
|
||||
if ($intNb > 0) {
|
||||
$strNb = '<small>(' . $intNb . ' ';
|
||||
$strNb .= ($intNb > 1) ? afficheTexte('compte_evenement_pluriel', 0) : afficheTexte('compte_evenement_singulier', 0);
|
||||
$strNb .= ')</small>';
|
||||
}
|
||||
|
||||
return '
|
||||
<li class="nav-item">
|
||||
<a class="nav-list" href="' . fxPromoteurHubEsc(fxPromoteurHubUrl($strLangue)) . '">
|
||||
<i class="fa fa-tachometer" aria-hidden="true"></i> ' . fxPromoteurHubEsc(afficheTexte('promoteur_hub_menu', 0)) . $strNb . '
|
||||
</a>
|
||||
</li>
|
||||
';
|
||||
}
|
||||
@ -7,8 +7,8 @@
|
||||
* Constantes *
|
||||
*
|
||||
**************/
|
||||
define('_VERSION_CODE', '4.72.699');
|
||||
define('_DATE_CODE', '2026-06-22');
|
||||
define('_VERSION_CODE', '4.72.700');
|
||||
define('_DATE_CODE', '2026-06-25');
|
||||
//MSIN-4290
|
||||
define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');
|
||||
// Outil temporaire ms1_kc_set.php — modifier key_chain_http (lien /kc/{pk}/)
|
||||
|
||||
51
sql/MSIN-promoteur-hub-phase1.sql
Normal file
51
sql/MSIN-promoteur-hub-phase1.sql
Normal file
@ -0,0 +1,51 @@
|
||||
-- Hub promoteur — page compte + libelles (acces v2 uniquement)
|
||||
SET NAMES utf8mb4;
|
||||
|
||||
DELETE FROM inscriptions_pages WHERE pag_code = 'compte_promoteur_hub';
|
||||
|
||||
INSERT INTO inscriptions_pages (
|
||||
pag_code, pag_label_fr, pag_label_en,
|
||||
pag_titre_fr, pag_titre_en,
|
||||
pag_texte_fr, pag_texte_en,
|
||||
pag_keywords_fr, pag_keywords_en,
|
||||
pag_tri, pag_maj, pag_menu, pag_actif
|
||||
) VALUES (
|
||||
'compte_promoteur_hub',
|
||||
'Promoteur', 'Promoter',
|
||||
'Mes evenements', 'My events',
|
||||
'', '',
|
||||
'', '',
|
||||
0, NOW(), 0, 1
|
||||
);
|
||||
|
||||
DELETE FROM info WHERE info_clef IN (
|
||||
'promoteur_hub_menu',
|
||||
'promoteur_hub_intro',
|
||||
'promoteur_hub_link_participant',
|
||||
'promoteur_hub_annonces_titre',
|
||||
'promoteur_hub_section_highlight',
|
||||
'promoteur_hub_section_archived',
|
||||
'promoteur_hub_btn_tableau',
|
||||
'promoteur_hub_btn_mobile',
|
||||
'promoteur_hub_empty'
|
||||
) AND info_prg = 'compte.php';
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES
|
||||
('promoteur_hub_menu', 'fr', 'Mes evenements (promoteur)', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_menu', 'en', 'My events (promoter)', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_intro', 'fr', 'Acces a vos tableaux de bord par evenement.', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_intro', 'en', 'Access your event dashboards.', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_link_participant', 'fr', 'Mon espace participant', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_link_participant', 'en', 'My participant space', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_annonces_titre', 'fr', 'Nouveautes MS1', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_annonces_titre', 'en', 'MS1 updates', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_section_highlight', 'fr', 'En vedette', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_section_highlight', 'en', 'Highlights', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_section_archived', 'fr', 'Evenements passes', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_section_archived', 'en', 'Past events', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_btn_tableau', 'fr', 'Tableau de bord', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_btn_tableau', 'en', 'Dashboard', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_btn_mobile', 'fr', 'Inscriptions mobile', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_btn_mobile', 'en', 'Mobile registrations', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_empty', 'fr', 'Aucun evenement accessible pour le moment.', '', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('promoteur_hub_empty', 'en', 'No accessible events at this time.', '', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
Reference in New Issue
Block a user