1
0

ajout de la liste des votants lors de l'affichage des résultats

This commit is contained in:
Daniel Tartavel
2021-10-22 20:12:02 +02:00
parent 7ae8c343ab
commit 5f6807b0dd
4 changed files with 118 additions and 9 deletions

View File

@ -25,7 +25,7 @@ if (empty($idVotation))
}else
{
//chargement des données de la votation
$db->query("SELECT *, UNIX_TIMESTAMP( DATE_ADD(dateFin, INTERVAL 1 DAY)) as tf FROM liste_votations WHERE id=" . $idVotation);
$db->query("SELECT *, UNIX_TIMESTAMP( DATE_ADD(dateFin, INTERVAL 1 DAY)) as tf, UNIX_TIMESTAMP(dateFin) as df, UNIX_TIMESTAMP(dateDebut) as dd FROM liste_votations WHERE id=" . $idVotation);
$votation = $db->result->fetch_array();
if(empty($_GET['status']))
@ -51,7 +51,7 @@ if (empty($idVotation))
$dolibarr->close();
$sujet = "[LALIS] Convocation à un vote";
$textDebut = "Bonjour,\nL'association Lalis vous invite à un vote.\nMotif du vote : " . $votation['libelle'] . "\n\nPour voter, cliquez sur le lien suivant :\nhttps://lalis69.ddns.net:10443/vote.form.php?v=" . $idVotation . "&id=";
$textDebut = "Bonjour,\nL'association Lalis vous invite à un vote du " . formatteDate('fr', $votation['dd'], 'Europe/Paris') . " 0h00 au " . formatteDate('fr', $votation['df'], 'Europe/Paris') . " minuit.\nMotif du vote : " . $votation['libelle'] . "\n\nPour voter, cliquez sur le lien suivant :\nhttps://lalis69.ddns.net:10443/vote.form.php?v=" . $idVotation . "&id=";
$textFin = "\n\nNous vous rappelons que pour pouvoir voter, vous devez être à jour de cotisation à la date du vote.\nLes résultats seront visibles dès le " . formatteDate('fr', $votation['tf'], 'Europe/Paris') . " par le lien suivant : https://lalis69.ddns.net:10443/vote.resultat.php?id=" . $idVotation . "\n\nPour Lalis, Le Président, David Larochette.";
foreach($adherents as $adherent)
{
@ -59,9 +59,8 @@ if (empty($idVotation))
print '<pre>' . $adherent['email'] . ' ' . $adherent['firstname'] . ' ' . $adherent['lastname'] . EOLH . nl2br($text) . '</pre>';
if ( $_GET['status'] == 'Oui')
{
//envoiMail($adherent['email'], $sujet, $text, $html=false, $cc='', $bcc='');
envoiMail('david@larochette.me', $sujet, $text, $html=false, $cc='', $bcc='');
envoiMail('ric.libr4d@protonmail.com', $sujet, $text, $html=false, $cc='', $bcc='');
envoiMail($adherent['email'], $sujet, $text, $html=false, $cc='', $bcc='');
//envoiMail('dtux@free.fr', $sujet, $text, $html=false, $cc='', $bcc='');
}
}
}else