1
0

ajout du nombre de votant, et correction bug de date

This commit is contained in:
Daniel Tartavel
2021-10-23 01:27:50 +02:00
parent 5f6807b0dd
commit 70261fcd71
3 changed files with 11 additions and 7 deletions

View File

@ -229,15 +229,19 @@ function listeAdherents()
function listeVotants($idVotation, $idVote, $listeAdherents)
{
global $db;
$nv = 0;
$text = '';
$query = "SELECT DISTINCT idVotant FROM votes WHERE idVotation=" . $idVotation . ' AND idVote=' . $idVote;
$result = $db->query($query);
print (EOLH . '<div id="listeVotants' . $idVote . '" style="display: none; line-height: 0.8;">');
while ($idVotants = $db->result->fetch_assoc())
{
print($listeAdherents[$idVotants['idVotant']] . EOLH);
$nv++;
$text .= $listeAdherents[$idVotants['idVotant']] . EOLH;
}
print('</div><button id="button' . $idVote . '" onclick="show(\'listeVotants\',\'' . $idVote . '\')">Voir la liste des votants</button>' . EOLH);
print('Nombre de votants : ' . $nv . EOLH . '<div id="listeVotants' . $idVote . '" style="display: none; line-height: 0.8;">' . $text . '</div>');
print('<button id="button' . $idVote . '" onclick="show(\'listeVotants\',\'' . $idVote . '\')">Voir la liste des votants</button>' . EOLH);
}
?>