Added link to fiche_referent when the guy is a 'referent'
authorx2000coic <x2000coic>
Sun, 19 Sep 2004 10:41:05 +0000 (10:41 +0000)
committerx2000coic <x2000coic>
Sun, 19 Sep 2004 10:41:05 +0000 (10:41 +0000)
htdocs/fiche.php
htdocs/fiche_referent.php
templates/fiche.tpl

index 18d33f6..a48a6bf 100644 (file)
@@ -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,
index 53cb388..0a79f15 100644 (file)
@@ -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,
index 687c8ea..59e0cb3 100644 (file)
@@ -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 @@
     <a href="mailto:{$forlife}@polytechnique.org">{$forlife}@polytechnique.org</a><br />
   </div>
   <div><em>{$nationalite}</em> - X {$promo}&nbsp;-&nbsp;Formation&nbsp;: {$applis|smarty:nodefaults}</div>
+  {if $is_referent}
+    <div><a href="javascript:x()"  onclick="popWin('fiche_referent.php?user={$forlife}')">Ma fiche référent</a></div>
+  {/if}
 </div>
 
 <div id="fiche_divers">