From 4cf73a3edbadd97e82661c161509d566842aeb96 Mon Sep 17 00:00:00 2001 From: x2000chevalier Date: Sun, 31 Oct 2004 16:02:44 +0000 Subject: [PATCH] identification disappeared, now auth_user_md5 only --- htdocs/advanced_search.php | 7 +++---- htdocs/epouse.php | 5 ++--- htdocs/fiche.php | 7 +++---- htdocs/inscription/step3.php | 4 ++-- htdocs/mescontacts.php | 5 ++--- htdocs/search.php | 13 ++++++------- 6 files changed, 18 insertions(+), 23 deletions(-) diff --git a/htdocs/advanced_search.php b/htdocs/advanced_search.php index 71b24d8..8826ef3 100644 --- a/htdocs/advanced_search.php +++ b/htdocs/advanced_search.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: advanced_search.php,v 1.21 2004-10-29 01:24:20 x2000habouzit Exp $ + $Id: advanced_search.php,v 1.22 2004-10-31 16:02:44 x2000chevalier Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -72,7 +72,7 @@ else { } $promo1Field = new PromoSField('promo1','egal1',array('u.promo'),''); $promo2Field = new PromoSField('promo2','egal2',array('u.promo'),''); - $womanField = new RefSField('woman',array('FIND_IN_SET(i.flags,\'femme\')+1'),'','',''); + $womanField = new RefSField('woman',array('FIND_IN_SET(u.flags,\'femme\')+1'),'','',''); $townField = new RefSField('ville',array('av.ville'),'adresses','av','u.user_id=av.uid',false); $countryField = new RefSField('pays',array('ap.pays'),'adresses','ap','u.user_id=ap.uid'); @@ -105,7 +105,7 @@ else { $where = $fields->get_where_statement(); $sql = 'SELECT SQL_CALC_FOUND_ROWS - DISTINCT u.matricule,i.matricule_ax, + DISTINCT u.matricule,u.matricule_ax, 1 AS inscrit, u.nom, u.prenom, @@ -116,7 +116,6 @@ else { FROM auth_user_md5 AS u '.$fields->get_select_statement().' INNER JOIN aliases AS a ON (u.user_id = a.id AND a.type="a_vie") - INNER JOIN identification AS i ON (i.matricule=u.matricule) LEFT JOIN contacts AS c ON (c.uid='.((array_key_exists('uid',$_SESSION))?$_SESSION['uid']:0).' AND c.contact=u.user_id) '.$globals->search_result_where_statement.' '.(($where!='')?('WHERE '.$where):'').' diff --git a/htdocs/epouse.php b/htdocs/epouse.php index 7c31709..e357595 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.9 2004-10-19 22:05:09 x2000habouzit Exp $ + $Id: epouse.php,v 1.10 2004-10-31 16:02:44 x2000chevalier Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -28,9 +28,8 @@ require("xorg.misc.inc.php"); new_skinned_page('epouse.tpl', AUTH_MDP); $res = $globals->db->query( - "SELECT u.nom,u.epouse,i.flags,e.alias + "SELECT u.nom,u.epouse,u.flags,e.alias FROM auth_user_md5 AS u - LEFT JOIN identification AS i USING(matricule) LEFT JOIN aliases AS e ON(u.user_id = e.id) WHERE user_id=".$_SESSION['uid']); diff --git a/htdocs/fiche.php b/htdocs/fiche.php index b37ffe6..c50b36a 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.17 2004-10-29 02:08:19 x2000habouzit Exp $ + $Id: fiche.php,v 1.18 2004-10-31 16:02:44 x2000chevalier Exp $ ***************************************************************************/ @@ -44,8 +44,8 @@ else $where_clause = " WHERE u.matricule = '{$_REQUEST['mat']}'"; $reqsql = "SELECT u.prenom, u.nom, u.epouse, IF(gp.nat='',gp.pays,gp.nat) AS text, - u.user_id, a.alias, a2.alias, u.matricule, i.deces != 0 as dcd, - i.deces, u.date, u.cv, sections.text, u.mobile, u.web, + u.user_id, a.alias, a2.alias, u.matricule, u.deces != 0 as dcd, + u.deces, u.date, u.cv, sections.text, u.mobile, u.web, u.libre, u.promo, c.uid IS NOT NULL, p.x, p.y FROM auth_user_md5 AS u INNER JOIN aliases AS a ON (u.user_id=a.id AND a.type='a_vie') @@ -53,7 +53,6 @@ $reqsql = "SELECT u.prenom, u.nom, u.epouse, IF(gp.nat='',gp.pays,gp.nat) AS te 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) - INNER JOIN identification AS i ON(u.matricule = i.matricule) 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/inscription/step3.php b/htdocs/inscription/step3.php index 3e65e8c..db1d11d 100644 --- a/htdocs/inscription/step3.php +++ b/htdocs/inscription/step3.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: step3.php,v 1.1 2004-09-05 22:25:44 x2000habouzit Exp $ + $Id: step3.php,v 1.2 2004-10-31 16:02:46 x2000chevalier Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -68,7 +68,7 @@ $sql="REPLACE INTO en_cours loginbis='$mailorg', username='$forlife'"; $globals->db->query($sql); -$globals->db->query("UPDATE identification SET last_known_email='{$_REQUEST['email']}' WHERE matricule = $matricule"); +$globals->db->query("UPDATE auth_user_md5 SET last_known_email='{$_REQUEST['email']}' WHERE matricule = $matricule"); // si on venait de la page maj.php, on met a jour la table envoidirect if(isset($_REQUEST['envoidirect'])) $globals->db->query("UPDATE envoidirect SET date_succes='NOW()' WHERE uid='{$_REQUEST['envoidirect']}'"); diff --git a/htdocs/mescontacts.php b/htdocs/mescontacts.php index c981972..27b6da6 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.21 2004-10-29 02:04:23 x2000habouzit Exp $ + $Id: mescontacts.php,v 1.22 2004-10-31 16:02:44 x2000chevalier Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -86,7 +86,7 @@ if(isset($_GET['trombi'])) { } else { $sql = "SELECT contact AS id, a.*, l.alias AS forlife, - i.deces != 0 AS dcd, i.deces, i.matricule_ax, FIND_IN_SET('femme', i.flags) AS sexe, + u.deces != 0 AS dcd, u.deces, u.matricule_ax, FIND_IN_SET('femme', u.flags) AS sexe, e.entreprise, es.label AS secteur, ef.fonction_fr AS fonction, IF(n.nat='',n.pays,n.nat) AS nat, n.a2 AS iso3166, ad0.text AS app0text, ad0.url AS app0url, ai0.type AS app0type, @@ -95,7 +95,6 @@ if(isset($_GET['trombi'])) { IF(a.epouse<>'',a.epouse,a.nom) AS sortkey 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 = 0 AND e.uid = a.user_id) LEFT JOIN emploi_secteur AS es ON (e.secteur = es.id) diff --git a/htdocs/search.php b/htdocs/search.php index 0168a87..d4b6321 100644 --- a/htdocs/search.php +++ b/htdocs/search.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: search.php,v 1.36 2004-10-25 20:27:52 x2000habouzit Exp $ + $Id: search.php,v 1.37 2004-10-31 16:02:44 x2000chevalier Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -50,7 +50,7 @@ if (array_key_exists('rechercher', $_REQUEST)) { } $promo1Field = new PromoSField('promo1','egal1',array('r.promo'),''); $promo2Field = new PromoSField('promo2','egal2',array('r.promo'),''); - $womanField = new RefSField('woman',array('FIND_IN_SET(i.flags,\'femme\')+1'),'','',''); + $womanField = new RefSField('woman',array('FIND_IN_SET(u.flags,\'femme\')+1'),'','',''); $fields = new SFieldGroup(true,array($nameField,$firstnameField,$promo1Field,$promo2Field,$womanField)); if (!$nameField->length() && !$firstnameField->length() @@ -62,16 +62,15 @@ if (array_key_exists('rechercher', $_REQUEST)) { $offset = new NumericSField('offset'); $sql = 'SELECT SQL_CALC_FOUND_ROWS - DISTINCT r.matricule,i.matricule_ax, + DISTINCT r.matricule,u.matricule_ax, u.nom!="" AS inscrit, - UPPER(IF(u.nom!="",u.nom,i.nom)) AS nom, - IF(u.prenom!="",u.prenom,i.prenom) AS prenom, - IF(u.promo!="",u.promo,i.promo) AS promo, + UPPER(IF(u.nom!="",u.nom,u.nom_ini)) AS nom, + IF(u.prenom!="",u.prenom,u.prenom_ini) AS prenom, + u.promo AS promo, a.alias AS forlife, '.$globals->search_result_fields.' c.uid AS contact FROM '.($with_soundex?'recherche_soundex':'recherche').' AS r - INNER JOIN identification AS i ON (i.matricule=r.matricule) LEFT JOIN auth_user_md5 AS u ON (u.matricule=r.matricule) LEFT JOIN aliases AS a ON (u.user_id = a.id AND a.type="a_vie") LEFT JOIN contacts AS c ON (c.uid='.((array_key_exists('uid',$_SESSION))?$_SESSION['uid']:0).' AND c.contact=u.user_id) -- 2.1.4