one more page
authorx2000habouzit <x2000habouzit>
Fri, 16 Jul 2004 23:45:02 +0000 (23:45 +0000)
committerx2000habouzit <x2000habouzit>
Fri, 16 Jul 2004 23:45:02 +0000 (23:45 +0000)
+--------+--------+--------+--------+
|  todo  |  post  |  done  |  tot.  |
+--------+--------+--------+--------+
|    35  |    31  |   108  |   174  |
|   20%  |   18%  |   62%  |  100%  |
+--------+--------+--------+--------+

PS: don't understand why, but jam seems to be fast as hell tonight ?!

etat_migration
htdocs/marketing/envoidirect.php [new file with mode: 0644]
templates/marketing/envoidirect.tpl [new file with mode: 0644]

index 178ca9f..8370747 100644 (file)
@@ -22,7 +22,6 @@ Etat  | Ancien nom                                                              | Nouveau nom
 ;        | admin/evenements.php                                          | 
 ;!       | admin/pg.php                                                          | 
 ------+-[ marketing ]-----------------------------+----------------
-;        | admin/envoidirect.php                                         | 
 ;        | admin/marketing_promo.php                             | marketing/
 ;        | admin/marketing_volontaire.php                        | marketing/
 ;        | admin/relance.php                                             | marketing/ 
@@ -103,6 +102,7 @@ xx    | acces_smtp.php                                                        | -
 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                                        | -
diff --git a/htdocs/marketing/envoidirect.php b/htdocs/marketing/envoidirect.php
new file mode 100644 (file)
index 0000000..db265bd
--- /dev/null
@@ -0,0 +1,25 @@
+<?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();
+
+?>
diff --git a/templates/marketing/envoidirect.tpl b/templates/marketing/envoidirect.tpl
new file mode 100644 (file)
index 0000000..1a835e2
--- /dev/null
@@ -0,0 +1,66 @@
+{* $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: *}