1
0

ajout saisie de la liste des votes

This commit is contained in:
2022-09-15 18:34:18 +02:00
parent 0cefd8f9a0
commit b3790d3425
3 changed files with 93 additions and 6 deletions

View File

@ -17,12 +17,19 @@ print(' <div class="row">
<h3>Nouvelle votation</h3>
<h4>');
if (array_key_exists("titre", $_GET))
$titre = getpost("titre");
$libelle = getpost("libelle");
$dateDebut = getpost("dateDebut");
$dateFin = getpost("dateFin");
if ($titre !== null and $libelle!== null and $dateDebut!== null and $dateFin !== null)
{
var_dump($_get);
$db = new db();
$query = "INSERT INTO liste_votations ('titre', 'libelle', 'status', 'dateDebut', 'dateFin') VALUES('" . $titre . "', '" . $libelle . "', '0', '" . $dateDebut . "', '" . $dateFin . "')"; // clotûre
$db->query($query);
}else
{
votationForm($path);
votationForm($path, $titre, $libelle, $dateDebut, $dateFin);
}
print(' </div>

View File

@ -0,0 +1,40 @@
<?php
require_once '../session_init.php';
require_once 'config.inc.php';
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">');
print(' <div class="row">
<div class="col-lg-12 text-center">
<h3>Nouveau vote</h3>
<h4>');
if (empty($idVotation))
{
if (array_key_exists("idVotation", $GLOBALS))
{
$idVotation == $GLOBALS["idVotation"];
}else
{
choixVotation($path);
}
}
votesForm($path);
print(' </div>
</div>
</form>
</div>
</section>');
require_once("footer.html");
?>