#!/usr/bin/php5 -q
<?php
-require('./connect.db.inc.php');
+require('connect.db.inc.php');
$MESSAGE = '';
// ---------------------------------------
// ---------------------------------------
$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()) {
$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('../../classes/plmailer.php');
$mailer = new PlMailer();
$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->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: