From 2f47e5488e424476a778b96cd2d017bd09d7c96b Mon Sep 17 00:00:00 2001 From: "Pierre Habouzit (MadCoder" Date: Mon, 17 Jan 2005 09:42:09 +0000 Subject: [PATCH] wibbles git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-372 --- include/marketing.inc.php | 2 +- include/register.inc.php | 12 +++++-- templates/mails/marketing.utilisateur.tpl | 55 ------------------------------- templates/marketing/private.tpl | 7 ++-- 4 files changed, 15 insertions(+), 61 deletions(-) delete mode 100644 templates/mails/marketing.utilisateur.tpl diff --git a/include/marketing.inc.php b/include/marketing.inc.php index 5f751c2..3443cca 100644 --- a/include/marketing.inc.php +++ b/include/marketing.inc.php @@ -62,7 +62,7 @@ function mark_send_mail($uid, $email, $envoyeur, $email_envoyeur) $mailer->setFrom($envoyeur." <".$email_envoyeur.">"); $mailer->addTo("\"{$u['prenom']} {$u['nom']}\" <{$email}>"); $mailer->setSubject($titre); - $mailer->setTxtBody($text); + $mailer->setTxtBody(wordwrap($text, 80)); $mailer->send(); } diff --git a/include/register.inc.php b/include/register.inc.php index 840cd9c..6edc58c 100644 --- a/include/register.inc.php +++ b/include/register.inc.php @@ -54,9 +54,15 @@ function get_X_mat($ourmat) $year = intval(substr($ourmat, 0, 4)); $rang = intval(substr($ourmat, 5, 3)); - $year = intval(substr(1900 - $year, 1, 3)); - - return sprintf('%03u%03u', $year, $rang); + if ($year < 1996) { + return; + } elseif ($year < 2000) { + $year = intval(substr(1900 - $year, 1, 3)); + return sprintf('%02u0%03u', $year, $rang); + } else { + $year = intval(substr(1900 - $year, 1, 3)); + return sprintf('%03u%03u', $year, $rang); + } } // }}} diff --git a/templates/mails/marketing.utilisateur.tpl b/templates/mails/marketing.utilisateur.tpl deleted file mode 100644 index 15b9015..0000000 --- a/templates/mails/marketing.utilisateur.tpl +++ /dev/null @@ -1,55 +0,0 @@ -{*************************************************************************** - * Copyright (C) 2003-2004 Polytechnique.org * - * http://opensource.polytechnique.org/ * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - ***************************************************************************} - -{subject text="Annuaire en ligne des Polytechniciens"} -{from full=$from} -{to addr=$to} -{if $femme} -Chère camarade, -{else} -Cher camarade, -{/if} - -Ta fiche n'est pas à jour dans l'annuaire des Polytechniciens sur Internet. Pour la mettre à jour, il te suffit de visiter cette page ou de copier cette adresse dans la barre de ton navigateur : - -========================================================== -{$baseurl}/register/?hash={$user_id} -========================================================== - -Il ne te faut que 5 minutes sur http://www.polytechnique.org/ pour rejoindre les {$num_users} camarades branchés grâce au système de reroutage de l'X et qui permet de joindre un camarade en connaissant seulement son nom et son prénom... et de bénéficier pour la vie d'une adresse prestigieuse {$mailorg}@polytechnique.org et son alias discret {$mailorg}@m4x.org (m4x = mail for X). -Pas de nouvelle boîte aux lettres à relever, il suffit de la rerouter vers ton adresse personnelle et/ou professionnelle que tu indiques et que tu peux changer tous les jours si tu veux sans imposer à tes correspondants de modifier leur carnet d'adresses... - -De plus, le site web offre les services d'annuaire (recherche multi-critères), de forums, de mailing-lists. Ce portail est géré par une dizaine de jeunes camarades, avec le soutien et les conseils de nombreux X de toutes promotions, incluant notamment des camarades de la Kès des élèves de l'X et d'autres de l'AX. Les serveurs sont hébergés au sein même de l'Ecole polytechnique, sur une connexion rapide, et les services évoluent en fonction des besoins exprimés par la communauté sur Internet. - -N'hésite pas à transmettre ce message à tes camarades ou à nous écrire, nous proposer toute amélioration ou suggestion pour les versions prochaines du site. - - -A bientôt sur http://www.polytechnique.org ! - -Bien à toi, - -{$envoyeur} --- -Polytechnique.org -"Le portail des élèves & anciens élèves de l'X" -http://www.polytechnique.org/ -http://www.polytechnique.net/ - -{* vim:set et sw=2 sts=2 sws=2: *} diff --git a/templates/marketing/private.tpl b/templates/marketing/private.tpl index a4b3b77..ee8c328 100644 --- a/templates/marketing/private.tpl +++ b/templates/marketing/private.tpl @@ -22,9 +22,12 @@

Marketing de {$prenom} {$nom}

Matricules

-Matricule École (à rentrer lors de l'inscription) : {$matricule_X} -
+ Matricule polytechnique.org : {$matricule} +{if $matricule_X} +
+Matricule École (à rentrer lors de l'inscription) : {$matricule_X} +{/if} {if $pending} -- 2.1.4