1
0
This repository has been archived on 2023-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
dtux__serveur-vote-lalis/gestionsite/saisieVotes.php
2022-09-19 13:06:33 +02:00

55 lines
1.2 KiB
PHP

<?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';
$db = new db();
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 pour la votation : </h3>');
$path = $_SERVER["PHP_SELF"];
$idVotation = getpost("id");
$query = "SELECT libelle FROM liste_votations WHERE id='" . $idVotation . "'";
$db->query($query);
if (array_key_exists("idVotation", $GLOBALS) and empty($idVotation))
{
$idVotation = $GLOBALS["idVotation"];
}
if (empty($idVotation))
{
choixVotation($path, 0, false);
}else
{
$method = getpost("method");
$libelle = getpost("libelle");
if (empty($method) or empty($libelle))
{
votesForm($path);
}else
{
$query = "INSERT INTO liste_votes ('libelle', 'method', 'id_votation') VALUES ('" . $libelle . "', '" . $method . "', '" . $idVotation . "')";
print($query);
//$db->query($query);
}
}
$db->close();
print(' </div>
</div>
</div>
</section>');
require_once("footer.html");
?>