closes FS#168
authorx2000habouzit <x2000habouzit>
Tue, 2 Nov 2004 07:13:08 +0000 (07:13 +0000)
committerx2000habouzit <x2000habouzit>
Tue, 2 Nov 2004 07:13:08 +0000 (07:13 +0000)
htdocs/fiche.php
htdocs/mescontacts_pdf.php
templates/fiche.tpl

index c50b36a..91b88c5 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: fiche.php,v 1.18 2004-10-31 16:02:44 x2000chevalier Exp $
+        $Id: fiche.php,v 1.19 2004-11-02 07:13:08 x2000habouzit Exp $
  ***************************************************************************/
 
 
@@ -51,8 +51,8 @@ $reqsql = "SELECT  u.prenom, u.nom, u.epouse, IF(gp.nat='',gp.pays,gp.nat) AS te
        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  geoloc_pays    AS gp ON (gp.a2 = u.nationalite)
-       INNER JOIN  sections            ON(sections.id = u.section)
+        LEFT JOIN  geoloc_pays    AS gp ON (gp.a2 = u.nationalite)
+       INNER JOIN  sections             ON(sections.id = u.section)
         LEFT JOIN  photo as p ON(p.uid = u.user_id)".$where_clause."
         ORDER BY  a2.type != 'epouse', LENGTH(a2.alias) LIMIT 1";
 
index 53e055d..9a627f8 100644 (file)
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: mescontacts_pdf.php,v 1.3 2004-10-09 13:52:01 x2000habouzit Exp $
+        $Id: mescontacts_pdf.php,v 1.4 2004-11-02 07:13:08 x2000habouzit Exp $
  ***************************************************************************/
 
 #
-# $Id: mescontacts_pdf.php,v 1.3 2004-10-09 13:52:01 x2000habouzit Exp $
+# $Id: mescontacts_pdf.php,v 1.4 2004-11-02 07:13:08 x2000habouzit Exp $
 #
 
 require("auto.prepend.inc.php");
@@ -103,16 +103,14 @@ while ($myrow = mysql_fetch_array($req)) {
 
     /* affichage des infos professionnelles (poste, adresse, tel) */
     $res_pro = $globals->db->query(
-       "SELECT entreprise, s.label, ss.label, f.fonction_fr, poste,
-               adr1, adr2, adr3, cp, ville, gp.pays, gr.name, tel, fax
-       FROM entreprises AS e
-       LEFT JOIN emploi_secteur AS s ON e.secteur = s.id
-       LEFT JOIN emploi_ss_secteur AS ss
-         ON (e.secteur = ss.secteur AND e.ss_secteur = ss.id)
-       LEFT JOIN fonctions_def AS f ON f.id = e.fonction
-       INNER JOIN geoloc_pays AS gp on gp.a2 = e.pays
-       INNER JOIN geoloc_region AS gr
-         ON (gr.a2 = e.pays AND gr.region = e.region)
+       "SELECT  entreprise, s.label, ss.label, f.fonction_fr, poste,
+                adr1, adr2, adr3, cp, ville, gp.pays, gr.name, tel, fax
+         FROM  entreprises       AS e
+     LEFT JOIN  emploi_secteur    AS s  ON e.secteur = s.id
+     LEFT JOIN  emploi_ss_secteur AS ss ON (e.secteur = ss.secteur AND e.ss_secteur = ss.id)
+     LEFT JOIN  fonctions_def     AS f  ON f.id = e.fonction
+     LEFT JOIN  geoloc_pays       AS gp ON gp.a2 = e.pays
+    INNER JOIN  geoloc_region     AS gr ON (gr.a2 = e.pays AND gr.region = e.region)
        WHERE e.uid = ".$myrow["user_id"]
     );
     while (list($entreprise, $secteur, $ss_secteur, $fonction, $poste, $adr1, $adr2, $adr3, $cp, $ville, $pays, $region, $tel, $fax) = mysql_fetch_row($res_pro)) {
index 12d26d6..7ce51ee 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: fiche.tpl,v 1.19 2004-10-30 09:09:04 x2000bedo Exp $
+        $Id: fiche.tpl,v 1.20 2004-11-02 07:13:08 x2000habouzit Exp $
  ***************************************************************************}
 
 {literal}
@@ -51,7 +51,7 @@ function chgMainWinLoc( strPage ) {
     <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}&nbsp;-&nbsp;Formation&nbsp;: {$applis|smarty:nodefaults}</div>
+  <div>{if $nationalite}<em>{$nationalite}</em> - {/if}X {$promo}&nbsp;-&nbsp;Formation&nbsp;: {$applis|smarty:nodefaults}</div>
   {if $mobile}<div><em class="intitule">Mobile : </em>{$mobile}</div>{/if}
   {if $is_referent}
     <div><a href="javascript:x()"  onclick="popWin('fiche_referent.php?user={$forlife}')">Ma fiche référent</a></div>