non-inscrit --> pending
authorx2000habouzit <x2000habouzit>
Mon, 22 Nov 2004 17:28:14 +0000 (17:28 +0000)
committerx2000habouzit <x2000habouzit>
Mon, 22 Nov 2004 17:28:14 +0000 (17:28 +0000)
htdocs/carnet/mescontacts.php
htdocs/marketing/index.php
htdocs/marketing/promo.php
htdocs/marketing/public.php
htdocs/marketing/relance.php
htdocs/marketing/utilisateurs_marketing.php
htdocs/marketing/volontaire.php
include/search.classes.inc.php
templates/admin/utilisateurs.tpl
upgrade/0.9.3/30_auth_user_md5.sql

index 9cf1ef0..fea77d1 100644 (file)
@@ -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,
index 065efd2..357766f 100644 (file)
@@ -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";
index 829db62..7e1619e 100644 (file)
@@ -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";
 
index 77a8e3a..073541e 100644 (file)
@@ -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);
index 8c37a8a..a1bac16 100644 (file)
@@ -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');
index ec705d8..1282b82 100644 (file)
@@ -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&eacute;j&agrave; 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&eacute;j&agrave; dans la table auth_user_md5.");
                        
index a745014..6687412 100644 (file)
@@ -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);
 
index 15b84dc..5b03811 100644 (file)
@@ -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,
index 481c318..9549ea3 100644 (file)
@@ -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) {
         <select name="permsN">
           <option value="user" {if $mr.perms eq "user"}selected="selected"{/if}>user</option>
           <option value="admin" {if $mr.perms eq "admin"}selected="selected"{/if}>admin</option>
-          <option value="non-inscrit" {if $mr.perms eq "non-inscrit"}selected="selected"{/if}>non-inscrit</option>
+          <option value="pending" {if $mr.perms eq "pending"}selected="selected"{/if}>pending</option>
           <option value="disabled" {if $mr.perms eq "disabled"}selected="selected"{/if}>disabled</option>
         </select>
       </td>
index 77472da..75250df 100644 (file)
@@ -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;