ajout cloture database\najout votes dans database
This commit is contained in:
@ -5,16 +5,17 @@ require_once 'db.class.php';
|
||||
require_once 'entete.php';
|
||||
require_once 'fonctions.inc.php';
|
||||
|
||||
$idVotation = getpost("id");
|
||||
$path = $_SERVER["PHP_SELF"];
|
||||
print('<br><br>
|
||||
<!-- lalis Grid Section -->
|
||||
<section id="content">
|
||||
<div class="container">') . EOL;
|
||||
print(' <div class="row">
|
||||
<div class="col-lg-12 text-center">
|
||||
<h3>Nouveau vote</h3>
|
||||
<h4>');
|
||||
<h3>Nouveau vote</h3>');
|
||||
|
||||
$path = $_SERVER["PHP_SELF"];
|
||||
$idVotation = getpost("id");
|
||||
|
||||
if (empty($idVotation))
|
||||
{
|
||||
if (array_key_exists("idVotation", $GLOBALS))
|
||||
@ -25,8 +26,20 @@ if (empty($idVotation))
|
||||
choixVotation($path);
|
||||
}
|
||||
}
|
||||
print("</h4>");
|
||||
votesForm($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(' </div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user