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/modifVotation.php

55 lines
1.1 KiB
PHP
Raw Normal View History

2021-10-14 17:58:21 +02:00
<?php
2022-09-15 18:39:27 +02:00
require_once '../session_init.php';
2021-10-14 17:58:21 +02:00
require_once 'config.inc.php';
require_once 'db.class.php';
2022-09-15 11:44:34 +02:00
require_once 'entete.php';
2021-10-14 17:58:21 +02:00
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";
2022-09-14 13:05:25 +02:00
choixVotation('./modifVotation.php') ;
2021-10-14 17:58:21 +02:00
}else
{
if ($action == "cloture")
{
2022-09-14 13:38:25 +02:00
if (empty($idVotation))
2021-10-14 17:58:21 +02:00
{
// choix de la votation à cloturer
2022-09-14 13:05:25 +02:00
choixVotation('./modifVotation.php',1 );
2021-10-14 17:58:21 +02:00
}else
{
2022-09-14 19:33:12 +02:00
//TODO alert "Do you want to delete ..."
2022-09-15 11:44:34 +02:00
$query = "UPDATE liste_votations SET status=0 WHERE id='" . $db->protect($idVotation) . "'"; // clotûre
2021-10-14 17:58:21 +02:00
$db->query($query);
}
2022-09-15 11:44:34 +02:00
}elseif ($action == "modif")
{
//TODO
votationForm($path, $titre, $libelle, $dateDebut, $dateFin, $status);
2021-10-14 17:58:21 +02:00
}
2022-09-15 11:44:34 +02:00
2021-10-14 17:58:21 +02:00
}
print(' </div>
</div>
</div>
</section>');
require_once './footer.html';
?>