From 19dda37b31c8f44183b8bf1c187fa3ce6f76f756 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Mon, 22 Nov 2004 17:28:14 +0000 Subject: [PATCH] non-inscrit --> pending --- htdocs/carnet/mescontacts.php | 4 ++-- htdocs/marketing/index.php | 14 +++++++------- htdocs/marketing/promo.php | 4 ++-- htdocs/marketing/public.php | 4 ++-- htdocs/marketing/relance.php | 6 +++--- htdocs/marketing/utilisateurs_marketing.php | 6 +++--- htdocs/marketing/volontaire.php | 8 ++++---- include/search.classes.inc.php | 4 ++-- templates/admin/utilisateurs.tpl | 4 ++-- upgrade/0.9.3/30_auth_user_md5.sql | 4 +++- 10 files changed, 30 insertions(+), 28 deletions(-) diff --git a/htdocs/carnet/mescontacts.php b/htdocs/carnet/mescontacts.php index 9cf1ef0..fea77d1 100644 --- a/htdocs/carnet/mescontacts.php +++ b/htdocs/carnet/mescontacts.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: mescontacts.php,v 1.4 2004-11-22 11:15:31 x2000habouzit Exp $ + $Id: mescontacts.php,v 1.5 2004-11-22 17:28:14 x2000habouzit Exp $ ***************************************************************************/ require("xorg.inc.php"); @@ -87,7 +87,7 @@ if(isset($_GET['trombi'])) { $sql = "SELECT contact AS id, a.*, l.alias AS forlife, 1 AS inscrit, - a.perms != 'non-inscrit' AS wasinscrit, + a.perms != 'pending' AS wasinscrit, a.deces != 0 AS dcd, a.deces, a.matricule_ax, FIND_IN_SET('femme', a.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, diff --git a/htdocs/marketing/index.php b/htdocs/marketing/index.php index 065efd2..357766f 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.6 2004-11-22 11:15:45 x2000habouzit Exp $ + $Id: index.php,v 1.7 2004-11-22 17:28:14 x2000habouzit Exp $ ***************************************************************************/ require("xorg.inc.php"); @@ -27,15 +27,15 @@ new_admin_page('marketing/index.tpl'); # Quelques statistiques $sql = "SELECT count(*) as vivants, - count(NULLIF(perms!='non-inscrit', 0)) as inscrits, - 100*count(NULLIF(perms!='non-inscrit', 0))/count(*) as ins_rate, + count(NULLIF(perms!='pending', 0)) as inscrits, + 100*count(NULLIF(perms!='pending', 0))/count(*) as ins_rate, count(NULLIF(promo >= 1972, 0)) as vivants72, - count(NULLIF(promo >= 1972 AND perms!='non-inscrit', 0)) as inscrits72, - 100 * count(NULLIF(promo >= 1972 AND perms!='non-inscrit', 0)) / + count(NULLIF(promo >= 1972 AND perms!='pending', 0)) as inscrits72, + 100 * count(NULLIF(promo >= 1972 AND perms!='pending', 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 perms!='non-inscrit', 0)) as inscrites, - 100 * count(NULLIF(FIND_IN_SET('femme', flags) AND perms!='non-inscrit', 0)) / + count(NULLIF(FIND_IN_SET('femme', flags) AND perms!='pending', 0)) as inscrites, + 100 * count(NULLIF(FIND_IN_SET('femme', flags) AND perms!='pending', 0)) / count(NULLIF(FIND_IN_SET('femme', flags), 0)) as inse_rate FROM auth_user_md5 WHERE deces = 0"; diff --git a/htdocs/marketing/promo.php b/htdocs/marketing/promo.php index 829db62..7e1619e 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.5 2004-11-22 11:15:45 x2000habouzit Exp $ + $Id: promo.php,v 1.6 2004-11-22 17:28:14 x2000habouzit Exp $ ***************************************************************************/ @@ -36,7 +36,7 @@ $sql = "SELECT u.nom, u.prenom, last_known_email, u.matricule, u.matricule_ax, 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 u.promo = $promo AND u.deces = 0 AND u.perms='non-inscrit' + WHERE u.promo = $promo AND u.deces = 0 AND u.perms='pending' GROUP BY u.matricule ORDER BY nom,prenom"; diff --git a/htdocs/marketing/public.php b/htdocs/marketing/public.php index 77a8e3a..073541e 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.8 2004-11-22 11:15:45 x2000habouzit Exp $ + $Id: public.php,v 1.9 2004-11-22 17:28:14 x2000habouzit Exp $ ***************************************************************************/ require("xorg.inc.php"); @@ -28,7 +28,7 @@ if (! isset($_REQUEST["num"])) { exit; } $mat = $_REQUEST["num"]; -$res = $globals->db->query("SELECT nom,prenom,promo FROM auth_user_md5 WHERE matricule = '$mat' AND perms='non-inscrit'"); +$res = $globals->db->query("SELECT nom,prenom,promo FROM auth_user_md5 WHERE matricule = '$mat' AND perms='pending'"); if (list($nom, $prenom, $promo) = mysql_fetch_row($res)) { $page->assign('prenom', $prenom); $page->assign('nom', $nom); diff --git a/htdocs/marketing/relance.php b/htdocs/marketing/relance.php index 8c37a8a..a1bac16 100644 --- a/htdocs/marketing/relance.php +++ b/htdocs/marketing/relance.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: relance.php,v 1.7 2004-11-22 11:15:45 x2000habouzit Exp $ + $Id: relance.php,v 1.8 2004-11-22 17:28:14 x2000habouzit Exp $ ***************************************************************************/ require("xorg.inc.php"); @@ -36,7 +36,7 @@ if (isset($_POST["relancer"]) && isset($_POST["relancer"]) != "") { $res = $globals->db->query("SELECT e.date,e.promo,e.nom,e.prenom,e.matricule,e.email,e.username FROM en_cours AS e - INNER JOIN auth_user_md5 AS a ON (e.matricule=a.matricule AND a.perms = 'non-inscrit')"); + INNER JOIN auth_user_md5 AS a ON (e.matricule=a.matricule AND a.perms = 'pending')"); $sent = Array(); @@ -75,7 +75,7 @@ if (isset($_POST["relancer"]) && isset($_POST["relancer"]) != "") { $sql = "SELECT e.date,e.relance,e.promo,e.nom,e.prenom,e.matricule FROM en_cours AS e - INNER JOIN auth_user_md5 AS a ON (e.matricule=a.matricule AND a.perms = 'non-inscrit') + INNER JOIN auth_user_md5 AS a ON (e.matricule=a.matricule AND a.perms = 'pending') ORDER BY date DESC"; $page ->mysql_assign($sql, 'relance','nb'); diff --git a/htdocs/marketing/utilisateurs_marketing.php b/htdocs/marketing/utilisateurs_marketing.php index ec705d8..1282b82 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.13 2004-11-22 11:15:45 x2000habouzit Exp $ + $Id: utilisateurs_marketing.php,v 1.14 2004-11-22 17:28:14 x2000habouzit Exp $ ***************************************************************************/ require("xorg.inc.php"); @@ -28,7 +28,7 @@ require("select_user.inc.php"); //actions possible une fois un X désigné par son matricule switch ($_REQUEST["submit"]) { case "Mailer": - $result=$globals->db->query("SELECT user_id FROM auth_user_md5 where matricule={$_REQUEST['xmat']} AND perms!='non-inscrit'"); + $result=$globals->db->query("SELECT user_id FROM auth_user_md5 where matricule={$_REQUEST['xmat']} AND perms!='pending'"); if ($myrow = mysql_fetch_assoc($result)) exit_error("Le matricule existe déjà dans la table auth_user_md5."); @@ -49,7 +49,7 @@ switch ($_REQUEST["submit"]) { case "Envoyer le mail": require('xorg.misc.inc.php'); - $result=$globals->db->query("SELECT user_id FROM auth_user_md5 where matricule={$_REQUEST['xmat']} AND perms!='non-inscrit'"); + $result=$globals->db->query("SELECT user_id FROM auth_user_md5 where matricule={$_REQUEST['xmat']} AND perms!='pending'"); if ($myrow = mysql_fetch_assoc($result)) exit_error("Le matricule existe déjà dans la table auth_user_md5."); diff --git a/htdocs/marketing/volontaire.php b/htdocs/marketing/volontaire.php index a745014..6687412 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.8 2004-11-22 15:51:12 x2000habouzit Exp $ + $Id: volontaire.php,v 1.9 2004-11-22 17:28:14 x2000habouzit Exp $ ***************************************************************************/ require("xorg.inc.php"); @@ -52,7 +52,7 @@ $page->mysql_assign($sql, 'neuves'); $sql = "SELECT a.promo, a.nom, a.prenom, - m.email, a.perms!='non-inscrit' AS inscrit, + m.email, a.perms!='pending' AS inscrit, sa.promo AS spromo, sa.nom AS snom, sa.prenom AS sprenom FROM marketing AS m INNER JOIN auth_user_md5 AS a ON a.matricule = m.dest @@ -61,13 +61,13 @@ $sql = "SELECT a.promo, a.nom, a.prenom, $page->mysql_assign($sql, 'used', 'nbused'); -$sql = "SELECT COUNT(a.perms != 'non-inscrit') AS j, +$sql = "SELECT COUNT(a.perms != 'pending') AS j, COUNT(i.matricule) AS i, 100 * COUNT(a.nom) / COUNT(i.matricule) as rate 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 AND a.perms!='non-inscrit') + LEFT JOIN auth_user_md5 AS a ON (a.matricule = m.dest AND a.perms!='pending') WHERE FIND_IN_SET('envoye', m.flags)"; $res = $globals->db->query($sql); diff --git a/include/search.classes.inc.php b/include/search.classes.inc.php index 15b84dc..5b03811 100644 --- a/include/search.classes.inc.php +++ b/include/search.classes.inc.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: search.classes.inc.php,v 1.36 2004-11-18 15:17:41 x2000habouzit Exp $ + $Id: search.classes.inc.php,v 1.37 2004-11-22 17:28:14 x2000habouzit Exp $ ***************************************************************************/ require_once("xorg.misc.inc.php"); @@ -31,7 +31,7 @@ $globals->search_result_fields = ' u.epouse,u.date,u.web,u.mobile, u.deces!=0 AS dcd,u.deces, u.perms IN (\'admin\',\'user\') AS inscrit, - u.perms != \'non-inscrit\' AS wasinscrit, + u.perms != \'pending\' AS wasinscrit, FIND_IN_SET(\'femme\', u.flags) AS sexe, ad0.text AS app0text, ad0.url AS app0url, ai0.type AS app0type, ad1.text AS app1text, ad1.url AS app1url, ai1.type AS app1type, diff --git a/templates/admin/utilisateurs.tpl b/templates/admin/utilisateurs.tpl index 481c318..9549ea3 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.23 2004-11-18 17:39:11 x2000habouzit Exp $ + $Id: utilisateurs.tpl,v 1.24 2004-11-22 17:28:15 x2000habouzit Exp $ ***************************************************************************} @@ -144,7 +144,7 @@ function del_fwd(fwd) { diff --git a/upgrade/0.9.3/30_auth_user_md5.sql b/upgrade/0.9.3/30_auth_user_md5.sql index 77472da..75250df 100644 --- a/upgrade/0.9.3/30_auth_user_md5.sql +++ b/upgrade/0.9.3/30_auth_user_md5.sql @@ -1,2 +1,4 @@ -alter table auth_user_md5 change column perms perms enum('user','admin','non-inscrit','disabled'); +alter table auth_user_md5 change column perms perms enum('user','admin','non-inscrit','pending','disabled'); +update auth_user_md5 set perms='pending' where perms='non-inscrit'; +alter table auth_user_md5 change column perms perms enum('user','admin','pending','disabled'); alter table auth_user_md5 change column comment comment varchar(64) not null; -- 2.1.4