Backport
[platal.git] / bin / cron / rapports_inscription.php
index c60780c..c9d09fd 100755 (executable)
@@ -5,7 +5,7 @@ $MESSAGE = '';
 
 // ---------------------------------------
 
-$res = $globals->xdb->iterRow(
+$res = XDB::iterRow(
         "SELECT  a.alias, u.promo, email
            FROM  auth_user_md5  AS u
       LEFT JOIN  aliases        AS a ON( u.user_id=a.id AND a.type='a_vie' )
@@ -22,23 +22,21 @@ if ($a = $res->total()) {
 
 // ---------------------------------------
 
-$res = $globals->xdb->iterRow(
-        "SELECT  hash, forlife, email, date
+$res = XDB::iterRow(
+        "SELECT  forlife, email, date
            FROM  register_pending
           WHERE  hash != 'INSCRIT'
        ORDER BY  date");
 if ($b = $res->total()) {
     $MESSAGE.="\n$b INSCRIPTIONS NON CONFIRMEES:\n";
-    while (list($code, $usern, $mail, $quand) = $res->next()) {        
-       $MESSAGE.="$quand, $usern,\n            $mail";
-       $MESSAGE.="\n";
-       $MESSAGE.="https://www.polytechnique.org/register/end.php?hash=$code\n";
+    while (list($usern, $mail, $quand) = $res->next()) {       
+       $MESSAGE.="$quand, $usern,\n            $mail\n";
     }
 }
 
 // ---------------------------------------
 
-$res = $globals->xdb->query('SELECT COUNT(DISTINCT uid), COUNT(*) FROM register_marketing');
+$res = XDB::query('SELECT COUNT(DISTINCT uid), COUNT(*) FROM register_marketing');
 list($a, $b) = $res->fetchOneRow();
 $MESSAGE .= "\n$c INSCRIPTIONS SOLICITÉES :\n";
 $MESSAGE .= "    $a utilisateurs\n    $b adresses mails\n";