4 require 'connect.db.inc.php';
8 $res = XDB
::iterRow("SELECT a.hruid, pd.promo, e.email
10 INNER JOIN account_profiles AS ap ON (ap.uid = a.uid AND FIND_IN_SET('owner', ap.perms))
11 INNER JOIN profile_display AS pd ON (ap.pid = pd.pid)
12 LEFT JOIN emails AS e ON (a.uid = e.uid AND NOT FIND_IN_SET('filter', e.flags))
13 WHERE a.registration_date > {?}
16 date("Ymd000000", strtotime('last Monday')));
17 if ($count = $res->total()) {
18 $message .= "$count INSCRIPTIONS CONFIRMÉES :\n";
19 while (list($forlife, $promo, $email) = $res->next()) {
20 $message .= "$promo, $forlife, $email\n";
24 $res = XDB
::iterRow("SELECT a.hruid, r.email, r.date
25 FROM register_pending AS r
26 INNER JOIN accounts AS a ON (a.uid = r.uid)
27 WHERE r.hash != 'INSCRIT'
29 if ($count = $res->total()) {
30 $message .= "\n$count INSCRIPTIONS NON CONFIRMÉES :\n";
31 while (list($forlife, $email, $date) = $res->next()) {
32 $message .= "$date, $forlife,\n $email\n";
36 $res = XDB
::query('SELECT COUNT(DISTINCT uid), COUNT(*)
37 FROM register_marketing');
38 list($a, $b) = $res->fetchOneRow();
39 $message .= "\nINSCRIPTIONS SOLICITÉES :\n";
40 $message .= " $a utilisateurs\n $b adresses email\n";
44 $mailer = new PlMailer();
45 $mailer->setSubject('Rapport des inscriptions de la semaine');
46 $mailer->setFrom($globals->register
->notif
);
47 $mailer->addTo($globals->register
->notif
);
48 $mailer->setTxtBody($message);
51 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: