1
0

some cleaning and debug

This commit is contained in:
Daniel Tartavel 2022-09-26 12:07:31 +02:00
parent 283d9c52b0
commit f8b090de42
2 changed files with 4 additions and 8 deletions

View File

@ -19,9 +19,10 @@ $site = "Lalis";
$dossier = "/sftp"; $dossier = "/sftp";
$basedir = dirname( $_SERVER['DOCUMENT_ROOT'] ) . $dossier; $basedir = dirname( $_SERVER['DOCUMENT_ROOT'] ) . $dossier;
$base_url = "https://lalis69.ddns.net:10443/vote"; $base_url = "https://lalis69.ddns.net:10443/";
$url_admin = $base_url . "/gestion"; $vote_url = $base_url . "vote/";
$accueil = $base_url . "/index.html"; $url_admin = $vote_url . "/gestion/";
$accueil = $vote_url . "/index.html";
if (empty( $_SERVER["PHP_AUTH_USER"])) if (empty( $_SERVER["PHP_AUTH_USER"]))
{ {
$_SERVER["PHP_AUTH_USER"] = 'script'; $_SERVER["PHP_AUTH_USER"] = 'script';

View File

@ -46,8 +46,6 @@ function mb_ucfirst($str)
function choixVote($path, $idVotation, $confirm=false) function choixVote($path, $idVotation, $confirm=false)
{ {
global $base_url, $action;
$db = new db(); $db = new db();
$query = "SELECT * FROM liste_votes WHERE idVotation=" . $idVotation; $query = "SELECT * FROM liste_votes WHERE idVotation=" . $idVotation;
$result = $db->query($query); $result = $db->query($query);
@ -72,8 +70,6 @@ function choixVote($path, $idVotation, $confirm=false)
function choixVotation($path, $methode = 2, $confirm = true) //2 = toutes les votations 0 = votations en cours 1 = votations cloturées function choixVotation($path, $methode = 2, $confirm = true) //2 = toutes les votations 0 = votations en cours 1 = votations cloturées
{ {
global $base_url, $action;
$db = new db(); $db = new db();
$query = "SELECT * FROM liste_votations"; $query = "SELECT * FROM liste_votations";
if ($methode != 2) if ($methode != 2)
@ -85,7 +81,6 @@ function choixVotation($path, $methode = 2, $confirm = true) //2 = toutes les v
print ('<form method="get" action="' . $path . '">'); print ('<form method="get" action="' . $path . '">');
print "<pre>"; print "<pre>";
print '<input type="hidden" name="action" value="' . $action . '"/>';
foreach($votations as $key => $value ) foreach($votations as $key => $value )
{ {
print '<input type="radio" name="idVotation" value="' . $value["id"] . '"/> ' . $value["titre"] . '&nbsp;:' . $value["libelle"] . '<br>'; print '<input type="radio" name="idVotation" value="' . $value["id"] . '"/> ' . $value["titre"] . '&nbsp;:' . $value["libelle"] . '<br>';