fix a11y + reprise config.inc + bug date_format win

This commit is contained in:
FramaJosephK 2014-11-14 17:35:22 +01:00
parent 6cc5fa3a13
commit 307f36ae64
22 changed files with 235 additions and 264 deletions

View File

@ -76,24 +76,24 @@ if (!$sondage || $sondage->RecordCount() != 1){
$dsujet=$sujets->FetchObject(false);
$dsondage=$sondage->FetchObject(false);
// Send email (only once during the session) to alert admin of the change he made. ==> two modifications (comment, title, description, ...) on differents polls in the same session will generate only one mail.
// Send email (only once during the session) to alert admin of the change he made. ==> two modifications (comment, title, description, ...) on differents polls in the same session will generate only one mail.
$email_admin = $dsondage->mail_admin;
$poll_title = $dsondage->titre;
function send_mail_admin() {
global $email_admin;
global $poll_title;
global $poll_title;
global $numsondageadmin;
if(config_get('use_smtp')==true){
if(!isset($_SESSION["mail_admin_sent"])) {
Utils::sendEmail( $email_admin,
_("[ADMINISTRATOR] New settings for your poll") . ' ' . stripslashes( $poll_title ),
_("You have changed the settings of your poll. \nYou can modify this poll with this link") .
" :\n\n" . Utils::getUrlSondage($numsondageadmin, true) . "\n\n" .
_("Thanks for your confidence.") . "\n" . NOMAPPLICATION
);
$_SESSION["mail_admin_sent"]=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 ),
_("You have changed the settings of your poll. \nYou can modify this poll with this link") .
" :\n\n" . Utils::getUrlSondage($numsondageadmin, true) . "\n\n" .
_("Thanks for your confidence.") . "\n" . NOMAPPLICATION
);
$_SESSION["mail_admin_sent"]=true;
}
}
}
@ -109,10 +109,8 @@ 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();
//}
}
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>';

View File

@ -1,47 +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 = true;

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

@ -23,12 +23,12 @@ include_once __DIR__ . '/app/inc/init.php';
// bandeaux de titre
function bandeau_titre($titre)
{
global $ALLOWED_LANGUAGES;
global $ALLOWED_LANGUAGES;
$img = ( IMAGE_TITRE ) ? '<img src="'. Utils::get_server_name(). IMAGE_TITRE. '" alt="'.NOMAPPLICATION.'">' : '';
echo '
<header role="banner">';
if(count($ALLOWED_LANGUAGES)>1){
echo '<form method="post" action="#">
if(count($ALLOWED_LANGUAGES)>1){
echo '<form method="post" action="#">
<div class="input-group input-group-sm pull-right col-md-2 col-xs-4">
<select name="lang" class="form-control" title="'. _("Select the language") .'" >' . liste_lang() . '</select>
<span class="input-group-btn">
@ -36,11 +36,11 @@ function bandeau_titre($titre)
</span>
</div>
</form>';
}
}
echo '
<h1><a href="'.str_replace('/admin','', Utils::get_server_name()).'" title="'._("Home").' - '.NOMAPPLICATION.'">'.$img.'</a></h1>
<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!"));
@ -67,7 +67,7 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
}
}
}
//format du sondage AUTRE
$_SESSION["formatsondage"]="A".$_SESSION["studsplus"];
@ -91,15 +91,11 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
Utils::print_header ( _("Removal date and confirmation (3 on 3)") );
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
// 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['default_poll_duration']); //60 sec * 60 min * 24 hours * config
$removal_date= strftime($date_format['txt_full'], ($_SESSION["champdatefin"]));//textual date
$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
// Summary
$summary = '<ol>';
for ($i=0;$i<count($_SESSION['choices']);$i++) {
@ -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,9 +181,9 @@ 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";
// Fields choices : 5 by default
@ -195,11 +195,11 @@ 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')){
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>';
}
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 '
</div>
</div>
</div>'."\n";
}
@ -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,9 +45,8 @@ 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
$_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.
$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)
VALUES (
@ -68,23 +67,23 @@ function ajouter_sondage()
$sql = $connect->Prepare($sql);
$connect->Execute($sql, array($sondage, $_SESSION['toutchoix']));
if(config_get('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";
$message .= _("Thanks for filling the poll at the link above") . " :\n\n%s\n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION;
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";
$message .= _("Thanks for filling the poll at the link above") . " :\n\n%s\n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION;
$message_admin = _("This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above");
$message_admin .= " :\n\n"."%s \n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION;
$message_admin = _("This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above");
$message_admin .= " :\n\n"."%s \n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION;
$message = sprintf($message, Utils::getUrlSondage($sondage));
$message_admin = sprintf($message_admin, Utils::getUrlSondage($sondage_admin, true));
$message = sprintf($message, Utils::getUrlSondage($sondage));
$message_admin = sprintf($message_admin, Utils::getUrlSondage($sondage_admin, true));
if (Utils::isValidEmail($_SESSION['adresse'])) {
Utils::sendEmail( "$_SESSION[adresse]", "[".NOMAPPLICATION."][" . _("Author's message") . "] " . _("Poll") . " : ".stripslashes(htmlspecialchars_decode($_SESSION["titre"],ENT_QUOTES)), $message_admin, $_SESSION['adresse'] );
Utils::sendEmail( "$_SESSION[adresse]", "[".NOMAPPLICATION."][" . _("For sending to the polled users") . "] " . _("Poll") . " : ".stripslashes(htmlspecialchars_decode($_SESSION["titre"],ENT_QUOTES)), $message, $_SESSION['adresse'] );
}
}
if (Utils::isValidEmail($_SESSION['adresse'])) {
Utils::sendEmail( "$_SESSION[adresse]", "[".NOMAPPLICATION."][" . _("Author's message") . "] " . _("Poll") . " : ".stripslashes(htmlspecialchars_decode($_SESSION["titre"],ENT_QUOTES)), $message_admin, $_SESSION['adresse'] );
Utils::sendEmail( "$_SESSION[adresse]", "[".NOMAPPLICATION."][" . _("For sending to the polled users") . "] " . _("Poll") . " : ".stripslashes(htmlspecialchars_decode($_SESSION["titre"],ENT_QUOTES)), $message, $_SESSION['adresse'] );
}
}
error_log(date('H:i:s d/m/Y:') . ' CREATION: '.$sondage."\t".$_SESSION[formatsondage]."\t".$_SESSION[nom]."\t".$_SESSION[adresse]."\t \t".$_SESSION[toutchoix]."\n", 3, 'admin/logs_studs.txt');
Utils::cleaning_polls($connect, 'admin/logs_studs.txt');

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');
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){
echo '<div class="col-md-'.$colmd.'">
$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.
}
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>
@ -71,13 +70,13 @@ echo '
<li>'. _('Discuss and make a decision') . '</li>
</ol>
<p>'. _('Do you want to ') . '<a href="' . Utils::getUrlSondage('aqg259dth55iuhwm').'">'. _("view an example?") .'</a></p>
</div>';
}
if(config_get('show_the_software') == true){
echo '<div class="col-md-'.$colmd.'">
</div>';
}
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>
@ -88,19 +87,19 @@ echo '
<li>Opera 11+</li>
</ul>
<p>'. _('It is governed by the ').'<a href="http://www.cecill.info">'. _('CeCILL-B license').'</a>.</p>
</div>';
}
if(config_get('show_cultivate_your_garden') == true){
echo '<div class="col-md-'.$colmd.'">
</div>';
}
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>
<p class="text-center"><a href="http://framacloud.org/cultiver-son-jardin/installation-de-framadate/" class="btn btn-success"><span class="glyphicon glyphicon-tree-deciduous"></span> framacloud.org</a></p>
</div>';
}
</div>';
}
echo '</div>'."\n";
bandeau_pied();

View File

@ -77,11 +77,11 @@ if (Utils::issetAndNoEmpty("poursuivre")){
unset($_SESSION["mailsonde"]);
$_SESSION["mailsonde"] = ($mailsonde !== null) ? true : false;
if (config_get('use_smtp')==true){
if (Utils::isValidEmail($adresse) === false) {
$erreur_adresse = true;
}
}
if ($config['use_smtp']==true){
if (Utils::isValidEmail($adresse) === false) {
$erreur_adresse = true;
}
}
if (preg_match(';<|>|";',$titre)) {
$erreur_injection_titre = true;
@ -96,13 +96,12 @@ 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){
$email_OK = $adresse && !$erreur_adresse;
}
else{
$email_OK = true;
}
if($config['use_smtp']==true){
$email_OK = $adresse && !$erreur_adresse;
} else{
$email_OK = true;
}
if ($titre && $nom && $email_OK && ! $erreur_injection_titre && ! $erreur_injection_commentaires && ! $erreur_injection_nom) {
if ( $poursuivre == "creation_sondage_date" ) {
@ -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){
echo '
<div class="form-group'.$errors['email']['class'].'">
<label for="email" class="col-sm-4 control-label">'. _("Your email address") .' *</label>
<div class="col-sm-8">
'.$input_email.'
</div>
</div>
'.$errors['email']['msg'];
}
echo '<div class="form-group">
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") .' *<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">
<div class="col-sm-offset-1 col-sm-11">
<div class="checkbox">
<label>
@ -272,19 +271,19 @@ echo '
</div>
</div>
</div>';
if(config_get('use_smtp')==true){
echo '<div class="form-group">
<div class="col-sm-offset-1 col-sm-11">
<div class="checkbox">
<label>
<input type=checkbox name=mailsonde '.$cochemail.' id="mailsonde">'. _("To receive an email for each new vote.") .'
</label>
</div>
</div>
</div>';
}
echo '<p class="text-right">
if($config['use_smtp']==true){
echo '<div class="form-group">
<div class="col-sm-offset-1 col-sm-11">
<div class="checkbox">
<label>
<input type=checkbox name=mailsonde '.$cochemail.' id="mailsonde">'. _("To receive an email for each new vote.") .'
</label>
</div>
</div>
</div>';
}
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

@ -404,12 +404,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,15 +173,15 @@ 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){
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').
_("has filled a line.\nYou can find your poll at the link") . " :\n\n".
Utils::getUrlSondage($numsondage) . " \n\n" .
_("Thanks for your confidence.") . "\n". NOMAPPLICATION );
}
}
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').
_("has filled a line.\nYou can find your poll at the link") . " :\n\n".
Utils::getUrlSondage($numsondage) . " \n\n" .
_("Thanks for your confidence.") . "\n". NOMAPPLICATION );
}
}
}
} else {
$err |= NAME_EMPTY;
@ -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';