query($query); $votationLine = $db->result->fetch_assoc(); return $votationLine["libelle"]; } $idVotation = getpost("id"); if (!empty($idVotation)) { $GLOBALS["idVotation"] = $idVotation; $votationName = queryVotationName($db, $idVotation); }elseif (array_key_exists("idVotation", $GLOBALS)) { $idVotation = $GLOBALS["idVotation"]; $votationName = queryVotationName($db, $idVotation); } print('

') . EOL; print('

Nouveau vote pour la votation'); if (empty($idVotation)) { choixVotation($path, 0, false); }else { print(": " . $votationName . '

' . EOL); $method = getpost("method"); $libelle = getpost("libelle"); if (empty($method) or empty($libelle)) { votesForm($path); }else { $query = "INSERT INTO liste_votes ('libelle', 'method', 'id_votation') VALUES ('" . $libelle . "', '" . $method . "', '" . $idVotation . "')"; print($query); //$db->query($query); } } $db->close(); print('
'); require_once("footer.html"); ?>