From 58d7768670c7d071b7882f51a79b63f5630a5727 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Tue, 2 Nov 2004 07:13:08 +0000 Subject: [PATCH] closes FS#168 --- htdocs/fiche.php | 6 +++--- htdocs/mescontacts_pdf.php | 22 ++++++++++------------ templates/fiche.tpl | 4 ++-- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/htdocs/fiche.php b/htdocs/fiche.php index c50b36a..91b88c5 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.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"; diff --git a/htdocs/mescontacts_pdf.php b/htdocs/mescontacts_pdf.php index 53e055d..9a627f8 100644 --- a/htdocs/mescontacts_pdf.php +++ b/htdocs/mescontacts_pdf.php @@ -18,11 +18,11 @@ * 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)) { diff --git a/templates/fiche.tpl b/templates/fiche.tpl index 12d26d6..7ce51ee 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.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 ) { {$bestalias}@polytechnique.org
{$forlife}@polytechnique.org -
{$nationalite} - X {$promo} - Formation : {$applis|smarty:nodefaults}
+
{if $nationalite}{$nationalite} - {/if}X {$promo} - Formation : {$applis|smarty:nodefaults}
{if $mobile}
Mobile : {$mobile}
{/if} {if $is_referent}
Ma fiche référent
-- 2.1.4