ajout saisie de la liste des votes
This commit is contained in:
@ -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>
|
||||
|
40
gestionsite/saisieVotes.php
Normal file
40
gestionsite/saisieVotes.php
Normal 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");
|
||||
|
||||
?>
|
Reference in New Issue
Block a user