unepage de marketing en plus
authorx2000habouzit <x2000habouzit>
Fri, 16 Jul 2004 20:22:02 +0000 (20:22 +0000)
committerx2000habouzit <x2000habouzit>
Fri, 16 Jul 2004 20:22:02 +0000 (20:22 +0000)
+--------+--------+--------+--------+
|  todo  |  post  |  done  |  tot.  |
+--------+--------+--------+--------+
|    36  |    31  |   107  |   174  |
|   20%  |   18%  |   61%  |  100%  |
+--------+--------+--------+--------+

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

index 6a37f98..178ca9f 100644 (file)
@@ -22,7 +22,6 @@ Etat  | Ancien nom                                                              | Nouveau nom
 ;        | admin/evenements.php                                          | 
 ;!       | admin/pg.php                                                          | 
 ------+-[ marketing ]-----------------------------+----------------
-;        | admin/marketing.php                                           | marketing/
 ;        | admin/envoidirect.php                                         | 
 ;        | admin/marketing_promo.php                             | marketing/
 ;        | admin/marketing_volontaire.php                        | marketing/
@@ -120,6 +119,7 @@ xx    | admin/index.php                                                       | -
 xx       | admin/ins_confirmees.php                              | -
 xx       | admin/logger_actions.php                              | -
 xx       | admin/logger.php                                              | -
+xx       | admin/marketing.php                                           | marketing/index.php
 xx       | admin/newsletter_archi.php                            | -
 xx       | admin/newsletter_pattecassee.php              | -
 xx       | admin/newsletter_prep.php                             | -
diff --git a/htdocs/marketing/index.php b/htdocs/marketing/index.php
new file mode 100644 (file)
index 0000000..30313f8
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+require("auto.prepend.inc.php");
+new_admin_page('marketing/index.tpl');
+
+# Quelques statistiques
+
+$sql = "SELECT count(*) as vivants,
+              count(u.matricule) as inscrits,
+              100*count(u.matricule)/count(*) as ins_rate,
+              count(NULLIF(i.promo >= 1972, 0)) as vivants72,
+              count(NULLIF(i.promo >= 1972 AND u.matricule, 0)) as inscrits72,
+              100 * count(NULLIF(i.promo >= 1972 AND u.matricule, 0)) /
+                   count(NULLIF(i.promo >= 1972, 0)) as ins72_rate,
+              count(NULLIF(FIND_IN_SET('femme', i.flags), 0)) as vivantes,
+              count(NULLIF(FIND_IN_SET('femme', i.flags) AND u.matricule, 0)) as inscrites,
+              100 * count(NULLIF(FIND_IN_SET('femme', i.flags) AND u.matricule, 0)) /
+                  count(NULLIF(FIND_IN_SET('femme', i.flags), 0)) as inse_rate
+          FROM identification as i
+     LEFT JOIN auth_user_md5 as u USING(matricule)
+         WHERE i.deces = 0";
+$res = $globals->db->query($sql);
+$stats = mysql_fetch_assoc($res);
+
+$page->assign('stats', $stats);
+mysql_free_result($res);
+
+$res = $globals->db->query("SELECT count(*) FROM ins_confirmees");
+list($nbInsSem) = mysql_fetch_row($res);
+mysql_free_result($res);
+
+$page->assign('nbInsSem', $nbInsSem);
+
+$res = $globals->db->query("SELECT count(*) FROM en_cours WHERE loginbis != 'INSCRIT'");
+list($nbInsEnCours) = mysql_fetch_row($res);
+mysql_free_result($res);
+$page->assign('nbInsEnCours', $nbInsEnCours);
+
+$res = $globals->db->query("SELECT count(*) FROM envoidirect as e left join auth_user_md5 as a ON e.matricule = a.matricule WHERE a.nom is null");
+list($nbInsEnvDir) = mysql_fetch_row($res);
+mysql_free_result($res);
+$page->assign('nbInsEnvDir', $nbInsEnvDir);
+
+$page->run();
+?>
index d98c54b..7e7c976 100644 (file)
@@ -2,7 +2,7 @@
 require("auto.prepend.inc.php");
 new_skinned_page('marketing/public.php', AUTH_MDP);
 
-if (! isset($_REQUEST["num"])) { require("footer.inc.php"); exit; }
+if (! isset($_REQUEST["num"])) { exit; }
 
 $mat = (((integer) $_REQUEST["num"]) + 100) / 2;
 
diff --git a/templates/marketing/index.tpl b/templates/marketing/index.tpl
new file mode 100644 (file)
index 0000000..cf2eeec
--- /dev/null
@@ -0,0 +1,63 @@
+{* $Id: index.tpl,v 1.1 2004-07-16 20:22:03 x2000habouzit Exp $ *}
+
+
+<div class="rubrique">Marketing Polytechnique.org</div>
+
+<table class="bicol" cellpadding="3" summary="Système">
+  <tr>
+    <th>actions disponibles</th>
+  </tr>
+  <tr class="impair">
+    <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="envoidirect.php">Sollicitations faites</a>
+    </td>
+  </tr>
+  <tr class="pair">
+    <td>
+      <span class="item">Relances : </span>
+      <a href="ins_confirmees.php">Inscriptions confirmées</a>
+      &nbsp;&nbsp;|&nbsp;&nbsp;
+      <a href="relance.php">Relance des ½-inscrits</a>
+    </td>
+  </tr>
+  <tr class="impair">
+    <td>
+      <span class="item">Emails : </span>
+      <a href="marketing_volontaire.php">Utiliser les adresses données par les inscrits</a>
+    </td>
+  </tr>
+</table>
+
+<br />
+
+{dynamic}
+<p class="normal">
+Nombre d'X vivants d'après notre base de données : {$stats.vivants}<br />
+Nombre d'X vivants inscrits à Polytechnique.org : {$stats.inscrits}<br />
+Soit un pourcentage d'inscrits de : {$stats.ins_rate} %<br />
+</p>
+
+<p class="normal">
+Parmi ceux-ci :<br />
+Nombre d'X vivants depuis 1972 d'après notre base de données : {$stats.vivants72}<br />
+Nombre d'X vivants depuis 1972 inscrits à Polytechnique.org : {$stats.inscrits72}<br />
+Soit un pourcentage d'inscrits de : {$stats.ins72_rate} % <br />
+</p>
+
+<p class="normal">
+Nombre de Polytechniciennes vivantes : {$stats.vivantes}<br />
+Nombre de Polytechniciennes vivantes et inscrites : {$stats.inscrites} <br />
+Soit un pourcentage d'inscrites de : {$stats.inse_rate} % <br />
+</p>
+
+<p class="normal">
+Nombre d'inscrits depuis le début de la semaine : {$nbInsSem} <br />
+Nombre d'inscriptions en cours (2ème phase non terminée) : {$nbInsEnCours} <br />
+Nombre d'envois marketing effectués n'ayant pas abouti : {$nbInsEnvDir}
+</p>
+{/dynamic}
+
+{* vim:set et sw=2 sts=2 sws=2: *}