added saisie votes et candidats
This commit is contained in:
46
gestion/saisieCandidats.php
Normal file
46
gestion/saisieCandidats.php
Normal file
@ -0,0 +1,46 @@
|
||||
|
||||
<?php
|
||||
require_once '../session_init.php';
|
||||
require_once 'config.inc.php';
|
||||
require_once 'db.class.php';
|
||||
require_once 'fonctions.inc.php';
|
||||
|
||||
$path = $_SERVER["PHP_SELF"];
|
||||
$db = new db();
|
||||
|
||||
$idVotation = getpost("idVotation");
|
||||
$idVote = getpost("idVote");
|
||||
$candidat = getpost("candidat");
|
||||
|
||||
if (!empty($idCandidat))
|
||||
{
|
||||
$query = "INSERT INTO liste_candidats VALUES (0, " . $idVotation . ", " . $idVote . ",'" . $candidat . "')";
|
||||
$db->query($query);
|
||||
header("Location: " . $$base_url . "/" . $path , TRUE, 301);
|
||||
return;
|
||||
}else
|
||||
{
|
||||
require_once 'entete.php';
|
||||
print('<br><br>
|
||||
<!-- lalis Grid Section -->
|
||||
<section id="content">
|
||||
<div class="container">') . EOL;
|
||||
print(' <div class="row">
|
||||
<div class="col-lg-12 text-center">');
|
||||
|
||||
if (empty($idVotation))
|
||||
{
|
||||
choixVotation($path, 0, false);
|
||||
}elseif (empty($idVote))
|
||||
{
|
||||
choixVote($path, $idVotation);
|
||||
}
|
||||
print(' </div>
|
||||
</div>
|
||||
</div>
|
||||
</section>');
|
||||
require_once("footer.html");
|
||||
}
|
||||
$db->close();
|
||||
|
||||
?>;
|
@ -7,8 +7,6 @@ require_once 'fonctions.inc.php';
|
||||
$path = $_SERVER["PHP_SELF"];
|
||||
$db = new db();
|
||||
|
||||
|
||||
|
||||
$idVotation = getpost("id");
|
||||
$method = getpost("method");
|
||||
$libelle = getpost("libelle");
|
||||
|
Reference in New Issue
Block a user