MailZu 0.8RC3
[bMailZu.git] / templates / summary.template.php
blob29aa84c642ec553c1c596f2649c4c54b4209ae7a
1 <?php
2 /**
3 * This file provides output functions for summary.php
4 * No data manipulation is done in this file
5 * @author Samuel Tran
6 * @author Jeremy Fowler <jfowler06@users.sourceforge.net>
7 * @version 04-03-2007
8 * @package Templates
10 * Copyright (C) 2005 - 2007 MailZu
11 * License: GPL, see LICENSE
15 /**
16 * Print table listing messages in quarantine :
17 * - spam (content type = 'S')
18 * - attachment (content type = 'B')
19 * - viruses (content type = 'V')
20 * - bad headers (content type = H)
21 * - pending requests ( RS = 'P')
22 * @param array $res containing spam and attachments of logged in user
24 function showSummary($count_array) {
25 global $link;
28 <table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
29 <tr>
30 <td class="tableBorder">
32 <!-- Draw Summary table -->
33 <table width="100%" border="0" cellspacing="1" cellpadding="0">
34 <tr>
35 <td colspan="5" class="tableTitle">
36 <? echo translate($_SESSION['sessionNav']); ?>
37 </td>
39 <td class="tableTitle">
40 <div align="right">
41 <? $link->doLink('javascript: help(\'msg_summary\');', '?', '', 'color: #FFFFFF;',
42 translate('Help') . ' - ' . translate($_SESSION['sessionNav'])) ?>
43 </div>
44 </td>
45 </tr>
46 </table>
49 <!-- Print summary table -->
50 <table class="stdFont" width="100%" height="100%" border="0" cellspacing="1" cellpadding="0">
52 <!-- Print table's headers -->
53 <tr class="rowHeaders">
54 <td width="15%">
55 <? echo translate('Date'); ?>
56 </td>
57 <td width="14%">
58 <? echo translate('Spam'); ?>
59 </td>
60 <td width="14%">
61 <? echo translate('Banned'); ?>
62 </td>
63 <td width="14%">
64 <? echo translate('Viruses'); ?>
65 </td>
66 <td width="14%">
67 <? echo translate('Bad Headers'); ?>
68 </td>
69 <td width="14%">
70 <? echo translate('Pending Requests'); ?>
71 </td>
72 <td width="15%">
73 <? echo translate('Total'); ?>
74 </td>
75 </tr>
77 <? $i = 0;
78 foreach ($count_array as $key => $val) {
79 echo '<tr class="' . 'cellColor' . ($i++%2) . ' align="center">';
80 echo ($key == 'Total' ? '<td class="rowTotals">' : '<td class="rowNumValues">') . "$key</td> \n";
81 foreach ($val as $subkey => $subval) {
82 echo ( $key == 'Total' ? '<td class="rowTotals">' : '<td class="rowNumValues">') . "$subval</td> \n";
84 echo '</tr>';
87 </tr>
88 </table>
89 </td>
90 </tr>
91 </table>
92 <?