' . $var . "
"; if ( isset($_GET[$var]) ) { //echo '$_get -> $var =>' . $var . "
"; return $_GET[$var]; } elseif ( isset($_POST[$var]) ) { //echo '$_POST -> $var =>' . $var . "
"; return $_POST[$var]; }else { return null; } } // MET LA PREMIÈRE LETTRE D'UN MOT EN MAJUSCULE ( utf8 compliant ) function mb_ucfirst($str) { $char = mb_substr($str,0,1,"UTF8"); $str = mb_substr( $str, 1, NULL, "UTF8"); $char = mb_strtoupper( $char, "UTF8"); return $char . $str; } function choixVotation($path, $methode = 2, $confirm = true) //2 = toutes les votations 1 = votations en cours 0 = votations cloturées { global $db, $base_url, $action; $query = "SELECT * FROM liste_votations"; if ($methode != 2) { $query .= " where status=" . $methode; } $result = $db->query($query); $votations = $db->result->fetch_all(MYSQLI_ASSOC); if ($db->result->num_rows == 1) { $redirect = ''); print "
";
	print '';
	foreach($votations as $key => $value )
	{
		print ' ' . $value["titre"] . ' :' . $value["libelle"] . '
'; } // TODO confirmation du choix par javascript si $confirm = true print '

'; } function votationForm($path, $titre="", $libelle="", $dateDebut="", $DateFin="", $status=0) { //TODO vérification du formulaire en javascript print('
'); print('
') . EOLH; print('
') . EOLH; print('
') . EOLH; print('
') . EOLH; print('') . EOLH; print('') . EOLH; } function votesForm($path, $libelle = "", $method = 0) { $db = new db(); $query = "SELECT * FROM methods"; // clotûre $db->query($query); $methods = $db->result->fetch_all(MYSQLI_ASSOC); if (!(array_key_exists($method, $methods))) { print(_("L'ID de la méthode demandée n'est pas bonne " . __file__ . __LINE__)); log_error(_("L'ID de la méthode demandée n'est pas bonne " . __file__ . __LINE__), true, true); } var_dump($methods); //TODO vérification du formulaire en javascript print(''); print('
') . EOLH; print('
') . EOLH; if ($method == 0) { print('