1
0

modifying index.php

This commit is contained in:
2022-09-29 11:32:23 +02:00
parent 135910b78f
commit 72e45ec987
5 changed files with 78 additions and 10 deletions

View File

@ -10,9 +10,11 @@ $db = new db();
$idVotation = getpost("idVotation");
$idVote = getpost("idVote");
$candidat = getpost("candidat");
$idCandidat = getpost("idCandidat");
$libelle = getpost("libelle");
$action = getpost("action");
if (!empty($candidat))
if (!empty($candidat) and $action != "modif")
{
$query = "INSERT INTO liste_candidats VALUES (0, " . $db->protect($idVotation) . ", " . $db->protect($idVote) . ",'" . $db->protect($libelle) . "', '". $db->protect($candidat) . "')";
$db->query($query);
@ -34,6 +36,9 @@ if (!empty($candidat))
}elseif (empty($idVote))
{
choixVote($path, $idVotation);
}elseif ($action == "modif" and !empty($idCandidat))
{
}else
{
$votationName = $db->queryVotationName($idVotation);
@ -63,4 +68,4 @@ if (!empty($candidat))
}
$db->close();
?>;
?>