debug
This commit is contained in:
43
gestion/saisieVotation.php
Normal file
43
gestion/saisieVotation.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?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';
|
||||
|
||||
$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>Nouvelle votation</h3>
|
||||
<h4>');
|
||||
|
||||
$titre = getpost("titre");
|
||||
$libelle = getpost("libelle");
|
||||
$dateDebut = getpost("dateDebut");
|
||||
$dateFin = getpost("dateFin");
|
||||
|
||||
if ($titre !== null and $libelle!== null and $dateDebut!== null and $dateFin !== null)
|
||||
{
|
||||
$db = new db();
|
||||
$query = "INSERT INTO liste_votations VALUES(0, '" . $titre . "', '" . $libelle . "', '0', '" . $dateDebut . "', '" . $dateFin . "')"; // clotûre
|
||||
$db->query($query);
|
||||
$db->close();
|
||||
// TODO retour à l'index
|
||||
}else
|
||||
{
|
||||
votationForm($path, $titre, $libelle, $dateDebut, $dateFin);
|
||||
}
|
||||
|
||||
print(' </div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>');
|
||||
require_once("footer.html");
|
||||
|
||||
?>
|
Reference in New Issue
Block a user