modifying index.php
This commit is contained in:
@ -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();
|
||||
|
||||
?>;
|
||||
?>
|
||||
|
Reference in New Issue
Block a user