51 lines
950 B
PHP
51 lines
950 B
PHP
|
<?php
|
||
|
|
||
|
require_once '../session_init.php';
|
||
|
require_once 'config.inc.php';
|
||
|
require_once 'db.class.php';
|
||
|
require_once './entete.html';
|
||
|
require_once 'fonctions.inc.php';
|
||
|
|
||
|
$action = $_GET["action"];
|
||
|
$idVotation =$_GET["id"];
|
||
|
|
||
|
print('<br><br>
|
||
|
<!-- lalis Grid Section -->
|
||
|
|
||
|
<section id="content">
|
||
|
<div class="container">
|
||
|
<div class="row">
|
||
|
<div class="col-lg-12 text-center">
|
||
|
<h4>Choisissez une votations à modifier</h4>' . EOL);
|
||
|
|
||
|
$db = new db();
|
||
|
if (empty($action))
|
||
|
{
|
||
|
$action="modif";
|
||
|
choixVotation('/gestionsite/modifVotation.php') ;
|
||
|
|
||
|
}else
|
||
|
{
|
||
|
if ($action == "cloture")
|
||
|
{
|
||
|
if ( empty($idVotation))
|
||
|
{
|
||
|
// choix de la votation à cloturer
|
||
|
choixVotation('/gestionsite/modifVotation.php',1 );
|
||
|
}else
|
||
|
{
|
||
|
$query = "UPDATE liste_votations SET status=0 WHERE id=" . $db->protect($idVotation); // clotûre
|
||
|
$db->query($query);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
print(' </div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</section>');
|
||
|
require_once './footer.html';
|
||
|
?>
|