* 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 $
***************************************************************************/
$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,
$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);
* 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 $
***************************************************************************}
</div>
<div class='right' style="font-size: smaller; width:100%">(Fiche mise à jour le {$date|date_format:"%d %B %Y"})</div>
<div>
- <a href="mailto:{$forlife}@polytechnique.org">{$forlife}@polytechnique.org</a><br />
+ <a href="mailto:{$bestalias}@polytechnique.org">{$bestalias}@polytechnique.org</a><br />
+ <a href="mailto:{$forlife}@polytechnique.org">{$forlife}@polytechnique.org</a>
</div>
<div><em>{$nationalite}</em> - X {$promo} - Formation : {$applis|smarty:nodefaults}</div>
{if $is_referent}