') . EOL;
print('
Nouveau vote
');
$path = $_SERVER["PHP_SELF"];
$idVotation = getpost("id");
if (empty($idVotation))
{
if (array_key_exists("idVotation", $GLOBALS))
{
$idVotation = $GLOBALS["idVotation"];
}else
{
choixVotation($path);
}
}
$method = getpost("method");
$libelle = getpost("libelle");
if (empty($method) or empty($libelle))
{
votesForm($path);
}else
{
$db = new db();
$query = "INSERT INTO liste_votes ('libelle', 'method', 'id_votation') VALUES ('" . $libelle . "', '" . $method . "', '" . $idVotation . "')";
print($query);
//$db->query($query);
$db->close();
}
print('