1
0
This commit is contained in:
Daniel Tartavel 2023-03-16 15:23:41 +01:00
parent 645a1089d5
commit f03c52813c
2 changed files with 7 additions and 5 deletions

View File

@ -79,20 +79,22 @@ function choixVotation($path, $methode = 2, $confirm = true) //2 = toutes les v
$result = $db->query($query); $result = $db->query($query);
$votations = $db->result->fetch_all(MYSQLI_ASSOC); $votations = $db->result->fetch_all(MYSQLI_ASSOC);
print ('<form method="get" action="' . $path . '">'); //print ('<form method="get" action="' . $path . '">');
print "<pre>"; //print "<pre>";
foreach($votations as $key => $value ) foreach($votations as $key => $value )
{ {
print '<input type="radio" name="id" value="' . $value["id"] . '"/> ' . $value["titre"] . '&nbsp;:' . $value["libelle"] . '<br>'; //print '<input type="radio" name="id" value="' . $value["id"] . '"/> ' . $value["titre"] . '&nbsp;:' . $value["libelle"] . '<br>';
print '<a href="' . $path . '?id=' . $value["id"] . '>' . $value["libelle"] . '<br>';
} }
// TODO confirmation du choix par javascript si $confirm = true // TODO confirmation du choix par javascript si $confirm = true
print '</pre><br> /*print '</pre><br>
<div> <div>
<input type="submit" value="Envoyer"/> <input type="submit" value="Envoyer"/>
<input type="submit" formaction="index.php" value="' . _("Annuler") . '"/> <input type="submit" formaction="index.php" value="' . _("Annuler") . '"/>
</div> </div>
</form>'; </form>';
*/
$db->close(); $db->close();
} }

View File

@ -22,9 +22,9 @@ print ("<table>");
foreach($votationsList as $votation) foreach($votationsList as $votation)
{ {
print("<tr><td>"); print("<tr><td>");
print('<a href="' . $vote_url . 'vote.resultat.php?v=' . $votation["id"] . '">' . $votation["libelle"] . '</a></td><td>');
if ($votation["status"] == 1) if ($votation["status"] == 1)
{ {
print('<a href="' . $vote_url . 'vote.resultat.php?id=' . $votation["id"] . '">' . $votation["libelle"] . '</a></td><td>');
print(_("Cloturé")); print(_("Cloturé"));
}else }else
{ {