Accessibilité : title contextualisé selon l'étape ou les erreurs du formulaire - attribut lang sur <html> et liens du pied de page - aria-describeby pour les msg d'erreur - fix points de validation W3C - fix issue #45

This commit is contained in:
FramaJosephK 2014-06-11 19:19:17 +02:00
parent 74e711deeb
commit 07450ecb22
28 changed files with 327 additions and 267 deletions

12
README
View File

@ -156,14 +156,16 @@ Technologies utilisées
============================================================================= =============================================================================
Compatibilités des navigateurs Compatibilités des navigateurs
Dernière mise à jour le 21 avril 2014
============================================================================= =============================================================================
- Firefox - Firefox : Ubuntu 13.10/FF28
- Opera -Chrome : Ubuntu13.10/Chromium33
- Opera (non testé)
- Konqueror - Konqueror
- Links - Links (non testé, inutile)
- Safari - Safari (non testé)
- IE - IE : Win7/IE9
----------------- -----------------
Janvier 2008 Janvier 2008

View File

@ -51,11 +51,11 @@ include_once('../bandeaux.php');
// Affichage des balises standards // Affichage des balises standards
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n"; echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n";
echo '<html>'."\n"; echo '<html lang="'.$lang.'">'."\n";
echo '<head>'."\n"; echo '<head>'."\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n"; echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n";
echo '<title>ADMINISTRATEUR de la base '.NOMAPPLICATION.'</title>'."\n"; echo '<title>'._("Polls administrator").' - '.NOMAPPLICATION.'</title>'."\n";
echo '<link rel="stylesheet" type="text/css" href="../style.css">'."\n"; echo '<link rel="stylesheet" type="text/css" href="'.get_server_name().'../style.css">'."\n";
echo '</head>'."\n"; echo '</head>'."\n";
echo '<body>'."\n"; echo '<body>'."\n";
@ -70,7 +70,7 @@ sous_bandeau_admin();
$sondage=$connect->Execute("select * from sondage"); $sondage=$connect->Execute("select * from sondage");
echo'<div class=corps>'."\n"; echo'<div class=corps>'."\n";
echo '<form action="index.php" method="POST">'."\n"; echo '<form action="'.get_server_name().'index.php" method="POST">'."\n";
// Test et affichage du bouton de confirmation en cas de suppression de sondage // Test et affichage du bouton de confirmation en cas de suppression de sondage
while($dsondage = $sondage->FetchNextObject(false)) { while($dsondage = $sondage->FetchNextObject(false)) {
if (issetAndNoEmpty('supprimersondage'.$dsondage->id_sondage) === true) { if (issetAndNoEmpty('supprimersondage'.$dsondage->id_sondage) === true) {
@ -133,9 +133,9 @@ while($dsondage = $sondage->FetchNextObject(false)) {
} }
echo '</table>'."\n"; echo '</table>'."\n";
echo'</div>'."\n";
// fin du formulaire et de la page web // fin du formulaire et de la page web
echo '</form>'."\n"; echo '</form>'."\n";
echo'</div>'."\n";
echo '<div class="separateur">&nbsp;</div>'; echo '<div class="separateur">&nbsp;</div>';
echo '</body>'."\n"; echo '</body>'."\n";
echo '</html>'."\n"; echo '</html>'."\n";

View File

@ -76,7 +76,7 @@ if (preg_match(";[\w\d]{24};i", $numsondageadmin)) {
//verification de l'existence du sondage, s'il n'existe pas on met une page d'erreur //verification de l'existence du sondage, s'il n'existe pas on met une page d'erreur
if (!$sondage || $sondage->RecordCount() != 1){ if (!$sondage || $sondage->RecordCount() != 1){
print_header(false); print_header(false, _("Error!"));
echo '<body>'."\n"; echo '<body>'."\n";
framanav(); framanav();
logo(); logo();
@ -86,7 +86,7 @@ if (!$sondage || $sondage->RecordCount() != 1){
echo '<div class=corpscentre>'."\n"; echo '<div class=corpscentre>'."\n";
print "<H2>" . _("This poll doesn't exist !") . "</H2><br><br>"."\n"; print "<H2>" . _("This poll doesn't exist !") . "</H2><br><br>"."\n";
print "" . _("Back to the homepage of ") . " <a href=\"index.php\"> ".NOMAPPLICATION."</A>. "."\n"; print "" . _("Back to the homepage of ") . " <a href=\"".get_server_name()."\"> ".NOMAPPLICATION."</A>. "."\n";
echo '<br><br><br><br>'."\n"; echo '<br><br><br><br>'."\n";
echo '</div>'."\n"; echo '</div>'."\n";
# sur_bandeau_pied(); # sur_bandeau_pied();
@ -324,7 +324,7 @@ if (isset($_POST["confirmesuppression"]) || isset($_POST["confirmesuppression_x"
echo '<div class="corps corpscentre">'."\n"; echo '<div class="corps corpscentre">'."\n";
print "<H2>" . _("Your poll has been removed!") . "</H2><br><br>"; print "<H2>" . _("Your poll has been removed!") . "</H2><br><br>";
print _("Back to the homepage of ") . ' <a href="/"> '.NOMAPPLICATION.'</a>.'."\n"; print _("Back to the homepage of ") . ' <a href="'.get_server_name().'"> '.NOMAPPLICATION.'</a>.'."\n";
echo '<br><br><br>'."\n"; echo '<br><br><br>'."\n";
echo '</div>'."\n"; echo '</div>'."\n";
sur_bandeau_pied(); sur_bandeau_pied();
@ -726,7 +726,7 @@ if ($sondage !== false) {
$sql = $connect->Prepare($sql); $sql = $connect->Prepare($sql);
$user_studs = $connect->Execute($sql, array($numsondage)); $user_studs = $connect->Execute($sql, array($numsondage));
} else { } else {
print_header(false); print_header(false, _("Error!"));
echo '<body>'."\n"; echo '<body>'."\n";
framanav(); framanav();
logo(); logo();
@ -734,7 +734,7 @@ if ($sondage !== false) {
bandeau_titre(_("Error!")); bandeau_titre(_("Error!"));
echo '<div class=corpscentre>'."\n"; echo '<div class=corpscentre>'."\n";
print "<H2>" . _("This poll doesn't exist !") . "</H2><br><br>"."\n"; print "<H2>" . _("This poll doesn't exist !") . "</H2><br><br>"."\n";
print "" . _("Back to the homepage of ") . " <a href=\"index.php\"> ".NOMAPPLICATION."</A>. "."\n"; print "" . _("Back to the homepage of ") . " <a href=\"".get_server_name()."\"> ".NOMAPPLICATION."</A>. "."\n";
echo '<br><br><br><br>'."\n"; echo '<br><br><br><br>'."\n";
echo '</div>'."\n"; echo '</div>'."\n";
@ -756,7 +756,7 @@ $nbcolonnes=substr_count($dsujet->sujet,',')+1;
echo '<form name="formulaire" action="'.getUrlSondage($numsondageadmin, true).'" method="POST" onkeypress="javascript:process_keypress(event)">'."\n"; echo '<form name="formulaire" action="'.getUrlSondage($numsondageadmin, true).'" method="POST" onkeypress="javascript:process_keypress(event)">'."\n";
echo '<div class="cadre"> '."\n"; echo '<div class="cadre"> '."\n";
echo _('As poll administrator, you can change all the lines of this poll with <img src="images/info.png" alt="infos">.<br> You can, as well, remove a column or a line with <img src="images/cancel.png" alt="Cancel">. <br>You can also add a new column with <img src="images/add-16.png" alt="Add column">.<br> Finally, you can change the informations of this poll like the title, the comments or your email address.') ."\n"; echo _('As poll administrator, you can change all the lines of this poll with <img src="'.get_server_name().'images/info.png" alt="infos">.<br> You can, as well, remove a column or a line with <img src="'.get_server_name().'images/cancel.png" alt="Cancel">. <br>You can also add a new column with <img src="'.get_server_name().'images/add-16.png" alt="Add column">.<br> Finally, you can change the informations of this poll like the title, the comments or your email address.') ."\n";
echo '<br><br>'."\n"; echo '<br><br>'."\n";
//debut de l'affichage de résultats //debut de l'affichage de résultats
@ -767,10 +767,11 @@ $toutsujet=explode(",",$dsujet->sujet);
echo '<tr>'."\n"; echo '<tr>'."\n";
echo '<td></td>'."\n"; echo '<td></td>'."\n";
echo '<td></td>'."\n"; echo '<td></td>'."\n";
echo '<td></td>'."\n";
//boucle pour l'affichage des boutons de suppression de colonne //boucle pour l'affichage des boutons de suppression de colonne
for ($i = 0; isset($toutsujet[$i]); $i++) { for ($i = 0; isset($toutsujet[$i]); $i++) {
echo '<td class=somme><input type="image" name="effacecolonne'.$i.'" value="Effacer la colonne" src="images/cancel.png"></td>'."\n"; echo '<td class=somme><input type="image" name="effacecolonne'.$i.'" value="Effacer la colonne" src="'.get_server_name().'images/cancel.png" /></td>'."\n";
} }
echo '</tr>'."\n"; echo '</tr>'."\n";
@ -806,7 +807,7 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") {
} }
} }
echo '<td class="annee"><input type="image" name="ajoutsujet" src="images/add-16.png" alt="' . _('Add') . '"></td>'."\n"; echo '<td class="annee"><input type="image" name="ajoutsujet" src="'.get_server_name().'images/add-16.png" alt="' . _('Add') . '"></td>'."\n";
echo '</tr>'."\n"; echo '</tr>'."\n";
echo '<tr>'."\n"; echo '<tr>'."\n";
echo '<td></td>'."\n"; echo '<td></td>'."\n";
@ -840,7 +841,7 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") {
} }
} }
echo '<td class="mois"><input type="image" name="ajoutsujet" src="images/add-16.png" alt="' . _('Add') . '"></td>'."\n"; echo '<td class="mois"><input type="image" name="ajoutsujet" src="'.get_server_name().'images/add-16.png" alt="' . _('Add') . '"></td>'."\n";
echo '</tr>'."\n"; echo '</tr>'."\n";
echo '<tr>'."\n"; echo '<tr>'."\n";
echo '<td></td>'."\n"; echo '<td></td>'."\n";
@ -874,7 +875,7 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") {
} }
} }
echo '<td class="jour"><input type="image" name="ajoutsujet" src="images/add-16.png" alt="' . _('Add') . '"></td>'."\n"; echo '<td class="jour"><input type="image" name="ajoutsujet" src="'.get_server_name().'images/add-16.png" alt="' . _('Add') . '"></td>'."\n";
echo '</tr>'."\n"; echo '</tr>'."\n";
//affichage des horaires //affichage des horaires
@ -892,7 +893,7 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") {
} }
} }
echo '<td class="heure"><input type="image" name="ajoutsujet" src="images/add-16.png" alt="' . _('Add') . '"></td>'."\n"; echo '<td class="heure"><input type="image" name="ajoutsujet" src="'.get_server_name().'images/add-16.png" alt="' . _('Add') . '"></td>'."\n";
echo '</tr>'."\n"; echo '</tr>'."\n";
} }
} else { } else {
@ -907,7 +908,7 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") {
echo '<td class="sujet">'.stripslashes($toutsujet[$i]).'</td>'."\n"; echo '<td class="sujet">'.stripslashes($toutsujet[$i]).'</td>'."\n";
} }
echo '<td class="sujet"><input type="image" name="ajoutsujet" src="images/add-16.png" alt="' . _('Add') . '"></td>'."\n"; echo '<td class="sujet"><input type="image" name="ajoutsujet" src="'.get_server_name().'images/add-16.png" alt="' . _('Add') . '"></td>'."\n";
echo '</tr>'."\n"; echo '</tr>'."\n";
} }
@ -920,7 +921,7 @@ while ($data = $user_studs->FetchNextObject(false)) {
$ensemblereponses = $data->reponses; $ensemblereponses = $data->reponses;
echo '<tr>'."\n"; echo '<tr>'."\n";
echo '<td><input type="image" name="effaceligne'.$compteur.'" value="Effacer" src="images/cancel.png" alt="Icone efface"></td>'."\n"; echo '<td><input type="image" name="effaceligne'.$compteur.'" value="Effacer" src="'.get_server_name().'images/cancel.png" alt="Icone efface" /></td>'."\n";
//affichage du nom //affichage du nom
$nombase=str_replace("°","'",$data->nom); $nombase=str_replace("°","'",$data->nom);
@ -971,14 +972,14 @@ while ($data = $user_studs->FetchNextObject(false)) {
//a la fin de chaque ligne se trouve les boutons modifier //a la fin de chaque ligne se trouve les boutons modifier
if (!$testligneamodifier=="true") { if (!$testligneamodifier=="true") {
echo '<td class=somme><input type="image" name="modifierligne'.$compteur.'" value="Modifier" src="images/info.png" alt="Icone infos"></td>'."\n"; echo '<td class=somme><input type="image" name="modifierligne'.$compteur.'" value="Modifier" src="'.get_server_name().'images/info.png" alt="Icone infos"></td>'."\n";
} }
//demande de confirmation pour modification de ligne //demande de confirmation pour modification de ligne
for ($i = 0; $i < $nblignes; $i++) { for ($i = 0; $i < $nblignes; $i++) {
if (isset($_POST["modifierligne$i"]) || isset($_POST['modifierligne'.$i.'_x'])) { if (isset($_POST["modifierligne$i"]) || isset($_POST['modifierligne'.$i.'_x'])) {
if ($compteur == $i) { if ($compteur == $i) {
echo '<td><input type="image" name="validermodifier'.$compteur.'" value="Valider la modification" src="images/accept.png" alt="Icone valider"></td>'."\n"; echo '<td><input type="image" name="validermodifier'.$compteur.'" value="Valider la modification" src="'.get_server_name().'images/accept.png" alt="Icone valider"></td>'."\n";
} }
} }
} }
@ -1001,7 +1002,7 @@ for ($i = 0; $i < $nbcolonnes; $i++) {
} }
// Affichage du bouton de formulaire pour inscrire un nouvel utilisateur dans la base // Affichage du bouton de formulaire pour inscrire un nouvel utilisateur dans la base
echo '<td><input type="image" name="boutonp" value="Participer" src="images/add-24.png" alt="' . _('Add') . '"></td>'."\n"; echo '<td><input type="image" name="boutonp" value="Participer" src="'.get_server_name().'images/add-24.png" alt="' . _('Add') . '"></td>'."\n";
echo '</tr>'."\n"; echo '</tr>'."\n";
//determination du meilleur choix //determination du meilleur choix
@ -1040,19 +1041,20 @@ for ($i = 0; $i < $nbcolonnes; $i++) {
echo '<td class="somme">'.$affichesomme.'</td>'."\n"; echo '<td class="somme">'.$affichesomme.'</td>'."\n";
} }
} }
echo '<td></td>'."\n";
echo '</tr>'."\n";
echo '<tr>'."\n"; echo '<tr>'."\n";
echo '<td></td>'."\n"; echo '<td></td>'."\n";
echo '<td class="somme"></td>'."\n"; echo '<td class="somme"></td>'."\n";
for ($i = 0; $i < $nbcolonnes; $i++) { for ($i = 0; $i < $nbcolonnes; $i++) {
if (isset($somme[$i]) === true && isset($meilleurecolonne) === true && $somme[$i] == $meilleurecolonne){ if (isset($somme[$i]) === true && isset($meilleurecolonne) === true && $somme[$i] == $meilleurecolonne){
echo '<td class="somme"><img src="images/medaille.png" alt="Meilleur resultat"></td>'."\n"; echo '<td class="somme"><img src="'.get_server_name().'images/medaille.png" alt="Meilleur resultat"></td>'."\n";
} else { } else {
echo '<td class="somme"></td>'."\n"; echo '<td class="somme"></td>'."\n";
} }
} }
echo '<td></td>'."\n";
echo '</tr>'."\n"; echo '</tr>'."\n";
@ -1139,9 +1141,9 @@ echo '<p class=affichageresultats>'."\n";
//affichage de la phrase annoncant le meilleur sujet //affichage de la phrase annoncant le meilleur sujet
if (isset($meilleurecolonne) && $compteursujet == "1") { if (isset($meilleurecolonne) && $compteursujet == "1") {
print "<img src=\"images/medaille.png\" alt=\"Meilleur resultat\">" . _("The best choice at this time is") . " : <b>$meilleursujet </b>" . _("with") . " <b>$meilleurecolonne </b>" . $vote_str . ".<br>\n"; print "<img src=\"".get_server_name()."images/medaille.png\" alt=\"Meilleur resultat\">" . _("The best choice at this time is") . " : <b>$meilleursujet </b>" . _("with") . " <b>$meilleurecolonne </b>" . $vote_str . ".<br>\n";
} elseif (isset($meilleurecolonne)) { } elseif (isset($meilleurecolonne)) {
print "<img src=\"images/medaille.png\" alt=\"Meilleur resultat\"> " . _("The bests choices at this time are") . " : <b>$meilleursujet </b>" . _("with") . " <b>$meilleurecolonne </b>" . $vote_str . ".<br>\n"; print "<img src=\"".get_server_name()."images/medaille.png\" alt=\"Meilleur resultat\"> " . _("The bests choices at this time are") . " : <b>$meilleursujet </b>" . _("with") . " <b>$meilleurecolonne </b>" . $vote_str . ".<br>\n";
} }
echo '<br><br>'."\n"; echo '<br><br>'."\n";
@ -1158,7 +1160,7 @@ echo '<br>'."\n";
$adresseadmin=$dsondage->mail_admin; $adresseadmin=$dsondage->mail_admin;
echo _("Change the title") .' :<br>' . echo _("Change the title") .' :<br>' .
'<input type="text" name="nouveautitre" size="40" value="'.$dsondage->titre.'">'. '<input type="text" name="nouveautitre" size="40" value="'.$dsondage->titre.'">'.
'<input type="image" name="boutonnouveautitre" value="Changer le titre" src="images/accept.png" alt="Valider"><br><br>'."\n"; '<input type="image" name="boutonnouveautitre" value="Changer le titre" src="'.get_server_name().'images/accept.png" alt="Valider"><br><br>'."\n";
//si la valeur du nouveau titre est invalide : message d'erreur //si la valeur du nouveau titre est invalide : message d'erreur
if ((isset($_POST["boutonnouveautitre"]) || isset($_POST["boutonnouveautitre_x"])) && !issetAndNoEmpty('nouveautitre')) { if ((isset($_POST["boutonnouveautitre"]) || isset($_POST["boutonnouveautitre_x"])) && !issetAndNoEmpty('nouveautitre')) {
@ -1166,10 +1168,10 @@ if ((isset($_POST["boutonnouveautitre"]) || isset($_POST["boutonnouveautitre_x"]
} }
//Changer les commentaires du sondage //Changer les commentaires du sondage
echo _("Change the comments") .' :<br> <textarea name="nouveauxcommentaires" rows="7" cols="40">'.stripslashes($dsondage->commentaires).'</textarea><br><input type="image" name="boutonnouveauxcommentaires" value="Changer les commentaires" src="images/accept.png" alt="Valider"><br><br>'."\n"; echo _("Change the comments") .' :<br> <textarea name="nouveauxcommentaires" rows="7" cols="40">'.stripslashes($dsondage->commentaires).'</textarea><br><input type="image" name="boutonnouveauxcommentaires" value="Changer les commentaires" src="'.get_server_name().'images/accept.png" alt="Valider"><br><br>'."\n";
//Changer l'adresse de l'administrateur //Changer l'adresse de l'administrateur
echo _("Change your email address") .' :<br> <input type="text" name="nouvelleadresse" size="40" value="'.$dsondage->mail_admin.'"> <input type="image" name="boutonnouvelleadresse" value="Changer votre adresse" src="images/accept.png" alt="Valider"><br>'."\n"; echo _("Change your email address") .' :<br> <input type="text" name="nouvelleadresse" size="40" value="'.$dsondage->mail_admin.'"> <input type="image" name="boutonnouvelleadresse" value="Changer votre adresse" src="'.get_server_name().'images/accept.png" alt="Valider"><br>'."\n";
//si l'adresse est invalide ou le champ vide : message d'erreur //si l'adresse est invalide ou le champ vide : message d'erreur
if ((isset($_POST["boutonnouvelleadresse"]) || isset($_POST["boutonnouvelleadresse_x"])) && !issetAndNoEmpty('nouvelleadresse')) { if ((isset($_POST["boutonnouvelleadresse"]) || isset($_POST["boutonnouvelleadresse_x"])) && !issetAndNoEmpty('nouvelleadresse')) {
@ -1185,7 +1187,7 @@ if ($comment_user->RecordCount() != 0) {
$i = 0; $i = 0;
while ( $dcomment=$comment_user->FetchNextObject(false)) { while ( $dcomment=$comment_user->FetchNextObject(false)) {
print "<input type=\"image\" name=\"suppressioncomment$i\" src=\"images/cancel.png\" alt=\"supprimer commentaires\"> ". stripslashes($dcomment->usercomment) ." : ".stripslashes($dcomment->comment) ." <br>"; print "<input type=\"image\" name=\"suppressioncomment$i\" src=\"".get_server_name()."images/cancel.png\" alt=\"supprimer commentaires\" /> ". stripslashes($dcomment->usercomment) ." : ".stripslashes($dcomment->comment) ." <br>";
$i++; $i++;
} }
@ -1200,21 +1202,21 @@ if (isset($erreur_commentaire_vide) && $erreur_commentaire_vide=="yes") {
print "<br>" . _("Add a comment in the poll") . " :<br>\n"; print "<br>" . _("Add a comment in the poll") . " :<br>\n";
echo _("Name") .' : <input type=text name="commentuser"><br>'."\n"; echo _("Name") .' : <input type=text name="commentuser"><br>'."\n";
echo '<textarea name="comment" rows="2" cols="40"></textarea>'."\n"; echo '<textarea name="comment" rows="2" cols="40"></textarea>'."\n";
echo '<input type="image" name="ajoutcomment" value="Ajouter un commentaire" src="images/accept.png" alt="Valider"><br>'."\n"; echo '<input type="image" name="ajoutcomment" value="Ajouter un commentaire" src="'.get_server_name().'images/accept.png" alt="Valider"><br>'."\n";
//suppression du sondage //suppression du sondage
echo '<br>'."\n"; echo '<br>'."\n";
echo _("Remove your poll") .' : <input type="image" name="suppressionsondage" value="'. _("Remove the poll") .'" src="images/cancel.png" alt="' . _('Cancel') . '"><br><br>'."\n"; echo _("Remove your poll") .' : <input type="image" name="suppressionsondage" value="'. _("Remove the poll") .'" src="'.get_server_name().'images/cancel.png" alt="' . _('Cancel') . '" /><br><br>'."\n";
echo '</form>'."\n"; echo '</form>'."\n";
if ($dsondage->format == "D" || $dsondage->format == "D+") { if ($dsondage->format == "D" || $dsondage->format == "D+") {
echo '<form name="formulaire2" action="/exportpdf.php" method="POST" onkeypress="javascript:process_keypress(event)" class="formulaire2">'."\n"; echo '<form name="formulaire2" action="'.get_server_name().'exportpdf.php" method="POST" onkeypress="javascript:process_keypress(event)" class="formulaire2">'."\n";
echo _("Generate the convocation letter (.PDF), choose the place to meet and validate") .'<br>'; echo _("Generate the convocation letter (.PDF), choose the place to meet and validate") .'<br>';
echo '<input type="text" name="lieureunion" size="100" value="" />'; echo '<input type="text" name="lieureunion" size="100" value="" />';
echo '<input type="hidden" name="sondage" value="$numsondageadmin" />'; echo '<input type="hidden" name="sondage" value="$numsondageadmin" />';
echo '<input type="hidden" name="meilleursujet" value="$meilleursujetexport" />'; echo '<input type="hidden" name="meilleursujet" value="$meilleursujetexport" />';
echo '<input type="image" name="exportpdf" value="Export en PDF" src="images/accept.png" alt="Export PDF"><br><br>'; echo '<input type="image" name="exportpdf" value="Export en PDF" src="'.get_server_name().'images/accept.png" alt="Export PDF"><br><br>';
echo '</form>'."\n"; echo '</form>'."\n";
// '<font color="#FF0000">'. _("Enter a meeting place!") .'</font><br><br>'."\n"; // '<font color="#FF0000">'. _("Enter a meeting place!") .'</font><br><br>'."\n";
} }
@ -1224,14 +1226,14 @@ if (isset($_POST["exportpdf_x"]) && !issetAndNoEmpty('lieureunion')) {
echo '<font color="#FF0000">'. _("Enter a meeting place!") .'</font><br><br>'."\n"; echo '<font color="#FF0000">'. _("Enter a meeting place!") .'</font><br><br>'."\n";
} }
echo '<a name="bas"></a>'."\n"; echo '<a id="bas"></a>'."\n";
echo '<br><br>'."\n"; echo '<br><br>'."\n";
//fin de la partie GESTION et beandeau de pied //fin de la partie GESTION et beandeau de pied
echo '</p>'."\n"; //echo '</p>'."\n";
echo '</div>'; echo '</div>';
echo '<div class="separateur">&nbsp;</div>'; echo '<div class="separateur">&nbsp;</div>';
bandeau_pied_mobile(); bandeau_pied_mobile();
echo '</form>'."\n"; //echo '</form>'."\n";
echo '</body>'."\n"; echo '</body>'."\n";
echo '</html>'."\n"; echo '</html>'."\n";

View File

@ -49,10 +49,10 @@ if (file_exists('bandeaux_local.php')) {
//affichage de la page //affichage de la page
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n"; echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n";
echo '<html>'."\n"; echo '<html lang="'.$lang.'">'."\n";
echo '<head>'."\n"; echo '<head>'."\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n"; echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n";
echo '<title>'.NOMAPPLICATION.'</title>'."\n"; echo '<title>'._("About").' - '.NOMAPPLICATION.'</title>'."\n";
echo '<link rel="stylesheet" type="text/css" href="style.css">'."\n"; echo '<link rel="stylesheet" type="text/css" href="style.css">'."\n";
echo '</head>'."\n"; echo '</head>'."\n";
echo '<body>'."\n"; echo '<body>'."\n";
@ -319,4 +319,4 @@ echo '</div>'."\n";
bandeau_pied_mobile(); bandeau_pied_mobile();
echo '</form>'."\n"; echo '</form>'."\n";
echo '</body>'."\n"; echo '</body>'."\n";
echo '</html>'."\n"; echo '</html>'."\n";

View File

@ -41,13 +41,11 @@ include_once('fonctions.php');
function framanav() function framanav()
{ {
/* if (file_exists($_SERVER['DOCUMENT_ROOT']."/framanav/nav.php")) { if (file_exists($_SERVER['DOCUMENT_ROOT']."/nav/nav.js")) {
//echo "\n".'<!-- Framanav --> '."\n";; echo "\n".'<!-- Framanav --> '."\n";;
//echo '<script src="/framanav/scripts/jquery.min.js" type="text/javascript"></script>'."\n";
include_once($_SERVER['DOCUMENT_ROOT']."/framanav/nav.php");
//echo '<!-- /Framanav --> '."\n";
}*/
echo '<script src="/nav/nav.js" id="nav_js" type="text/javascript" charset="utf-8"></script>'."\n"; echo '<script src="/nav/nav.js" id="nav_js" type="text/javascript" charset="utf-8"></script>'."\n";
echo '<!-- /Framanav --> '."\n";
}
} }
function gAnalytics() { function gAnalytics() {
@ -73,7 +71,7 @@ function gAnalytics() {
function logo () function logo ()
{ {
/* if(defined('LOGOBANDEAU')) { /* if(defined('LOGOBANDEAU')) {
echo '<div class="logo"><img src="/' . LOGOBANDEAU . '" height="74" alt="logo"></div>'."\n"; echo '<div class="logo"><img src="/' . LOGOBANDEAU . '" height="74" alt=""></div>'."\n";
}*/ }*/
} }
@ -83,11 +81,11 @@ function bandeau_tete()
{ {
if ( IMAGE_TITRE ) { if ( IMAGE_TITRE ) {
echo '<div class="bandeau"><a href="/" title="Accueil '.NOMAPPLICATION.'"><img src="/' . IMAGE_TITRE. '" title="Accueil '.NOMAPPLICATION.'" alt="'.NOMAPPLICATION.'"></a></div>'."\n"; echo '<div role="banner" class="bandeau"><h1><a href="'.str_replace('/admin','',get_server_name()).'" title="'._("Home").' - '.NOMAPPLICATION.'"><img src="'.get_server_name(). IMAGE_TITRE. '" title="'._("Home").' - '.NOMAPPLICATION.'" alt="'.NOMAPPLICATION.'"></a></h1></div>'."\n";
} else { } else {
echo '<div class="bandeau"><a href="/" title="Accueil '.NOMAPPLICATION.'">'.NOMAPPLICATION.'</a></div>'."\n"; echo '<div role="banner" class="bandeau"><h1><a href="'.str_replace('/admin','',get_server_name()).'" title="'._("Home").' - '.NOMAPPLICATION.'">'.NOMAPPLICATION.'</a></h1></div>'."\n";
} ; } ;
@ -97,7 +95,7 @@ function bandeau_tete()
// bandeaux de titre // bandeaux de titre
function bandeau_titre($titre) function bandeau_titre($titre)
{ {
echo '<div class="bandeautitre">'. $titre .'</div>'."\n"; echo '<p class="bandeautitre">'. $titre .'</p>'."\n";
} }
@ -107,7 +105,7 @@ function liste_lang()
$str = ''; $str = '';
foreach ($ALLOWED_LANGUAGES as $k => $v ) { foreach ($ALLOWED_LANGUAGES as $k => $v ) {
$str .= '<a class="button small gray" href="' . $_SERVER['PHP_SELF'] . '?lang=' . $k . '">' . $v . '</a>' . "\n" ; $str .= '<li lang="'.substr($k,0,2).'"><a class="button small gray" href="' . $_SERVER['PHP_SELF'] . '?lang=' . $k . '">' . $v . '</a></li>' . "\n" ;
} }
return $str; return $str;
@ -118,7 +116,7 @@ function liste_lang()
function sous_bandeau() function sous_bandeau()
{ {
/*echo '<div class="sousbandeau">' . /*echo '<div class="sousbandeau">' .
'<a href="/">'. _("Home") .'</a>' . '<a href="./">'. _("Home") .'</a>' .
'<a href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a>' . '<a href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a>' .
'<a href="http://contact.framasoft.org" target="_new">'. _("Contact") .'</a>' . '<a href="http://contact.framasoft.org" target="_new">'. _("Contact") .'</a>' .
//'<a href="/sources/sources.php">'. _("Sources") .'</a>' . //not implemented //'<a href="/sources/sources.php">'. _("Sources") .'</a>' . //not implemented
@ -133,15 +131,15 @@ function sous_bandeau()
function sous_bandeau_admin() function sous_bandeau_admin()
{ {
echo '<div class="sousbandeau">' . echo '<div class="sousbandeau">' .
'<a class="button small gray" href="/">'. _("Home") .'</a>'; '<a class="button small gray" href="'.str_replace('/admin','',get_server_name()).'">'. _("Home") .'</a>';
if(is_readable('logs_studs.txt')) { if(is_readable('logs_studs.txt')) {
echo '<a class="button small gray" href="/admin/logs_studs.txt">'. _("Logs") .'</a>'; echo '<a role="button" class="button small gray" href="'.str_replace('/admin','',get_server_name()).'admin/logs_studs.txt">'. _("Logs") .'</a>';
} }
echo '<a class="button small gray" href="/../scripts/nettoyage_sondage.php">'. _("Cleaning") .'</a>' . echo '<a role="button" class="button small gray" href="'.str_replace('/admin','',get_server_name()).'scripts/nettoyage_sondage.php">'. _("Cleaning") .'</a>' .
'<span class="sousbandeau sousbandeaulangue">' . '<ul class="sousbandeau sousbandeaulangue">' .
liste_lang() . '</span>'. liste_lang() . '</ul>'.
'</div>'."\n"; '</div>'."\n";
gAnalytics(); gAnalytics();
@ -166,16 +164,17 @@ function sur_bandeau_pied()
function bandeau_pied() function bandeau_pied()
{ {
//echo '<div class="bandeaupied">'. _("Universit&eacute; de Strasbourg. Creation: Guilhem BORGHESI. 2008-2009") .'</div>'."\n"; //echo '<div class="bandeaupied">'. _("Universit&eacute; de Strasbourg. Creation: Guilhem BORGHESI. 2008-2009") .'</div>'."\n";
echo '<div class="separateur">&nbsp;</div>';
echo '<div class="sousbandeau">' . echo '<div class="sousbandeau">' .
'<a class="button small gray" href="/">'. _("Home") .'</a>' . '<ul>' .
'<a class="button small gray" href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a>' . '<li><a class="button small gray" href="'.get_server_name().'">'. _("Home") .'</a></li>' .
'<a class="button small gray" href="http://contact.framasoft.org" target="_new">'. _("Contact") .'</a>' . '<li><a class="button small gray" href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a></li>' .
'<li><a class="button small gray" href="http://contact.framasoft.org">'. _("Contact") .'</a></li>' .
//'<a href="/sources/sources.php">'. _("Sources") .'</a>' . //not implemented //'<a href="/sources/sources.php">'. _("Sources") .'</a>' . //not implemented
'<a class="button small gray" href="/apropos.php">'. _("About") .'</a>' . '<li><a class="button small gray" href="'.get_server_name().'apropos.php">'. _("About") .'</a></li>' .
//'<a class="button small gray" href="/admin/index.php">'. _("Admin") .'</a>' . //'<a class="button small gray" href="/admin/index.php">'. _("Admin") .'</a></li>' .
'<span class="sousbandeau sousbandeaulangue">' . '</ul>' .
liste_lang() . '</span>'. '<ul class="sousbandeau sousbandeaulangue">' .
liste_lang() . '</ul>'.
'</div>' . "\n"; '</div>' . "\n";
gAnalytics(); gAnalytics();
} }
@ -187,14 +186,16 @@ function bandeau_pied_mobile()
'<div class="bandeaupiedmobile">'. _("Universit&eacute; de Strasbourg. Creation: Guilhem BORGHESI. 2008-2009") .'</div>'."\n";*/ '<div class="bandeaupiedmobile">'. _("Universit&eacute; de Strasbourg. Creation: Guilhem BORGHESI. 2008-2009") .'</div>'."\n";*/
echo '<div class="separateur">&nbsp;</div>'; echo '<div class="separateur">&nbsp;</div>';
echo '<div class="sousbandeau">' . echo '<div class="sousbandeau">' .
'<a class="button small gray" href="/">'. _("Home") .'</a>' . '<ul>' .
'<a class="button small gray" href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a>' . '<li><a class="button small gray" href="'.get_server_name().'">'. _("Home") .'</a></li>' .
'<a class="button small gray" href="http://contact.framasoft.org" target="_new">'. _("Contact") .'</a>' . '<li><a class="button small gray" href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a></li>' .
'<li><a class="button small gray" href="http://contact.framasoft.org">'. _("Contact") .'</a></li>' .
//'<a href="/sources/sources.php">'. _("Sources") .'</a>' . //not implemented //'<a href="/sources/sources.php">'. _("Sources") .'</a>' . //not implemented
'<a class="button small gray" href="/apropos.php">'. _("About") .'</a>' . '<li><a class="button small gray" href="'.get_server_name().'apropos.php">'. _("About") .'</a></li>' .
//'<a class="button small gray" href="/admin/index.php">'. _("Admin") .'</a>' . //'<a class="button small gray" href="/admin/index.php">'. _("Admin") .'</a></li>' .
'<span class="sousbandeau sousbandeaulangue">' . '</ul>' .
liste_lang() . '</span>'. '<ul class="sousbandeau sousbandeaulangue">' .
liste_lang() . '</ul>'.
'</div>' . "\n"; '</div>' . "\n";
gAnalytics(); gAnalytics();
} }

View File

@ -71,9 +71,9 @@
.gray { .gray {
color: #e9e9e9; color: #e9e9e9;
border: solid 1px #555; border: solid 1px #555;
background: #6e6e6e; background-color: #575757;
background: -webkit-gradient(linear, left top, left bottom, from(#888), to(#575757)); background-image: -webkit-gradient(linear, left top, left bottom, from(#888), to(#575757));
background: -moz-linear-gradient(top, #888, #575757); background-image: -moz-linear-gradient(top, #888, #575757);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#888888', endColorstr='#575757'); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#888888', endColorstr='#575757');
} }
.gray:hover { .gray:hover {
@ -114,11 +114,11 @@
/* orange */ /* orange */
.orange { .orange {
color: #fef4e9; color: #fef4e9;
border: solid 1px #da7c0c; border: solid 1px #c42710;
background: #f78d1d; background-color: #c42710;
background: -webkit-gradient(linear, left top, left bottom, from(#faa51a), to(#f47a20)); background-image: -webkit-gradient(linear, left top, left bottom, from(#f47a20), to(#c42710));
background: -moz-linear-gradient(top, #faa51a, #f47a20); background-image: -moz-linear-gradient(top, #f47a20, #c42710);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#faa51a', endColorstr='#f47a20'); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f47a20', endColorstr='#c42710');
} }
.orange:hover { .orange:hover {
background: #f47c20; background: #f47c20;
@ -158,11 +158,11 @@
/* blue */ /* blue */
.blue { .blue {
color: #d9eef7; color: #d9eef7;
border: solid 1px #0076a3; border: solid 1px #00328B;
background: #0095cd; background-color: #00328B;
background: -webkit-gradient(linear, left top, left bottom, from(#00adee), to(#0078a5)); background-image: -webkit-gradient(linear, left top, left bottom, from(#0078a5), to(#00328B));
background: -moz-linear-gradient(top, #00adee, #0078a5); background-image: -moz-linear-gradient(top, #0078a5, #00328B);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee', endColorstr='#0078a5'); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0078a5', endColorstr='#00328B');
} }
.blue:hover { .blue:hover {
background: #007ead; background: #007ead;
@ -203,21 +203,21 @@
.green { .green {
color: #e8f0de; color: #e8f0de;
border: solid 1px #538312; border: solid 1px #538312;
background: #64991e; background-color: #426514;
background: -webkit-gradient(linear, left top, left bottom, from(#7db72f), to(#4e7d0e)); background-image: -webkit-gradient(linear, left top, left bottom, from(#4e7d0e), to(#426514));
background: -moz-linear-gradient(top, #7db72f, #4e7d0e); background-image: -moz-linear-gradient(top, #7db72f, #4e7d0e);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7db72f', endColorstr='#4e7d0e'); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4e7d0e', endColorstr='#426514');
} }
.green:hover { .green:hover {
background: #538018; background-color: #538018;
background: -webkit-gradient(linear, left top, left bottom, from(#6b9d28), to(#436b0c)); background-image: -webkit-gradient(linear, left top, left bottom, from(#6b9d28), to(#436b0c));
background: -moz-linear-gradient(top, #6b9d28, #436b0c); background-image: -moz-linear-gradient(top, #6b9d28, #436b0c);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#6b9d28', endColorstr='#436b0c'); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#6b9d28', endColorstr='#436b0c');
} }
.green:active { .green:active {
color: #a9c08c; color: #a9c08c;
background: -webkit-gradient(linear, left top, left bottom, from(#4e7d0e), to(#7db72f)); background-image: -webkit-gradient(linear, left top, left bottom, from(#4e7d0e), to(#7db72f));
background: -moz-linear-gradient(top, #4e7d0e, #7db72f); background-image: -moz-linear-gradient(top, #4e7d0e, #7db72f);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4e7d0e', endColorstr='#7db72f'); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4e7d0e', endColorstr='#7db72f');
} }

View File

@ -48,22 +48,21 @@ if (file_exists('bandeaux_local.php')) {
//si les variables de session ne sont pas valides, il y a une erreur //si les variables de session ne sont pas valides, il y a une erreur
if (issetAndNoEmpty('titre', $_SESSION) === false || issetAndNoEmpty('nom', $_SESSION) === false || issetAndNoEmpty('adresse', $_SESSION) === false) { if (issetAndNoEmpty('titre', $_SESSION) === false || issetAndNoEmpty('nom', $_SESSION) === false || issetAndNoEmpty('adresse', $_SESSION) === false) {
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n"; echo '<!DOCTYPE html>'."\n";
echo '<html>'."\n"; echo '<html lang="'.$lang.'">'."\n";
echo '<head>'."\n"; echo '<head>'."\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n"; echo '<meta charset="utf-8">'."\n";
echo '<title>'.NOMAPPLICATION.'</title>'."\n"; echo '<title>'._("Error!").' - '.NOMAPPLICATION.'</title>'."\n";
echo '<link rel="stylesheet" type="text/css" href="style.css">'."\n"; echo '<link rel="stylesheet" href="'.get_server_name().'/style.css">'."\n";
echo '</head>'."\n"; echo '</head>'."\n";
echo '<body>'."\n"; echo '<body>'."\n";
framanav(); framanav();
logo(); logo();
bandeau_tete(); bandeau_tete();
bandeau_titre(_("Error!")); bandeau_titre(_("Error!"));
echo '<div class=corpscentre>'."\n"; echo '<div class="corpscentre">'."\n";
print "<H2>" . _("You haven't filled the first section of the poll creation.") . " !</H2>"."\n"; print "<h2>" . _("You haven't filled the first section of the poll creation.") . " !</h2>"."\n";
print "" . _("Back to the homepage of ") . " <a href=\"index.php\"> ".NOMAPPLICATION."</A>."."\n"; print "" . _("Back to the homepage of ") . " <a href=\"".get_server_name()."\"> ".NOMAPPLICATION."</a>."."\n";
echo '<br><br><br>'."\n";
echo '</div>'."\n"; echo '</div>'."\n";
//bandeau de pied //bandeau de pied
bandeau_pied(); bandeau_pied();
@ -136,7 +135,14 @@ if (issetAndNoEmpty('titre', $_SESSION) === false || issetAndNoEmpty('nom', $_SE
$_SESSION["nbrecases"]=$_SESSION["nbrecases"]+5; $_SESSION["nbrecases"]=$_SESSION["nbrecases"]+5;
} }
print_header();
if( ($testremplissage != "ok" && (isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"]))) || ($testdate === false) || ($erreur_injection) ) {
// S'il y a des erreurs
print_header(false, _("Error!") .' - '. _("Poll subjects (2 on 2)"));
} else {
print_header(false, _("Poll subjects (2 on 2)"));
}
echo '<body>'."\n"; echo '<body>'."\n";
framanav(); framanav();
@ -146,8 +152,8 @@ if (issetAndNoEmpty('titre', $_SESSION) === false || issetAndNoEmpty('nom', $_SE
bandeau_titre(_("Poll subjects (2 on 2)")); bandeau_titre(_("Poll subjects (2 on 2)"));
sous_bandeau_choix(); sous_bandeau_choix();
echo '<div class=corps>'."\n"; echo '<div class="corps">'."\n";
echo '<br>'. _("Your poll aim is to make a choice between different subjects.<br>Enter the subjects to vote for:") .'<br><br>'."\n"; echo '<p>'. _("Your poll aim is to make a choice between different subjects.<br>Enter the subjects to vote for:") .'</p>'."\n";
echo '<table>'."\n"; echo '<table>'."\n";
//affichage des cases texte de formulaire //affichage des cases texte de formulaire
@ -156,7 +162,7 @@ if (issetAndNoEmpty('titre', $_SESSION) === false || issetAndNoEmpty('nom', $_SE
if (isset($_SESSION["choix$i"]) === false) { if (isset($_SESSION["choix$i"]) === false) {
$_SESSION["choix$i"] = ''; $_SESSION["choix$i"] = '';
} }
echo '<tr><td>'. _("Choice") .' '.$j.' : </td><td><input type="text" name="choix[]" size="40" maxlength="40" value="'.str_replace("\\","",$_SESSION["choix$i"]).'" id="choix'.$i.'"></td></tr>'."\n"; echo '<tr><td><label for="choix'.$i.'">'. _("Choice") .' '.$j.'</label> : </td><td><input type="text" name="choix[]" size="40" maxlength="40" value="'.str_replace("\\","",$_SESSION["choix$i"]).'" id="choix'.$i.'"></td></tr>'."\n";
} }
echo '</table>'."\n"; echo '</table>'."\n";
@ -168,9 +174,8 @@ if (issetAndNoEmpty('titre', $_SESSION) === false || issetAndNoEmpty('nom', $_SE
//ajout de cases supplementaires //ajout de cases supplementaires
echo '<table><tr>'."\n"; echo '<table><tr>'."\n";
echo '<td>'. _("5 choices more") .'</td><td><input type="image" name="ajoutcases" value="Retour" src="images/add-16.png"></td>'."\n"; echo '<td>'. _("5 choices more") .'</td><td><input type="image" alt="'. _("5 choices more").'" name="ajoutcases" value="Retour" src="'.get_server_name().'images/add-16.png"></td>'."\n";
echo '</tr></table>'."\n"; echo '</tr></table>'."\n";
echo'<br>'."\n";
//echo '<table><tr>'."\n"; //echo '<table><tr>'."\n";
//echo '<td>'. _("Next") .'</td><td><input type="image" name="fin_sondage_autre" value="Cr&eacute;er le sondage" src="images/next-32.png"></td>'."\n"; //echo '<td>'. _("Next") .'</td><td><input type="image" name="fin_sondage_autre" value="Cr&eacute;er le sondage" src="images/next-32.png"></td>'."\n";
@ -191,46 +196,43 @@ if (!isset($_POST["fin_sondage_autre_x"])) {
//message d'erreur si aucun champ renseigné //message d'erreur si aucun champ renseigné
if ($testremplissage != "ok" && (isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"]))) { if ($testremplissage != "ok" && (isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"]))) {
print "<br><font color=\"#FF0000\">" . _("Enter at least one choice") . "</font><br><br>"."\n"; print "<p class=\"error\">" . _("Enter at least one choice") . "</p>"."\n";
$erreur = true; $erreur = true;
} }
//message d'erreur si mauvaise date //message d'erreur si mauvaise date
if ($testdate === false) { if ($testdate === false) {
print "<br><font color=\"#FF0000\">" . _("Date must be have the format DD/MM/YYYY") . "</font><br><br>"."\n"; print "<p class=\"error\">" . _("Date must be have the format DD/MM/YYYY") . "</p>"."\n";
} }
if ($erreur_injection) { if ($erreur_injection) {
print "<font color=#FF0000>" . _("Characters \" < and > are not permitted") . "</font><br><br>\n"; print "<p class=\"error\">" . _("Characters \" < and > are not permitted") . "</p>\n";
} }
if ((isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"])) && !$erreur && !$erreur_injection) { if ((isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"])) && !$erreur && !$erreur_injection) {
//demande de la date de fin du sondage //demande de la date de fin du sondage
echo '<br>'."\n";
echo '<div class=presentationdatefin>'."\n"; echo '<div class=presentationdatefin>'."\n";
echo '<br>'. _("Your poll will be automatically removed after 6 months.<br> You can fix another removal date for it.") .'<br><br>'."\n"; echo '<p>'. _("Your poll will be automatically removed after 6 months.<br> You can fix another removal date for it.") .'</p>'."\n";
echo _("Removal date (optional)") .' : <input type="text" class="champdatefin" name="champdatefin" value="'.$date_selected.'" size="10" maxlength="10"> '. _("(DD/MM/YYYY)") ."\n"; echo '<label for="champdatefin">'. _("Removal date (optional)") .'</label> : <input type="text" class="champdatefin" id="champdatefin" aria-describedby="dateformat" name="champdatefin" value="'.$date_selected.'" size="10" maxlength="10"> <span id="dateformat">'. _("(DD/MM/YYYY)") .'</span>'."\n";
echo '</div>'."\n"; echo '</div>'."\n";
echo '<div class=presentationdatefin>'."\n"; echo '<div class=presentationdatefin>'."\n";
echo '<font color=#FF0000>'. _("Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll. <br><br>Then, you will receive quickly an email contening the link to your poll for sending it to the voters.") .'</font>'."\n"; echo '<p class="error">'. _("Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll. <br><br>Then, you will receive quickly an email contening the link to your poll for sending it to the voters.").'</p>'."\n";
echo '</div>'."\n"; echo '</div>'."\n";
echo '<br>'."\n";
//echo '<table>'."\n"; //echo '<table>'."\n";
//echo '<tr><td>'. _("Create the poll") .'</td><td><input type="image" name="confirmecreation" value="Valider la cr&eacute;ation"i src="images/add.png"></td></tr>'."\n"; //echo '<tr><td>'. _("Create the poll") .'</td><td><input type="image" name="confirmecreation" value="Valider la cr&eacute;ation"i src="images/add.png"></td></tr>'."\n";
//echo '</table>'."\n"; //echo '</table>'."\n";
echo '<button name="confirmecreation" value="confirmecreation" type="submit" class="button green poursuivre"><strong>'. _('Make a poll') . '</strong> </button>'; echo '<button name="confirmecreation" value="confirmecreation" type="submit" class="button green poursuivre margin-top"><strong>'. _('Make a poll') . '</strong> </button>';
echo '<div style="clear:both"></div>'; echo '<div style="clear:both"></div>';
} }
//fin du formulaire et bandeau de pied //fin du formulaire et bandeau de pied
echo '</form>'."\n"; echo '</form>'."\n";
echo '<a name=bas></a>'."\n"; echo '<a id=bas></a>'."\n";
echo '<br><br><br>'."\n";
echo '</div>'."\n"; echo '</div>'."\n";
//bandeau de pied //bandeau de pied
bandeau_pied_mobile(); bandeau_pied_mobile();
echo '</body>'."\n"; echo '</body>'."\n";
echo '</html>'."\n"; echo '</html>'."\n";
} }

View File

@ -50,11 +50,11 @@ if (is_readable('bandeaux_local.php')) {
//si les variables de session ne snot pas valides, il y a une erreur //si les variables de session ne snot pas valides, il y a une erreur
if (!issetAndNoEmpty('nom', $_SESSION) && !issetAndNoEmpty('adresse', $_SESSION) && !issetAndNoEmpty('commentaires', $_SESSION) && !issetAndNoEmpty('mail', $_SESSION)) { if (!issetAndNoEmpty('nom', $_SESSION) && !issetAndNoEmpty('adresse', $_SESSION) && !issetAndNoEmpty('commentaires', $_SESSION) && !issetAndNoEmpty('mail', $_SESSION)) {
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n"; echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n";
echo '<html>'."\n"; echo '<html lang="'.$lang.'">'."\n";
echo '<head>'."\n"; echo '<head>'."\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n"; echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n";
echo '<title>'.NOMAPPLICATION.'</title>'."\n"; echo '<title>'._("Error!").' - '.NOMAPPLICATION.'</title>'."\n";
echo '<link rel="stylesheet" type="text/css" href="style.css">'."\n"; echo '<link rel="stylesheet" type="text/css" href="'.get_server_name().'style.css">'."\n";
echo '</head>'."\n"; echo '</head>'."\n";
echo '<body>'."\n"; echo '<body>'."\n";
framanav(); framanav();
@ -63,7 +63,7 @@ if (!issetAndNoEmpty('nom', $_SESSION) && !issetAndNoEmpty('adresse', $_SESSION)
bandeau_titre(_("Error!")); bandeau_titre(_("Error!"));
echo '<div class=corpscentre corps>'."\n"; echo '<div class=corpscentre corps>'."\n";
print "<H2>" . _("You haven't filled the first section of the poll creation.") . " !</H2>"."\n"; print "<H2>" . _("You haven't filled the first section of the poll creation.") . " !</H2>"."\n";
print _("Back to the homepage of ") . ' ' . '<a href="index.php">' . NOMAPPLICATION . '</a>.' . "\n"; print _("Back to the homepage of ") . ' ' . '<a href="'.get_server_name().'">' . NOMAPPLICATION . '</a>.' . "\n";
echo '<br><br><br>'."\n"; echo '<br><br><br>'."\n";
echo '</div>'."\n"; echo '</div>'."\n";
//bandeau de pied //bandeau de pied
@ -214,12 +214,12 @@ if (!issetAndNoEmpty('nom', $_SESSION) && !issetAndNoEmpty('adresse', $_SESSION)
//debut de la page web //debut de la page web
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n"; echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n";
echo '<html>'."\n"; echo '<html lang="'.$lang.'">'."\n";
echo '<head>'."\n"; echo '<head>'."\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n"; echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n";
echo '<title>'.NOMAPPLICATION.'</title>'."\n"; echo '<title>'._("Poll dates (2 on 2)").' - '.NOMAPPLICATION.'</title>'."\n";
echo '<link rel="stylesheet" type="text/css" href="style.css">'."\n"; echo '<link rel="stylesheet" type="text/css" href="'.get_server_name().'style.css">'."\n";
echo '<script type="text/javascript" src="block_enter.js"></script>'; echo '<script type="text/javascript" src="'.get_server_name().'block_enter.js"></script>';
echo '</head>'."\n"; echo '</head>'."\n";
echo '<body>'."\n"; echo '<body>'."\n";
@ -230,7 +230,7 @@ if (!issetAndNoEmpty('nom', $_SESSION) && !issetAndNoEmpty('adresse', $_SESSION)
bandeau_titre(_("Poll dates (2 on 2)")); bandeau_titre(_("Poll dates (2 on 2)"));
sous_bandeau_choix(); sous_bandeau_choix();
echo '<form name="formulaire" action="choix_date.php" method="POST" onkeypress="javascript:process_keypress(event)">'."\n"; echo '<form name="formulaire" action="'.get_server_name().'choix_date.php" method="POST" onkeypress="javascript:process_keypress(event)">'."\n";
//ajout pyg pour la cohérence graphique //ajout pyg pour la cohérence graphique
@ -244,7 +244,7 @@ if (!issetAndNoEmpty('nom', $_SESSION) && !issetAndNoEmpty('adresse', $_SESSION)
//debut du tableau qui affiche le calendrier //debut du tableau qui affiche le calendrier
echo '<div class=calendrier>'."\n"; echo '<div class=calendrier>'."\n";
echo '<table align=center>'."\n"; echo '<table align=center>'."\n";
echo '<tr><td><input type="image" name="anneeavant" value="<<" src="images/rewind.png"></td><td><input type="image" name="moisavant" value="<" src="images/previous.png"></td><td align="center" class="choix_date_mois"> '.$motmois.' '.$_SESSION["annee"].' </td><td><input type="image" name="moisapres" value=">" src="images/next.png"></td><td><input type="image" name="anneeapres" value=">>" src="images/fforward.png"></td><td></td><td></td><td></td><td></td><td></td><td><input type="image" name="retourmois" value="Aujourd\'hui" src="images/reload.png"></td></tr>'."\n"; echo '<tr><td><input type="image" name="anneeavant" value="<<" src="'.get_server_name().'images/rewind.png"></td><td><input type="image" name="moisavant" value="<" src="'.get_server_name().'images/previous.png"></td><td align="center" class="choix_date_mois"> '.$motmois.' '.$_SESSION["annee"].' </td><td><input type="image" name="moisapres" value=">" src="'.get_server_name().'images/next.png"></td><td><input type="image" name="anneeapres" value=">>" src="'.get_server_name().'images/fforward.png"></td><td></td><td></td><td></td><td></td><td></td><td><input type="image" name="retourmois" value="Aujourd\'hui" src="'.get_server_name().'images/reload.png"></td></tr>'."\n";
echo '</table>'."\n"; echo '</table>'."\n";
echo '<table>'."\n"; echo '<table>'."\n";
echo '<tr>'."\n"; echo '<tr>'."\n";
@ -498,7 +498,7 @@ if (!issetAndNoEmpty('nom', $_SESSION) && !issetAndNoEmpty('adresse', $_SESSION)
} }
if ($_SESSION["nbrecaseshoraires"] < 10) { if ($_SESSION["nbrecaseshoraires"] < 10) {
echo '<td classe=somme><input type="image" name="ajoutcases" src="images/add-16.png"></td>'."\n"; echo '<td classe=somme><input type="image" name="ajoutcases" src="'.get_server_name().'images/add-16.png"></td>'."\n";
} }
echo '</tr>'."\n"; echo '</tr>'."\n";
@ -621,4 +621,4 @@ if (!issetAndNoEmpty('nom', $_SESSION) && !issetAndNoEmpty('adresse', $_SESSION)
unset($_SESSION["nbrecaseshoraires"]); unset($_SESSION["nbrecaseshoraires"]);
echo '<meta http-equiv="refresh" content="0">'; echo '<meta http-equiv="refresh" content="0">';
} }
} }

View File

@ -65,21 +65,20 @@ if ((isset($_POST['envoiquestion']) || isset($_POST['envoiquestion_x'])) && isse
} }
//affichage de la page de confirmation d'envoi //affichage de la page de confirmation d'envoi
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n"; echo '<!DOCTYPE html>'."\n";
echo '<html>'."\n"; echo '<html lang="'.$lang.'">'."\n";
echo '<head>'."\n"; echo '<head>'."\n";
echo '<title>'.NOMAPPLICATION.'</title>'."\n"; echo '<title>'._("Make your polls").' - '.NOMAPPLICATION.'</title>'."\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n"; echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n";
echo '<link rel="stylesheet" type="text/css" href="style.css">'."\n"; echo '<link rel="stylesheet" type="text/css" href="'.get_server_name().'style.css">'."\n";
echo '</head>'."\n"; echo '</head>'."\n";
echo '<body>'."\n"; echo '<body>'."\n";
logo(); logo();
bandeau_tete(); bandeau_tete();
bandeau_titre(_("Make your polls")); bandeau_titre(_("Make your polls"));
echo '<div class=corpscentre>'."\n"; echo '<div class=corpscentre>'."\n";
print "<H2>" . _("Your message has been sent!") . "</H2><br><br>"."\n"; print "<h2>" . _("Your message has been sent!") . "</h2>"."\n";
print "" . _("Back to the homepage of ") . " <a href=\"index.php\"> ".NOMAPPLICATION."</A>."."\n"; print "" . _("Back to the homepage of ") . " <a href=\"".get_server_name()."\"> ".NOMAPPLICATION."</a>."."\n";
echo '<br><br><br>'."\n";
echo '</div>'."\n"; echo '</div>'."\n";
bandeau_pied(); bandeau_pied();
session_unset(); session_unset();
@ -94,19 +93,19 @@ if ((isset($_POST['envoiquestion']) || isset($_POST['envoiquestion_x'])) && isse
} }
//affichage de la page //affichage de la page
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n"; echo '<!DOCTYPE html>'."\n";
echo '<html>'."\n"; echo '<html lang="'.strtolower($_SESSION['langue']).'">'."\n";
echo '<head>'."\n"; echo '<head>'."\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n"; echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n";
echo '<title>'.NOMAPPLICATION.'</title>'."\n"; echo '<title>'._("Contact us").' - '.NOMAPPLICATION.'</title>'."\n";
echo '<link rel="stylesheet" type="text/css" href="style.css">'."\n"; echo '<link rel="stylesheet" type="text/css" href="'.get_server_name().'style.css">'."\n";
echo '</head>'."\n"; echo '</head>'."\n";
echo '<body>'."\n"; echo '<body>'."\n";
framanav(); framanav();
//debut du formulaire //debut du formulaire
echo '<form name=formulaire action="contacts.php" method="POST">'."\n"; echo '<form name=formulaire action="'.get_server_name().'contacts.php" method="POST">'."\n";
//bandeaux de tete //bandeaux de tete
logo(); logo();
@ -132,8 +131,6 @@ framanav();
echo ' <font color="#FF0000">'. _("The address is not correct!") .'</font>'; echo ' <font color="#FF0000">'. _("The address is not correct!") .'</font>';
} }
echo '<br><br>';
echo _("Question") .' :<br>'."\n"; echo _("Question") .' :<br>'."\n";
echo '<textarea name="question" rows="7" cols="40">'.$_SESSION["question"].'</textarea>'; echo '<textarea name="question" rows="7" cols="40">'.$_SESSION["question"].'</textarea>';
@ -141,9 +138,7 @@ framanav();
echo ' <font color="#FF0000">&nbsp;Il faut poser une question !</font>'; echo ' <font color="#FF0000">&nbsp;Il faut poser une question !</font>';
} }
echo '<br><br><br>'."\n";
echo '<button type="submit" name="envoiquestion" value="'._("Send your question").'" class="button green poursuivre" alt="'._("Send your question").'"><strong>'._("Send your question").'</strong></button>'; echo '<button type="submit" name="envoiquestion" value="'._("Send your question").'" class="button green poursuivre" alt="'._("Send your question").'"><strong>'._("Send your question").'</strong></button>';
echo '<br><br><br>'."\n";
echo '</div>'."\n"; echo '</div>'."\n";
echo '</form>'."\n"; echo '</form>'."\n";
//bandeau de pied //bandeau de pied

View File

@ -41,7 +41,7 @@
include '../bandeaux.php'; include '../bandeaux.php';
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n"; echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n";
echo '<html>'."\n"; echo '<html lang="'.$lang.'">'."\n";
echo '<head>'."\n"; echo '<head>'."\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n"; echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n";
echo '<title>Erreur !</title>'."\n"; echo '<title>Erreur !</title>'."\n";
@ -62,4 +62,4 @@ echo '</div>'."\n";
sur_bandeau_pied(); sur_bandeau_pied();
bandeau_pied(); bandeau_pied();
echo '</body>'."\n"; echo '</body>'."\n";
echo '</html>'."\n"; echo '</html>'."\n";

View File

@ -56,7 +56,7 @@ function connexion_base()
function get_server_name() function get_server_name()
{ {
$scheme = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http'; $scheme = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http';
return $scheme . '://' . $_SERVER['SERVER_NAME'] . '/'; return $scheme . '://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']).'/';
} }
@ -105,10 +105,10 @@ function is_user()
function print_header($js = false, $nom_sondage = '') function print_header($js = false, $nom_sondage = '')
{ {
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> echo '<!DOCTYPE html>
<html> <html lang="'.$lang.'">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'; <meta charset="utf-8">';
if (empty($nom_sondage) === false) { if (empty($nom_sondage) === false) {
echo ' echo '
<title>'.stripslashes($nom_sondage).' - '.NOMAPPLICATION.'</title>'; <title>'.stripslashes($nom_sondage).' - '.NOMAPPLICATION.'</title>';
@ -117,8 +117,8 @@ function print_header($js = false, $nom_sondage = '')
<title>'.NOMAPPLICATION.'</title>'; <title>'.NOMAPPLICATION.'</title>';
} }
echo ' echo '
<link rel="stylesheet" type="text/css" href="/style.css"> <link rel="stylesheet" href="'.get_server_name().'style.css">
<link rel="stylesheet" type="text/css" href="/print.css" media="print">'; <link rel="stylesheet" href="'.get_server_name().'print.css" media="print">';
echo '</head>'; echo '</head>';
} }
@ -219,15 +219,15 @@ function getUrlSondage($id, $admin = false)
{ {
if (URL_PROPRE === true) { if (URL_PROPRE === true) {
if ($admin === true) { if ($admin === true) {
$url = get_server_name().$id.'/admin'; $url = str_replace('/admin','',get_server_name()).$id.'/admin';
} else { } else {
$url = get_server_name().$id; $url = str_replace('/admin','',get_server_name()).$id;
} }
} else { } else {
if ($admin === true) { if ($admin === true) {
$url = get_server_name().'adminstuds.php?sondage='.$id; $url = str_replace('/admin','',get_server_name()).'adminstuds.php?sondage='.$id;
} else { } else {
$url = get_server_name().'studs.php?sondage='.$id; $url = str_replace('/admin','',get_server_name()).'studs.php?sondage='.$id;
} }
} }

@ -1 +0,0 @@
Subproject commit 24d503e3e56e9fa095a2cee17576f6f0cb518fcc

View File

@ -23,3 +23,7 @@ textdomain($domain);
/* temp, for compatibility :*/ /* temp, for compatibility :*/
$a = explode('_', $locale); $a = explode('_', $locale);
$_SESSION['langue'] = strtoupper($a[0]); $_SESSION['langue'] = strtoupper($a[0]);
/* <html lang="$lang"> */
$lang = ($_SESSION['langue']!='') ? strtolower($_SESSION['langue']) : 'fr';

View File

@ -47,12 +47,12 @@ if (is_readable('bandeaux_local.php')) {
session_start(); session_start();
//affichage de la page //affichage de la page
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n"; echo '<!DOCTYPE html>'."\n";
echo '<html>'."\n"; echo '<html lang="'.$lang.'">'."\n";
echo '<head>'."\n"; echo '<head>'."\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n"; echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n";
echo '<title>'.NOMAPPLICATION.'</title>'."\n"; echo '<title>'._("Home").' - '.NOMAPPLICATION.'</title>'."\n";
echo '<link rel="stylesheet" type="text/css" href="style.css">'."\n"; echo '<link rel="stylesheet" type="text/css" href="'.get_server_name().'style.css">'."\n";
echo '</head>'."\n"; echo '</head>'."\n";
echo '<body>'."\n"; echo '<body>'."\n";
@ -73,17 +73,15 @@ echo '<div class=corps>'."\n";
# '</span>'; # '</span>';
#echo '</div>' . "\n"; #echo '</div>' . "\n";
echo '<br>'."\n";
echo '<div class="index_date">'; echo '<div class="index_date">';
echo '<div><a href="./infos_sondage.php?choix_sondage=date"/><image class="opacity" src="images/date.png"/></a></div>'; echo '<p><a href="'.get_server_name().'infos_sondage.php?choix_sondage=date" role="button"><img class="opacity" src="'.get_server_name().'images/date.png" alt="" />';
echo '<a href="./infos_sondage.php?choix_sondage=date" class="button orange bigrounded"/><strong><img src="images/calendar-32.png" alt="" />' echo '<span class="button orange bigrounded"><strong><img src="'.get_server_name().'images/calendar-32.png" alt="" />'
. _('Schedule an event') . '</strong></a>'; . _('Schedule an event') . '</strong></span></a></p>';
echo '</div>'; echo '</div>';
echo '<div class="index_sondage">'; echo '<div class="index_sondage">';
echo '<div><a href="./infos_sondage.php?choix_sondage=autre"><image class="opacity" src="images/sondage2.png" /></a></div>'; echo '<p><a href="'.get_server_name().'infos_sondage.php?choix_sondage=autre" role="button"><img alt="" class="opacity" src="'.get_server_name().'images/sondage2.png" />';
echo '<a href="./infos_sondage.php?choix_sondage=autre" class="button blue bigrounded"><strong><img src="images/chart-32.png" alt="" />'. _('Make a poll') . '</strong></a>'; echo '<span class="button blue bigrounded"><strong><img src="'.get_server_name().'images/chart-32.png" alt="" />'. _('Make a poll') . '</strong></span></a></p>';
echo '</div>'; echo '</div>';

View File

@ -141,18 +141,23 @@ if (issetAndNoEmpty("poursuivre")){
} }
} else {
// Title Erreur !
print_header(true, _("Error!").' - '._("Poll creation (1 on 2)"));
} }
} else {
// Title OK (formulaire pas encore rempli)
print_header(true, _("Poll creation (1 on 2)"));
} }
//affichage de la page //affichage de la page
print_header(true);
echo '<body>'."\n"; echo '<body>'."\n";
framanav(); framanav();
//affichage des bandeaux de tete //affichage des bandeaux de tete
logo(); logo();
bandeau_tete(); bandeau_tete();
echo '<div class="bandeautitre">'. _("Poll creation (1 on 2)") .'</div>'."\n"; echo '<p class="bandeautitre">'. _("Poll creation (1 on 2)") .'</p>'."\n";
sous_bandeau(); sous_bandeau();
// premier sondage ? test l'existence des schémas SQL avant d'aller plus loin // premier sondage ? test l'existence des schémas SQL avant d'aller plus loin
@ -167,56 +172,69 @@ if(!check_table_sondage()) {
} }
//debut du formulaire //debut du formulaire
echo '<form name="formulaire" id="formulaire" action="infos_sondage.php" method="POST" onkeypress="javascript:process_keypress(event)">'."\n"; echo '<form name="formulaire" id="formulaire" action="'.get_server_name().'infos_sondage.php" method="POST" onkeypress="javascript:process_keypress(event)">'."\n";
echo '<div class=corps>'."\n"; echo '<div class="corps" style="margin-bottom:5em;">'."\n";
echo '<br>'. _("You are in the poll creation section. <br> Required fields cannot be left blank") .'<br><br>'."\n"; echo '<p>'. _("You are in the poll creation section. <br> Required fields cannot be left blank") .'</p>'."\n";
//Affichage des différents champs textes a remplir //Affichage des différents champs textes a remplir
echo '<table>'."\n"; echo '<table role="presentation">'."\n";
echo '<tr><td>'. _("Poll title *: ") .'</td><td><input type="text" name="titre" size="40" maxlength="80" value="'.stripslashes($_SESSION["titre"]).'"></td>'."\n"; echo '<tr><td><label for="poll_title">'. _("Poll title *: ") .'</label></td><td><input id="poll_title" type="text" name="titre" size="40" maxlength="80" value="'.stripslashes($_SESSION["titre"]).'"';
if (!$_SESSION["titre"] && issetAndNoEmpty("poursuivre") ) { if (!$_SESSION["titre"] && issetAndNoEmpty("poursuivre") ) {
print "<td><font color=\"#FF0000\">" . _("Enter a title") . "</font></td>"."\n"; // fermeture de la ligne du dessus avec attribut aria-describeby pour avoir les infos concernant l'erreur
// pas très propre mais bon...
echo 'aria-describeby="#poll_title_error"></td>'."\n";
echo '<td class="error" id="poll_title_error">' . _("Enter a title") . '</td>'."\n";
} elseif ($erreur_injection_titre) { } elseif ($erreur_injection_titre) {
print "<td><font color=\"#FF0000\">" . _("Characters < > and \" are not permitted") . "</font></td><br>"."\n"; // idem
echo 'aria-describeby="#poll_title_error"></td>'."\n";
echo '<td class="error" id="poll_title_error">' . _("Characters < > and \" are not permitted") . '</td>'."\n";
} else {
// pas d'erreur, pas d'aria
echo '></td>'."\n";
} }
echo '</tr>'."\n"; echo '</tr>'."\n";
echo '<tr><td>'. _("Comments: ") .'</td><td><textarea name="commentaires" rows="7" cols="40">'.stripslashes($_SESSION["commentaires"]).'</textarea></td>'."\n";
echo '<tr><td><label for="poll_comments">'. _("Comments: ") .'</label></td><td><textarea id="poll_comments" name="commentaires" rows="7" cols="40"';
if ($erreur_injection_commentaires) { if ($erreur_injection_commentaires) {
print "<td><font color=\"#FF0000\">" . _("Characters < > and \" are not permitted") . "</font></td><br>"."\n"; // même principe
echo 'aria-describeby="#poll_comment_error">'.stripslashes($_SESSION["commentaires"]).'</textarea></td>'."\n";
echo '<td class="error" id="poll_comment_error">' . _("Characters < > and \" are not permitted") . "</td>"."\n";
} else {
// pas d'erreur, pas d'aria
echo '>'.stripslashes($_SESSION["commentaires"]).'</textarea></td>'."\n";
} }
echo '</tr>'."\n"; echo '</tr>'."\n";
echo '<tr><td>'. _("Your name*: ") .'</td><td>'; echo '<tr><td><label for="yourname">'. _("Your name*: ") .'</label><td>';
if (USE_REMOTE_USER && isset($_SERVER['REMOTE_USER'])) { if (USE_REMOTE_USER && isset($_SERVER['REMOTE_USER'])) {
echo '<input type="hidden" name="nom" size="40" maxlength="40" value="'.$_SESSION["nom"].'">'.stripslashes($_SESSION["nom"]).'</td>'."\n"; echo '<input type="hidden" name="nom" size="40" maxlength="40" value="'.$_SESSION["nom"].'">'.stripslashes($_SESSION["nom"]).'</td>'."\n";
} else { } else {
echo '<input type="text" name="nom" size="40" maxlength="40" value="'.stripslashes($_SESSION["nom"]).'"></td>'."\n"; echo '<input id="yourname" type="text" name="nom" size="40" maxlength="40" value="'.stripslashes($_SESSION["nom"]).'"></td>'."\n";
} }
if (!$_SESSION["nom"] && issetAndNoEmpty("poursuivre")) { if (!$_SESSION["nom"] && issetAndNoEmpty("poursuivre")) {
print "<td><font color=\"#FF0000\">" . _("Enter a name") . "</font></td>"."\n"; print "<td class=\"error\">" . _("Enter a name") . "</td>"."\n";
} elseif ($erreur_injection_nom) { } elseif ($erreur_injection_nom) {
print "<td><font color=\"#FF0000\">" . _("Characters < > and \" are not permitted") . "</font></td><br>"."\n"; print "<td class=\"error\">" . _("Characters < > and \" are not permitted") . "</td>"."\n";
} }
echo '</tr>'."\n"; echo '</tr>'."\n";
echo '<tr><td>'. _("Your e-mail address *: ") .'</td><td>'; echo '<tr><td><label for="email">'. _("Your e-mail address *: ") .'</label><td>';
if (USE_REMOTE_USER && isset($_SERVER['REMOTE_USER'])) { if (USE_REMOTE_USER && isset($_SERVER['REMOTE_USER'])) {
echo '<input type="hidden" name="adresse" size="40" maxlength="64" value="'.$_SESSION["adresse"].'">'.$_SESSION["adresse"].'</td>'."\n"; echo '<input type="hidden" name="adresse" size="40" maxlength="64" value="'.$_SESSION["adresse"].'">'.$_SESSION["adresse"].'</td>'."\n";
} else { } else {
echo '<input type="text" name="adresse" size="40" maxlength="64" value="'.$_SESSION["adresse"].'"></td>'."\n"; echo '<input id="email" type="text" name="adresse" size="40" maxlength="64" value="'.$_SESSION["adresse"].'"></td>'."\n";
} }
if (!$_SESSION["adresse"] && issetAndNoEmpty("poursuivre")) { if (!$_SESSION["adresse"] && issetAndNoEmpty("poursuivre")) {
print "<td><font color=\"#FF0000\">" . _("Enter an email address") . " </font></td>"."\n"; print "<td class=\"error\">" . _("Enter an email address") . " </td>"."\n";
} elseif ($erreur_adresse && issetAndNoEmpty("poursuivre")) { } elseif ($erreur_adresse && issetAndNoEmpty("poursuivre")) {
print "<td><font color=\"#FF0000\">" . _("The address is not correct! (You should enter a valid email address in order to receive the link to your poll)") . "</font></td>"."\n"; print "<td class=\"error\">" . _("The address is not correct! (You should enter a valid email address in order to receive the link to your poll)") . "</td>"."\n";
} }
echo '</tr>'."\n"; echo '</tr>'."\n";
@ -238,13 +256,13 @@ if ($_SESSION["studsplus"]=="+") {
$cocheplus="checked"; $cocheplus="checked";
} }
echo '<input type=checkbox name=studsplus '.$cocheplus.' id="studsplus"><label for="studsplus">'. _(" Voters can modify their vote themselves.") .'</label><br>'."\n"; echo '<p><input type=checkbox name=studsplus '.$cocheplus.' id="studsplus"><label for="studsplus"><strong>'. _(" Voters can modify their vote themselves.") .'</strong></label></p>'."\n";
if ($_SESSION["mailsonde"]) { if ($_SESSION["mailsonde"]) {
$cochemail="checked"; $cochemail="checked";
} }
echo '<input type=checkbox name=mailsonde '.$cochemail.' id="mailsonde"><label for="mailsonde">'. _(" To receive an email for each new vote.") .'</label><br>'."\n"; echo '<p><input type=checkbox name=mailsonde '.$cochemail.' id="mailsonde"><label for="mailsonde"><strong>'. _(" To receive an email for each new vote.") .'</strong></label></p>'."\n";
//affichage des boutons pour choisir sondage date ou autre //affichage des boutons pour choisir sondage date ou autre
if ($_GET['choix_sondage'] == 'date') { if ($_GET['choix_sondage'] == 'date') {
@ -253,7 +271,7 @@ if ($_GET['choix_sondage'] == 'date') {
$choix = "creation_sondage_autre"; $choix = "creation_sondage_autre";
} }
echo '<input type="hidden" name="choix_sondage" value="'. $choix_sondage .'"/>'; echo '<input type="hidden" name="choix_sondage" value="'. $choix_sondage .'"/>';
echo '<br><button name="poursuivre" value="'. $choix .'" type="submit" class="button green poursuivre"><strong>'. _('Next') . '</strong> </button>'; echo '<button name="poursuivre" value="'. $choix .'" type="submit" class="button green poursuivre"><strong>'. _('Next') . '</strong> </button>';
echo '<div style="clear:both"></div>'; echo '<div style="clear:both"></div>';

Binary file not shown.

View File

@ -400,8 +400,8 @@ msgid "Comments"
msgstr "Kommentar" msgstr "Kommentar"
#: studs.php:261 #: studs.php:261
msgid "If you want to vote in this poll, you have to give your name, choose the values that fit best for you<br>(without paying attention to the choices of the other voters) and validate with the plus button at the end of the line." msgid "If you want to vote in this poll, you have to give your name, choose the values that fit best for you<br> and validate with the plus button at the end of the line."
msgstr "Um an dieser Umfrage Teilzunehmen tragen sie bitte ihren Namen, w&auml;hlen sie die ihnen passenden Wehrte (ohne die dispo der anderen Teilnehmer zu beachten)<br> und best&auml;tigen sie ihre Wahl mit dem Knopf am ende der Ligne." msgstr "Um an dieser Umfrage Teilzunehmen tragen sie bitte ihren Namen, w&auml;hlen sie die ihnen passenden Wehrte<br> und best&auml;tigen sie ihre Wahl mit dem Knopf am ende der Ligne."
#: studs.php:445 #: studs.php:445
#: adminstuds.php:806 #: adminstuds.php:806

Binary file not shown.

View File

@ -388,8 +388,8 @@ msgid "Comments"
msgstr "Comments" msgstr "Comments"
#: studs.php:310 #: studs.php:310
msgid "If you want to vote in this poll, you have to give your name, choose the values that fit best for you<br>(without paying attention to the choices of the other voters) and validate with the plus button at the end of the line." msgid "If you want to vote in this poll, you have to give your name, choose the values that fit best for you<br> and validate with the plus button at the end of the line."
msgstr "If you want to vote in this poll, you have to give your name, choose the values that fit best for you<br>(without paying attention to the choices of the other voters) and validate with the plus button at the end of the line." msgstr "If you want to vote in this poll, you have to give your name, choose the values that fit best for you<br> and validate with the plus button at the end of the line."
#: studs.php:517 #: studs.php:517
#: adminstuds.php:886 #: adminstuds.php:886

Binary file not shown.

View File

@ -400,8 +400,8 @@ msgid "Comments"
msgstr "Comentarios" msgstr "Comentarios"
#: studs.php:261 #: studs.php:261
msgid "If you want to vote in this poll, you have to give your name, choose the values that fit best for you<br>(without paying attention to the choices of the other voters) and validate with the plus button at the end of the line." msgid "If you want to vote in this poll, you have to give your name, choose the values that fit best for you<br> and validate with the plus button at the end of the line."
msgstr "Para participar a esta encuesta, introduzca su nombre, elige todas las valores que son apriopriadas <br>(sin tener en cuenta los otros encuestados) y validar su seleccion con el bot&oacute;n verde a la fin de l&iacute;nea." msgstr "Para participar a esta encuesta, introduzca su nombre, elige todas las valores que son apriopriadas <br> y validar su seleccion con el bot&oacute;n verde a la fin de l&iacute;nea."
#: studs.php:445 #: studs.php:445
#: adminstuds.php:806 #: adminstuds.php:806

Binary file not shown.

View File

@ -374,8 +374,8 @@ msgid "Comments"
msgstr "Commentaire de l'auteur" msgstr "Commentaire de l'auteur"
#: studs.php:238 #: studs.php:238
msgid "If you want to vote in this poll, you have to give your name, choose the values that fit best for you<br>(without paying attention to the choices of the other voters) and validate with the plus button at the end of the line." msgid "If you want to vote in this poll, you have to give your name, choose the values that fit best for you<br> and validate with the plus button at the end of the line."
msgstr "Pour participer &agrave; ce sondage, veuillez entrer votre nom, choisir toutes les valeurs qui vous conviennent <br>et valider votre choix avec le bouton en bout de ligne." msgstr "Pour participer &agrave; ce sondage, veuillez entrer votre nom, choisir toutes les valeurs qui vous conviennent <br> et valider votre choix avec le bouton en bout de ligne."
#: studs.php:456 #: studs.php:456
msgid "Participate" msgid "Participate"
@ -395,7 +395,7 @@ msgstr "Meilleur choix"
#: adminstuds.php:924 #: adminstuds.php:924
#: adminstuds.php:926 #: adminstuds.php:926
msgid "for" msgid "for"
msgstr "&agrave" msgstr "&agrave;"
#: studs.php:534 #: studs.php:534
#: adminstuds.php:947 #: adminstuds.php:947

View File

@ -39,12 +39,12 @@
include_once('bandeaux.php'); include_once('bandeaux.php');
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n"; echo '<!DOCTYPE html>'."\n";
echo '<html>'."\n"; echo '<html lang="'.$lang.'">'."\n";
echo '<head>'."\n"; echo '<head>'."\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n"; echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n";
echo '<title>Maintenance '.NOMAPPLICATION.' </title>'."\n"; echo '<title>Maintenance '.NOMAPPLICATION.' </title>'."\n";
echo '<link rel="stylesheet" type="text/css" href="../style.css">'."\n"; echo '<link rel="stylesheet" type="text/css" href="'.get_server_name().'style.css">'."\n";
echo '</head>'."\n"; echo '</head>'."\n";
echo '<body>'."\n"; echo '<body>'."\n";
logo(); logo();
@ -60,4 +60,4 @@ echo '</div>'."\n";
sur_bandeau_pied(); sur_bandeau_pied();
bandeau_pied(); bandeau_pied();
echo '</body>'."\n"; echo '</body>'."\n";
echo '</html>'."\n"; echo '</html>'."\n";

View File

@ -40,7 +40,7 @@
include '../bandeaux.php'; include '../bandeaux.php';
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n"; echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'."\n";
echo '<html>'."\n"; echo '<html lang="'.$lang.'">'."\n";
echo '<head>'."\n"; echo '<head>'."\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n"; echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'."\n";
echo '<title>Sources '.NOMAPPLICATION.'</title>'."\n"; echo '<title>Sources '.NOMAPPLICATION.'</title>'."\n";
@ -61,4 +61,4 @@ echo '</div>'."\n";
// Affichage du bandeau de pied // Affichage du bandeau de pied
bandeau_pied(); bandeau_pied();
echo '</body>'."\n"; echo '</body>'."\n";
echo '</html>'."\n"; echo '</html>'."\n";

View File

@ -183,8 +183,11 @@ if (!is_error(NO_POLL) && (isset($_POST["boutonp"]) || isset($_POST["boutonp_x"]
$err |= NAME_EMPTY; $err |= NAME_EMPTY;
} }
} }
if($err != 0) {
print_header(true, $dsondage->titre); print_header(true, _("Error!").' - '.$dsondage->titre);
} else {
print_header(true, $dsondage->titre);
}
echo '<body>'."\n"; echo '<body>'."\n";
framanav(); framanav();
logo(); logo();
@ -219,9 +222,8 @@ if($err != 0) {
if(is_error(NO_POLL_ID) || is_error(NO_POLL)) { if(is_error(NO_POLL_ID) || is_error(NO_POLL)) {
echo '<div class=corpscentre>'."\n"; echo '<div class=corpscentre>'."\n";
print "<H2>" . _("This poll doesn't exist !") . "</H2>"."\n"; print "<h2>" . _("This poll doesn't exist !") . "</h2>"."\n";
print _("Back to the homepage of") . ' <a href="index.php"> '. NOMAPPLICATION . '</a>.'."\n"; print _("Back to the homepage of") . ' <a href="'.get_server_name().'"> '. NOMAPPLICATION . '</a>.'."\n";
echo '<br><br><br><br>'."\n";
echo '</div>'."\n"; echo '</div>'."\n";
bandeau_pied(); bandeau_pied();
@ -232,16 +234,16 @@ if($err != 0) {
} }
echo '<div class="corps">'; //ajout pyg cohérence graphique echo '<div class="corps">'; //ajout pyg cohérence graphique
echo '<div class="imprimer""><a href="javascript:print()" class="button white medium">Imprimer</a></div>'; echo '<div class="imprimer"><a role="button" href="javascript:print()" class="button white medium">Imprimer</a></div>';
echo '<div class="presentationdate"> '."\n"; echo '<div class="presentationdate"> '."\n";
//affichage du titre du sondage //affichage du titre du sondage
$titre=str_replace("\\","",$dsondage->titre); $titre=str_replace("\\","",$dsondage->titre);
echo '<H2>'.stripslashes($titre).'</H2>'."\n"; echo '<h2>'.stripslashes($titre).'</h2>'."\n";
//affichage du nom de l'auteur du sondage //affichage du nom de l'auteur du sondage
echo '<div class="initiator"><span class="mlabel">'. _("Initiator of the poll") .' :</span><span class="nom"> '.stripslashes($dsondage->nom_admin).'</span></div>'."\n"; echo '<div class="initiator"><p><span class="mlabel">'. _("Initiator of the poll") .' :</span><span class="nom"> '.stripslashes($dsondage->nom_admin).'</span></p></div>'."\n";
echo '<div class="adress"><span class="mlabel">'.'Adresse : </span><code>'.getUrlSondage($dsondage->id_sondage).'</code></div>'."\n";; echo '<div class="adress"><p><span class="mlabel">'.'Adresse : </span><code>'.getUrlSondage($dsondage->id_sondage).'</code></p></div>'."\n";;
//affichage des commentaires du sondage //affichage des commentaires du sondage
@ -252,15 +254,13 @@ if ($dsondage->commentaires) {
echo '<span class="mcontent">'. $commentaires .'</span>'; echo '<span class="mcontent">'. $commentaires .'</span>';
echo '</div>'."\n"; echo '</div>'."\n";
} }
echo '<br>'."\n";
echo '</div>'."\n"; echo '</div>'."\n";
echo '<form name="formulaire" action="'.getUrlSondage($dsondage->id_sondage).'"'.'#bas" method="POST" onkeypress="javascript:process_keypress(event)">'."\n"; echo '<form name="formulaire" action="'.getUrlSondage($dsondage->id_sondage).'#bas" method="POST" onkeypress="javascript:process_keypress(event)">'."\n";
echo '<input type="hidden" name="sondage" value="' . $numsondage . '"/>'; echo '<input type="hidden" name="sondage" value="' . $numsondage . '"/>';
// Todo : add CSRF protection // Todo : add CSRF protection
echo '<div class="cadre"><div class="information">'."\n"; echo '<div class="cadre"><div class="information">'."\n";
echo _("If you want to vote in this poll, you have to give your name, choose the values that fit best for you<br>(without paying attention to the choices of the other voters) and validate with the plus button at the end of the line.") ."\n"; echo _("If you want to vote in this poll, you have to give your name, choose the values that fit best for you<br> and validate with the plus button at the end of the line.") ."\n";
echo '</div>'."\n"; echo '</div>'."\n";
// Debut de l'affichage des resultats du sondage // Debut de l'affichage des resultats du sondage
@ -416,12 +416,12 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") {
//affichage des sujets du sondage //affichage des sujets du sondage
echo '<tr>'."\n"; echo '<tr>'."\n";
echo '<td></td>'."\n"; echo '<th role="presentation"></th>'."\n";
for ($i=0; isset($toutsujet[$i]); $i++) { for ($i=0; isset($toutsujet[$i]); $i++) {
echo '<td class="sujet">'.stripslashes($toutsujet[$i]).'</td>'."\n"; echo '<th scope="col" class="sujet">'.stripslashes($toutsujet[$i]).'</th>'."\n";
} }
echo '<th></th>'."\n";
echo '</tr>'."\n"; echo '</tr>'."\n";
} }
@ -442,7 +442,7 @@ while ($data = $user_studs->FetchNextObject(false)) {
$nombase=str_replace("°","'",$data->nom); $nombase=str_replace("°","'",$data->nom);
echo stripslashes($nombase).'</td>'."\n"; echo stripslashes($nombase).'</td>'."\n";
// Les réponses qu'il a choisit // Les réponses qu'il a choisies
$ensemblereponses = $data->reponses; $ensemblereponses = $data->reponses;
// ligne d'un usager pré-authentifié // ligne d'un usager pré-authentifié
@ -453,7 +453,7 @@ while ($data = $user_studs->FetchNextObject(false)) {
for ($k=0; $k < $nbcolonnes; $k++) { for ($k=0; $k < $nbcolonnes; $k++) {
// on remplace les choix de l'utilisateur par une ligne de checkbox pour recuperer de nouvelles valeurs // on remplace les choix de l'utilisateur par une ligne de checkbox pour recuperer de nouvelles valeurs
if ($compteur == $ligneamodifier) { if ($compteur == $ligneamodifier) {
echo '<td class="vide"><input type="checkbox" name="choix'.$k.'" value="1" '; echo '<td class="vide"><input type="checkbox" title="Sélectionnez le choix '.$k.'" name="choix'.$k.'" value="1" ';
if(substr($ensemblereponses,$k,1) == '1') { if(substr($ensemblereponses,$k,1) == '1') {
echo 'checked="checked"'; echo 'checked="checked"';
} }
@ -475,14 +475,14 @@ while ($data = $user_studs->FetchNextObject(false)) {
//a la fin de chaque ligne se trouve les boutons modifier //a la fin de chaque ligne se trouve les boutons modifier
if ($compteur != $ligneamodifier && ($dsondage->format=="A+"||$dsondage->format=="D+") && $mod_ok) { if ($compteur != $ligneamodifier && ($dsondage->format=="A+"||$dsondage->format=="D+") && $mod_ok) {
echo '<td class=casevide><input type="image" name="modifierligne'.$compteur.'" value="Modifier" src="images/info.png"></td>'."\n"; echo '<td class=casevide><input type="image" alt="Modifier" name="modifierligne'.$compteur.'" src="'.get_server_name().'images/info.png"></td>'."\n";
} }
//demande de confirmation pour modification de ligne //demande de confirmation pour modification de ligne
for ($i=0;$i<$nblignes;$i++) { for ($i=0;$i<$nblignes;$i++) {
if (isset($_POST["modifierligne$i"]) || isset($_POST['modifierligne'.$i.'_x'])) { if (isset($_POST["modifierligne$i"]) || isset($_POST['modifierligne'.$i.'_x'])) {
if ($compteur == $i) { if ($compteur == $i) {
echo '<td class="casevide"><input type="image" name="validermodifier'.$compteur.'" value="Valider la modification" src="images/accept.png" ></td>'."\n"; echo '<td class="casevide"><input type="image" alt="Valider la modification" name="validermodifier'.$compteur.'" src="'.get_server_name().'images/accept.png" ></td>'."\n";
} }
} }
} }
@ -500,13 +500,13 @@ if (! ( USE_REMOTE_USER && isset($_SERVER['REMOTE_USER']) ) || !$user_mod) {
} else { } else {
$nom = 'Votre nom'; $nom = 'Votre nom';
} }
echo '<input type="text" name="nom" maxlength="64" value="'.$nom.'" onfocus="if (this.value == \'Votre nom\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \'Votre nom\';}" >'."\n"; echo '<input title="Votre nom" type="text" id="'.$nom.'" name="nom" maxlength="64" value="'.$nom.'" onfocus="if (this.value == \'Votre nom\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \'Votre nom\';}" >'."\n";
echo '</td>'."\n"; echo '</td>'."\n";
// affichage des cases de formulaire checkbox pour un nouveau choix // affichage des cases de formulaire checkbox pour un nouveau choix
for ($i=0;$i<$nbcolonnes;$i++) { for ($i=0;$i<$nbcolonnes;$i++) {
echo '<td class="vide"><input type="checkbox" name="choix'.$i.'" value="1"'; echo '<td class="vide"><input type="checkbox" title="sélectionnez le choix'.$i.'" name="choix'.$i.'" value="1"';
if ( isset($_POST['choix'.$i]) && $_POST['choix'.$i] == '1' && is_error(NAME_EMPTY) ) { if ( isset($_POST['choix'.$i]) && $_POST['choix'.$i] == '1' && is_error(NAME_EMPTY) ) {
echo ' checked="checked"'; echo ' checked="checked"';
} }
@ -515,7 +515,7 @@ if (! ( USE_REMOTE_USER && isset($_SERVER['REMOTE_USER']) ) || !$user_mod) {
} }
// Affichage du bouton de formulaire pour inscrire un nouvel utilisateur dans la base // Affichage du bouton de formulaire pour inscrire un nouvel utilisateur dans la base
echo '<td><input type="image" name="boutonp" value="' . _('Participate') . '" src="images/add-24.png"></td>'."\n"; echo '<td><input type="image" alt="Valider mes choix" name="boutonp" src="'.get_server_name().'images/add-24.png"></td>'."\n";
echo '</tr>'."\n"; echo '</tr>'."\n";
} }
@ -537,10 +537,10 @@ echo '</tbody>'."\n".'<tfoot>'."\n";
// Affichage des différentes sommes des colonnes existantes // Affichage des différentes sommes des colonnes existantes
echo '<tr>'."\n"; echo '<tr>'."\n";
echo '<td align="right">'; echo '<th scope="row" class="txt-right">';
// si on a plus de 8 colonnes, on affiche un second bouton "valider mes choix" // si on a plus de 8 colonnes, on affiche un second bouton "valider mes choix"
echo ($nbcolonnes>8) ?'<input type="submit" name="boutonp" value="Valider mes choix" class="btn btn-success btn-mini" style="margin-right:50px">' : ""; echo ($nbcolonnes>8) ?'<input type="submit" name="boutonp" value="Valider mes choix" class="btn btn-success btn-mini" style="margin-right:50px">' : "";
echo _("Addition") .'</td>'."\n"; echo _("Addition") .'</th>'."\n";
for ($i=0; $i < $nbcolonnes; $i++) { for ($i=0; $i < $nbcolonnes; $i++) {
if (isset($somme[$i]) === true) { if (isset($somme[$i]) === true) {
@ -555,19 +555,19 @@ for ($i=0; $i < $nbcolonnes; $i++) {
echo '<td class="somme">'.$affichesomme.'</td>'."\n"; echo '<td class="somme">'.$affichesomme.'</td>'."\n";
} }
echo '<td class="somme"></td>'."\n";
echo '</tr>'."\n"; echo '</tr>'."\n";
echo '<tr>'."\n"; echo '<tr>'."\n";
echo '<td class="somme"></td>'."\n"; echo '<td class="somme"></td>'."\n";
for ($i=0; $i < $nbcolonnes; $i++) { for ($i=0; $i < $nbcolonnes; $i++) {
if (isset($somme[$i]) && isset($meilleurecolonne) && $somme[$i] == $meilleurecolonne) { if (isset($somme[$i]) && isset($meilleurecolonne) && $somme[$i] == $meilleurecolonne) {
echo '<td class="somme"><img src="images/medaille.png" alt="' . _('Best choice') . '"></td>'."\n"; echo '<td class="somme"><img src="'.get_server_name().'images/medaille.png" alt="' . _('Best choice') . '"></td>'."\n";
} else { } else {
echo '<td class="somme"></td>'."\n"; echo '<td class="somme"></td>'."\n";
} }
} }
echo '<td class="somme"></td>'."\n";
echo '</tr>'."\n"; echo '</tr>'."\n";
echo '</tfoot>'."\n"; echo '</tfoot>'."\n";
echo '</table>'."\n"; echo '</table>'."\n";
@ -620,9 +620,9 @@ echo '<p class="affichageresultats">'."\n";
// Affichage du meilleur choix // Affichage du meilleur choix
if ($compteursujet == "1" && isset($meilleurecolonne)) { if ($compteursujet == "1" && isset($meilleurecolonne)) {
print '<img src="images/medaille.png" alt="Meilleur choix"> ' . _('The best choice at this time is:') . "<b>".stripslashes($meilleursujet)."</b> " . _('with') . " <b>$meilleurecolonne </b>" . $vote_str . ".\n"; print '<img src="'.get_server_name().'images/medaille.png" alt="Meilleur choix"> ' . _('The best choice at this time is:') . "<b>".stripslashes($meilleursujet)."</b> " . _('with') . " <b>$meilleurecolonne </b>" . $vote_str . ".\n";
} elseif (isset($meilleurecolonne)) { } elseif (isset($meilleurecolonne)) {
print '<img src="images/medaille.png" alt="Meilleur choix"> ' . _('The bests choices at this time are:') . " <b>".stripslashes($meilleursujet)."</b> " . _('with') . " <b>$meilleurecolonne </b>" . $vote_str . ".\n"; print '<img src="'.get_server_name().'images/medaille.png" alt="Meilleur choix"> ' . _('The bests choices at this time are:') . " <b>".stripslashes($meilleursujet)."</b> " . _('with') . " <b>$meilleurecolonne </b>" . $vote_str . ".\n";
} }
echo '</p>'; echo '</p>';
@ -640,33 +640,33 @@ if ($comment_user->RecordCount() != 0) {
} }
//affichage de la case permettant de rajouter un commentaire par les utilisateurs //affichage de la case permettant de rajouter un commentaire par les utilisateurs
print '<div class="addcomment">' .'<p>' ._("Add a comment in the poll:") . '</p>' . "\n"; print '<div class="addcomment">' .'<fieldset><legend>' ._("Add a comment in the poll:") . '</legend>' . "\n";
if (isset($_SESSION['nom']) === false) { if (isset($_SESSION['nom']) === false) {
$nom = ''; $nom = '';
} else { } else {
$nom = stripslashes($_SESSION['nom']); $nom = stripslashes($_SESSION['nom']);
} }
echo _("Name") .' : '; echo '<p><label for="commentator">'. _("Name") .'</label> : ';
echo '<input type="text" name="commentuser" maxlength="64" value="'.$nom.'" /><br>'."\n"; echo '<input type="text" name="commentuser" maxlength="64" id="commentator" value="'.$nom.'" /></p>'."\n";
echo '<p><label for="comment">Votre commentaire</label> : <br />';
echo '<textarea name="comment" rows="2" cols="40"></textarea>'."\n"; echo '<textarea id="comment" title="Écrivez votre commentaire" name="comment" rows="2" cols="40"></textarea></p>'."\n";
echo '<input type="submit" name="ajoutcomment" value="Ajouter un commentaire" class="btn btn-success" alt="Valider"><br>'."\n"; echo '<p><input type="submit" name="ajoutcomment" value="Ajouter un commentaire" class="bouton green"></p>'."\n";
echo '</form>'."\n"; echo '</fieldset></div></form>'."\n";
// Focus javascript sur la case de texte du formulaire // Focus javascript sur la case de texte du formulaire
echo '<script type="text/javascript">'."\n" . 'document.formulaire.commentuser.focus();'."\n" . '</script>'."\n"; echo '<script type="text/javascript">'."\n" . 'document.formulaire.commentuser.focus();'."\n" . '</script>'."\n";
echo '</div>'."\n"; echo '</div>'."\n";
echo '<ul class="exports">'; echo '<ul class="exports">';
echo '<li><img alt="' . _('Export to CSV') . '" src="images/csv.png"/>'.'<a class="affichageexport" href="exportcsv.php?numsondage=' . $numsondage . '">'._("Export: Spreadsheet") .' (.CSV)' . '</a></li>'; echo '<li><img alt="' . _('Export to CSV') . '" src="'.get_server_name().'images/csv.png"/>'.'<a class="affichageexport" href="'.get_server_name().'exportcsv.php?numsondage=' . $numsondage . '">'._("Export: Spreadsheet") .' (.CSV)' . '</a></li>';
if ( ($dsondage->format == 'D' || $dsondage->format == 'D+') && $compteursujet=="1" && $meilleurecolonne && file_exists('iCalcreator/iCalcreator.class.php') && false /* TODO: later */) { if ( ($dsondage->format == 'D' || $dsondage->format == 'D+') && $compteursujet=="1" && $meilleurecolonne && file_exists('iCalcreator/iCalcreator.class.php') && false /* TODO: later */) {
echo '<li><img alt="' . _('Export iCal') . '" src="images/ical.png">' .'<a class="affichageexport" href="exportics.php?numsondage=' . $numsondage . '">'._("Agenda") .' (.ICS)' . '</a></li>'; echo '<li><img alt="' . _('Export iCal') . '" src="'.get_server_name().'images/ical.png">' .'<a class="affichageexport" href="'.get_server_name().'exportics.php?numsondage=' . $numsondage . '">'._("Agenda") .' (.ICS)' . '</a></li>';
} }
echo '</ul>'; echo '</ul>';
echo '<a name="bas"></a>'."\n"; echo '<a id="bas"></a>'."\n";
echo '</div>'; // ajout pyg cohérence graphique //echo '</div>'; // ajout pyg cohérence graphique
bandeau_pied_mobile(); bandeau_pied_mobile();
// Affichage du bandeau de pied // Affichage du bandeau de pied

View File

@ -62,7 +62,17 @@ img {
box-sizing:content-box; box-sizing:content-box;
} }
/* a11y rules*/
a:focus {
outline:#000 dotted 1px;
}
/*bandeau de titre*/ /*bandeau de titre*/
h1 {
margin:0;
}
.framorange { .framorange {
color: #FF8400; color: #FF8400;
display: inline; display: inline;
@ -88,7 +98,7 @@ div.bandeau{
background-color: #EAEAFF; background-color: #EAEAFF;
color:white; color:white;
vertical-align:middle; vertical-align:middle;
font-size:42px; font-size:1em;
font-family:arial; font-family:arial;
padding:8px; padding:8px;
height:40px; height:40px;
@ -115,7 +125,8 @@ div.logo{
padding-top: 30px; padding-top: 30px;
} }
/*Sous bandeau avec bouton de navigation*/ /*Sous bandeau avec bouton de navigation*/
div.bandeautitre{ .bandeautitre{
margin:0;
height:17px; height:17px;
background-color: #EAEAFF; background-color: #EAEAFF;
font-size:14px; font-size:14px;
@ -125,7 +136,7 @@ div.bandeautitre{
font-style: italic; font-style: italic;
vertical-align:middle; vertical-align:middle;
font-family:arial; font-family:arial;
padding:13px; padding:.9em;
position:static; position:static;
top:57px; top:57px;
left:6px; left:6px;
@ -134,7 +145,7 @@ div.bandeautitre{
border-bottom: 1px solid #CCC; border-bottom: 1px solid #CCC;
} }
div.sousbandeau{ div.sousbandeau{
height:17px; min-height:17px;
background-color: #C4C4FF; background-color: #C4C4FF;
font-size:11px; font-size:11px;
color:black; color:black;
@ -148,9 +159,21 @@ div.sousbandeau{
left:6px; left:6px;
right:6px; */ right:6px; */
/* display: none; */ /* display: none; */
margin-top: 1.5em; margin-top: 3em;
border-top: 1px solid #999; border-top: 1px solid #999;
} }
.sousbandeau ul {
margin:0;
padding:0;
display:block;
float:left;
}
.sousbandeau ul li {
list-style:none;
display:inline;
}
/*bandeau de pied*/ /*bandeau de pied*/
div.surbandeaupied{ div.surbandeaupied{
background-color: #EAEAFF; background-color: #EAEAFF;
@ -210,7 +233,8 @@ div.bandeaupiedmobile{
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
} }
*/ */
span.sousbandeaulangue { ul.sousbandeaulangue {
display:block;
margin-left:6px; margin-left:6px;
margin-right:90px; margin-right:90px;
float:right; float:right;
@ -360,6 +384,7 @@ div.cadre table.resultats {
margin:0 auto; margin:0 auto;
} }
div.cadre th,
div.cadre td { div.cadre td {
height:30px; height:30px;
} }
@ -375,11 +400,13 @@ div.cadre td.non {
width:35px; width:35px;
} }
/*Case de tableau VIDE dans affichage de sondage*/ /*Case de tableau VIDE dans affichage de sondage*/
div.cadre th.vide, div.cadre th.sujet,
div.cadre td.vide, div.cadre td.sujet { div.cadre td.vide, div.cadre td.sujet {
background-color: #DDDDDD; background-color: #DDDDDD;
text-align:center; text-align:center;
padding:1px 5px;
} }
div.cadre th.vide, div.cadre th.ok, div.cadre th.non, div.cadre th.sujet, div.cadre th.nom, div.cadre th.jour, div.cadre th.heure, div.cadre th.mois,
div.cadre td.vide, div.cadre td.ok, div.cadre td.non, div.cadre td.sujet, div.cadre td.nom, div.cadre td.jour, div.cadre td.heure, div.cadre td.mois { div.cadre td.vide, div.cadre td.ok, div.cadre td.non, div.cadre td.sujet, div.cadre td.nom, div.cadre td.jour, div.cadre td.heure, div.cadre td.mois {
border-right: 1px solid #BBB !important; border-right: 1px solid #BBB !important;
border-bottom: 1px solid #BBB !important; border-bottom: 1px solid #BBB !important;
@ -654,3 +681,15 @@ li.error {
.imprimer { .imprimer {
float:right; float:right;
} }
.error {
color:red;
}
.margin-top {
margin-top:1em;
}
.txt-right {
text-align:right;
}

View File

@ -95,8 +95,8 @@ if (@file_exists('variables.local.php')) {
const STUDS_VERSION = 0.7; const STUDS_VERSION = 0.7;
// Do not edit the following // Do not edit the following
$ALLOWED_LANGUAGES = array('fr_FR' => 'french', $ALLOWED_LANGUAGES = array('fr_FR' => '<li>Français</li>',
'en_GB' => 'english', 'en_GB' => '<li lang="en">English</li>',
'es_ES' => 'spanish', 'es_ES' => '<li lang="es">Español</li>',
'de_DE' => 'german' ); 'de_DE' => '<li lang="de">Deutsch</li>' );