debug
This commit is contained in:
parent
70f82f66ba
commit
6bd179968a
@ -5,13 +5,27 @@ require_once 'db.class.php';
|
|||||||
require_once 'entete.php';
|
require_once 'entete.php';
|
||||||
require_once 'fonctions.inc.php';
|
require_once 'fonctions.inc.php';
|
||||||
|
|
||||||
|
$path = $_SERVER["PHP_SELF"];
|
||||||
$db = new db();
|
$db = new db();
|
||||||
|
|
||||||
$idVotation = getpost("id");
|
function queryVotationName($db, $idVotation) :string
|
||||||
|
{
|
||||||
$query = "SELECT libelle FROM liste_votations WHERE id='" . $idVotation . "'";
|
$query = "SELECT libelle FROM liste_votations WHERE id='" . $idVotation . "'";
|
||||||
$db->query($query);
|
$db->query($query);
|
||||||
$votationName = $db->result->fetch_assoc();
|
$votationLine = $db->result->fetch_assoc();
|
||||||
|
return $votationLine["libelle"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$idVotation = getpost("id");
|
||||||
|
if (!empty($idVotation))
|
||||||
|
{
|
||||||
|
$GLOBALS["idVotation"] = $idVotation;
|
||||||
|
$votationName = queryVotationName($db, $idVotation);
|
||||||
|
}elseif (array_key_exists("idVotation", $GLOBALS))
|
||||||
|
{
|
||||||
|
$idVotation = $GLOBALS["idVotation"];
|
||||||
|
$votationName = queryVotationName($db, $idVotation);
|
||||||
|
}
|
||||||
|
|
||||||
print('<br><br>
|
print('<br><br>
|
||||||
<!-- lalis Grid Section -->
|
<!-- lalis Grid Section -->
|
||||||
@ -19,22 +33,14 @@ print('<br><br>
|
|||||||
<div class="container">') . EOL;
|
<div class="container">') . EOL;
|
||||||
print(' <div class="row">
|
print(' <div class="row">
|
||||||
<div class="col-lg-12 text-center">
|
<div class="col-lg-12 text-center">
|
||||||
<h3>Nouveau vote pour la votation : ' . $votationName["libelle"]. '</h3>');
|
<h3>Nouveau vote pour la votation');
|
||||||
|
|
||||||
$path = $_SERVER["PHP_SELF"];
|
|
||||||
|
|
||||||
print
|
|
||||||
|
|
||||||
if (array_key_exists("idVotation", $GLOBALS) and empty($idVotation))
|
|
||||||
{
|
|
||||||
$idVotation = $GLOBALS["idVotation"];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($idVotation))
|
if (empty($idVotation))
|
||||||
{
|
{
|
||||||
choixVotation($path, 0, false);
|
choixVotation($path, 0, false);
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
print(": " . $votationName . '</h3>' . EOL);
|
||||||
$method = getpost("method");
|
$method = getpost("method");
|
||||||
$libelle = getpost("libelle");
|
$libelle = getpost("libelle");
|
||||||
if (empty($method) or empty($libelle))
|
if (empty($method) or empty($libelle))
|
||||||
|
Reference in New Issue
Block a user