one more page
authorx2000habouzit <x2000habouzit>
Sat, 17 Jul 2004 10:14:55 +0000 (10:14 +0000)
committerx2000habouzit <x2000habouzit>
Sat, 17 Jul 2004 10:14:55 +0000 (10:14 +0000)
+--------+--------+--------+--------+
|  todo  |  post  |  done  |  tot.  |
+--------+--------+--------+--------+
|    34  |    31  |   109  |   174  |
|   19%  |   18%  |   63%  |  100%  |
+--------+--------+--------+--------+

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

index 8370747..45531f0 100644 (file)
@@ -22,7 +22,6 @@ Etat  | Ancien nom                                                              | Nouveau nom
 ;        | admin/evenements.php                                          | 
 ;!       | admin/pg.php                                                          | 
 ------+-[ marketing ]-----------------------------+----------------
-;        | admin/marketing_promo.php                             | marketing/
 ;        | admin/marketing_volontaire.php                        | marketing/
 ;        | admin/relance.php                                             | marketing/ 
 ;        | admin/utilisateurs_identification.php         | marketing/
@@ -120,6 +119,7 @@ xx    | admin/ins_confirmees.php                              | -
 xx       | admin/logger_actions.php                              | -
 xx       | admin/logger.php                                              | -
 xx       | admin/marketing.php                                           | marketing/index.php
+xx       | admin/marketing_promo.php                             | marketing/promo.php
 xx       | admin/newsletter_archi.php                            | -
 xx       | admin/newsletter_pattecassee.php              | -
 xx       | admin/newsletter_prep.php                             | -
diff --git a/htdocs/marketing/promo.php b/htdocs/marketing/promo.php
new file mode 100644 (file)
index 0000000..b2e8148
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+
+require("auto.prepend.inc.php");
+new_admin_page('marketing/promo.tpl');
+
+$promo = (integer) (isset($_REQUEST["promo"]) ? $_REQUEST["promo"] : $_SESSION["promo"]);
+$page->assign('promo', $promo);
+$page->assign('promob10', $promo-10);
+$page->assign('promob1', $promo-1);
+$page->assign('promoa1', $promo+1);
+$page->assign('promoa10', $promo+10);
+
+$sql = "SELECT  i.nom, i.prenom, i.last_known_email, i.matricule, i.matricule_ax, MAX(e.date_envoi) AS dern_rel, c.email
+          FROM  identification AS i
+     LEFT JOIN  auth_user_md5  AS a ON (i.matricule = a.matricule)
+     LEFT JOIN  envoidirect    AS e ON (i.matricule = e.matricule)
+     LEFT JOIN  en_cours       AS c ON (i.matricule = c.matricule)
+         WHERE  a.nom is NULL AND i.promo = $promo AND i.deces = 0
+      GROUP BY  i.matricule
+      ORDER BY  nom,prenom";
+
+$page->mysql_assign($sql, 'nonins', 'nbnonins');
+
+$page->run();
+
+?>
index cf2eeec..7423044 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: index.tpl,v 1.1 2004-07-16 20:22:03 x2000habouzit Exp $ *}
+{* $Id: index.tpl,v 1.2 2004-07-17 10:14:56 x2000habouzit Exp $ *}
 
 
 <div class="rubrique">Marketing Polytechnique.org</div>
@@ -11,7 +11,7 @@
     <td>
       <span class="item">Premier contact : </span>
       <a href="utilisateurs_marketing.php">Chercher un non inscrit</a> &nbsp;&nbsp;|&nbsp;&nbsp;
-      <a href="marketing_promo.php">Marketing promo</a> &nbsp;&nbsp;|&nbsp;&nbsp;
+      <a href="promo.php">Marketing promo</a> &nbsp;&nbsp;|&nbsp;&nbsp;
       <a href="envoidirect.php">Sollicitations faites</a>
     </td>
   </tr>
diff --git a/templates/marketing/promo.tpl b/templates/marketing/promo.tpl
new file mode 100644 (file)
index 0000000..acb2bb1
--- /dev/null
@@ -0,0 +1,78 @@
+{* $Id: promo.tpl,v 1.1 2004-07-17 10:14:56 x2000habouzit Exp $ *}
+
+{dynamic}
+
+<table style="margin-left: auto; margin-right: auto">
+  <tr>
+    <td>
+      <form action="{$smarty.server.PHP_SELF}" method="post">
+        <input type="hidden" name="promo" value="{$promob10}"><input type="submit" value="<<">
+      </form>
+    </td>
+    <td>
+      <form action="{$smarty.server.PHP_SELF}" method="post">
+        <input type="hidden" name="promo" value="{$promob1}"><input type="submit" value="<">
+      </form>
+    </td>
+    <td>
+      <form action="{$smarty.server.PHP_SELF}" method="post">
+        Promotion : <input type="text" name="promo" value="{$promo}" size=4 maxlength=4><input type="submit" value="GO">
+      </form>
+    </td>
+    <td>
+      <form action="{$smarty.server.PHP_SELF}" method="post"><input type="hidden"
+        name="promo" value="{$promoa1}"><input type="submit" value=">"></form> </td>
+    <td>
+      <form action="{$smarty.server.PHP_SELF}" method="post">
+        <input type="hidden" name="promo" value="{$promoa10}">
+        <input type="submit" value=">>">
+      </form> 
+    </td>
+  </tr>
+</table>
+
+<br />
+
+<div align="center">
+  <a href="javascript:void(window.open('{"stats/stats_promo.php"|url}?promo={$promo}','','width=800,height=600,toolbar=no'))">
+    Voir l'évolution des inscriptions de la promotion
+  </a>
+</div>
+
+<form action="{$smarty.server.PHP_SELF}" method="post">
+  <table class="bicol" summary="liste des inscriptions non confirmées">
+    <tr>
+      <th>Nom</th>
+      <th>Dernière adresse connue</th>
+      <th>Date dernière relance<br />(si moins d'un an)</th>
+      <th>&nbsp;</th>
+    </tr>
+    {foreach from=$nonins item=it}
+    <tr class="{cycle values="pair,impair"}">
+      <td>{$it.nom} {$it.prenom}</td>
+      <td class="center">{if $it.last_known_email}{mailto address=$it.last_known_email}{/if}</td>
+      <td class="center">
+        {if $it.dern_rel}
+        {$it.dern_rel}
+        {elseif $it.email}
+        Ins en cours depuis {$it.email}
+        {else}
+        Jamais ou + d'1 an
+        {/if}
+      </td>
+      <td class="center">
+        <a href="http://www.polytechniciens.com/index.php?page=AX_FICHE_ANCIEN&amp;anc_id={$it.matricule_ax}">Fiche AX</a>/
+        <a href="utilisateurs_marketing.php?xmat={$it.matricule}">Marketing</a>
+      </td>
+    </tr>
+    {/foreach}
+  </table>
+</form>
+
+<p>
+{$nbnonins} Polytechniciens de la promo {$promo} ne sont pas inscrits !
+</p>
+
+{/dynamic}
+
+{* vim:set et sw=2 sts=2 sws=2: *}