X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fcron%2Frapports_inscription.php;h=b7892cd2c5eebcab85b1ffcd7a5ad284a73cd17b;hb=61e0e8619a9e391d9536d1af3c8cd441491bbc99;hp=c60780ce48dcdd8e14d13ad4a8efca997128417e;hpb=0337d704b62718d7c77106c0e4c4e26fb02beacf;p=platal.git diff --git a/bin/cron/rapports_inscription.php b/bin/cron/rapports_inscription.php index c60780c..b7892cd 100755 --- a/bin/cron/rapports_inscription.php +++ b/bin/cron/rapports_inscription.php @@ -1,11 +1,11 @@ -#!/usr/bin/php4 -q +#!/usr/bin/php5 -q 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,37 +22,35 @@ 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 .= "\n$c INSCRIPTIONS SOLICITÉES :\n"; $MESSAGE .= " $a utilisateurs\n $b adresses mails\n"; // --------------------------------------- $MESSAGE .= "\n\n"; -require_once('diogenes/diogenes.hermes.inc.php'); -$mailer = new HermesMailer(); -$mailer->setSubject("$a confirmées, $b en attente et $c sollicitées"); -$mailer->setFrom('register@polytechnique.org'); -$mailer->addTo('register@polytechnique.org'); -$mailer->addCc('jean-michel.yolin+register@polytechnique.org'); +require_once('../../classes/plmailer.php'); +$mailer = new PlMailer(); +$mailer->setSubject("$a confirmées, $b en attente et $c sollicitées"); +$mailer->setFrom($globals->register->notif); +$mailer->addTo($globals->register->notif); $mailer->setTxtBody($MESSAGE); $mailer->send(); +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>