update
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
require_once 'session_init.php';
|
||||
require_once '../session_init.php';
|
||||
require_once 'config.inc.php';
|
||||
require_once 'db.class.php';
|
||||
require_once 'fonctions.inc.php';
|
||||
@ -12,9 +12,8 @@ $idVote = getpost("idVote");
|
||||
$candidat = getpost("candidat");
|
||||
$idCandidat = getpost("idCandidat");
|
||||
$libelle = getpost("libelle");
|
||||
$action = getpost("action");
|
||||
|
||||
if (!empty($candidat) and $action != "modif")
|
||||
if (!empty($candidat))
|
||||
{
|
||||
$query = "INSERT INTO liste_candidats VALUES (0, " . $db->protect($idVotation) . ", " . $db->protect($idVote) . ",'" . $db->protect($libelle) . "', '". $db->protect($candidat) . "')";
|
||||
$db->query($query);
|
||||
@ -36,7 +35,7 @@ if (!empty($candidat) and $action != "modif")
|
||||
}elseif (empty($idVote))
|
||||
{
|
||||
choixVote($path, $idVotation);
|
||||
}elseif ($action == "modif" and !empty($idCandidat))
|
||||
}elseif (!empty($idCandidat))
|
||||
{
|
||||
|
||||
}else
|
||||
@ -54,8 +53,8 @@ if (!empty($candidat) and $action != "modif")
|
||||
print('<h4>Liste des candidats</h4>');
|
||||
foreach($candidatsList as $line)
|
||||
{
|
||||
print("<b><u>" . $line["candidat"] . "</u></b><br>");
|
||||
print(nl2br($line["libelle"]) . EOLH);
|
||||
print("<b><u>" . $line["candidat"] . "</u></b><br>");
|
||||
}
|
||||
}
|
||||
candidatsForm($path, $idVotation, $idVote);
|
||||
|
Reference in New Issue
Block a user