; | admin/evenements.php |
;! | admin/pg.php |
------+-[ marketing ]-----------------------------+----------------
-; | admin/envoidirect.php |
; | admin/marketing_promo.php | marketing/
; | admin/marketing_volontaire.php | marketing/
; | admin/relance.php | marketing/
xx | acces_wap.php | -
xx | admin/ax-xorg.php | -
xx | admin/deces_promo.php | -
+xx | admin/envoidirect.php | marketing/envoidirect.php
xx | admin/FormatePrenomNOM2.php | scripts/
xx | admin/FormatePrenomNOM.php | scripts/
xx | admin/gerer_applis.php | -
--- /dev/null
+<?php
+require("auto.prepend.inc.php");
+new_admin_page('marketing/envoidirect.tpl');
+
+// effacement des inscrits il y a plus de 8 jours
+$globals->db->query("DELETE FROM envoidirect WHERE DATE_ADD(date_succes, INTERVAL 8 DAY) < CURRENT_DATE AND date_succes <> '0000-00-00'");
+$sql = "SELECT a.date_ins,e.date_envoi,e.promo,e.nom,e.prenom,e.email,b.nom as sender
+ FROM envoidirect AS e
+ INNER JOIN auth_user_md5 AS a ON e.matricule = a.matricule
+ LEFT JOIN auth_user_md5 AS b ON e.sender = b.user_id
+ ORDER BY e.date_envoi DESC";
+
+$page->mysql_assign($sql, 'recents', 'nbrecents');
+
+$sql = "SELECT e.date_envoi, e.promo, e.nom, e.prenom, e.email, b.nom as sender
+ FROM envoidirect AS e
+ LEFT JOIN auth_user_md5 AS a ON e.matricule = a.matricule
+ LEFT JOIN auth_user_md5 AS b ON e.sender = b.user_id
+ WHERE a.nom is null
+ ORDER BY e.date_envoi DESC";
+$page->mysql_assign($sql, 'notsub', 'nbnotsub');
+
+$page->run();
+
+?>
--- /dev/null
+{* $Id: envoidirect.tpl,v 1.1 2004-07-16 23:45:03 x2000habouzit Exp $ *}
+
+<div class="rubrique">
+ Liste des sollicités inscrits récemment
+</div>
+
+{dynamic}
+
+<table class="bicol" summary="liste des sollicités inscrits">
+ <tr>
+ <th>Date sollicitation</th>
+ <th>Promo</th>
+ <th>Nom</th>
+ <th>Email</th>
+ <th>Date inscription</th>
+ </tr>
+ {foreach from=$recents item=it}
+ <tr class="{cycle values="pair,impair"}">
+ <td class="center">{$it.date_envoi|date_format:"%e %b %Y"} (par {$it.sender|truncate:4:""})</td>
+ <td class="center">
+ <a href="marketing_promo.php?promo={$it.promo}">{$it.promo}</a>
+ </td>
+ <td>{$it.nom} {$it.prenom}</td>
+ <td>
+ <a href="mailto:{$it.email}">{$it.email}</a>
+ </td>
+ <td align="center">{$it.date_ins|date_format:"%e %b %Y"}</td>
+ </tr>
+ {/foreach}
+</table>
+<p>
+{$nbrecents} Polytechniciens ont été sollicités et se sont inscrits.
+</p>
+
+<div class="rubrique">
+ Liste des sollicités non inscrits
+</div>
+
+<table class="bicol" summary="liste des sollicités non inscrits">
+ <tr>
+ <th>Date sollicitation</th>
+ <th>Promo</th>
+ <th>Nom</th>
+ <th>Email</th>
+ </tr>
+ {foreach from=$notsub item=it}
+ <tr class="{cycle values="pair,impair"}">
+ <td class="center">{$it.date_envoi|date_format:"%e %b %Y"} (par {$it.sender|truncate:4:""})</td>
+ <td class="center">
+ <a href="marketing_promo.php?promo={$it.promo}">{$it.promo}</a>
+ </td>
+ <td>{$it.nom} {$it.prenom}</td>
+ <td>
+ <a href="mailto:{$it.email}">{$it.email}</a>
+ </td>
+ </tr>
+ {/foreach}
+</table>
+
+<p>
+{$nbnotsub} Polytechniciens ont été sollicités et ne se sont toujours pas inscrits.
+</p>
+
+{/dynamic}
+
+{* vim:set et sw=2 sts=2 sws=2: *}