From 7ec1a2fc8e984c755d9e0f1bce477d999840f4d4 Mon Sep 17 00:00:00 2001 From: Simon Leblanc Date: Mon, 4 Jul 2011 11:36:31 -0700 Subject: [PATCH 1/4] fix issue #19 : convert html entities in the mail send --- studs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/studs.php b/studs.php index ed7649e..1bf36d7 100644 --- a/studs.php +++ b/studs.php @@ -308,7 +308,7 @@ if ($testmodifier) { if ($dsondage->mailsonde=="yes") { $headers="From: ".NOMAPPLICATION." <".ADRESSEMAILADMIN.">\r\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 8bit"; - mail ("$dsondage->mail_admin", "[".NOMAPPLICATION."] " . _("Poll's participation") . " : $dsondage->titre", "\"$data->nom\""."" . _("has filled a line.\nYou can find your poll at the link") . " :\n\n".getUrlSondage($numsondage)." \n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION,$headers); + mail ("$dsondage->mail_admin", "[".NOMAPPLICATION."] " . _("Poll's participation") . " : ".htmlspecialchars_decode($dsondage->titre, ENT_QUOTES), "\"".htmlspecialchars_decode($data->nom, ENT_QUOTES)."\""."" . _("has filled a line.\nYou can find your poll at the link") . " :\n\n".getUrlSondage($numsondage)." \n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION,$headers); } } From be16c63fd7a63474330cdc07eaaa81b057a46e34 Mon Sep 17 00:00:00 2001 From: Simon Leblanc Date: Mon, 4 Jul 2011 21:33:58 +0200 Subject: [PATCH 2/4] First try for issue #13 : OK with Firefox and IE>=8 but not with Webkit --- print.css | 17 +++++++++++++++++ studs.php | 7 ++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/print.css b/print.css index ce6664d..0e702e0 100644 --- a/print.css +++ b/print.css @@ -42,6 +42,23 @@ div.cadre tr.ajout_reponse { display:none; } +table { + page-break-inside:auto +} + +tr { + page-break-inside:avoid; + page-break-after:auto; +} + +thead { + display:table-header-group; +} + +tfoot { + display:table-footer-group; +} + div.addcomment { display:none; } diff --git a/studs.php b/studs.php index 1bf36d7..e80a2ec 100644 --- a/studs.php +++ b/studs.php @@ -266,7 +266,7 @@ echo _("If you want to vote in this poll, you have to give your name, choose the echo ''."\n"; // Debut de l'affichage des resultats du sondage -echo ''."\n"; +echo '
'."\n".''; //On récupere les données et les sujets du sondage $nblignes = $user_studs->RecordCount(); @@ -426,6 +426,8 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") { echo ''."\n"; } +echo ''."\n".''."\n"; + //Usager pré-authentifié dans la liste? $user_mod = false; @@ -532,6 +534,8 @@ for ($i=0; $i < $nbcolonnes; $i++) { } } +echo ''."\n".''."\n"; + // Affichage des différentes sommes des colonnes existantes echo ''."\n"; echo ''."\n"; @@ -563,6 +567,7 @@ for ($i=0; $i < $nbcolonnes; $i++) { } echo ''."\n"; +echo ''."\n"; echo '
'. _("Addition") .'
'."\n"; echo ''."\n"; From b033b8121d857ecff728c1a5cc0f8b1c9b18af60 Mon Sep 17 00:00:00 2001 From: framatools Date: Mon, 4 Jul 2011 22:08:39 +0200 Subject: [PATCH 3/4] Fix really issue #19 :-) --- studs.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/studs.php b/studs.php index e80a2ec..ceaeb15 100644 --- a/studs.php +++ b/studs.php @@ -173,8 +173,8 @@ if (!is_error(NO_POLL) && (isset($_POST["boutonp"]) || isset($_POST["boutonp_x"] if ($dsondage->mailsonde || /* compatibility for non boolean DB */ $dsondage->mailsonde=="yes" || $dsondage->mailsonde=="true") { $headers="From: ".NOMAPPLICATION." <".ADRESSEMAILADMIN.">\r\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 8bit"; mail ("$dsondage->mail_admin", - "[".NOMAPPLICATION."] "._("Poll's participation")." : ".htmlspecialchars_decode($dsondage->titre, ENT_QUOTES)."", - htmlspecialchars_decode("\"$nom\" ", ENT_QUOTES). + "[".NOMAPPLICATION."] "._("Poll's participation")." : ".utf8_decode(html_entity_decode($dsondage->titre, ENT_QUOTES, 'UTF-8'))."", + utf8_decode(html_entity_decode("\"$nom\" ", ENT_QUOTES, 'UTF-8')). _("has filled a line.\nYou can find your poll at the link") . " :\n\n". getUrlSondage($numsondage)." \n\n" . _("Thanks for your confidence.") . "\n". NOMAPPLICATION, @@ -308,7 +308,7 @@ if ($testmodifier) { if ($dsondage->mailsonde=="yes") { $headers="From: ".NOMAPPLICATION." <".ADRESSEMAILADMIN.">\r\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 8bit"; - mail ("$dsondage->mail_admin", "[".NOMAPPLICATION."] " . _("Poll's participation") . " : ".htmlspecialchars_decode($dsondage->titre, ENT_QUOTES), "\"".htmlspecialchars_decode($data->nom, ENT_QUOTES)."\""."" . _("has filled a line.\nYou can find your poll at the link") . " :\n\n".getUrlSondage($numsondage)." \n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION,$headers); + mail ("$dsondage->mail_admin", "[".NOMAPPLICATION."] " . _("Poll's participation") . " : ".utf8_decode(html_entity_decode($dsondage->titre, ENT_QUOTES, 'UTF-8')), "\"".utf8_decode(html_entity_decode($data->nom, ENT_QUOTES, 'UTF-8'))."\""."" . _("has filled a line.\nYou can find your poll at the link") . " :\n\n".getUrlSondage($numsondage)." \n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION,$headers); } } @@ -669,4 +669,4 @@ echo ''; // ajout pyg cohérence graphique bandeau_pied_mobile(); // Affichage du bandeau de pied echo ''."\n"; -echo ''."\n"; \ No newline at end of file +echo ''."\n"; From 52f954ed5ec268417f65145e956b2efbacdfa5c3 Mon Sep 17 00:00:00 2001 From: framatools Date: Mon, 4 Jul 2011 22:24:38 +0200 Subject: [PATCH 4/4] UTF 8 error while fix issue #19 : damn issue... --- studs.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/studs.php b/studs.php index ceaeb15..f113838 100644 --- a/studs.php +++ b/studs.php @@ -173,8 +173,8 @@ if (!is_error(NO_POLL) && (isset($_POST["boutonp"]) || isset($_POST["boutonp_x"] if ($dsondage->mailsonde || /* compatibility for non boolean DB */ $dsondage->mailsonde=="yes" || $dsondage->mailsonde=="true") { $headers="From: ".NOMAPPLICATION." <".ADRESSEMAILADMIN.">\r\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 8bit"; mail ("$dsondage->mail_admin", - "[".NOMAPPLICATION."] "._("Poll's participation")." : ".utf8_decode(html_entity_decode($dsondage->titre, ENT_QUOTES, 'UTF-8'))."", - utf8_decode(html_entity_decode("\"$nom\" ", ENT_QUOTES, 'UTF-8')). + "[".NOMAPPLICATION."] "._("Poll's participation")." : ".html_entity_decode($dsondage->titre, ENT_QUOTES, 'UTF-8')."", + html_entity_decode("\"$nom\" ", ENT_QUOTES, 'UTF-8'). _("has filled a line.\nYou can find your poll at the link") . " :\n\n". getUrlSondage($numsondage)." \n\n" . _("Thanks for your confidence.") . "\n". NOMAPPLICATION, @@ -308,7 +308,7 @@ if ($testmodifier) { if ($dsondage->mailsonde=="yes") { $headers="From: ".NOMAPPLICATION." <".ADRESSEMAILADMIN.">\r\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 8bit"; - mail ("$dsondage->mail_admin", "[".NOMAPPLICATION."] " . _("Poll's participation") . " : ".utf8_decode(html_entity_decode($dsondage->titre, ENT_QUOTES, 'UTF-8')), "\"".utf8_decode(html_entity_decode($data->nom, ENT_QUOTES, 'UTF-8'))."\""."" . _("has filled a line.\nYou can find your poll at the link") . " :\n\n".getUrlSondage($numsondage)." \n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION,$headers); + mail ("$dsondage->mail_admin", "[".NOMAPPLICATION."] " . _("Poll's participation") . " : ".html_entity_decode($dsondage->titre, ENT_QUOTES, 'UTF-8'), "\"".html_entity_decode($data->nom, ENT_QUOTES, 'UTF-8')."\""."" . _("has filled a line.\nYou can find your poll at the link") . " :\n\n".getUrlSondage($numsondage)." \n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION,$headers); } }