modifying index.php
This commit is contained in:
29
gestion/index2.php
Normal file
29
gestion/index2.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
require_once '../session_init.php';
|
||||
require_once 'config.inc.php';
|
||||
require_once 'entete.php';
|
||||
|
||||
print(' <br><br>
|
||||
<!-- lalis Grid Section -->
|
||||
|
||||
<section id="content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-center">
|
||||
<h3>Gestion du site</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<ul>');
|
||||
$votationsList = queryVotationList();
|
||||
foreach($votationsList as $votation)
|
||||
{
|
||||
|
||||
}
|
||||
print(' </ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>');
|
||||
|
||||
require_once './footer.html';
|
||||
?>
|
@ -10,9 +10,11 @@ $db = new db();
|
||||
$idVotation = getpost("idVotation");
|
||||
$idVote = getpost("idVote");
|
||||
$candidat = getpost("candidat");
|
||||
$idCandidat = getpost("idCandidat");
|
||||
$libelle = getpost("libelle");
|
||||
$action = getpost("action");
|
||||
|
||||
if (!empty($candidat))
|
||||
if (!empty($candidat) and $action != "modif")
|
||||
{
|
||||
$query = "INSERT INTO liste_candidats VALUES (0, " . $db->protect($idVotation) . ", " . $db->protect($idVote) . ",'" . $db->protect($libelle) . "', '". $db->protect($candidat) . "')";
|
||||
$db->query($query);
|
||||
@ -34,6 +36,9 @@ if (!empty($candidat))
|
||||
}elseif (empty($idVote))
|
||||
{
|
||||
choixVote($path, $idVotation);
|
||||
}elseif ($action == "modif" and !empty($idCandidat))
|
||||
{
|
||||
|
||||
}else
|
||||
{
|
||||
$votationName = $db->queryVotationName($idVotation);
|
||||
@ -63,4 +68,4 @@ if (!empty($candidat))
|
||||
}
|
||||
$db->close();
|
||||
|
||||
?>;
|
||||
?>
|
||||
|
@ -52,7 +52,7 @@ if (!empty($votes))
|
||||
print("<b>vote</b></td><td><b>méthode</b></td></tr>");
|
||||
foreach ($votes as $value)
|
||||
{
|
||||
print ("<tr><td>" . $value[1] . "</td><td>" . $value[5] . "</td></tr>" . EOL);
|
||||
print ("<tr><td>" . $value["libelle"] . "</td><td>" . $value["methode"] . "</td></tr>" . EOL);
|
||||
}
|
||||
print("</table>" . EOL);
|
||||
echo EOLH . EOLH;
|
||||
|
Reference in New Issue
Block a user