diff --git a/gestion/.htaccess b/gestion/.htaccess index 8b5a076..633be5f 100644 --- a/gestion/.htaccess +++ b/gestion/.htaccess @@ -2,6 +2,6 @@ Options -Indexes AuthName "back_office" AuthBasicProvider file AuthType Basic -AuthUserFile "/var/www/html/vote/gestionsite/.htpasswd" +AuthUserFile "/var/www/html/vote/gestion/.htpasswd" require valid-user diff --git a/gestion/saisieVotes.php b/gestion/saisieVotes.php index eb627ba..ad0b8ee 100644 --- a/gestion/saisieVotes.php +++ b/gestion/saisieVotes.php @@ -18,7 +18,7 @@ function queryVotationName($db, $idVotation) :string return $votationLine["libelle"]; } -function queryVotes($db, $idVotation) :array +function queryVotes($db, $idVotation) { $query = "SELECT * FROM liste_votes WHERE id='" . $idVotation . "'"; $db->query($query); @@ -47,11 +47,14 @@ print('

print('
'); $votes = queryVotes($db, $idVotation); -foreach ($votes as $value) +if (!empty($votes)) { - print ($value[0] . " " . $value[1] . EOLH); -} + foreach ($votes as $value) + { + print ($value[0] . " " . $value[1] . EOLH); + } echo EOLH . EOLH; +} print('

Nouveau vote pour la votation');