120 lines
3.1 KiB
PHP
120 lines
3.1 KiB
PHP
|
|
<?php
|
|
//ini_set('display_errors', 1);
|
|
//error_reporting(E_ALL);
|
|
// MSIN-3880 nouveau tableau
|
|
include_once("php/inc_fx_modifierinscriptions.php");
|
|
include_once("php/inc_fx_memberships.php");
|
|
include_once("php/inc_fx_promoteur.php");
|
|
require_once('superadm/php/inc_manager.php');
|
|
|
|
global $objDatabase, $vDomaine, $strLangue;
|
|
$intEveId = 0;
|
|
$blnDon = false;
|
|
|
|
if ($strLangue == 'fr') {
|
|
$strPage = '/compte';
|
|
} else {
|
|
$strPage = '/account';
|
|
}
|
|
if($strLangue == 'fr')
|
|
$strCode = 'compte/';
|
|
else
|
|
$strCode = 'account/';
|
|
|
|
$strBibCode = $strCode;
|
|
$strCode .= $_GET['code'];
|
|
|
|
if (isset($_GET['promoteur_eve_id'])) {
|
|
$intEveId = base64_decode(urldecode($_GET['promoteur_eve_id']));
|
|
$arrEvenement = fxGetEvenementsId($intEveId);
|
|
//$tabEvenement['general'] = $arrEvenement;
|
|
|
|
}
|
|
?>
|
|
<a class="btn btn-primary rounded-pill" id="link_back" href="<?php echo $vDomaine . $strPage . "/inc_tableau_promoteur?promoteur_eve_id=" . urlencode(base64_encode($intEveId)); ?>">
|
|
<i class="fa fa-chevron-left mr-2" aria-hidden="true"></i>
|
|
<?php afficheTexte('promoteur_back'); ?>
|
|
</a>
|
|
<br><br>
|
|
<style>
|
|
a {
|
|
color: #f15b0a;
|
|
}
|
|
|
|
a:hover {
|
|
color: #000000;
|
|
}
|
|
|
|
.color-yellow {
|
|
background-color: yellow;
|
|
}
|
|
</style>
|
|
<?php
|
|
|
|
$sort = "ASC";
|
|
if ($intEveId != 0) {
|
|
$mem_order = " ORDER BY r.mr_reponse";
|
|
if (isset($_GET['o'])) {
|
|
if (isset($_GET['DESC'])) {
|
|
$sort = "ASC";
|
|
$mem_order = " ORDER BY " . $_GET['o'] . " DESC";
|
|
} else {
|
|
$sort = "DESC";
|
|
$mem_order = " ORDER BY " . $_GET['o'] . " ASC";
|
|
}
|
|
|
|
|
|
}
|
|
|
|
$arrEvenement = fxGetEvenementsId($intEveId);
|
|
// effacer le statut les validation
|
|
|
|
|
|
$mem_sqlQuestions = fxquestionechusql($mem_order);
|
|
|
|
|
|
fxShowQuestionsmail($mem_sqlQuestions, $strLangue, $intEveId, $sort)
|
|
|
|
?>
|
|
<a class="btn btn-primary rounded-pill" id="link_back" href="<?php echo $vDomaine . $strPage . "/inc_tableau_promoteur?promoteur_eve_id=" . urlencode(base64_encode($intEveId)); ?>">
|
|
<i class="fa fa-chevron-left mr-2" aria-hidden="true"></i>
|
|
<?php
|
|
afficheTexte('promoteur_back'); ?>
|
|
</a>
|
|
|
|
<?php
|
|
|
|
|
|
} else {
|
|
if ($strLangue == 'fr')
|
|
echo "Une erreur quelconque est survenue.";
|
|
else
|
|
echo "A generic error occurred.";
|
|
}
|
|
?>
|
|
<script>
|
|
$(".btn_valider").on("click", function (event) {
|
|
event.preventDefault();
|
|
|
|
let checkbox = $(this); // Récupérer l'élément checkbox
|
|
let key = checkbox.data('key');
|
|
let isChecked = checkbox.prop("checked") ? 1 : 0;
|
|
let action = "validequestion";
|
|
|
|
$.post('<?php echo $vDomaine; ?>/superadm/enregistrer.php', {
|
|
action: action,
|
|
key: key,
|
|
valeur: isChecked
|
|
}, function (result) {
|
|
|
|
// Si l'update échoue, remettre l'ancien état du checkbox
|
|
checkbox.prop("checked", isChecked); // Mettre à jour visuellement la case
|
|
|
|
}, 'json')
|
|
.fail(function () {
|
|
// En cas d'erreur AJAX, annuler le changement
|
|
checkbox.prop("checked", !isChecked);
|
|
});
|
|
});
|
|
</script>
|