X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fcron%2Frapports_inscription.php;h=b7e916787f3c067fb1cbb361c9ebafb8c09f882c;hb=4478f95efc07709dbe0a4415e979ff0347651cf8;hp=c9d09fdba732a01eba8d2783db30eba6956ceeab;hpb=08cce2ff528b38bde27cdec6d6bc28d6af4a42d4;p=platal.git diff --git a/bin/cron/rapports_inscription.php b/bin/cron/rapports_inscription.php index c9d09fd..b7e9167 100755 --- a/bin/cron/rapports_inscription.php +++ b/bin/cron/rapports_inscription.php @@ -1,6 +1,6 @@ -#!/usr/bin/php4 -q +#!/usr/bin/php5 -q total()) { // --------------------------------------- $res = XDB::iterRow( - "SELECT forlife, email, date - FROM register_pending - WHERE hash != 'INSCRIT' - ORDER BY date"); + "SELECT u.hruid, r.email, r.date + FROM register_pending AS r + LEFT JOIN auth_user_md5 AS u ON (u.user_id = r.uid) + WHERE r.hash != 'INSCRIT' + ORDER BY r.date"); if ($b = $res->total()) { $MESSAGE.="\n$b INSCRIPTIONS NON CONFIRMEES:\n"; while (list($usern, $mail, $quand) = $res->next()) { @@ -38,19 +39,18 @@ if ($b = $res->total()) { $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"; +$MESSAGE .= "\nINSCRIPTIONS SOLICITÉES :\n"; +$MESSAGE .= " $a utilisateurs\n $b adresses email\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'); +$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: ?>