Merge branch 'a11y-audit2' into 'master'

Accessibilté suite 2e audit + reprise merge précédent

## Accessibilité
- role="presentation" sur icônes en page d'accueil et sur séparateurs
- aria-hidden du la légende (pas besoin d'être lu par un lecteur d'écran)
- sélecteur de langue par ordre alphabétique
- description en h3 + label pour lecteur d'écran sur adminstuds
- label pour lecteur d'écran pour les champs #day*
- aide à la saisie/après erreur concernant le format d'email
- h4 de la modale pour ajouter img ou lien replacé par un p
- suppression des bootstrap-a11y dans le head

## Locales
- reformulation « Reporter les horaires du premier jour sur les autres jours »
- intitulé plus explicite pour les boutons de suppression de jour, horaires et choix dans choix_(autre|date).php
- découpage du texte concernant la date d'expiration
- « email » remplacé par « courriel » ou « adresse électronique » (évite d'avoir à mettre un <span lang="en"> qui de toute manière ne passe pas dans les title)

## Ergonomie
- formulaire de vote toujours en haut et déplacé en bas au scroll si la longueur du tableau dépasse celle de l'écran
- marge sous les boutons de création de sondage en page d'accueil (sur mobile la correspondance du bouton avec l'img n'était pas claire)

## Config
- config.inc.php supprimé : les valeurs de configuration sont maintenant stockées dans un tableau dans le fichier constant.php (on pourra renommer ce fichier plus tard quand le backend aura été repensé entièrement)
- function.inc.php supprimé, auparavant un fichier du même nom existait et a été remplacé par la classe Utils.php (idem à voir comment on repense le backend). La fonction pour appeler les variables de config ne me paraissait pas nécessaire.
- prise en compte des paramètres de configuration pour la date d'expiration des sondage date et pour le texte expliquant l'envoi des emails
- meilleure gestion des formats de date sur windows ( a priori c'est ce qui bug au #17 )

## Admin
- purge auto limité à 20 sondages pour 1 sondage créé

See merge request !13
This commit is contained in:
JosephK 2014-11-14 18:18:57 +01:00
commit 9eccbee0ed
22 changed files with 238 additions and 268 deletions

View File

@ -83,7 +83,7 @@ function send_mail_admin() {
global $email_admin;
global $poll_title;
global $numsondageadmin;
if(config_get('use_smtp')==true){
if($config['use_smtp']==true){
if(!isset($_SESSION["mail_admin_sent"])) {
Utils::sendEmail( $email_admin,
_("[ADMINISTRATOR] New settings for your poll") . ' ' . stripslashes( $poll_title ),
@ -109,9 +109,7 @@ if (isset($_POST["boutonnouveautitre"])) {
//Email sent to the admin
if ($connect->Execute($sql, array($nouveautitre, $numsondage))) {
//if(config_get('use_smtp')==true){
send_mail_admin();
//}
}
}
}
@ -757,9 +755,10 @@ echo '
</div>
</div>
<div class="form-group col-md-7" id="description-form">
<label for="newdescription">'._("Description") .'</label><button class="btn btn-link btn-sm btn-edit" title="'. _('Edit the description') .'"><span class="glyphicon glyphicon-pencil"></span><span class="sr-only">' . _('Edit') . '</span></button><br />
<h4 class="control-label">'._("Description") .'</h4><button class="btn btn-link btn-sm btn-edit" title="'. _('Edit the description') .'"><span class="glyphicon glyphicon-pencil"></span><span class="sr-only">' . _('Edit') . '</span></button><br />
<p class="well">'.$description.'</p>
<div class="hidden js-desc text-right">
<label class="sr-only" for="newdescription">'._("Description") .'</label>
<textarea class="form-control" id="newdescription" name="nouveauxcommentaires" rows="2" cols="40">'.$description.'</textarea>
<button type="submit" id="btn-new-desc" name="boutonnouveauxcommentaires" value="1" class="btn btn-sm btn-success" title="'. _("Save the description") .'">'. _("Save") .'</button>
<button class="btn btn-default btn-sm btn-cancel" title="'. _('Cancel the description edit') .'">'. _('Cancel') .'</button>
@ -840,7 +839,7 @@ if (substr($dsondage->format, 0, 1)=="D") {
$current = $toutsujet[$i];
$border[$i] = false;
$radio_title[$i] = strftime("%A %e %B %Y",$current);
$radio_title[$i] = strftime($date_format['txt_short'],$current);
// Months
$td_headers[$i] = 'M'.($i+1-$colspan_month);
@ -856,11 +855,11 @@ if (substr($dsondage->format, 0, 1)=="D") {
// Days
$td_headers[$i] .= ' D'.($i+1-$colspan_day);
if (isset($toutsujet[$i+1]) && strftime("%a %e",$current)==strftime("%a %e",$toutsujet[$i+1]) && strftime("%B",$current)==strftime("%B",$toutsujet[$i+1])){
if (isset($toutsujet[$i+1]) && strftime($date_format['txt_day'],$current)==strftime($date_format['txt_day'],$toutsujet[$i+1]) && strftime("%B",$current)==strftime("%B",$toutsujet[$i+1])){
$colspan_day++;
} else {
$rbd = ($border[$i]) ? ' rbd' : '';
$tr_days .= '<th colspan="'.$colspan_day.'" class="bg-primary day'.$rbd.'" id="D'.($i+1-$colspan_day).'">'.strftime("%a %e",$current).'</th>';
$tr_days .= '<th colspan="'.$colspan_day.'" class="bg-primary day'.$rbd.'" id="D'.($i+1-$colspan_day).'">'.strftime($date_format['txt_day'],$current).'</th>';
$colspan_day=1;
}
@ -956,7 +955,7 @@ echo '
' . _(' remove a column or a line with ') . '<span class="glyphicon glyphicon-remove text-danger"></span><span class="sr-only">' . _('Remove') . '</span>
' . _('and add a new column with '). '<span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">'. _('Add a column') . '</span></p>
<p>' . _('Finally, you can change the informations of this poll like the title, the comments or your email address.') . '</p>
<p><b>' . _('Legend:'). '</b> <span class="glyphicon glyphicon-ok"></span> =' . _('Yes') . ', <b>(<span class="glyphicon glyphicon-ok"></span>)</b> = ' . _('Ifneedbe') . ', <span class="glyphicon glyphicon-ban-circle"></span> = ' . _('No') . '</p>
<p aria-hidden="true"><b>' . _('Legend:'). '</b> <span class="glyphicon glyphicon-ok"></span> =' . _('Yes') . ', <b>(<span class="glyphicon glyphicon-ok"></span>)</b> = ' . _('Ifneedbe') . ', <span class="glyphicon glyphicon-ban-circle"></span> = ' . _('No') . '</p>
</div>
<div class="hidden row scroll-buttons" aria-hidden="true">
@ -1079,7 +1078,7 @@ while ($data = $user_studs->FetchNextObject(false)) {
for ($i = 0; $i < $nblignes; $i++) {
if (isset($_POST["modifierligne$i"])) {
if ($compteur == $i) {
echo '<td style="padding:5px"><button type="submit" class="btn btn-success btn-xs" name="validermodifier'.$compteur.'" title="'. _('Save the choices:') .' '.stripslashes($nombase).'">'. _('Save') .'</button></td>'."\n";
echo '<td style="padding:5px"><button type="submit" class="btn btn-success btn-xs" name="validermodifier'.$compteur.'" title="'. _('Save the choices') .' '.stripslashes($nombase).'">'. _('Save') .'</button></td>'."\n";
}
}
}
@ -1186,7 +1185,7 @@ if ($compteursujet == 1) {
echo '
</div>
<hr />'."\n";
<hr role="presentation" />'."\n";
// Commments
$sql = 'SELECT * FROM comments WHERE id_sondage='.$connect->Param('numsondage').' ORDER BY id_comment';
$sql = $connect->Prepare($sql);

View File

@ -87,14 +87,12 @@ class Utils
echo '
<link rel="stylesheet" href="' . self::get_server_name() . 'css/bootstrap.min.css">
<link rel="stylesheet" href="' . self::get_server_name() . 'css/bootstrap-accessibility.css">
<link rel="stylesheet" href="' . self::get_server_name() . 'css/datepicker3.css">
<link rel="stylesheet" href="' . self::get_server_name() . 'css/style.css">
<link rel="stylesheet" href="' . self::get_server_name() . 'css/frama.css">
<link rel="stylesheet" href="' . self::get_server_name() . 'css/print.css" media="print">
<script type="text/javascript" src="' . self::get_server_name() . 'js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="' . self::get_server_name() . 'js/bootstrap.min.js"></script>
<script type="text/javascript" src="' . self::get_server_name() . 'js/bootstrap-accessibility.min.js"></script>
<script type="text/javascript" src="' . self::get_server_name() . 'js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="' . self::get_server_name() . 'js/locales/bootstrap-datepicker.'.$lang.'.js"></script>
<script type="text/javascript" src="' . self::get_server_name() . 'js/core.js"></script>';
@ -252,7 +250,7 @@ class Utils
public static function cleaning_polls($connect, $log_txt) {
$connect->StartTrans();
$req = 'SELECT * FROM sondage WHERE date_fin < NOW()';
$req = 'SELECT * FROM sondage WHERE date_fin < NOW() LIMIT 20';
$sql = $connect->Prepare($req);
$cleaning = $connect->Execute($sql);

View File

@ -1,49 +0,0 @@
<?php
/**
* This software is governed by the CeCILL-B license. If a copy of this license
* is not distributed with this file, you can obtain one at
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
*
* Authors of STUdS (initial project): Guilhem BORGHESI (borghesi@unistra.fr) and Raphaël DROZ
* Authors of Framadate/OpenSondate: Framasoft (https://git.framasoft.org/framasoft/framadate)
*
* =============================
*
* Ce logiciel est régi par la licence CeCILL-B. Si une copie de cette licence
* ne se trouve pas avec ce fichier vous pouvez l'obtenir sur
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt
*
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
* Auteurs de Framadate/OpenSondage : Framasoft (https://git.framasoft.org/framasoft/framadate)
*/
/**
* general configuration
*/
//use email for polls creation/modification/responses notification
$use_smtp = true;
/**
* index.php
*/
//display "how to use" section
$show_what_is_that = true;
//display technical information about the software
$show_the_software = true;
//display "developpement and administration" information
$show_cultivate_your_garden = true;
/**
* choix_autre.php
*/
//default values for the new poll duration (number of days).
$default_poll_duration = 30;
//user can add link or URL when creating his poll.
$user_can_add_link_or_url = false;

View File

@ -83,3 +83,18 @@ const NO_POLL_ID = 0x0001000000;
const INVALID_EMAIL = 0x0010000000;
const TITLE_EMPTY = 0x0100000000;
const INVALID_DATE = 0x1000000000;
// Config
$config = [
/* general config */
'use_smtp' => true, // use email for polls creation/modification/responses notification
/* home */
'show_what_is_that' => true, // display "how to use" section
'show_the_software' => true, // display technical information about the software
'show_cultivate_your_garden' => true, // display "developpement and administration" information
/* choix_autre.php / choix_date.php */
'default_poll_duration' => 180, // default values for the new poll duration (number of days).
/* choix_autre.php */
'user_can_add_img_or_link' => true, // user can add link or URL when creating his poll.
];

View File

@ -1,24 +0,0 @@
<?php
/**
* This software is governed by the CeCILL-B license. If a copy of this license
* is not distributed with this file, you can obtain one at
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
*
* Authors of STUdS (initial project): Guilhem BORGHESI (borghesi@unistra.fr) and Raphaël DROZ
* Authors of Framadate/OpenSondate: Framasoft (https://git.framasoft.org/framasoft/framadate)
*
* =============================
*
* Ce logiciel est régi par la licence CeCILL-B. Si une copie de cette licence
* ne se trouve pas avec ce fichier vous pouvez l'obtenir sur
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt
*
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
* Auteurs de Framadate/OpenSondage : Framasoft (https://git.framasoft.org/framasoft/framadate)
*/
function config_get($p_option){
include('config.inc.php');
if (isset(${$p_option})){
return ${$p_option};
}
}

View File

@ -17,6 +17,8 @@
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
*/
asort($ALLOWED_LANGUAGES);
if (isset($_POST['lang']) && is_string($_POST['lang']) && in_array($_POST['lang'], array_keys($ALLOWED_LANGUAGES)) ) {
$mlocale = $_POST['lang'] ;
setcookie('lang' , $_POST['lang'], time()+60*5);
@ -52,3 +54,15 @@ $_SESSION['langue'] = strtoupper($a[0]);
/* <html lang="$lang"> */
$lang = ($_SESSION['langue']!='') ? strtolower($_SESSION['langue']) : 'fr';
/* Date Format */
$date_format['txt_full'] = _("%A, den %e. %B %Y"); //summary in choix_date.php and removal date in choix_(date|autre).php
$date_format['txt_short'] = "%A %e %B %Y"; // radio title
$date_format['txt_day'] = "%a %e";
if (strtoupper(substr(PHP_OS,0,3))=='WIN'){ //%e can't be used on Windows platform, use %#d instead
foreach($date_format as $k => $v) {
$date_format[$k] = preg_replace('#(?<!%)((?:%%)*)%e#','\1%#d', $v); //replace %e by %#d for windows
}
}

View File

@ -25,7 +25,6 @@ require_once __DIR__ . '/../../vendor/autoload.php';
include_once __DIR__ . '/constants.php';
include_once __DIR__ . '/i18n.php';
include_once __DIR__ . '/functions.inc.php';
$connect = NewADOConnection(BASE_TYPE);
$connect->Connect(SERVEURBASE, USERBASE, USERPASSWD, BASE);

View File

@ -40,7 +40,7 @@ function bandeau_titre($titre)
echo '
<h1><a href="'.str_replace('/admin','', Utils::get_server_name()).'" title="'._("Home").' - '.NOMAPPLICATION.'">'.$img.'</a></h1>
<h2 class="lead"><i>'. $titre .'</i></h2>
<hr class="trait" />
<hr class="trait" role="presentation" />
</header>
<main role="main">';
}

View File

@ -28,7 +28,7 @@ if (file_exists('bandeaux_local.php')) {
}
// Step 1/3 : error if $_SESSION from info_sondage are not valid
if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmpty('nom', $_SESSION) === false || ((config_get('use_smtp')) ? Utils::issetAndNoEmpty('adresse', $_SESSION) === false : false)) {
if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmpty('nom', $_SESSION) === false || (($config['use_smtp']) ? Utils::issetAndNoEmpty('adresse', $_SESSION) === false : false)) {
Utils::print_header ( _("Error!") );
bandeau_titre(_("Error!"));
@ -92,13 +92,9 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
bandeau_titre(_("Removal date and confirmation (3 on 3)"));
// Expiration date is initialised with config parameter. Value will be modified in step 4 if user has defined an other date
$_SESSION["champdatefin"]= time()+ (86400 * config_get('default_poll_duration')); //60 secondes * 60 minutes * 24 heures * config
$_SESSION["champdatefin"]= time()+ (86400 * $config['default_poll_duration']); //60 sec * 60 min * 24 hours * config
$date_format = _("%A, den %e. %B %Y"); //locale replacement
if (strtoupper(substr(PHP_OS,0,3))=='WIN'){ //%e can't be used on Windows platform, use %#d instead
$date_format = preg_replace('#(?<!%)((?:%%)*)%e#','\1%#d', $date_format); //replace %e by %#d for windows
}
$removal_date="(".strftime($date_format, ($_SESSION["champdatefin"])).")";//textual date
$removal_date= strftime($date_format['txt_full'], ($_SESSION["champdatefin"]));//textual date
// Summary
$summary = '<ol>';
@ -142,7 +138,7 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
'. $summary .'
</div>
<div class="alert alert-info">
<p>' . _("Your poll will be automatically removed after"). " " . config_get('default_poll_duration') . " " . _("days") . ' <strong>'.$removal_date.'</strong>.<br />' . _("You can fix another removal date for it.") .'</p>
<p>' . _("Your poll will be automatically removed after"). " " . $config['default_poll_duration'] . " " . _("days") . ': <strong>'.$removal_date.'</strong>.<br />' . _("You can fix another removal date for it.") .'</p>
<div class="form-group">
<label for="champdatefin" class="col-sm-5 control-label">'. _("Removal date (optional)") .'</label>
<div class="col-sm-6">
@ -155,8 +151,12 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
</div>
</div>
<div class="alert alert-warning">
<p>'. _("Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll."). '</p>
<p>' . _("Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.") .'</p>
<p>'. _("Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll."). '</p>';
if($config['use_smtp']==true){
echo '
<p>' . _("Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.") .'</p>';
}
echo '
</div>
<p class="text-right">
<button class="btn btn-default" onclick="javascript:window.history.back();" title="'. _('Back to step 2') . '">'. _('Back') . '</button>
@ -181,7 +181,7 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
<div class="alert alert-info">
<p>'. _("To make a generic poll you need to propose at least two choices between differents subjects.") .'</p>
<p>'. _("You can add or remove additional choices with the buttons") .' <span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">'. _("Remove") .'</span> <span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">'. _("Add") .'</span></p>';
if(config_get('user_can_add_link_or_url')){
if($config['user_can_add_img_or_link']){
echo ' <p>'. _("It's possible to propose links or images by using "). '<a href="http://'.$lang.'.wikipedia.org/wiki/Markdown">'. _("the Markdown syntax") .'</a>.</p>';
}
echo ' </div>'."\n";
@ -195,7 +195,7 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
<label for="choice'.$i.'" class="col-sm-2 control-label">'. _("Choice") .' '.($i+1).'</label>
<div class="col-sm-10 input-group">
<input type="text" class="form-control" name="choices[]" size="40" value="'.$choice_value.'" id="choice'.$i.'" />';
if(config_get('user_can_add_link_or_url')){
if($config['user_can_add_img_or_link']){
echo '<span class="input-group-addon btn-link md-a-img" title="'. _("Add a link or an image") .' - '. _("Choice") .' '.($i+1).'" ><span class="glyphicon glyphicon-picture"></span> <span class="glyphicon glyphicon-link"></span></span>';
}
echo '
@ -221,7 +221,7 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">'. _('Close') . '</span></button>
<h4 class="modal-title" id="md-a-imgModalLabel">'. _("Add a link or an image") .'</h4>
<p class="modal-title" id="md-a-imgModalLabel">'. _("Add a link or an image") .'</p>
</div>
<div class="modal-body">
<p class="alert alert-info">'. _("These fields are optional. You can add a link, an image or both.") .'</p>

View File

@ -76,7 +76,7 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
$_SESSION["toutchoix"]=substr($choixdate,1);
// Expiration date → 6 months after last day if not filled or in bad format
$_SESSION["champdatefin"]=end($temp_results)+15552000;
$_SESSION["champdatefin"]=end($temp_results)+(86400 * $config['default_poll_duration']);
if (Utils::issetAndNoEmpty('champdatefin')) {
$registredate = explode("/",$_POST["champdatefin"]);
@ -124,12 +124,12 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
$temp_array = array_unique($_SESSION["totalchoixjour"]);
sort($temp_array);
$removal_date=strftime(_("%A, den %e. %B %Y"), end($temp_array)+15552000);
$removal_date=strftime($date_format['txt_full'], end($temp_array)+ (86400 * $config['default_poll_duration']));
// Sumary
$summary = '<ul>';
for ($i=0;$i<count($_SESSION["totalchoixjour"]);$i++) {
$summary .= '<li>'.strftime(_("%A, den %e. %B %Y"), $_SESSION["totalchoixjour"][$i]);
$summary .= '<li>'.strftime($date_format['txt_full'], $_SESSION["totalchoixjour"][$i]);
for ($j=0;$j<count($_SESSION['horaires'.$i]);$j++) {
if (isset($_SESSION['horaires'.$i][$j])) {
$summary .= ($j==0) ? ' : ' : ', ';
@ -150,7 +150,7 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
'. $summary .'
</div>
<div class="alert alert-info clearfix">
<p>' . _("Your poll will be automatically removed 6 months after the last date of your poll:") . ' <strong>'.$removal_date.'</strong>.<br />' . _("You can fix another removal date for it.") .'</p>
<p>' . _("Your poll will be automatically removed "). $config['default_poll_duration'] . ' ' . _("days") ._(" after the last date of your poll:") . ' <strong>'.$removal_date.'</strong>.<br />' . _("You can fix another removal date for it.") .'</p>
<div class="form-group">
<label for="champdatefin" class="col-sm-5 control-label">'. _("Removal date (optional)") .'</label>
<div class="col-sm-6">
@ -163,8 +163,12 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
</div>
</div>
<div class="alert alert-warning">
<p>'. _("Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll."). '</p>
<p>' . _("Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.") .'</p>
<p>'. _("Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll."). '</p>';
if($config['use_smtp']==true){
echo '
<p>' . _("Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.") .'</p>';
}
echo '
</div>
<p class="text-right">
<button class="btn btn-default" onclick="javascript:window.history.back();" title="'. _('Back to step 2') . '">'. _('Back') . '</button>
@ -200,6 +204,7 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
<fieldset>
<div class="form-group">
<legend>
<label class="sr-only" for="day'.$i.'">'. _("Day") .' '. ($i+1) .'</label>
<div class="input-group date col-xs-7">
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar text-info"></i></span>
<input type="text" class="form-control" id="day'.$i.'" title="'. _("Day") .' '. ($i+1) .'" data-date-format="'. _("dd/mm/yyyy") .'" aria-describedby="dateformat'.$i.'" name="days[]" value="'.$day_value.'" size="10" maxlength="10" placeholder="'. _("dd/mm/yyyy") .'" />

View File

@ -45,8 +45,7 @@ function ajouter_sondage()
$sondage=random(16);
$sondage_admin=$sondage.random(8);
//$date_fin = ($_SESSION["champdatefin"]) ? $_SESSION["champdatefin"] : $date_fin=time()+ (86400 * config_get('default_poll_duration'));
$date_fin = $_SESSION["champdatefin"]; //always provided by choix_autre.php
$date_fin = $_SESSION["champdatefin"]; // provided by choix_autre.php or choix_date.php
$_SESSION["champdatefin"]=""; //clean param cause 2 polls created by the same user in the same session can be affected by this param during the 2nd creation.
$sql = 'INSERT INTO sondage
(id_sondage, commentaires, mail_admin, nom_admin, titre, id_sondage_admin, date_fin, format, mailsonde)
@ -68,7 +67,7 @@ function ajouter_sondage()
$sql = $connect->Prepare($sql);
$connect->Execute($sql, array($sondage, $_SESSION['toutchoix']));
if(config_get('use_smtp')==true){
if($config['use_smtp']==true){
$message = _("This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.");
$message .= "\n\n";
$message .= stripslashes(html_entity_decode($_SESSION["nom"],ENT_QUOTES,"UTF-8"))." " . _("hast just created a poll called") . " : \"".stripslashes(htmlspecialchars_decode($_SESSION["titre"],ENT_QUOTES))."\".\n";

View File

@ -44,8 +44,6 @@ div.comment{
padding-left: 14px;
}
/* Ajouts après mise en place de Bootstrap */
/* Règles générales */
a:focus { /* a11y */
@ -77,6 +75,10 @@ main, header, footer, .container .jumbotron {
opacity: 1;
}
.home-choice {
margin-bottom:50px;
}
/* Description du sondage */
/* studs.php et adminstuds.php */
header .lead {
@ -115,7 +117,7 @@ caption {
}
/* adminstuds.php */
#title-form h2 .btn-edit,
#title-form h3 .btn-edit,
#email-form .btn-edit,
#description-form .btn-edit,
#poll-rules-form .btn-edit {
@ -338,3 +340,7 @@ table.results .btn-link.btn-sm {
#md-a-imgModal .form-group {
margin:10px 0px;
}
#md-a-imgModalLabel {
font-size: 24px;
}

View File

@ -37,31 +37,30 @@ bandeau_titre(_("Make your polls"));
echo '
<div class="row">
<div class="col-md-6 text-center">
<p><a href="'.Utils::get_server_name().'infos_sondage.php?choix_sondage=date" class="opacity" role="button">
<p class="home-choice"><a href="'.Utils::get_server_name().'infos_sondage.php?choix_sondage=date" class="opacity" role="button">
<img class="img-responsive center-block" src="'.Utils::get_server_name().'images/date.png" alt="" />
<br /><span class="btn btn-primary btn-lg"><span class="glyphicon glyphicon-calendar"></span>
'. _('Schedule an event') . '</span>
</a></p>
</div>
<div class="col-md-6 text-center">
<p><a href="'.Utils::get_server_name().'infos_sondage.php?choix_sondage=autre" class="opacity" role="button">
<p class="home-choice"><a href="'.Utils::get_server_name().'infos_sondage.php?choix_sondage=autre" class="opacity" role="button">
<img alt="" class="img-responsive center-block" src="'.Utils::get_server_name().'images/classic.png" />
<br /><span class="btn btn-info btn-lg"><span class="glyphicon glyphicon-stats"></span>
'. _('Make a classic poll') . '</span>
</a></p>
</div>
</div>
<hr />
<hr role="presentation" />
<div class="row">';
$nbcol = config_get('show_what_is_that') + config_get('show_the_software') + config_get('show_cultivate_your_garden');
$nbcol = $config['show_what_is_that'] + $config['show_the_software'] + $config['show_cultivate_your_garden'];
if ($nbcol > 0){
$colmd = 12/$nbcol; // 3 =>col-md-4, 2 =>col-md-6, 1 =>col-md-12.
//echo "mon test : ".$nbActivation;
}
if(config_get('show_what_is_that') == true){
if($config['show_what_is_that'] == true){
echo '<div class="col-md-'.$colmd.'">
<h3>'. _('What is that?') . '</h3>
<p class="text-center"><span class="glyphicon glyphicon-question-sign" style="font-size:50px"></span></p>
<p class="text-center" role="presentation"><span class="glyphicon glyphicon-question-sign" style="font-size:50px"></span></p>
<p>'. _('Framadate is an online service for planning an appointment or make a decision quickly and easily. No registration is required.') .'</p>
<p>'. _('Here is how it works:') . '</p>
<ol>
@ -74,10 +73,10 @@ echo '
</div>';
}
if(config_get('show_the_software') == true){
if($config['show_the_software'] == true){
echo '<div class="col-md-'.$colmd.'">
<h3>'. _('The software') .'</h3>
<p class="text-center"><span class="glyphicon glyphicon-cloud" style="font-size:50px"></span></p>
<p class="text-center" role="presentation"><span class="glyphicon glyphicon-cloud" style="font-size:50px"></span></p>
<p>'. _('Framadate was initially based on '). '<a href="https://sourcesup.cru.fr/projects/studs/">Studs</a>'. _(' a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft') .'.</p>
<p>'. _('This software needs javascript and cookies enabled. It is compatible with the following web browsers:') .'</p>
<ul>
@ -91,10 +90,10 @@ echo '
</div>';
}
if(config_get('show_cultivate_your_garden') == true){
if($config['show_cultivate_your_garden'] == true){
echo '<div class="col-md-'.$colmd.'">
<h3>'. _('Cultivate your garden') .'</h3>
<p class="text-center"><span class="glyphicon glyphicon-tree-deciduous" style="font-size:50px"></span></p>
<p class="text-center" role="presentation"><span class="glyphicon glyphicon-tree-deciduous" style="font-size:50px"></span></p>
<p>'. _('To participate in the software development, suggest improvements or simply download it, please visit ') .'<a href="https://git.framasoft.org/framasoft/framadate">'._('the development site').'</a>.</p>
<br />
<p>'. _('If you want to install the software for your own use and thus increase your independence, we help you on:') .'</p>

View File

@ -77,7 +77,7 @@ if (Utils::issetAndNoEmpty("poursuivre")){
unset($_SESSION["mailsonde"]);
$_SESSION["mailsonde"] = ($mailsonde !== null) ? true : false;
if (config_get('use_smtp')==true){
if ($config['use_smtp']==true){
if (Utils::isValidEmail($adresse) === false) {
$erreur_adresse = true;
}
@ -96,10 +96,9 @@ if (Utils::issetAndNoEmpty("poursuivre")){
}
// Si pas d'erreur dans l'adresse alors on change de page vers date ou autre
if(config_get('use_smtp')==true){
if($config['use_smtp']==true){
$email_OK = $adresse && !$erreur_adresse;
}
else{
} else{
$email_OK = true;
}
@ -188,7 +187,7 @@ if (!$_SESSION["adresse"] && Utils::issetAndNoEmpty("poursuivre")) {
$errors['email']['msg'] = '<div class="alert alert-danger"><p id="poll_email_error">' . _("Enter an email address") . '</p></div>';
} elseif ($erreur_adresse && Utils::issetAndNoEmpty("poursuivre")) {
$errors['email']['aria'] = 'aria-describeby="poll_email_error" '; $errors['email']['class'] = ' has-error';
$errors['email']['msg'] = '<div class="alert alert-danger"><p id="poll_email_error">' . _("The address is not correct! (You should enter a valid email address in order to receive the link to your poll)") . '</p></div>';
$errors['email']['msg'] = '<div class="alert alert-danger"><p id="poll_email_error">' . _("The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.") . '</p></div>';
}
/*
@ -252,18 +251,18 @@ echo '
</div>
</div>
'.$errors['name']['msg'];
if(config_get('use_smtp')==true){
if($config['use_smtp']==true){
echo '
<div class="form-group'.$errors['email']['class'].'">
<label for="email" class="col-sm-4 control-label">'. _("Your email address") .' *</label>
<label for="email" class="col-sm-4 control-label">'. _("Your email address") .' *<br /><span class="small">'. _("(in the format name@mail.com)") .'</span></label>
<div class="col-sm-8">
'.$input_email.'
</div>
</div>
'.$errors['email']['msg'];
}
echo '<div class="form-group">
echo '
<div class="form-group">
<div class="col-sm-offset-1 col-sm-11">
<div class="checkbox">
<label>
@ -272,7 +271,7 @@ echo '
</div>
</div>
</div>';
if(config_get('use_smtp')==true){
if($config['use_smtp']==true){
echo '<div class="form-group">
<div class="col-sm-offset-1 col-sm-11">
<div class="checkbox">
@ -283,8 +282,8 @@ echo '
</div>
</div>';
}
echo '<p class="text-right">
echo '
<p class="text-right">
<input type="hidden" name="choix_sondage" value="'. $choix_sondage .'"/>
<button name="poursuivre" value="'. $choix_sondage .'" type="submit" class="btn btn-success" title="'. _('Go to step 2') . '">'. _('Next') . '</button>
</p>
@ -295,5 +294,4 @@ echo '
</div>
</div>';
//bandeau de pied
bandeau_pied();

View File

@ -151,6 +151,7 @@ $(document).ready(function() {
var new_day_html = last_day.html().replace(re_id_hours, '"d'+nb_days+'-h')
.replace('id="day'+(nb_days-1)+'"', 'id="day'+nb_days+'"')
.replace('for="day'+(nb_days-1)+'"', 'for="day'+nb_days+'"')
.replace(re_name_hours, 'name="horaires'+nb_days)
.replace(/value="(.*?)"/g, 'value=""')
.replace(/hours" title="(.*?)"/g, 'hours" title="" p')
@ -404,12 +405,11 @@ $(document).ready(function() {
// Vote form moving to the top or to the bottom
$(window).scroll(function() {
var $table_offset = $('.results thead').offset();
if($table_offset != undefined && $(window).scrollTop() < $table_offset.top) {
$('.results tbody').prepend($('#vote-form'));
$('#tableContainer').before($('.scroll-buttons'));
} else {
if(($table_offset == undefined || $(window).scrollTop() > $table_offset.top) && ($('table.results').height() > $(window).height())) {
$('#addition').before($('#vote-form'));
$('#tableContainer').after($('.scroll-buttons'));
} else {
$('.results tbody').prepend($('#vote-form'));
$('#tableContainer').before($('.scroll-buttons'));
}
});

Binary file not shown.

View File

@ -60,6 +60,9 @@ msgstr "Ihr Name"
msgid "Your email address"
msgstr "Ihre E-Mail Addresse"
msgid "(in the format name@mail.com)"
msgstr "(in the format name@mail.com)"
msgid "Description"
msgstr "Beschreibung"
@ -428,8 +431,8 @@ msgstr "Die Zeichen < > und \" sind nicht erlaubt !"
msgid "Enter an email address"
msgstr "Sie müssen eine E-Mail Adresse eingeben"
msgid "The address is not correct! (You should enter a valid email address in order to receive the link to your poll)"
msgstr "Die Adresse ist nicht korrekt! (Sie sollten eine funktionierende E-Mail Adresse angeben, um den Link zu ihrer Umfrage zu erhalten)"
msgid "The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll."
msgstr "Die Adresse ist nicht korrekt! Sie sollten eine funktionierende E-Mail Adresse angeben, um den Link zu ihrer Umfrage zu erhalten"
# Error choix_date.php/choix_autre.php
msgid "You haven't filled the first section of the poll creation."

Binary file not shown.

View File

@ -4,7 +4,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-10-23 20:52+0100\n"
"PO-Revision-Date: 2014-11-11 20:12+0100\n"
"Last-Translator: mrB <mr.bricodage@gmail.com>\n"
"Last-Translator: JosephK\n"
"Language-Team: JosephK\n"
"Language: English\n"
"MIME-Version: 1.0\n"
@ -60,6 +60,9 @@ msgstr "Your name"
msgid "Your email address"
msgstr "Your email address"
msgid "(in the format name@mail.com)"
msgstr "(in the format name@mail.com)"
msgid "Description"
msgstr "Description"
@ -434,8 +437,8 @@ msgstr "Characters < > and \" are not permitted"
msgid "Enter an email address"
msgstr "Enter an email address"
msgid "The address is not correct! (You should enter a valid email address in order to receive the link to your poll)"
msgstr "The address is not correct! (You should enter a valid email address in order to receive the link to your poll)"
msgid "The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll."
msgstr "The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll."
# Error choix_date.php/choix_autre.php
msgid "You haven't filled the first section of the poll creation."
@ -554,8 +557,11 @@ msgid "Create the poll"
msgstr "Create the poll"
# Step 3 choix_date.php
msgid "Your poll will be automatically removed 6 months after the last date of your poll:"
msgstr "Your poll will be automatically removed 6 months after the last date of your poll:"
msgid "Your poll will be automatically removed "
msgstr "Your poll will be automatically removed "
msgid " after the last date of your poll:"
msgstr " after the last date of your poll:"
msgid "Removal date:"
msgstr "Removal date:"

Binary file not shown.

View File

@ -4,7 +4,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-10-23 20:52+0100\n"
"PO-Revision-Date: 2014-11-11 13:19+0100\n"
"Last-Translator: mrB <mr.bricodage@gmail.com>\n"
"Last-Translator: JosephK\n"
"Language-Team: JosephK\n"
"Language: French\n"
"MIME-Version: 1.0\n"
@ -58,7 +58,10 @@ msgid "Your name"
msgstr "Votre nom"
msgid "Your email address"
msgstr "Votre adresse email"
msgstr "Votre courriel"
msgid "(in the format name@mail.com)"
msgstr "(au format nom@mail.com)"
msgid "Description"
msgstr "Description"
@ -197,16 +200,16 @@ msgid "Initiator of the poll"
msgstr "Auteur du sondage"
msgid "Email"
msgstr "Adresse email"
msgstr "Courriel"
msgid "Edit the email adress"
msgstr "Modifier l'adresse email"
msgstr "Modifier le courriel"
msgid "Save the email address "
msgstr "Enregistrer l'adresse email"
msgstr "Enregistrer le courriel"
msgid "Cancel the email address edit"
msgstr "Annuler le changement d'adresse email"
msgstr "Annuler le changement de courriel"
msgid "Edit the description"
msgstr "Modifier la description"
@ -255,7 +258,7 @@ msgid "and add a new column with "
msgstr "et si vous avez oublié de saisir un choix, vous pouvez rajouter une colonne en cliquant sur "
msgid "Finally, you can change the informations of this poll like the title, the comments or your email address."
msgstr "Vous pouvez enfin également modifier les informations relatives à ce sondage comme le titre, les commentaires ou encore votre adresse électronique."
msgstr "Vous pouvez enfin également modifier les informations relatives à ce sondage comme le titre, les commentaires ou encore votre courriel."
# Help text studs.php
msgid "If you want to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line."
@ -419,7 +422,7 @@ msgid "Voters can modify their vote themselves."
msgstr "Vous souhaitez que les sondés puissent modifier leur ligne eux-mêmes."
msgid "To receive an email for each new vote."
msgstr "Vous souhaitez recevoir un mail à chaque participation d'un sondé."
msgstr "Vous souhaitez recevoir un courriel à chaque participation d'un sondé."
msgid "Go to step 2"
msgstr "Aller à l'étape 2"
@ -432,10 +435,10 @@ msgid "Characters < > and \" are not permitted"
msgstr "Les caractères < > et \" ne sont pas autorisés !"
msgid "Enter an email address"
msgstr "Il faut saisir une adresse email !"
msgstr "Il faut saisir une adresse électronique !"
msgid "The address is not correct! (You should enter a valid email address in order to receive the link to your poll)"
msgstr "L'adresse saisie n'est pas correcte ! (Il faut une adresse valide pour recevoir le lien vers le sondage)"
msgid "The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll."
msgstr "L'adresse saisie n'est pas correcte ! Il faut une adresse électronique valide (par exemple r.stallman@outlock.com) pour recevoir le lien vers le sondage."
# Error choix_date.php/choix_autre.php
msgid "You haven't filled the first section of the poll creation."
@ -468,16 +471,16 @@ msgid "Time"
msgstr "Horaire"
msgid "Remove an hour"
msgstr "Supprimer un horaire"
msgstr "Supprimer le dernier horaire"
msgid "Add an hour"
msgstr "Ajouter un horaire"
msgid "Copy hours of the first day"
msgstr "Reporter les horaires du premier jour"
msgstr "Reporter les horaires du premier jour sur les autres jours"
msgid "Remove a day"
msgstr "Supprimer un jour"
msgstr "Supprimer le dernier jour"
msgid "Add a day"
msgstr "Ajouter un jour"
@ -523,7 +526,7 @@ msgid "Alternative text"
msgstr "Texte alternatif"
msgid "Remove a choice"
msgstr "Supprimer un choix"
msgstr "Supprimer le dernier choix"
msgid "Add a choice"
msgstr "Ajouter un choix"
@ -548,14 +551,17 @@ msgid "Once you have confirmed the creation of your poll, you will be automatica
msgstr "Une fois que vous aurez confirmé la création du sondage, vous serez redirigé automatiquement vers la page d'administration de votre sondage."
msgid "Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll."
msgstr "En même temps, vous recevrez deux emails : l'un contenant le lien vers votre sondage pour le faire suivre aux futurs sondés, l'autre contenant le lien vers la page d'administraion du sondage."
msgstr "En même temps, vous recevrez deux courriels : l'un contenant le lien vers votre sondage pour le faire suivre aux futurs sondés, l'autre contenant le lien vers la page d'administraion du sondage."
msgid "Create the poll"
msgstr "Créer le sondage"
# Step 3 choix_date.php
msgid "Your poll will be automatically removed 6 months after the last date of your poll:"
msgstr "Votre sondage sera automatiquement effacé 6 mois après la date la plus tardive :"
msgid "Your poll will be automatically removed "
msgstr "Votre sondage sera automatiquement effacé "
msgid " after the last date of your poll:"
msgstr " après la date la plus tardive :"
msgid "Removal date:"
msgstr "Date de suppression :"
@ -604,13 +610,9 @@ msgstr "Voir le sondage"
msgid "Change the poll"
msgstr "Modifier le sondage"
# Footer
msgid "Logs"
msgstr "Historique"
msgid "Cleaning"
msgstr "Nettoyage"
########### Mails ###########
# Mails studs.php
msgid "Poll's participation"

View File

@ -173,7 +173,7 @@ if (!Utils::is_error(NO_POLL) && (isset($_POST["boutonp"]))) {
$connect->Execute($sql, array($nom, $numsondage, $nouveauchoix));
if ($dsondage->mailsonde || /* compatibility for non boolean DB */ $dsondage->mailsonde=="yes" || $dsondage->mailsonde=="true") {
if(config_get('use_smtp')==true){
if($config['use_smtp']==true){
Utils::sendEmail( "$dsondage->mail_admin",
"[".NOMAPPLICATION."] "._("Poll's participation")." : ".html_entity_decode($dsondage->titre, ENT_QUOTES, 'UTF-8')."",
html_entity_decode("\"$nom\" ", ENT_QUOTES, 'UTF-8').
@ -246,7 +246,7 @@ if ($dsondage->commentaires) {
$commentaires=nl2br(str_replace("\\","",$commentaires));
echo '
<div class="form-group col-md-7">
<label class="control-label">'._("Description") .'</label><br />
<h4 class="control-label">'._("Description") .'</h4><br />
<p class="form-control-static well">'. $commentaires .'</p>
</div>';
}
@ -335,7 +335,7 @@ if ($dsondage->format=="D"||$dsondage->format=="D+"||$dsondage->format=="D-") {
$current = $toutsujet[$i];
$border[$i] = false;
$radio_title[$i] = strftime("%A %e %B %Y",$current);
$radio_title[$i] = strftime($date_format['txt_short'],$current);
// Months
$td_headers[$i] = 'M'.($i+1-$colspan_month);
@ -351,11 +351,11 @@ if ($dsondage->format=="D"||$dsondage->format=="D+"||$dsondage->format=="D-") {
// Days
$td_headers[$i] .= ' D'.($i+1-$colspan_day);
if (isset($toutsujet[$i+1]) && strftime("%a %e",$current)==strftime("%a %e",$toutsujet[$i+1])&&strftime("%B",$current)==strftime("%B",$toutsujet[$i+1])){
if (isset($toutsujet[$i+1]) && strftime($date_format['txt_day'],$current)==strftime($date_format['txt_day'],$toutsujet[$i+1])&&strftime("%B",$current)==strftime("%B",$toutsujet[$i+1])){
$colspan_day++;
} else {
$rbd = ($border[$i]) ? ' rbd' : '';
$tr_days .= '<th colspan="'.$colspan_day.'" class="bg-primary day'.$rbd.'" id="D'.($i+1-$colspan_day).'">'.strftime("%a %e",$current).'</th>';
$tr_days .= '<th colspan="'.$colspan_day.'" class="bg-primary day'.$rbd.'" id="D'.($i+1-$colspan_day).'">'.strftime($date_format['txt_day'],$current).'</th>';
$colspan_day=1;
}
@ -439,13 +439,13 @@ if ($dsondage->format=="A-" || $dsondage->format=="D-") {
echo '
<div class="alert alert-danger">
<p>' . _("The administrator locked this poll, votes and comments are frozen, it's not possible to participate anymore.") . '</p>
<p><b>' . _('Legend:'). '</b> <span class="glyphicon glyphicon-ok"></span> =' . _('Yes') . ', <b>(<span class="glyphicon glyphicon-ok"></span>)</b> = ' . _('Ifneedbe') . ', <span class="glyphicon glyphicon-ban-circle"></span> = ' . _('No') . '</p>
<p aria-hidden="true"><b>' . _('Legend:'). '</b> <span class="glyphicon glyphicon-ok"></span> =' . _('Yes') . ', <b>(<span class="glyphicon glyphicon-ok"></span>)</b> = ' . _('Ifneedbe') . ', <span class="glyphicon glyphicon-ban-circle"></span> = ' . _('No') . '</p>
</div>';
} else {
echo '
<div class="alert alert-info">
<p>' . _("If you want to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line.") . '</p>
<p><b>' . _('Legend:'). '</b> <span class="glyphicon glyphicon-ok"></span> =' . _('Yes') . ', <b>(<span class="glyphicon glyphicon-ok"></span>)</b> = ' . _('Ifneedbe') . ', <span class="glyphicon glyphicon-ban-circle"></span> = ' . _('No') . '</p>
<p aria-hidden="true"><b>' . _('Legend:'). '</b> <span class="glyphicon glyphicon-ok"></span> =' . _('Yes') . ', <b>(<span class="glyphicon glyphicon-ok"></span>)</b> = ' . _('Ifneedbe') . ', <span class="glyphicon glyphicon-ban-circle"></span> = ' . _('No') . '</p>
</div>';
}
echo'
@ -557,7 +557,7 @@ while ($data = $user_studs->FetchNextObject(false)) {
for ($i=0;$i<$nblignes;$i++) {
if (isset($_POST["modifierligne$i"])) {
if ($compteur == $i) {
echo '<td style="padding:5px"><button type="submit" class="btn btn-success btn-xs" name="validermodifier'.$compteur.'" title="'. _('Save the choices:') .' '.stripslashes($nombase).'">'. _('Save') .'</button></td>'."\n";
echo '<td style="padding:5px"><button type="submit" class="btn btn-success btn-xs" name="validermodifier'.$compteur.'" title="'. _('Save the choices') .' '.stripslashes($nombase).'">'. _('Save') .'</button></td>'."\n";
}
}
}
@ -662,7 +662,7 @@ if ($compteursujet == 1) {
echo '
</div>
<hr />';
<hr role="presentation" />';
// Comments
$sql = 'select * from comments where id_sondage='.$connect->Param('numsondage').' order by id_comment';