oooooookay.
authorx2000habouzit <x2000habouzit>
Sun, 5 Sep 2004 12:54:18 +0000 (12:54 +0000)
committerx2000habouzit <x2000habouzit>
Sun, 5 Sep 2004 12:54:18 +0000 (12:54 +0000)
now every page that uses aliases discard homonymes entries, and prints expire date if appliable

16 files changed:
htdocs/admin/utilisateurs.php
htdocs/emails.php
htdocs/fiche.php
htdocs/fiche_referent.php
htdocs/marketing/utilisateurs_identification.php [deleted file]
htdocs/mescontacts.php
htdocs/mescontacts_ldif.php
htdocs/paiement/cyberpaiement_retour.php
htdocs/pattecassee.php
htdocs/recovery.php
htdocs/redirect/redirect.php
htdocs/routage-mail.php
htdocs/vcard.php
templates/admin/utilisateurs.tpl
templates/emails.tpl
templates/routage-mail.tpl

index 60510a4..0fa354a 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: utilisateurs.php,v 1.21 2004-09-04 20:14:30 x2000habouzit Exp $
+        $Id: utilisateurs.php,v 1.22 2004-09-05 12:54:18 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -55,7 +55,7 @@ if (!empty($_REQUEST['login'])) {
     $login = $_REQUEST['login'];
     $r=$globals->db->query("SELECT  *
                              FROM  auth_user_md5 AS u
-                       INNER JOIN  aliases       AS a ON ( a.id = u.user_id AND a.alias='$login' )");
+                       INNER JOIN  aliases       AS a ON ( a.id = u.user_id AND a.alias='$login' AND type!='homonyme' )");
     if($tmp = mysql_fetch_assoc($r)) $mr=$tmp;
     mysql_free_result($r);
 }
@@ -95,7 +95,8 @@ if(isset($mr)) {
 
            case "del_alias":
                if(empty($val)) break;
-               $globals->db->query("DELETE FROM aliases WHERE id='{$_REQUEST['user_id']}' AND alias='$val' AND type!='a_vie'");
+               $globals->db->query("DELETE FROM aliases WHERE id='{$_REQUEST['user_id']}' AND alias='$val'
+                                                               AND type!='a_vie' AND type!='homonyme'");
                $errors[] = $val." a été supprimé";
                break;
 
@@ -143,7 +144,7 @@ if(isset($mr)) {
                $globals->db->query("delete from photo where uid=$user_id");
                $globals->db->query("delete from perte_pass where uid=$user_id");
                $globals->db->query("delete from user_changes where user_id=$user_id");
-               $globals->db->query("delete from aliases where id=$user_id and type in ('login','epouse','alias')");
+               $globals->db->query("delete from aliases where id=$user_id and type in ('a_vie','epouse','alias')");
                $globals->db->query("delete from listes_ins where idu=$user_id");
                $globals->db->query("delete from listes_mod where idu=$user_id");
                $globals->db->query("delete from applis_ins where uid=$user_id");
@@ -182,9 +183,9 @@ if(isset($mr)) {
     $page->assign('lastlogin', $lastlogin);
     $page->assign('host', $host);
 
-    $page->mysql_assign("SELECT  alias, type='a_vie' AS for_life
+    $page->mysql_assign("SELECT  alias, type='a_vie' AS for_life,expire
                           FROM  aliases
-                         WHERE  id = {$mr["user_id"]}
+                         WHERE  id = {$mr["user_id"]} AND type!='homonyme'
                       ORDER BY  type!= 'a_vie'", 'aliases');
     $page->assign_by_ref('xorgmails', $xorgmails);
     $page->assign_by_ref('email_panne', $email_panne);    
index c479a6b..fc79655 100644 (file)
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: emails.php,v 1.6 2004-09-04 14:40:02 x2000habouzit Exp $
+        $Id: emails.php,v 1.7 2004-09-05 12:54:18 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
 new_skinned_page('emails.tpl',AUTH_COOKIE);
 
 // on regarde si on a affaire à un homonyme
-$sql = "SELECT  alias, (type='a_vie') AS a_vie
+$sql = "SELECT  alias, (type='a_vie') AS a_vie, expire
           FROM  aliases
-         WHERE  id='{$_SESSION['uid']}'
+         WHERE  id='{$_SESSION['uid']}' AND type!='homonyme'
       ORDER BY  type!='a_vie'";
 $page->mysql_assign($sql, 'aliases');
 
index d9b7732..e97c4ce 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: fiche.php,v 1.7 2004-09-02 23:25:30 x2000habouzit Exp $
+        $Id: fiche.php,v 1.8 2004-09-05 12:54:18 x2000habouzit Exp $
  ***************************************************************************/
 
 
@@ -39,7 +39,7 @@ if (isset($_REQUEST["modif"]) && $_REQUEST["modif"]=="new") {
 }
 
 if (isset($_REQUEST['user']))
-    $where_clause = "INNER JOIN aliases AS a1 ON (a1.id=u.user_id AND a1.alias = '{$_REQUEST['user']}')";
+    $where_clause = "INNER JOIN aliases AS a1 ON (a1.id=u.user_id AND a1.alias = '{$_REQUEST['user']}' AND type!='homonyne')";
 else
     $where_clause = " WHERE u.matricule = '{$_REQUEST['mat']}'";
 
index f74d070..53cb388 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: fiche_referent.php,v 1.7 2004-09-03 00:28:18 x2000habouzit Exp $
+        $Id: fiche_referent.php,v 1.8 2004-09-05 12:54:18 x2000habouzit Exp $
  ***************************************************************************/
 
 
@@ -34,7 +34,7 @@ if (!isset($_REQUEST['user']))
 $reqsql = "SELECT  prenom, nom, user_id, promo, cv, a.alias AS forlife
              FROM  auth_user_md5 AS u
        INNER JOIN  aliases       AS a ON (u.user_id=a.id AND a.type='a_vie')
-       INNER JOIN  aliases       AS a1 ON (u.user_id=a1.id AND a1.alias = '{$_REQUEST['user']}')";
+       INNER JOIN  aliases       AS a1 ON (u.user_id=a1.id AND a1.alias = '{$_REQUEST['user']}' AND a1.type!='homonyme')";
 $result = $globals->db->query($reqsql);
 if (mysql_num_rows($result)!=1)
         exit;
diff --git a/htdocs/marketing/utilisateurs_identification.php b/htdocs/marketing/utilisateurs_identification.php
deleted file mode 100644 (file)
index d7115db..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-/***************************************************************************
- *  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                *
- ***************************************************************************
-        $Id: utilisateurs_identification.php,v 1.5 2004-09-03 00:15:49 x2000bedo Exp $
- ***************************************************************************/
-
-require("auto.prepend.inc.php");
-$id_actions = array('Editer','Inscrire');
-require("select_user.inc.php");
-require("inscription_listes_base.inc.php");
-
-//actions possible une fois un X désigné par son matricule
-switch ($_REQUEST["submit"]) {
-case "Editer":
-       $result=$globals->db->query("SELECT user_id FROM auth_user_md5 where matricule=".$_REQUEST["xmat"]);
-       if ($myrow = mysql_fetch_array($result))
-                       exit_error(">Le matricule existe d&eacute;j&agrave; dans la table auth_user_md5, refus d'&eacute;dition.");
-       $result = $globals->db->query("select * from identification where matricule=".$_REQUEST["xmat"]);
-       $myrow = mysql_fetch_array($result);
-    new_admin_page('marketing/utilisateurs_edit.tpl');
-    $page->assign('row', $myrow);
-    $page->run();
-       break;
-                 
-case "Modifier la base":
-       // gestion des flags
-    $flags = (empty($_REQUEST['flag_femmeN']))?"":"femme";
-       // on fait la requete
-       $sql="update identification set prenom='".$_REQUEST["prenomN"]."',nom='".$_REQUEST["nomN"]."',promo=".$_REQUEST["promoN"].",deces='".$_REQUEST["decesN"]."',flags='".$flags."' where matricule=".$_REQUEST["xmat"];
-       $globals->db->query($sql);
-    new_admin_page('marketing/utilisateurs_edit.tpl');
-    $page->assign('success',1);
-    $page->run();
-       break;
-                 
-case "Inscrire":
-       $result=$globals->db->query("SELECT user_id FROM auth_user_md5 where matricule=".$_REQUEST["xmat"]);
-       if ($myrow = mysql_fetch_array($result))
-               exit_error("Le matricule existe d&eacute;j&agrave; dans la table auth_user_md5.");
-                       
-       $result = $globals->db->query("select * from identification where matricule=".$_REQUEST["xmat"]);
-       $myrow = mysql_fetch_array($result);
-    new_admin_page('marketing/utilisateurs_inscrire.tpl');
-    $page->assign('row', $myrow);
-       //calcul du login de l'inscrit
-       $page->assign('mailorg',make_forlife($myrow['prenom'],$myrow['nom'],$myrow['promo']));
-    $page->run();
-       break;
-               
-case "Creer le login":
-       //on commence par vérifier:
-       // - que le matricule n'existe pas parmi les inscrits
-       // - que le login n'existe pas déjà
-       // - que la date de naissance est bien remplie
-    
-       $result=$globals->db->query("SELECT user_id FROM auth_user_md5 where matricule='".$_REQUEST["xmat"]."'");
-       if ($myrow = mysql_fetch_array($result))
-               exit_error("Le matricule existe d&eacute;j&agrave; dans la table auth_user_md5.");
-                               
-       $result=$globals->db->query("SELECT user_id FROM aliases AS a 
-    WHERE a.type='a_vie' AND a.alias='".$_REQUEST["mailorg"]."'");
-       if ($myrow = mysql_fetch_array($result))
-               exit_error("Le login existe d&eacute;j&agrave; dans la table auth_user_md5.");
-
-       $naissance=(isset($_REQUEST['naissance']))?$naissance:0;
-
-       // tirage aléatoire de UID et mot de passe
-       $pass_clair=rand_pass();
-       $password=md5($pass_clair);
-       $date=date("Y-m-j");
-                               
-       $sql = "INSERT INTO auth_user_md5 SET matricule='".$_REQUEST['xmat']."',promo='".$_REQUEST['promoN']."',password='$password',nom='".$_REQUEST['nomN']."',prenom='".$_REQUEST['prenomN']."',date='$date',naissance='$naissance', date_ins = NULL";
-       $result=$globals->db->query($sql);
-
-       if (!$globals->db->err()) {
-               $newuid = mysql_insert_id();
-        $sql = "INSERT INTO aliases SET alias='".$_REQUEST['mailorg']."',type='a_vie',id='$newuid'";
-        $result=$globals->db->query($sql);
-               /** inscription à la liste promo ****************/
-               $inspromo = inscription_liste_promo($newuid,$_REQUEST['promoN']);
-               /** inscription à la newsletter  ***************/
-               $insnewsletter = inscription_newsletter($newuid);
-
-               // pas d'erreur pour l'insert
-        new_admin_page('marketing/utilisateurs_inscrire.tpl');
-        $page->assign('mailorg',$_REQUEST['mailorg']);
-        $page->assign('pass_clair',$pass_clair);
-        $page->assign('success',1);
-        $page->run();
-       } else {
-               exit_error("Une erreur s'est produite lors de la tentative d'insertion.");
-       }
-       break;
-}
-?>
index eab27ce..7256ef2 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: mescontacts.php,v 1.9 2004-09-02 23:25:30 x2000habouzit Exp $
+        $Id: mescontacts.php,v 1.10 2004-09-05 12:54:18 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -36,7 +36,7 @@ if (isset($_REQUEST['action'])) {
         // si l'utilisateur demande l'ajout de qqun à sa liste
     } elseif ($_REQUEST["action"]=="ajouter") {
 
-        if (($res = $globals->db->query("SELECT id FROM aliases WHERE alias='{$_REQUEST['user']}'")) && mysql_num_rows($res)==1) {
+        if (($res = $globals->db->query("SELECT id FROM aliases WHERE alias='{$_REQUEST['user']}' AND type!='homonyme'")) && mysql_num_rows($res)==1) {
             list($cont_user_id) = mysql_fetch_row($res);
             if ($globals->db->query("INSERT INTO contacts set uid = '{$_SESSION['uid']}', contact = '$cont_user_id'")) {
                 $page->assign('erreur', 'Contact ajouté !');
index 8cde017..2b9e5df 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: mescontacts_ldif.php,v 1.9 2004-09-02 23:55:56 x2000habouzit Exp $
+        $Id: mescontacts_ldif.php,v 1.10 2004-09-05 12:54:18 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -68,7 +68,7 @@ mysql_free_result($req);
 $req = $globals->db->query("SELECT  a.id,a.alias
                               FROM  aliases  AS a
                        INNER JOIN  contacts AS c ON a.id=c.contact
-                            WHERE  c.uid='{$_SESSION['uid']}' AND a.type!='a_vie'");
+                            WHERE  c.uid='{$_SESSION['uid']}' AND a.type!='a_vie' AND a.type!='homonyme'");
 while(list($id,$alias) = mysql_fetch_row($req)) {
     $contacts[$id]['aliases'][] = $alias;
 }
index 497ccc9..9811c04 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: cyberpaiement_retour.php,v 1.4 2004-09-02 21:22:19 x2000habouzit Exp $
+        $Id: cyberpaiement_retour.php,v 1.5 2004-09-05 12:54:20 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -95,7 +95,7 @@ $montant = "$champ201 $champ202";
 $res = $globals->db->query("
     SELECT  a.prenom,a.nom,a.promo,l.alias,FIND_IN_SET(i.flags,'femme')
       FROM  auth_user_md5  AS a
-INNER JOIN  aliases        AS l ON a.user_id=l.id
+INNER JOIN  aliases        AS l ON (a.user_id=l.id AND type!='homonyme')
 INNER JOIN  identification AS i ON a.matricule=i.matricule
      WHERE  a.user_id='$uid'");
 if (!list($prenom,$nom,$promo,$forlife,$femme) = mysql_fetch_row($res))
index d65d61a..faded5f 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: pattecassee.php,v 1.8 2004-09-04 14:40:02 x2000habouzit Exp $
+        $Id: pattecassee.php,v 1.9 2004-09-05 12:54:18 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -44,7 +44,7 @@ if (array_key_exists('email', $_GET) && array_key_exists('action', $_GET)) {
       "SELECT  e.uid, a.alias
          FROM  emails        AS e
    INNER JOIN  auth_user_md5 AS u ON e.uid = u.user_id
-   INNER JOIN  aliases       AS a ON e.uid = a.id
+   INNER JOIN  aliases       AS a ON (e.uid = a.id AND type!='homonyme')
         WHERE  e.email='$email'");
     if (list($uid, $dest) = mysql_fetch_row($sel)) {
        // envoi du mail
index ba21bf3..dbfc819 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: recovery.php,v 1.3 2004-09-02 23:55:56 x2000habouzit Exp $
+        $Id: recovery.php,v 1.4 2004-09-05 12:54:18 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -39,7 +39,7 @@ if (isset($_REQUEST['login']) and isset($_REQUEST['birth']))  {
 
     $sql="SELECT  user_id, naissance
            FROM  auth_user_md5 AS u
-      INNER JOIN  aliases       AS a ON u.user_id=a.id
+      INNER JOIN  aliases       AS a ON (u.user_id=a.id AND type!='homonyme')
            WHERE a.alias='$mailorg'";
     $result=$globals->db->query($sql);
     if (list($uid,$naissance)=mysql_fetch_array($result)) {
index ca2a0c6..8459a61 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: redirect.php,v 1.4 2004-09-02 23:55:57 x2000habouzit Exp $
+        $Id: redirect.php,v 1.5 2004-09-05 12:54:20 x2000habouzit Exp $
  ***************************************************************************/
 
 
@@ -37,7 +37,7 @@ list($user, $path) = preg_split('/\//', $_SERVER["REQUEST_URI"], 2, PREG_SPLIT_N
 $result = $globals->db->query("
     SELECT  redirecturl
       FROM  auth_user_md5 AS u
-INNER JOIN  aliases       AS a ON u.user_id=a.id
+INNER JOIN  aliases       AS a ON (u.user_id=a.id AND type!='homonyme')
      WHERE  a.alias='$user'");
 if ($result and list($url) = mysql_fetch_row($result) and $url != '') {
        // on envoie un redirect (PHP met automatiquement le code de retour 302
index f55ba07..ec147a8 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: routage-mail.php,v 1.6 2004-09-04 14:40:02 x2000habouzit Exp $
+        $Id: routage-mail.php,v 1.7 2004-09-05 12:54:18 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -49,7 +49,7 @@ list($grx) = mysql_fetch_row($res);
 $page->assign('grx',$grx);
 $page->assign('domaine',substr($grx,0,-3));
 
-$page->mysql_assign("SELECT alias FROM aliases WHERE id=".$_SESSION["uid"], 'alias');
+$page->mysql_assign("SELECT alias,expire FROM aliases WHERE id='{$_SESSION['uid']}' AND type!='homonyme'", 'alias');
 $page->assign('emails',$redirect->emails);
 
 $page->run();
index 43d5e57..18127e7 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: vcard.php,v 1.9 2004-09-02 23:36:57 x2000habouzit Exp $
+        $Id: vcard.php,v 1.10 2004-09-05 12:54:18 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -89,7 +89,7 @@ $vcard = mysql_fetch_assoc($result);
 $page->assign_by_ref('vcard', $vcard);
 mysql_free_result($result);
 
-$page->mysql_assign("SELECT alias FROM aliases WHERE id={$vcard['user_id']} AND type!='a_vie'",'aliases');
+$page->mysql_assign("SELECT alias FROM aliases WHERE id={$vcard['user_id']} AND type!='a_vie' AND type!='homonyme'",'aliases');
 
 $adr = $globals->db->query(
         "SELECT statut,adr1,adr2,adr3,cp,ville,gp.pays,gr.name,tel,fax,
index 46e105a..9a8337d 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: utilisateurs.tpl,v 1.14 2004-09-04 20:14:31 x2000habouzit Exp $
+        $Id: utilisateurs.tpl,v 1.15 2004-09-05 12:54:20 x2000habouzit Exp $
  ***************************************************************************}
 
 
@@ -191,7 +191,10 @@ function del_fwd(fwd) {
     </tr>
     {foreach from=$aliases item=a}
     <tr class="{cycle values="impair,pair"}">
-      <td>{if $a.for_life}<strong>{$a.alias}</strong>{else}{$a.alias}{/if}</td>
+      <td>
+        {if $a.for_life}<strong>{$a.alias}</strong>{else}{$a.alias}{/if}
+        {if $a.expire}<span class='erreur'>(expire {$a.expire|date_format:"%d %b %Y"})</span>{/if}
+      </td>
       {if $a.for_life}
       <td>garanti à vie*</td>
       {else}
index 7194cc0..6acca3e 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: emails.tpl,v 1.4 2004-09-02 22:27:06 x2000habouzit Exp $
+        $Id: emails.tpl,v 1.5 2004-09-05 12:54:20 x2000habouzit Exp $
  ***************************************************************************}
 
 
@@ -36,8 +36,14 @@ Gestion de mes courriers 
       Tes adresses polytechniciennes sont :
       <ul>
         {foreach from=$aliases item=a}
-        <li>{if $a.a_vie}(*){/if} <strong>{$a.alias}</strong>@polytechnique.org</li>
-        <li>{if $a.a_vie}(*){/if} <strong>{$a.alias}</strong>@m4x.org</li>
+        <li>
+        {if $a.a_vie}(*){/if} <strong>{$a.alias}</strong>@polytechnique.org
+        {if $a.expire}<span class='erreur'>(expire le {$a.expire|date_format:"%d %b %Y"})</span>{/if}
+        </li>
+        <li>
+        {if $a.a_vie}(*){/if} <strong>{$a.alias}</strong>@m4x.org
+        {if $a.expire}<span class='erreur'>(expire le {$a.expire|date_format:"%d %b %Y"})</span>{/if}
+        </li>
         {/foreach}
       </ul>
     </td>
index f6b143a..7520923 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: routage-mail.tpl,v 1.7 2004-09-04 14:40:03 x2000habouzit Exp $
+        $Id: routage-mail.tpl,v 1.8 2004-09-05 12:54:20 x2000habouzit Exp $
  ***************************************************************************}
 
 {dynamic}
   <ul>
     {if $grx neq ""}<li><strong>{$grx}</strong>, <strong>{$domaine}org</strong></li>{/if}
     {foreach from=$alias item=a}
-    <li><strong>{$a.alias}@polytechnique.org</strong></li>
+    <li>
+    <strong>{$a.alias}@polytechnique.org</strong>
+    {if $a.expire}<span class='erreur'>(expire le {$a.expire|date_format:"%d %b %Y"})</span>{/if}
+    </li>
     {/foreach}
   </ul>
   <p>