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

50 lines
1.0 KiB
PHP
Raw Normal View History

2022-09-15 18:34:18 +02:00
<?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';
print('<br><br>
<!-- lalis Grid Section -->
<section id="content">
2022-09-19 10:28:44 +02:00
<div class="container">') . EOL;
2022-09-15 18:34:18 +02:00
print(' <div class="row">
<div class="col-lg-12 text-center">
<h3>Nouveau vote</h3>');
$path = $_SERVER["PHP_SELF"];
$idVotation = getpost("id");
2022-09-19 11:35:05 +02:00
if (array_key_exists("idVotation", $GLOBALS) and empty($idVotation))
{
$idVotation = $GLOBALS["idVotation"];
}
2022-09-15 18:34:18 +02:00
if (empty($idVotation))
{
2022-09-19 11:35:05 +02:00
choixVotation($path);
2022-09-15 18:34:18 +02:00
}
$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);
2022-09-19 11:11:15 +02:00
$db->close();
}
2022-09-15 18:34:18 +02:00
2022-09-15 21:29:43 +02:00
print(' </div>
</div>
2022-09-15 18:34:18 +02:00
</div>
</section>');
require_once("footer.html");
?>