From: x2000chevalier Date: Sun, 10 Oct 2004 08:38:58 +0000 (+0000) Subject: adds the 'bestalias' email address X-Git-Tag: xorg/old~1347 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=fbfdbac2be430424cfd415effaa90ea10cf58503;p=platal.git adds the 'bestalias' email address --- diff --git a/htdocs/fiche.php b/htdocs/fiche.php index bb23c0d..83a44df 100644 --- a/htdocs/fiche.php +++ b/htdocs/fiche.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: fiche.php,v 1.12 2004-10-06 13:25:40 x2000habouzit Exp $ + $Id: fiche.php,v 1.13 2004-10-10 08:38:59 x2000chevalier Exp $ ***************************************************************************/ @@ -44,23 +44,25 @@ else $where_clause = " WHERE u.matricule = '{$_REQUEST['mat']}'"; $reqsql = "SELECT u.prenom, u.nom, u.epouse, nationalites.text, - u.user_id, a.alias, u.matricule, i.deces != 0 as dcd, + u.user_id, a.alias, a2.alias, u.matricule, i.deces != 0 as dcd, i.deces, u.date, u.cv, sections.text, u.mobile, u.web, u.libre, u.promo, c.uid IS NOT NULL, p.x, p.y 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 a2 ON (u.user_id=a2.id AND (a2.type='alias' OR a2.type='epouse') AND a2.alias LIKE '%.%') LEFT JOIN contacts AS c ON (c.uid = {$_SESSION['uid']} and c.contact = u.user_id) INNER JOIN nationalites ON(nationalites.id = u.nationalite) INNER JOIN sections ON(sections.id = u.section) INNER JOIN identification AS i ON(u.matricule = i.matricule) - LEFT JOIN photo as p ON(p.uid = u.user_id)".$where_clause; + LEFT JOIN photo as p ON(p.uid = u.user_id)".$where_clause." + ORDER BY a2.type != 'epouse', LENGTH(a2.alias) LIMIT 1"; $result = $globals->db->query($reqsql); if (mysql_num_rows($result)!=1) exit; if (list($prenom, $nom, $epouse, $nationalite, - $user_id, $forlife, $matricule, $dcd, $deces, + $user_id, $forlife, $bestalias, $matricule, $dcd, $deces, $date, $cv, $section, $mobile, $web, $libre, $promo, @@ -72,6 +74,7 @@ $page->assign('nom', $nom); $page->assign('promo', $promo); $page->assign('cv', $cv); $page->assign('forlife', $forlife); +$page->assign('bestalias', $bestalias); $page->assign('epouse', $epouse); $page->assign('nationalite', $nationalite); $page->assign('user_id', $user_id); diff --git a/templates/fiche.tpl b/templates/fiche.tpl index 59e0cb3..4607fdc 100644 --- a/templates/fiche.tpl +++ b/templates/fiche.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: fiche.tpl,v 1.12 2004-09-19 10:41:08 x2000coic Exp $ + $Id: fiche.tpl,v 1.13 2004-10-10 08:38:58 x2000chevalier Exp $ ***************************************************************************} @@ -33,7 +33,8 @@
(Fiche mise à jour le {$date|date_format:"%d %B %Y"})
- {$forlife}@polytechnique.org
+ {$bestalias}@polytechnique.org
+ {$forlife}@polytechnique.org
{$nationalite} - X {$promo} - Formation : {$applis|smarty:nodefaults}
{if $is_referent}