From: x2000habouzit Date: Thu, 2 Sep 2004 23:06:10 +0000 (+0000) Subject: hop hop hop, more fixes X-Git-Tag: xorg/old~1599 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=525d5b22ba819b1ec5ea060a5e7845f7a540c2f2;p=platal.git hop hop hop, more fixes --- diff --git a/htdocs/admin/utilisateurs.php b/htdocs/admin/utilisateurs.php index 9390243..3beeb5b 100644 --- a/htdocs/admin/utilisateurs.php +++ b/htdocs/admin/utilisateurs.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: utilisateurs.php,v 1.16 2004-09-02 19:39:20 x2000habouzit Exp $ + $Id: utilisateurs.php,v 1.17 2004-09-02 23:06:11 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -163,6 +163,10 @@ if (!empty($_REQUEST['user_id'])) { } if(isset($mr)) { + $r=$globals->db->query("SELECT alias FROM aliases WHERE ( id = {$mr['user_id']} AND tpe='a_vie' )"); + list($forlife) = mysql_fetch_row($r); + mysql_free_result($r); + $mr['forlife'] = $forlife; $page->assign('mr',$mr); $result=$globals->db->query("SELECT UNIX_TIMESTAMP(s.start), s.host diff --git a/htdocs/epouse.php b/htdocs/epouse.php index bedd433..1a1b3d1 100644 --- a/htdocs/epouse.php +++ b/htdocs/epouse.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: epouse.php,v 1.6 2004-09-01 22:15:54 x2000habouzit Exp $ + $Id: epouse.php,v 1.7 2004-09-02 23:06:10 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -44,8 +44,8 @@ if (!empty($_REQUEST['submit']) && ($epouse != $epouse_old)) { $page->assign('same',true); } else { // le nom de mariage est distinct du nom à l'X // on calcule l'alias pour l'afficher - $myepouse = new EpouseReq($_SESSION['uid'], $_SESSION['username'], $epouse); - list($prenom_username,) = explode('.',$_SESSION['username']); + $myepouse = new EpouseReq($_SESSION['uid'], $_SESSION['forlife'], $epouse); + list($prenom_username,) = explode('.',$_SESSION['forlife']); $alias_old=make_username($prenom_username,$epouse_old); $myepouse->submit(); diff --git a/htdocs/login.php b/htdocs/login.php index 0dae491..1e70909 100644 --- a/htdocs/login.php +++ b/htdocs/login.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: login.php,v 1.13 2004-09-02 18:30:34 x2000habouzit Exp $ + $Id: login.php,v 1.14 2004-09-02 23:06:10 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -75,13 +75,14 @@ $page->assign_by_ref('publicite', $publicite); // affichage des evenements // annonces promos triées par présence d'une limite sur les promos // puis par dates croissantes d'expiration -$sql = "SELECT e.id,e.titre,e.texte,a.user_id,a.nom,a.prenom,a.promo - FROM evenements AS e INNER JOIN auth_user_md5 AS a - ON e.user_id=a.user_id - WHERE FIND_IN_SET(flags, 'valide') AND peremption >= NOW() - AND (e.promo_min = 0 || e.promo_min <= {$_SESSION['promo']}) - AND (e.promo_max = 0 || e.promo_max >= {$_SESSION['promo']}) - ORDER BY (e.promo_min != 0 AND e.promo_max != 0) DESC, e.peremption"; +$sql = "SELECT e.id,e.titre,e.texte,a.user_id,a.nom,a.prenom,a.promo,l.alias AS forlife + FROM evenements AS e + INNER JOIN auth_user_md5 AS a ON e.user_id=a.user_id + INNER JOIN aliases AS l ON ( a.user_id=l.id AND l.type='a_vie' ) + WHERE FIND_IN_SET(flags, 'valide') AND peremption >= NOW() + AND (e.promo_min = 0 || e.promo_min <= {$_SESSION['promo']}) + AND (e.promo_max = 0 || e.promo_max >= {$_SESSION['promo']}) + ORDER BY (e.promo_min != 0 AND e.promo_max != 0) DESC, e.peremption"; $page->mysql_assign($sql, 'evenement'); $page->assign('toto',""); diff --git a/htdocs/mescontacts.php b/htdocs/mescontacts.php index adf86b1..1fba971 100644 --- a/htdocs/mescontacts.php +++ b/htdocs/mescontacts.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: mescontacts.php,v 1.7 2004-09-02 19:51:22 x2000habouzit Exp $ + $Id: mescontacts.php,v 1.8 2004-09-02 23:06:10 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -49,7 +49,7 @@ if (isset($_REQUEST['action'])) { } $sql = "SELECT contact AS id, - a.*, + a.*, l.alias AS forlife i.deces != 0 AS dcd, i.matricule_ax, e.entreprise, es.label AS secteur, ef.label AS fonction, n.text AS nat, @@ -59,6 +59,7 @@ $sql = "SELECT contact AS id, FROM contacts AS c INNER JOIN auth_user_md5 AS a ON (a.user_id = c.contact) INNER JOIN identification AS i ON (a.matricule = i.matricule) + INNER JOIN aliases AS l ON (a.user_id = l.id AND l.type='a_vie') LEFT JOIN entreprises AS e ON (e.entrid = 1 AND e.uid = a.user_id) LEFT JOIN emploi_secteur AS es ON (e.secteur = es.id) LEFT JOIN emploi_naf AS ef ON (e.fonction = ef.id) diff --git a/templates/admin/utilisateurs.tpl b/templates/admin/utilisateurs.tpl index 9733e03..2fb93ca 100644 --- a/templates/admin/utilisateurs.tpl +++ b/templates/admin/utilisateurs.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: utilisateurs.tpl,v 1.12 2004-09-02 17:43:14 x2000habouzit Exp $ + $Id: utilisateurs.tpl,v 1.13 2004-09-02 23:06:11 x2000habouzit Exp $ ***************************************************************************} @@ -165,7 +165,7 @@ function del_fwd(fwd) { - [Voir fiche] + [Voir fiche] diff --git a/templates/include/x_inscrit.tpl b/templates/include/x_inscrit.tpl index f64e970..efcef0d 100644 --- a/templates/include/x_inscrit.tpl +++ b/templates/include/x_inscrit.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: x_inscrit.tpl,v 1.7 2004-09-02 19:51:23 x2000habouzit Exp $ + $Id: x_inscrit.tpl,v 1.8 2004-09-02 23:06:11 x2000habouzit Exp $ ***************************************************************************} @@ -39,7 +39,7 @@ {/strip}
- + Afficher les détails diff --git a/templates/login.tpl b/templates/login.tpl index 9b3c6d6..6719bcd 100644 --- a/templates/login.tpl +++ b/templates/login.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: login.tpl,v 1.10 2004-09-02 18:30:34 x2000habouzit Exp $ + $Id: login.tpl,v 1.11 2004-09-02 23:06:11 x2000habouzit Exp $ ***************************************************************************} @@ -49,7 +49,7 @@ {dynamic on="0$fiche_incitation"}

La dernière mise à jour de ta - fiche + fiche date du {$fiche_incitation|date_format:"%x"}. Il est possible qu'elle ne soit pas à jour. Si tu souhaites la modifier, clique ici ! @@ -91,7 +91,7 @@ {$ev.texte|smarty:nodefaults|nl2br}

Annonce proposée par - + {$ev.prenom} {$ev.nom} X{$ev.promo}