display mail stats
authorx2000palatin <x2000palatin>
Tue, 9 Nov 2004 13:59:19 +0000 (13:59 +0000)
committerx2000palatin <x2000palatin>
Tue, 9 Nov 2004 13:59:19 +0000 (13:59 +0000)
htdocs/stats/parselog.php
templates/stats/parselog.tpl

index a780a14..059af2c 100644 (file)
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: parselog.php,v 1.3 2004-08-31 10:03:31 x2000habouzit Exp $
+        $Id: parselog.php,v 1.4 2004-11-09 13:59:23 x2000palatin Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
-new_skinned_page("stats/parselog.tpl");
+new_skinned_page("stats/parselog.tpl",AUTH_COOKIE);
 
 $page->run();
 ?>
index 7a935ef..aaf5abf 100644 (file)
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: parselog.tpl,v 1.4 2004-10-24 14:41:17 x2000habouzit Exp $
+        $Id: parselog.tpl,v 1.5 2004-11-09 13:59:19 x2000palatin Exp $
  ***************************************************************************}
 
 
 <h1>
-  Logs de polytechnique.org
+  Statistiques mail de polytechnique.org
 </h1>
 
 <p>
+<a href="?order=D">[Resultats classes par ordre des noms de domaines destinataires]</a><br />
+<a href="?order=N">[Resultats classes par nombre de mails achemines]</a><br />
+<a href="?order=R">[Resultats classes par nombre de mails retardes]</a><br />
+{perms level=admin}
+  <a href="?raw=true">[Resultats bruts]</a><br />
+{/perms}
+</p>
+
 {dynamic}
-{fetch file="/home/web/public/lastParselog" assign=bob}
-{$bob|replace:" ":"&nbsp;"|nl2br}
+{if $smarty.request.order}
+<table class="bicol" cellpadding="3" cellspacing="0" summary="Statistiques mails">
+  <tr>
+      <th>Domaine destinataire</th>
+      <th>Delai moyen</th>
+      <th>Delai maxi</th>
+      <th>Nombre de mails</th>
+      <th>Mails retardes</th>
+  </tr>
+{if $smarty.request.order eq "D"}  
+  {include file="stats/lastParselogD.tpl"}
+{elseif $smarty.request.order eq "R"}
+  {include file="stats/lastParselogR.tpl"}
+{elseif $smarty.request.order eq "N"}
+  {include file="stats/lastParselogN.tpl"}
+{/if}  
+</table>
+{/if}
+
+{perms level=admin}
+  {if $smarty.request.raw}
+    <pre>
+    {include file="stats/lastParselog.tpl" assign=content}
+    {$content|escape}
+    </pre>
+  {/if}
+{/perms}
+
 {/dynamic}
-</p>
 
 {* vim:set et sw=2 sts=2 sws=2: *}