From fe48afc7fba9bac27bd7a77498c969e486cee731 Mon Sep 17 00:00:00 2001 From: x2000coic Date: Sun, 19 Sep 2004 10:41:05 +0000 Subject: [PATCH] Added link to fiche_referent when the guy is a 'referent' --- htdocs/fiche.php | 11 ++++++++++- htdocs/fiche_referent.php | 3 ++- templates/fiche.tpl | 5 ++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/htdocs/fiche.php b/htdocs/fiche.php index 18d33f6..a48a6bf 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.10 2004-09-05 20:27:57 x2000coic Exp $ + $Id: fiche.php,v 1.11 2004-09-19 10:41:05 x2000coic Exp $ ***************************************************************************/ @@ -86,6 +86,7 @@ $page->assign('libre', $libre); $page->assign('xorg_title', "$prenom $nom"); + // reformatage is_contact $is_contact = (bool) $is_contact; $page->assign('is_contact', $is_contact); @@ -111,6 +112,14 @@ $page->assign('size_y', $size_y); mysql_free_result($result); +//check si le gars est un referent : +$reqsql = "SELECT 1 FROM mentor WHERE uid = '$user_id' AND expertise <> ''"; +$result = $globals->db->query($reqsql); +if (list($is_referent) = mysql_fetch_row($result)){ + mysql_free_result($result); +} +$page->assign('is_referent', $is_referent); + //recuperation des infos professionnelles $reqsql = "SELECT e.entreprise, s.label as secteur , ss.label as sous_secteur , f.fonction_fr as fonction, diff --git a/htdocs/fiche_referent.php b/htdocs/fiche_referent.php index 53cb388..0a79f15 100644 --- a/htdocs/fiche_referent.php +++ b/htdocs/fiche_referent.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: fiche_referent.php,v 1.8 2004-09-05 12:54:18 x2000habouzit Exp $ + $Id: fiche_referent.php,v 1.9 2004-09-19 10:41:05 x2000coic Exp $ ***************************************************************************/ @@ -48,6 +48,7 @@ $page->assign('promo', $promo); $page->assign('cv', $cv); $page->assign('forlife', $forlife); + //recuperation des infos professionnelles $reqsql = "SELECT e.entreprise, s.label as secteur , ss.label as sous_secteur , f.fonction_fr as fonction, diff --git a/templates/fiche.tpl b/templates/fiche.tpl index 687c8ea..59e0cb3 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.11 2004-09-10 23:54:14 x2000habouzit Exp $ + $Id: fiche.tpl,v 1.12 2004-09-19 10:41:08 x2000coic Exp $ ***************************************************************************} @@ -36,6 +36,9 @@ {$forlife}@polytechnique.org
{$nationalite} - X {$promo} - Formation : {$applis|smarty:nodefaults}
+ {if $is_referent} +
Ma fiche référent
+ {/if}
-- 2.1.4