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

@ -35,7 +35,7 @@ if ($dolibarr->result->num_rows == 0)
{
$dolibarr->close();
$db = new db();
$query = 'SELECT *, UNIX_TIMESTAMP(dateDebut) as td, UNIX_TIMESTAMP( DATE_ADD(dateFin, INTERVAL 1 DAY)) as tf FROM liste_votations WHERE id=' . $db->protect($idVotation);
$query = 'SELECT *, UNIX_TIMESTAMP(dateDebut) as td, UNIX_TIMESTAMP( DATE_ADD(dateFin, INTERVAL 1 DAY)) as tf, UNIX_TIMESTAMP( dateFin) as df FROM liste_votations WHERE id=' . $db->protect($idVotation);
$resultVotation = $db->query($query);
$votation = $db->result->fetch_array();
$now = date('Y-m-d');
@ -84,7 +84,7 @@ if ($dolibarr->result->num_rows == 0)
}
}else
{
print " Bonjour " . $votant['firstname'] . " " . $votant['lastname'] . ',</h4>' . EOLH . EOLH . "Le vote ne sera ouvert qu'à partir du " . formattedate('fr', $votation['td'] , "Europe/Paris") . " et jusqu'au " . formattedate('fr', $votation['tf'] , "Europe/Paris") . '.' . EOLH . "Si vous pensez que ceci est une erreur, veuillez prendre contact avec les responsables de l'association.</h4>";
print " Bonjour " . $votant['firstname'] . " " . $votant['lastname'] . ',</h4>' . EOLH . EOLH . "Le vote ne sera ouvert qu'à partir du " . formattedate('fr', $votation['td'] , "Europe/Paris") . " et jusqu'au " . formattedate('fr', $votation['df'] , "Europe/Paris") . '.' . EOLH . "Si vous pensez que ceci est une erreur, veuillez prendre contact avec les responsables de l'association.</h4>";
}
}
}