From: x2000chevalier Date: Sun, 31 Oct 2004 16:39:04 +0000 (+0000) Subject: identification disappeared, now auth_user_md5 only X-Git-Tag: xorg/old~1120 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=453225a251def9af2ee0759cebda25141e074740;p=platal.git identification disappeared, now auth_user_md5 only --- diff --git a/htdocs/admin/ax-xorg.php b/htdocs/admin/ax-xorg.php index f044160..8447ab4 100644 --- a/htdocs/admin/ax-xorg.php +++ b/htdocs/admin/ax-xorg.php @@ -18,32 +18,32 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: ax-xorg.php,v 1.3 2004-08-31 10:03:29 x2000habouzit Exp $ + $Id: ax-xorg.php,v 1.4 2004-10-31 16:39:04 x2000chevalier Exp $ ***************************************************************************/ require('auto.prepend.inc.php'); new_admin_page('admin/ax-xorg.tpl'); // liste des différences -$sql = "SELECT i.promo,i.nom AS nom,i.prenom AS prenom,ia.nom AS nomax,ia.prenom AS prenomax,i.matricule AS mat,ia.matricule_ax AS matax - FROM identification AS i - INNER JOIN identification_ax AS ia ON i.matricule_ax = ia.matricule_ax - WHERE (SOUNDEX(i.nom) != SOUNDEX(ia.nom) AND SOUNDEX(CONCAT(ia.particule,i.nom)) != SOUNDEX(ia.nom) - AND SOUNDEX(i.nom) != SOUNDEX(ia.nom_patro) AND SOUNDEX(CONCAT(ia.particule,i.nom)) != SOUNDEX(ia.nom_patro)) - OR i.prenom != ia.prenom - OR (i.promo != ia.promo AND i.promo != ia.promo+1 AND i.promo != ia.promo-1) - ORDER BY i.promo,i.nom,i.prenom"; +$sql = "SELECT u.promo,u.nom AS nom,u.prenom AS prenom,ia.nom AS nomax,ia.prenom AS prenomax,u.matricule AS mat,ia.matricule_ax AS matax + FROM auth_user_md5 AS u + INNER JOIN identification_ax AS ia ON u.matricule_ax = ia.matricule_ax + WHERE (SOUNDEX(u.nom) != SOUNDEX(ia.nom) AND SOUNDEX(CONCAT(ia.particule,u.nom)) != SOUNDEX(ia.nom) + AND SOUNDEX(u.nom) != SOUNDEX(ia.nom_patro) AND SOUNDEX(CONCAT(ia.particule,u.nom)) != SOUNDEX(ia.nom_patro)) + OR u.prenom != ia.prenom + OR (u.promo != ia.promo AND u.promo != ia.promo+1 AND u.promo != ia.promo-1) + ORDER BY u.promo,u.nom,u.prenom"; $page->mysql_assign($sql,'diffs','nb_diffs'); // gens à l'ax mais pas chez nous $sql = "SELECT ia.promo,ia.nom,ia.nom_patro,ia.prenom FROM identification_ax as ia - LEFT JOIN identification AS i ON i.matricule_ax = ia.matricule_ax - WHERE i.nom IS NULL"; + LEFT JOIN auth_user_md5 AS u ON u.matricule_ax = ia.matricule_ax + WHERE u.nom IS NULL"; $page->mysql_assign($sql,'mank','nb_mank'); // gens chez nous et pas à l'ax -$sql = "SELECT promo,nom,prenom FROM identification WHERE matricule_ax IS NULL"; +$sql = "SELECT promo,nom,prenom FROM auth_user_md5 WHERE matricule_ax IS NULL"; $page->mysql_assign($sql,'plus','nb_plus'); diff --git a/htdocs/admin/deces_promo.php b/htdocs/admin/deces_promo.php index 3e840dd..8cd49fc 100644 --- a/htdocs/admin/deces_promo.php +++ b/htdocs/admin/deces_promo.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: deces_promo.php,v 1.4 2004-08-31 10:03:29 x2000habouzit Exp $ + $Id: deces_promo.php,v 1.5 2004-10-31 16:39:04 x2000chevalier Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -33,13 +33,13 @@ if(isset($_REQUEST['add10'])) $promo += 10; $page->assign('promo',$promo); if (isset($_REQUEST["valider"]) && $_REQUEST["valider"] == "Valider") { - $res = $globals->db->query("SELECT matricule FROM identification WHERE promo = $promo"); + $res = $globals->db->query("SELECT matricule FROM auth_user_md5 WHERE promo = $promo"); while (list($mat) = mysql_fetch_row($res)) { - $globals->db->query("UPDATE identification SET deces='".$_REQUEST[$mat]."' WHERE matricule = '".$mat."'"); + $globals->db->query("UPDATE auth_user_md5 SET deces='".$_REQUEST[$mat]."' WHERE matricule = '".$mat."'"); } } -$sql = "SELECT matricule, nom, prenom, deces FROM identification WHERE promo = $promo ORDER BY nom,prenom"; +$sql = "SELECT matricule, nom, prenom, deces FROM auth_user_md5 WHERE promo = $promo ORDER BY nom,prenom"; $page->mysql_assign($sql, 'decedes'); $page->run(); diff --git a/htdocs/marketing/index.php b/htdocs/marketing/index.php index a4214b0..eb9818c 100644 --- a/htdocs/marketing/index.php +++ b/htdocs/marketing/index.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: index.php,v 1.2 2004-08-31 10:03:30 x2000habouzit Exp $ + $Id: index.php,v 1.3 2004-10-31 16:39:06 x2000chevalier Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -27,19 +27,18 @@ new_admin_page('marketing/index.tpl'); # Quelques statistiques $sql = "SELECT count(*) as vivants, - count(u.matricule) as inscrits, - 100*count(u.matricule)/count(*) as ins_rate, - count(NULLIF(i.promo >= 1972, 0)) as vivants72, - count(NULLIF(i.promo >= 1972 AND u.matricule, 0)) as inscrits72, - 100 * count(NULLIF(i.promo >= 1972 AND u.matricule, 0)) / - count(NULLIF(i.promo >= 1972, 0)) as ins72_rate, - count(NULLIF(FIND_IN_SET('femme', i.flags), 0)) as vivantes, - count(NULLIF(FIND_IN_SET('femme', i.flags) AND u.matricule, 0)) as inscrites, - 100 * count(NULLIF(FIND_IN_SET('femme', i.flags) AND u.matricule, 0)) / - count(NULLIF(FIND_IN_SET('femme', i.flags), 0)) as inse_rate - FROM identification as i - LEFT JOIN auth_user_md5 as u USING(matricule) - WHERE i.deces = 0"; + count(user!='non-inscrit') as inscrits, + 100*count(user!='non-inscrit')/count(*) as ins_rate, + count(NULLIF(promo >= 1972, 0)) as vivants72, + count(NULLIF(promo >= 1972 AND user!='non-inscrit', 0)) as inscrits72, + 100 * count(NULLIF(promo >= 1972 AND user!='non-inscrit', 0)) / + count(NULLIF(promo >= 1972, 0)) as ins72_rate, + count(NULLIF(FIND_IN_SET('femme', flags), 0)) as vivantes, + count(NULLIF(FIND_IN_SET('femme', flags) AND user!='non-inscrit', 0)) as inscrites, + 100 * count(NULLIF(FIND_IN_SET('femme', flags) AND user!='non-inscrit', 0)) / + count(NULLIF(FIND_IN_SET('femme', flags), 0)) as inse_rate + FROM auth_user_md5 + WHERE deces = 0"; $res = $globals->db->query($sql); $stats = mysql_fetch_assoc($res); diff --git a/htdocs/marketing/promo.php b/htdocs/marketing/promo.php index 4efe7db..a2d2ead 100644 --- a/htdocs/marketing/promo.php +++ b/htdocs/marketing/promo.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: promo.php,v 1.2 2004-08-31 10:03:30 x2000habouzit Exp $ + $Id: promo.php,v 1.3 2004-10-31 16:39:06 x2000chevalier Exp $ ***************************************************************************/ @@ -32,13 +32,12 @@ $page->assign('promob1', $promo-1); $page->assign('promoa1', $promo+1); $page->assign('promoa10', $promo+10); -$sql = "SELECT i.nom, i.prenom, i.last_known_email, i.matricule, i.matricule_ax, MAX(e.date_envoi) AS dern_rel, c.email - FROM identification AS i - LEFT JOIN auth_user_md5 AS a ON (i.matricule = a.matricule) - LEFT JOIN envoidirect AS e ON (i.matricule = e.matricule) - LEFT JOIN en_cours AS c ON (i.matricule = c.matricule) - WHERE a.nom is NULL AND i.promo = $promo AND i.deces = 0 - GROUP BY i.matricule +$sql = "SELECT nom, prenom, last_known_email, matricule, matricule_ax, MAX(e.date_envoi) AS dern_rel, c.email + FROM auth_user_md5 AS u + LEFT JOIN envoidirect AS e ON (u.matricule = e.matricule) + LEFT JOIN en_cours AS c ON (u.matricule = c.matricule) + WHERE a.nom is NULL AND u.promo = $promo AND u.deces = 0 AND u.perms='non-inscrit' + GROUP BY u.matricule ORDER BY nom,prenom"; $page->mysql_assign($sql, 'nonins', 'nbnonins'); diff --git a/htdocs/marketing/public.php b/htdocs/marketing/public.php index 0a21e14..781c3a7 100644 --- a/htdocs/marketing/public.php +++ b/htdocs/marketing/public.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: public.php,v 1.5 2004-10-20 14:09:15 x2000habouzit Exp $ + $Id: public.php,v 1.6 2004-10-31 16:39:06 x2000chevalier Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -28,7 +28,7 @@ if (! isset($_REQUEST["num"])) { exit; } $mat = $_REQUEST["num"]; -$res = $globals->db->query("SELECT nom,prenom,promo FROM identification WHERE matricule = '$mat'"); +$res = $globals->db->query("SELECT nom,prenom,promo FROM auth_user_md5 WHERE matricule = '$mat'"); if (list($nom, $prenom, $promo) = mysql_fetch_row($res)) { $page->assign('prenom', $prenom); $page->assign('nom', $nom); diff --git a/htdocs/marketing/utilisateurs_marketing.php b/htdocs/marketing/utilisateurs_marketing.php index c09fcb8..1827bc4 100644 --- a/htdocs/marketing/utilisateurs_marketing.php +++ b/htdocs/marketing/utilisateurs_marketing.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: utilisateurs_marketing.php,v 1.8 2004-09-30 15:55:11 x2000habouzit Exp $ + $Id: utilisateurs_marketing.php,v 1.9 2004-10-31 16:39:06 x2000chevalier Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -32,7 +32,7 @@ switch ($_REQUEST["submit"]) { if ($myrow = mysql_fetch_assoc($result)) exit_error("Le matricule existe déjà dans la table auth_user_md5."); - $result = $globals->db->query("SELECT * FROM identification WHERE matricule=".$_REQUEST["xmat"]); + $result = $globals->db->query("SELECT * FROM auth_user_md5 WHERE matricule=".$_REQUEST["xmat"]); $myrow = mysql_fetch_array($result); new_admin_page('marketing/utilisateurs_form.tpl'); @@ -57,10 +57,10 @@ switch ($_REQUEST["submit"]) { exit_error("L'email n'est pas valide."); $result=$globals->db->query("SELECT prenom,nom,promo,FIND_IN_SET('femme', flags) - FROM identification + FROM auth_user_md5 WHERE matricule=".$_REQUEST['xmat']); if (!list($prenom,$nom,$promo,$femme) = mysql_fetch_row($result)) - exit_error("Le matricule n'a pas été trouvé dans table identification."); + exit_error("Le matricule n'a pas été trouvé dans table auth_user_md5."); // calcul de l'envoyeur list($envoyeur) = explode('@', $_REQUEST["from"]); @@ -89,7 +89,7 @@ switch ($_REQUEST["submit"]) { // calcul du login $mailorg = make_forlife($prenom,$nom,$promo); - $globals->db->query("UPDATE identification + $globals->db->query("UPDATE auth_user_md5 SET last_known_email='{$_REQUEST['mail']}' WHERE matricule='{$_REQUEST['xmat']}'"); $requete="INSERT INTO envoidirect diff --git a/htdocs/marketing/volontaire.php b/htdocs/marketing/volontaire.php index 433dda7..202167d 100644 --- a/htdocs/marketing/volontaire.php +++ b/htdocs/marketing/volontaire.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: volontaire.php,v 1.4 2004-09-02 23:57:48 x2000bedo Exp $ + $Id: volontaire.php,v 1.5 2004-10-31 16:39:06 x2000chevalier Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -42,33 +42,33 @@ $sql = "SELECT m.id, m.expe, m.dest, m.email, i.promo, i.nom, i.prenom, i.last_known_email, u.promo AS spromo, u.nom AS snom, u.prenom AS sprenom, a.alias AS forlife, FIND_IN_SET('mail_perso', m.flags) AS mailperso - FROM marketing AS m - INNER JOIN identification AS i ON i.matricule = m.dest - INNER JOIN auth_user_md5 AS u ON u.user_id = m.expe - INNER JOIN aliases AS a ON (u.user_id = a.id AND a.type='a_vie') + FROM marketing AS m + INNER JOIN auth_user_md5 AS i ON i.matricule = m.dest + INNER JOIN auth_user_md5 AS u ON u.user_id = m.expe + INNER JOIN aliases AS a ON (u.user_id = a.id AND a.type='a_vie') WHERE NOT FIND_IN_SET('envoye', m.flags)"; $page->mysql_assign($sql, 'neuves'); $sql = "SELECT i.promo, i.nom, i.prenom, - m.email, a.nom AS inscrit, + m.email, perms!='non-inscrit' AS inscrit, sa.promo AS sprormo, sa.nom AS snom, sa.prenom AS sprenom - FROM marketing AS m - INNER JOIN identification AS i ON i.matricule = m.dest - INNER JOIN auth_user_md5 AS sa ON sa.user_id = m.expe - LEFT JOIN auth_user_md5 AS a ON a.matricule = m.dest + FROM marketing AS m + INNER JOIN auth_user_md5 AS i ON i.matricule = m.dest + INNER JOIN auth_user_md5 AS sa ON sa.user_id = m.expe + LEFT JOIN auth_user_md5 AS a ON a.matricule = m.dest WHERE FIND_IN_SET('envoye', m.flags)"; $page->mysql_assign($sql, 'used', 'nbused'); -$sql = "SELECT COUNT(a.nom) AS j, +$sql = "SELECT COUNT(a.perms != 'non-inscrit') AS j, COUNT(i.matricule) AS i, 100 * COUNT(a.nom) / COUNT(i.matricule) as rate - FROM marketing AS m - INNER JOIN identification AS i ON i.matricule = m.dest - INNER JOIN auth_user_md5 AS sa ON sa.user_id = m.expe - LEFT JOIN auth_user_md5 AS a ON a.matricule = m.dest + FROM marketing AS m + INNER JOIN auth_user_md5 AS i ON i.matricule = m.dest + INNER JOIN auth_user_md5 AS sa ON sa.user_id = m.expe + LEFT JOIN auth_user_md5 AS a ON a.matricule = m.dest WHERE FIND_IN_SET('envoye', m.flags)"; $res = $globals->db->query($sql); diff --git a/htdocs/paiement/cyberpaiement_retour.php b/htdocs/paiement/cyberpaiement_retour.php index 5c7af39..ab8d52e 100644 --- a/htdocs/paiement/cyberpaiement_retour.php +++ b/htdocs/paiement/cyberpaiement_retour.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: cyberpaiement_retour.php,v 1.7 2004-10-09 10:44:03 x2000habouzit Exp $ + $Id: cyberpaiement_retour.php,v 1.8 2004-10-31 16:39:08 x2000chevalier Exp $ ***************************************************************************/ require("config.xorg.inc.php") ; @@ -92,10 +92,9 @@ $montant = "$champ201 $champ202"; /* on extrait les informations sur l'utilisateur */ $res = $globals->db->query(" - SELECT a.prenom,a.nom,a.promo,l.alias,FIND_IN_SET(i.flags,'femme') - FROM auth_user_md5 AS a -INNER JOIN aliases AS l ON (a.user_id=l.id AND type!='homonyme') -INNER JOIN identification AS i ON a.matricule=i.matricule + SELECT a.prenom,a.nom,a.promo,l.alias,FIND_IN_SET(a.flags,'femme') + FROM auth_user_md5 AS a +INNER JOIN aliases AS l ON (a.user_id=l.id AND type!='homonyme') WHERE a.user_id='$uid'"); if (!list($prenom,$nom,$promo,$forlife,$femme) = mysql_fetch_row($res)) erreur("uid invalide");