This commit refines the promoteur hub integration by replacing the existing function `fxPromoteurHubComUsesV2` with `fxPromoteurHubShouldUse`, which combines access checks and page existence validation. It updates the account management logic to ensure proper redirects based on the new checks, enhancing the user experience for promoteur hub accounts. Additionally, it introduces a new function to verify the existence of the promoteur hub page, streamlining the access management process.
857 lines
37 KiB
PHP
857 lines
37 KiB
PHP
<?php
|
|
|
|
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_code_qr.php');
|
|
require_once("php/inc_fx_modifierinscriptions.php");
|
|
require_once('php/inc_fx_transferts.php');
|
|
|
|
|
|
require_once('php/inc_fx_affilies.php');
|
|
require_once('php/inc_fx_memberships.php');
|
|
|
|
//require_once('php/inc_fx_montants_dus.php');
|
|
require_once('superadm/php/inc_manager.php');
|
|
|
|
require_once('php/inc_dons.php');
|
|
|
|
require_once('php/inc_logs_course.php');
|
|
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
|
|
|
|
// si on clique le bouton supprimer rabais
|
|
foreach (array_keys($_POST) as $strValue) {
|
|
if (strstr($strValue, 'btn_delete_')) {
|
|
|
|
$tabSubtablesDel = fxGetMenussuperadm('', base64_decode(urldecode($intMenu)));
|
|
|
|
for ($intCtr = 1; $intCtr <= count($tabSubtablesDel); $intCtr++) {
|
|
if (isset($_POST['chk_' . $tabSubtablesDel[$intCtr]['men_id']]))
|
|
fxSetForm('del', urlencode(base64_encode(fxUnescape($tabSubtablesDel[$intCtr]['men_id']))), $_POST, '');
|
|
}
|
|
}
|
|
}
|
|
|
|
if (!empty($_GET['autologin']))
|
|
$autologin = $_GET['autologin'];
|
|
else
|
|
$autologin = false;
|
|
|
|
if (!empty($_GET['lang']))
|
|
$strLangue = $_GET['lang'];
|
|
else
|
|
$strLangue = 'fr';
|
|
|
|
|
|
if (!empty($_GET['code']))
|
|
$strCode = 'compte_' . $_GET['code'];
|
|
else {
|
|
if (isset($_SESSION['com_id'])) {
|
|
if (fxPromoteurHubShouldUse($_SESSION['com_id'])) {
|
|
$strCode = 'compte_promoteur_hub';
|
|
} else {
|
|
$strCode = 'compte_accueil';
|
|
}
|
|
} else {
|
|
$strCode = 'compte_login';
|
|
}
|
|
}
|
|
|
|
if ($strCode === 'compte_promoteur_hub' && (!isset($_SESSION['com_id']) || !fxPromoteurHubShouldUse($_SESSION['com_id']))) {
|
|
header('Location: ' . $vDomaine . '/' . ($strLangue === 'fr' ? 'compte' : 'account'));
|
|
exit;
|
|
}
|
|
|
|
$recPage = fxGetPage($strCode);
|
|
|
|
if (count($recPage) < 1) {
|
|
header('Location: index.php');
|
|
exit;
|
|
}
|
|
|
|
if ($strLangue == 'fr')
|
|
$strPage = 'compte';
|
|
else
|
|
$strPage = 'account';
|
|
// msin-4148
|
|
if (!empty($_GET['a']) && $_GET['code'] != 'bib_assignment') {
|
|
$strCode = $_GET['a'];
|
|
}
|
|
|
|
// empêcher d'accéder à une page où il faut être loggé et qu'on ne l'est pas
|
|
if (($strCode != "compte_login" && $strCode != "compte_motdepasse" && $strCode != "compte_nouveau" && $strCode != "compte_reset" && !isset($_SESSION['com_id'])) || (($strCode == "compte_login" || $strCode == "compte_motdepasse" || $strCode == "compte_nouveau" || $strCode == "compte_reset") && isset($_SESSION['com_id']))) {
|
|
|
|
|
|
|
|
/// MSIN-4339 Sauvegarder l'URL demandée
|
|
$_SESSION['redirect_after_login'] = $_SERVER['REQUEST_URI'];
|
|
|
|
header('Location: ' . $vDomaine . '/' . $strPage);
|
|
|
|
exit;
|
|
}
|
|
|
|
|
|
// script pour certaine page
|
|
$footer_script = false;
|
|
if ((!empty($_GET['reloadinf']) && isset($_POST['btn_mod']))) {
|
|
$sqlCourriel = "SELECT * FROM inscriptions_comptes WHERE com_login = '" . $_SESSION['com_info']['com_login'] . "'";
|
|
$infoCompte = $objDatabase->fxGetRow($sqlCourriel);
|
|
|
|
$_SESSION['com_id'] = $infoCompte['com_id'];
|
|
$_SESSION['com_prenom'] = $infoCompte['com_prenom'];
|
|
$_SESSION['vadmin_texte'] = false;
|
|
$_SESSION['com_info'] = $infoCompte;
|
|
// liste des compte affilie
|
|
$infoAffilie = fxGetInfosAffilies($_SESSION['com_id']);
|
|
$_SESSION['com_affilie'] = $infoAffilie;
|
|
|
|
// metre dans l'info compte la liste des evenement prive
|
|
$_SESSION['com_info']['eve_prive'] = explode(',', $infoCompte['com_eve_prive']);
|
|
|
|
header('Location: ' . $vDomaine . '/' . $strPage);
|
|
exit;
|
|
}
|
|
if (!empty($_GET['mr_id'])) {
|
|
$mr_id = base64_decode(urldecode($_GET['mr_id']));
|
|
$com_id = base64_decode(urldecode($_GET['com_id']));
|
|
// echo($mr_id);echo("<br>");
|
|
// echo($com_id);
|
|
$compte = fxGetAbonnements($com_id);
|
|
|
|
// print_r($compte[1] );
|
|
|
|
fxSendQuestionpasserdate($compte[1], $mr_id);
|
|
|
|
$intEveId = base64_decode(urldecode($_GET['promoteur_eve_id']));
|
|
header('Location: ' . $vDomaine . '/' . $strPage . "/inc_tableau_mail_questions?promoteur_eve_id=" . urlencode(base64_encode($intEveId)));
|
|
exit;
|
|
}
|
|
|
|
$vtexte_page = obtenirTextepage($vPage, $strLangue, 2);
|
|
|
|
if (isset($_POST['btn_excel_top']) || isset($_POST['btn_excel_bot'])) {
|
|
require_once('superadm/php/inc_fx_excell.php');
|
|
|
|
$arrMembres = fxGetMembresClub($_POST['mem_numero'], 1);
|
|
|
|
$headers = [afficheTexte('memberships_prenom'), afficheTexte('memberships_nom'), afficheTexte('memberships_courriel'), afficheTexte('memberships_no'), afficheTexte('memberships_date_de'), afficheTexte('memberships_a'), afficheTexte('memberships_affilie')];
|
|
$memexcfichier = 'membres';
|
|
$memexctitre = 'membres';
|
|
|
|
fxrapportexcell_array($headers, $arrMembres, $memexcfichier, $memexctitre);
|
|
|
|
}
|
|
|
|
if (isset($_POST['btn_excel_top_echues']) || isset($_POST['btn_excel_bot_echues'])) {
|
|
require_once('superadm/php/inc_fx_excell.php');
|
|
error_reporting(1);
|
|
|
|
$mem_sqlQuestions = fxquestionechusql("", 1);
|
|
|
|
|
|
$headers = [afficheTexte('questions_mail_tq'), afficheTexte('questions_mail_nom'), afficheTexte('questions_mail_courriel'), afficheTexte('questions_mail_question_echue'), afficheTexte('questions_mail'), afficheTexte('questions_mail_tel'), afficheTexte('questions_mail_eche_adh'), afficheTexte('questions_mail_datedernierrap'), afficheTexte('questions_mail_rappel')];
|
|
$memexcfichier = 'questions_echues';
|
|
$memexctitre = 'questions échues entraineur';
|
|
|
|
fxrapportexcell_array($headers, $mem_sqlQuestions, $memexcfichier, $memexctitre);
|
|
|
|
}
|
|
if (isset($_POST['download']) && $_POST['download'] == 'excel' && $strCode == "compte_inc_tableau_liste_attente") {
|
|
$intEveId = base64_decode(urldecode($_GET['promoteur_eve_id']));
|
|
$intEveIdbase = $intEveId;
|
|
$arrEvenement = fxGetEvenementsId($intEveId);
|
|
$inteprId = base64_decode(urldecode($_GET['epr_id']));
|
|
$tabEpreuve = fxGetEpreuve($inteprId);
|
|
if (isset($_POST['strwhere']))
|
|
$strwhere = $_POST['strwhere'];
|
|
else
|
|
$strorder = "";
|
|
if (isset($_POST['strorder']))
|
|
$strorder = $_POST['strorder'];
|
|
else
|
|
$strorder = "";
|
|
|
|
$intmenu = urlencode(base64_encode(251));
|
|
$mement = [strip_tags($arrEvenement["eve_nom_" . $strLangue]), ' ', strip_tags($tabEpreuve["epr_categorie_" . $strLangue]), strip_tags($tabEpreuve["epr_type_" . $strLangue]), strip_tags($tabEpreuve["epr_nom_" . $strLangue])];
|
|
|
|
|
|
fxrapportexcell2($intmenu, $strLangue, $strorder, $strwhere, $mement);
|
|
}
|
|
|
|
$strLienFr = "/compte/" . str_replace('compte_', '', $strCode);
|
|
$strLienEn = "/account/" . str_replace('compte_', '', $strCode);
|
|
|
|
if (isset($_GET['valider']))
|
|
fxValiderCompte($strLangue);
|
|
if (isset($_GET['promoteur_eve_id'])) {
|
|
|
|
$intEveId = base64_decode(urldecode($_GET['promoteur_eve_id']));
|
|
$intEveIdbase = $intEveId;
|
|
$arrEvenement = fxGetEvenementsId($intEveId);
|
|
//5$tabEvenement['general'] = $arrEvenement;
|
|
$strSousTitre = '<br><small class="text-muted">' . fxUnescape($arrEvenement['eve_nom_' . $strLangue]) . '</small>';
|
|
|
|
}
|
|
|
|
|
|
if (!empty($_POST['form_action'])) {
|
|
|
|
|
|
$strAction = base64_decode(urldecode($_POST['form_action']));
|
|
if (isset($_POST['form_action_encode'])) {
|
|
$strAction = base64_decode(urldecode($_POST['form_action_encode']));
|
|
}
|
|
|
|
switch ($strCode) {
|
|
case 'compte_inc_tableau_liste_attente':
|
|
|
|
switch ($strAction) {
|
|
case 'mod':
|
|
|
|
if (!empty($_GET['t']))
|
|
$intMenu = $_GET['t'];
|
|
else
|
|
$intMenu = 0;
|
|
$_POST['eve_id'] = $intEveId;
|
|
|
|
$int_menu = base64_encode(urlencode(250));
|
|
|
|
|
|
fxSetForm($_POST['form_action'], $int_menu, $_POST, $_FILES, 1, 0);
|
|
|
|
$intepr_id = base64_encode(urlencode($_POST["epr_id"]));
|
|
$intEveId = base64_encode(urlencode($_POST['eve_id']));
|
|
|
|
|
|
// header('Location: ' . $vDomaine . '/' . $strPage . "/inc_tableau_epreuves?epr_id=".$intepr_id."&promoteur_eve_id=" . $intEveId);
|
|
|
|
break;
|
|
}
|
|
break;
|
|
default:
|
|
switch ($strAction) {
|
|
case 'login':
|
|
|
|
fxLoginCompte($_POST, $strLangue);
|
|
|
|
|
|
break;
|
|
case 'password':
|
|
fxCourrielPerduCompte($strLangue);
|
|
break;
|
|
case 'add-compte':
|
|
case 'checkout-compte':
|
|
if ($_POST['com_password_a'] == $_POST['com_password_b'])
|
|
$_POST['com_password'] = $_POST['com_password_a'];
|
|
|
|
$_POST['com_login'] = $_POST['com_courriel'];
|
|
|
|
fxSetCompte('add', '', $_POST, $strLangue);
|
|
break;
|
|
case 'addaffilie-compte':
|
|
fxSetCompte('addaffilie', '', $_POST, $strLangue);
|
|
exit;
|
|
break;
|
|
case 'mod-compte':
|
|
$_POST['com_login'] = $_POST['com_courriel'];
|
|
|
|
if (trim($_POST['com_courriel']) == '') {
|
|
unset($_POST['com_courriel']);
|
|
unset($_POST['com_login']);
|
|
}
|
|
|
|
if ($_POST['com_password_a'] == $_POST['com_password_b'])
|
|
$_POST['com_password'] = $_POST['com_password_a'];
|
|
|
|
if (trim($_POST['com_password']) == '')
|
|
unset($_POST['com_password']);
|
|
|
|
fxSetCompte('mod', '', $_POST, $strLangue);
|
|
break;
|
|
case 'reset':
|
|
fxResetPassword($_POST, $strLangue);
|
|
break;
|
|
case 'list':
|
|
case 'mod':
|
|
case 'add':
|
|
//
|
|
if (!empty($_GET['t']))
|
|
$intMenu = $_GET['t'];
|
|
else
|
|
$intMenu = 0;
|
|
$_POST['eve_id'] = $intEveId;
|
|
|
|
|
|
fxSetForm($_POST['form_action'], $intMenu, $_POST, $_FILES, 1);
|
|
|
|
|
|
$intEveId = base64_decode(urldecode($_GET['promoteur_eve_id']));
|
|
header('Location: ' . $vDomaine . '/' . $strPage . "/inc_tableau_rabais?promoteur_eve_id=" . urlencode(base64_encode($intEveId)));
|
|
exit;
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
// récupérer les détails de la page
|
|
|
|
|
|
$strSousTitre = '';
|
|
|
|
|
|
//if ($strCode == 'compte_inc_tableau_promoteur'|| $strCode == 'compte_inc_tableau_inscriptions') {
|
|
//if (strstr($strCode, "inc_tableau_") || $strCode='bibdd_assignment') {
|
|
|
|
|
|
if (isset($_GET['promoteur_eve_id'])) {
|
|
|
|
|
|
$intEveId = base64_decode(urldecode($_GET['promoteur_eve_id']));
|
|
$intEveIdbase = $intEveId;
|
|
if ($strCode === 'compte_inc_tableau_inscriptions_mobile') {
|
|
if (!fxInscrMobileCanAccess($_SESSION['com_id'], $intEveIdbase)) {
|
|
header('Location: ' . $vDomaine . '/' . $strPage);
|
|
exit;
|
|
}
|
|
} elseif ($strCode === 'compte_inc_tableau_gestion_epreuves') {
|
|
if (empty($_SESSION['usa_id'])
|
|
&& !fxEveAccesHasAnyPermission($_SESSION['com_id'] ?? 0, $intEveIdbase, array('dossards.manage', 'epreuves.edit_qte'))) {
|
|
header('Location: ' . $vDomaine . '/' . $strPage);
|
|
exit;
|
|
}
|
|
} elseif (!fxIsPromoteur($_SESSION['com_id'], $intEveIdbase)
|
|
&& !fxEveAccesComHasV2ForEvent($_SESSION['com_id'], $intEveIdbase)) {
|
|
header('Location: ' . $vDomaine . '/' . $strPage);
|
|
exit;
|
|
}
|
|
|
|
$arrEvenement = fxGetEvenementsId($intEveId);
|
|
//5$tabEvenement['general'] = $arrEvenement;
|
|
$strSousTitre = '<br><small class="text-muted">' . fxUnescape($arrEvenement['eve_nom_' . $strLangue]) . '</small>';
|
|
// $suite='compte/inc_tableau_promoteur?promoteur_eve_id='.$_GET['promoteur_eve_id'];
|
|
}
|
|
//}
|
|
|
|
if ($strCode == 'compte_affichecarte') {
|
|
$mem_sl_id = (isset($_GET['mem_id'])) ? $_GET['mem_id'] : 0;
|
|
$mem_sl_pec_id = (isset($_GET['mem_pec_id'])) ? $_GET['mem_pec_id'] : 0;
|
|
fxCarteAbonnements($mem_sl_id, $strLangue, $mem_sl_pec_id);
|
|
exit;
|
|
}
|
|
|
|
$strMetaTitle = fxRemoveHtml(fxUnescape($recPage['pag_titre_' . $strLangue]));
|
|
$strMetaDescription = fxRemoveHtml(fxUnescape($recPage['pag_description_' . $strLangue]));
|
|
$strMetaKeywords = fxRemoveHtml(fxUnescape($recPage['pag_keywords_' . $strLangue]));
|
|
$blnBoutonRetour = true;
|
|
$blnHideCompteTitle = false;
|
|
|
|
require_once("inc_header.php");
|
|
|
|
?>
|
|
<div id="page">
|
|
<div id="main">
|
|
<div class="container bg-white p-3 p-xl-5">
|
|
|
|
<?php
|
|
if (isset($recPage['pag_titre_' . $strLangue]) != '' && empty($blnHideCompteTitle)) {
|
|
?>
|
|
|
|
|
|
<h1 class="mb-3"><?php echo fxUnescape($recPage['pag_titre_' . $strLangue]) . $strSousTitre; ?></h1>
|
|
<?php
|
|
|
|
if (isset($recPage['pag_texte_' . $strLangue]) != '') {
|
|
echo '
|
|
<div class="mb-3">
|
|
' . fxUnescape($recPage['pag_texte_' . $strLangue]) . '
|
|
</div>
|
|
';
|
|
}
|
|
}
|
|
if (isset($_SESSION['msg'])) {
|
|
echo fxMessage($_SESSION['msg'], '', $strLangue);
|
|
} else if (empty($blnHideCompteTitle)) {
|
|
?>
|
|
<br>
|
|
<?php
|
|
}
|
|
|
|
|
|
if (!empty($_GET['a']) && $_GET['code'] != 'bib_assignment') {
|
|
$strCode = $_GET['a'];
|
|
}
|
|
|
|
switch ($strCode) {
|
|
case 'add':
|
|
|
|
// https://ms1inscriptiondev.interne.ca/compte/inc_tableau_rabais?promoteur_eve_id=OTQ3%20%20&lng=fr
|
|
if ($vblnEnvironementDev == 0) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case 'mod':
|
|
|
|
$blnBoutonRetour = false;
|
|
if (!empty($_GET['t']))
|
|
$intMenu = $_GET['t'];
|
|
else
|
|
$intMenu = 0;
|
|
$strhomeclient = "";
|
|
if (!empty($_GET['eve_id']))
|
|
$intEveId = $_GET['eve_id'];
|
|
else
|
|
$intEveId = 0;
|
|
|
|
fxShowForm($strCode, $intMenu, $strLangue, $intEveId);
|
|
break;
|
|
break;
|
|
case 'compte_modifiercompte':
|
|
// lire les données du compte
|
|
$sqlCompte = "SELECT * FROM inscriptions_comptes WHERE com_id = " . $_SESSION['com_id'];
|
|
$infoCompte = $objDatabase->fxGetRow($sqlCompte);
|
|
|
|
// préparer les champs spéciaux
|
|
$infoCompte['txt_password_a'] = $infoCompte['com_password'];
|
|
$infoCompte['txt_password_b'] = $infoCompte['com_password'];
|
|
|
|
//$infoCompte['txt_login'] = $infoCompte['com_login'];
|
|
$infoCompte['com_courriel_confirm'] = '';
|
|
$infoCompte['txt_courriel'] = $infoCompte['com_courriel'];
|
|
|
|
fxShowFormCompte($infoCompte, "mod", $strLangue);
|
|
break;
|
|
case 'compte_modifieraffilie':
|
|
// lire les données du compte
|
|
$mem_aff = $_SESSION['com_affilie'];
|
|
$mem_pk_aff = $mem_aff[$_GET['aff']]['com_id'];
|
|
|
|
|
|
$sqlCompte = "SELECT * FROM inscriptions_comptes WHERE com_id = " . $mem_pk_aff;
|
|
$infoCompte = $objDatabase->fxGetRow($sqlCompte);
|
|
|
|
// préparer les champs spéciaux
|
|
$infoCompte['txt_password_a'] = $infoCompte['com_password'];
|
|
$infoCompte['txt_password_b'] = $infoCompte['com_password'];
|
|
|
|
//$infoCompte['txt_login'] = $infoCompte['com_login'];
|
|
$infoCompte['com_courriel_confirm'] = '';
|
|
$infoCompte['txt_courriel'] = $infoCompte['com_courriel'];
|
|
|
|
fxShowFormCompte($infoCompte, "mod", $strLangue);
|
|
break;
|
|
case 'compte_gestionaffilie':
|
|
$strRetour = '
|
|
<ul class="nav flex-column ms1-menu-compte">
|
|
<li class="nav-item">
|
|
<a class="nav-list" href="' . $vDomaine . '/' . $strPage . '/nouveauaffilie"><i class="fa fa-user-plus" aria-hidden="true"></i> ' . afficheTexte('compte_nouveauaffilie_texte', 0) . '</a>
|
|
</li>
|
|
';
|
|
|
|
// affiche les compte affilie
|
|
if ($_SESSION['com_affilie'] != null) {
|
|
foreach ($_SESSION['com_affilie'] as $intCtr => $arrAff) {
|
|
$strRetour .= '
|
|
<li class="nav-item">
|
|
<a class="nav-list" href="' . $vDomaine . '/' . $strPage . '/modifieraffilie?aff=' . $intCtr . '"><i class="fa fa-user" aria-hidden="true"></i> ' . afficheTexte('compte_modifcompte_affilie_texte', 0) . ' - ' . $arrAff['com_prenom'] . '</a>
|
|
</li>
|
|
';
|
|
}
|
|
}
|
|
|
|
$strRetour .= '
|
|
</ul>
|
|
';
|
|
|
|
echo $strRetour;
|
|
break;
|
|
case 'compte_reset':
|
|
$blnBoutonRetour = false;
|
|
fxShowFormReset($_GET, $strLangue);
|
|
break;
|
|
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'])) { ?>
|
|
|
|
<a href="qr_test.php" target="_blank" class="btn btn-primary">
|
|
QR Test
|
|
</a>
|
|
|
|
<?php }
|
|
echo fxShowMenuCompte($_SESSION['com_info'], $strLangue);
|
|
|
|
break;
|
|
case 'compte_info_promoteur':
|
|
echo fxShowInfoPromoteur($_SESSION['com_info'], $strLangue);
|
|
break;
|
|
case 'compte_mes_defis':
|
|
$arrFormsLogSettings = $arrFormsAddLogs = array();
|
|
$arrCommandes = fxGetCommandes($_SESSION['com_info'], 3, $strLangue);
|
|
echo fxShowCommandes($arrCommandes['actives'], $_SESSION['com_info'], 3, $strLangue);
|
|
?>
|
|
<div class="bloc_archives">
|
|
<p>
|
|
<a class="more_link" href="#"><?php afficheTexte('comte_courses-terminées'); ?>
|
|
(<?php echo count($arrCommandes['terminées']); ?>) <span class="more_sign"><i
|
|
class="fa fa-plus" aria-hidden="true"></i></span></a>
|
|
</p>
|
|
<div class="more_block" style="display: none;">
|
|
<?php fxShowCommandes($arrCommandes['terminées'], $_SESSION['com_info'], 1, $strLangue); ?>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
/* $strCoursesTerminees = '
|
|
<p>
|
|
<a class="more_link" href="#">' . afficheTexte('comte_courses-terminées', 0) . ' (' . count($arrCommandes['terminées']) . ') <span class="more_sign"><i class="fa fa-plus" aria-hidden="true"></i></span></a>
|
|
</p>
|
|
<div class="more_block" style="display: none;">
|
|
' . fxShowCommandes($arrCommandes['terminées'], $_SESSION['com_info'], 1, $strLangue) . '
|
|
</div>
|
|
';
|
|
echo $strCoursesTerminees; */
|
|
break;
|
|
case 'compte_mon_benevolat':
|
|
$arrCommandes = fxGetCommandes($_SESSION['com_info'], 2, $strLangue);
|
|
echo fxShowCommandes($arrCommandes['actives'], $_SESSION['com_info'], 2, $strLangue);
|
|
?>
|
|
<div class="bloc_archives">
|
|
<p>
|
|
<a class="more_link" href="#"><?php afficheTexte('comte_courses-terminées'); ?>
|
|
(<?php echo count($arrCommandes['terminées']); ?>) <span class="more_sign"><i
|
|
class="fa fa-plus" aria-hidden="true"></i></span></a>
|
|
</p>
|
|
<div class="more_block" style="display: none;">
|
|
<?php fxShowCommandes($arrCommandes['terminées'], $_SESSION['com_info'], 1, $strLangue); ?>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
/* $strCoursesTerminees = '
|
|
<p>
|
|
<a class="more_link" href="#">' . afficheTexte('comte_courses-terminées', 0) . ' (' . count($arrCommandes['terminées']) . ') <span class="more_sign"><i class="fa fa-plus" aria-hidden="true"></i></span></a>
|
|
</p>
|
|
<div class="more_block" style="display: none;">
|
|
' . fxShowCommandes($arrCommandes['terminées'], $_SESSION['com_info'], 1, $strLangue) . '
|
|
</div>
|
|
';
|
|
echo $strCoursesTerminees; */
|
|
break;
|
|
case 'compte_mes_levees_fonds':
|
|
$arrFormsObjectifsDons = array();
|
|
$arrCommandes = fxGetCommandes($_SESSION['com_info'], 0, $strLangue);
|
|
echo fxShowLeveesFonds($arrCommandes['actives'], $strLangue);
|
|
?>
|
|
<div class="bloc_archives">
|
|
<p>
|
|
<a class="more_link" href="#"><?php afficheTexte('comte_courses-terminées'); ?>
|
|
(<?php echo count($arrCommandes['terminées']); ?>) <span class="more_sign"><i
|
|
class="fa fa-plus" aria-hidden="true"></i></span></a>
|
|
</p>
|
|
<div class="more_block" style="display: none;">
|
|
<?php echo fxShowLeveesFonds($arrCommandes['terminées'], $strLangue); ?>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
/* $strCoursesTerminees = '
|
|
<p>
|
|
<a class="more_link" href="#">' . afficheTexte('comte_courses-terminées', 0) . ' (' . count($arrCommandes['terminées']) . ') <span class="more_sign"><i class="fa fa-plus" aria-hidden="true"></i></span></a>
|
|
</p>
|
|
<div class="more_block" style="display: none;">
|
|
' . fxShowLeveesFonds($arrCommandes['terminées'], $strLangue) . '
|
|
</div>
|
|
';
|
|
echo $strCoursesTerminees; */
|
|
break;
|
|
case 'compte_mes_adhesions':
|
|
|
|
if (!empty($_GET['no'])) {
|
|
$arrCalMembership = $arrFormsMembership = $arrTelMembership = array();
|
|
$strValidationMembership = '';
|
|
echo $strHTML = fxShowQuestionsAdhesion(trim($_GET['no']), $strLangue);
|
|
} else {
|
|
|
|
$arrAbonnements = fxGetAbonnements($_SESSION['com_id'], 1, $strLangue, "", 1);
|
|
|
|
|
|
echo('<h4>' . $arrAbonnements[1]["mt_nom_" . $strLangue] . '</h4>');
|
|
echo fxShowAbonnementspartype($arrAbonnements, $_SESSION['com_info'], 1, $strLangue, 'compte');
|
|
$arrAbonnements = fxGetAbonnementsaffilie($_SESSION['com_id'], 1, $strLangue, 1);
|
|
|
|
echo('<h4>' . afficheTexte('compte_associe', 0) . "/" . $arrAbonnements[1]["mt_nom_" . $strLangue] . '</h4>');
|
|
echo fxShowAbonnements($arrAbonnements, $_SESSION['com_info'], 1, $strLangue, 'affilie');
|
|
|
|
echo('<hr>');
|
|
|
|
|
|
$arrAbonnements = fxGetAbonnements($_SESSION['com_id'], 1, $strLangue, "", 2);
|
|
|
|
echo('<h4>' . $arrAbonnements[1]["mt_nom_" . $strLangue] . '</h4>');
|
|
echo fxShowAbonnementspartype($arrAbonnements, $_SESSION['com_info'], 1, $strLangue, 'compte');
|
|
$arrAbonnements = fxGetAbonnementsaffilie($_SESSION['com_id'], 1, $strLangue, 2);
|
|
if ($arrAbonnements != null) {
|
|
echo('<h4>' . afficheTexte('compte_associe', 0) . "/" . $arrAbonnements[1]["mt_nom_" . $strLangue] . '</h4>');
|
|
echo fxShowAbonnements($arrAbonnements, $_SESSION['com_info'], 1, $strLangue, 'affilie');
|
|
}
|
|
echo('<hr>');
|
|
|
|
|
|
$arrAbonnements = fxGetAbonnements($_SESSION['com_id'], 1, $strLangue, "", 3);
|
|
|
|
echo('<h4>' . $arrAbonnements[1]["mt_nom_" . $strLangue] . '</h4>');
|
|
echo fxShowAbonnementspartype($arrAbonnements, $_SESSION['com_info'], 1, $strLangue, 'compte');
|
|
$arrAbonnements = fxGetAbonnementsaffilie($_SESSION['com_id'], 1, $strLangue, 3);
|
|
if ($arrAbonnements != null) {
|
|
echo('<h4>' . afficheTexte('compte_associe', 0) . "/" . $arrAbonnements[1]["mt_nom_" . $strLangue] . '</h4>');
|
|
echo fxShowAbonnements($arrAbonnements, $_SESSION['com_info'], 1, $strLangue, 'affilie');
|
|
}
|
|
echo('<hr>');
|
|
|
|
$arrAbonnements = fxGetAbonnements($_SESSION['com_id'], 1, $strLangue, "", 4);
|
|
|
|
echo('<h4>' . $arrAbonnements[1]["mt_nom_" . $strLangue] . '</h4>');
|
|
|
|
echo fxShowAbonnementspartype($arrAbonnements, $_SESSION['com_info'], 1, $strLangue, 'compte');
|
|
|
|
|
|
echo('<hr>');
|
|
|
|
}
|
|
break;
|
|
case 'compte_mes_commandes':
|
|
|
|
$arrFormsTransfert = $arrFormsObjectifsDons = array();
|
|
$arrCommandes = fxGetCommandes($_SESSION['com_info'], 1, $strLangue);
|
|
|
|
echo fxShowCommandes($arrCommandes['actives'], $_SESSION['com_info'], 1, $strLangue);
|
|
|
|
|
|
?>
|
|
<div class="bloc_archives">
|
|
<p>
|
|
<a class="more_link" href="#"><?php afficheTexte('comte_courses-terminées'); ?>
|
|
(<?php echo count($arrCommandes['terminées']); ?>) <span class="more_sign"><i
|
|
class="fa fa-plus" aria-hidden="true"></i></span></a>
|
|
</p>
|
|
<div class="more_block" style="display: none;">
|
|
<?php fxShowCommandes($arrCommandes['terminées'], $_SESSION['com_info'], 1, $strLangue); ?>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
echo fxShowListeattente($_SESSION['com_info'], $strLangue);
|
|
|
|
|
|
|
|
/* $strCoursesTerminees = '
|
|
<p>
|
|
<a class="more_link" href="#">' . afficheTexte('comte_courses-terminées', 0) . ' (' . count($arrCommandes['terminées']) . ') <span class="more_sign"><i class="fa fa-plus" aria-hidden="true"></i></span></a>
|
|
</p>
|
|
<div class="more_block" style="display: none;">
|
|
' . fxShowCommandes($arrCommandes['terminées'], $_SESSION['com_info'], 1, $strLangue) . '
|
|
</div>
|
|
';
|
|
echo $strCoursesTerminees; */
|
|
break;
|
|
case 'compte_motdepasse':
|
|
$blnBoutonRetour = false;
|
|
fxShowFormPassword($strLangue);
|
|
|
|
// lien support temporaire a faire sl
|
|
// MSIN-3866
|
|
if ($strLangue == 'fr')
|
|
echo('<p style="font-size: 1.2em; line-height: 150%;">Pour du support concernant votre compte sur <strong>ms<sup>-1</sup> inscription</strong>, <a href="https://www.ms1timing.com/index.php?code=contact" target="_blank">contactez-nous</a>.</p>');
|
|
else
|
|
echo('<p style="font-size: 1.2em; line-height: 150%;">For inquiries and requests about your account on <strong>ms<sup>-1</sup> inscription</strong>, <a href="https://www.ms1timing.com/home.php?code=contact" target="_blank">contact us</a>.</p>');
|
|
|
|
break;
|
|
case 'compte_nouveau':
|
|
$blnBoutonRetour = false;
|
|
// replacer $_GET['p'] par $_SESSION['no_panier']
|
|
if (!empty($_SESSION['no_panier'])) {
|
|
// récupérer les info de panier acheteur
|
|
$sqlAheteur = "SELECT ipa.com_prenom, ipa.com_nom, ipa.com_adresse, ipa.com_ville, ipa.pro_id, ipa.pay_id, ipa.com_codepostal, ipa.com_telephone1, ipa.com_telephone2, ipa.com_courriel as com_courriel, '' as txt_courriel, '' as com_courriel_confirm, '' as com_login, ipa.com_courriel as txt_login, '' as com_tshirt, ipa.ach_lang AS com_langue, ipp.par_sexe AS com_sexe, '" . $_SESSION['no_panier'] . "' AS no_panier, par_naissance AS com_naissance FROM inscriptions_panier_acheteurs ipa INNER JOIN inscriptions_panier_participants ipp on ipp.par_id=ipa.par_id WHERE ipa.no_panier = '" . $objDatabase->fxEscape($_SESSION['no_panier']) . "'";
|
|
$tabAcheteur = $objDatabase->fxGetRow($sqlAheteur);
|
|
|
|
fxShowFormCompte($tabAcheteur, "checkout", $strLangue);
|
|
} else {
|
|
|
|
fxShowFormCompte(2, "add", $strLangue);
|
|
}
|
|
break;
|
|
case 'compte_nouveauaffilie':
|
|
$blnBoutonRetour = false;
|
|
// replacer $_GET['p'] par $_SESSION['no_panier']
|
|
|
|
fxShowFormCompte(2, "addaffilie", $strLangue);
|
|
break;
|
|
|
|
case 'compte_inc_tableau_promoteur':
|
|
$blnBoutonRetour = false;
|
|
include("inc_tableau_promoteur.php");
|
|
break;
|
|
case 'compte_inc_tableau_rabais':
|
|
$blnBoutonRetour = false;
|
|
$footer_script = true;
|
|
include("inc_tableau_rabais.php");
|
|
break;
|
|
// MSIN-3679
|
|
case 'compte_inc_tableau_remboursement':
|
|
$blnBoutonRetour = false;
|
|
$footer_script = true;
|
|
|
|
include("inc_tableau_remboursement.php");
|
|
break;
|
|
|
|
case 'compte_inc_tableau_inscriptions':
|
|
$blnBoutonRetour = false;
|
|
$footer_script = true;
|
|
include("inc_tableau_inscriptions.php");
|
|
break;
|
|
case 'compte_inc_tableau_inscriptions_mobile':
|
|
$blnBoutonRetour = false;
|
|
$footer_script = true;
|
|
$blnHideCompteTitle = true;
|
|
fxInscrMobileInitTextes($strLangue);
|
|
include("inc_tableau_inscriptions_mobile.php");
|
|
break;
|
|
case 'compte_inc_tableau_mail_entraineurs':
|
|
$blnBoutonRetour = false;
|
|
$footer_script = true;
|
|
include("inc_tableau_mail_entraineurs.php");
|
|
break;
|
|
case 'compte_inc_tableau_mail_questions':
|
|
$blnBoutonRetour = false;
|
|
$footer_script = true;
|
|
include("inc_tableau_mail_questions.php");
|
|
break;
|
|
case 'compte_inc_tableau_dossards':
|
|
$blnBoutonRetour = false;
|
|
|
|
include("inc_tableau_dossards.php");
|
|
break;
|
|
case 'compte_inc_tableau_epreuves':
|
|
$blnBoutonRetour = false;
|
|
include("inc_tableau_epreuves.php");
|
|
break;
|
|
case 'compte_inc_tableau_gestion_epreuves':
|
|
$blnBoutonRetour = false;
|
|
include("inc_tableau_gestion_epreuves.php");
|
|
break;
|
|
|
|
case 'compte_inc_tableau_liste_attente':
|
|
|
|
$blnBoutonRetour = false;
|
|
|
|
include("inc_tableau_liste_attente.php");
|
|
|
|
break;
|
|
|
|
case 'compte_bib_assignment':
|
|
|
|
$blnBoutonRetour = false;
|
|
include("bib_assignment.php");
|
|
|
|
break;
|
|
default:
|
|
case 'compte_login':
|
|
$blnBoutonRetour = false;
|
|
$_SESSION['affiche_pas_connexion'] = "true";
|
|
?>
|
|
<script type="text/javascript">
|
|
$().ready(function () {
|
|
$("#frm_login").validate({
|
|
messages: {
|
|
txt_login: "<?php if ($strLangue == 'fr') { ?>Veuillez entrer votre nom d'usager<?php } else { ?>Please enter your username<?php } ?>"
|
|
txt_password: "<?php if ($strLangue == 'fr') { ?>Veuillez entrer votre mot de passe<?php } else { ?>Please enter your password<?php } ?>"
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<form action="<?php echo $vDomaine; ?>/<?php echo $strPage; ?>" id="frm_login" name="frm_login"
|
|
method="post">
|
|
<input type="hidden" name="form_action"
|
|
value="<?php echo urlencode(base64_encode('login')); ?>">
|
|
<div class="form-group row">
|
|
<label class="control-label col-12 col-lg-4 text-lg-right"
|
|
for="txt_login"><?php if ($strLangue == 'fr') { ?>Nom d'utilisateur<?php } else { ?>Username<?php } ?>
|
|
:</label>
|
|
<div class="col-12 col-lg-4">
|
|
<input class="form-control rounded-0" type="text" id="txt_login" name="txt_login"
|
|
required autofocus>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="control-label col-12 col-lg-4 text-lg-right"
|
|
for="txt_password"><?php if ($strLangue == 'fr') { ?>Mot de passe<?php } else { ?>Password<?php } ?>
|
|
:</label>
|
|
<div class="col-12 col-lg-4">
|
|
<input class="form-control rounded-0" type="password" id="txt_password"
|
|
name="txt_password" required>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<div class="col-12 col-lg-4 offset-lg-4">
|
|
<button class="btn btn-primary rounded-0" type="submit" id="btn_login"
|
|
name="btn_login"><?php if ($strLangue == 'fr') { ?>Connexion<?php } else { ?>Sign in<?php } ?></button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<ul class="list-unstyled my-3">
|
|
<li>
|
|
<a href="<?php echo $vDomaine; ?>/<?php echo $strPage; ?>/motdepasse"><?php afficheTexte('compte_passoublier_texte'); ?></a>
|
|
</li>
|
|
<li>
|
|
<a href="<?php echo $vDomaine; ?>/<?php echo $strPage; ?>/nouveau"><?php afficheTexte('compte_nouvcompte_texte'); ?></a>
|
|
</li>
|
|
</ul>
|
|
<p></p>
|
|
<p></p>
|
|
<?php
|
|
}
|
|
|
|
if ($blnBoutonRetour) {
|
|
?>
|
|
<p>
|
|
<a class="btn btn-primary rounded-pill" href="<?php echo $vDomaine . '/' . $strPage; ?>">
|
|
<i class="fa fa-chevron-left mr-2" aria-hidden="true"></i>
|
|
<?php afficheTexte('compte_link_retour_texte'); ?>
|
|
</a>
|
|
</p>
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php // a faire voir ou on a besoin et changer pour celle dans liste?>
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$('#btn_excel_topold, #btn_excel_botold, #btn_excel_na_topold, #btn_excel_na_botold, #btn_excel_animateur_topold, #btn_excel_animateur_botold').click(function () {
|
|
return confirm("<?php if ($strLangue == 'fr') { ?>Voulez-vous télécharger la version excel ?<?php } else { ?>Do you want to download the excel version?<?php } ?>");
|
|
});
|
|
});
|
|
</script>
|
|
<?php require_once("inc_footer.php");
|