<!--%%INCLUDE "i_defaulthead.incl" ("PolluStop Statistics")-->
   <form action="statistics" method="post">

   <fieldset>
   <legend>Since last startup (%%LOCALDATETIME("^y-^N-^D ^H:^m:^s"):statistics.session.resettime%% - server time)</legend>
   <ul><!--%%IF NOT(EQUALS(statistics.session.scannedcount AND "0"))-->
   <li>PolluStop processed <span class="tt">%%statistics.session.messagecount%%</span> unique messages, for a total of <span class="tt">%%statistics.session.totalsize%%</span>  kB (<span class="tt">%%statistics.session.avgmessagesize%%</span> kB per message).</li>
   <li>Among the processed messages, <span class="tt">%%statistics.session.scannedcount%%</span> of them, sent to <span class="tt">%%statistics.session.uniquerecipients%%</span> unique local recipients, were scanned.</li>
   <li>PolluStop took a total of <span class="tt">%%statistics.session.processtime%%</span> (wall clock) seconds to scan these messages (<span class="tt">%%statistics.session.avgprocesstime%%</span>ms per message).</li>
   <li>PolluStop took a total of <span class="tt">%%statistics.session.processcputime%%</span> (cpu usr+sys) seconds to scan these messages (<span class="tt">%%statistics.session.avgprocesscputime%%</span>ms per message).</li>
   <li><span class="tt">%%statistics.session.whitelistedcount%%</span> messages matched the Whitelist.</li>
   <li><span class="tt">%%statistics.session.blacklistedcount%%</span> messages matched the Blacklist.</li>
   <li><span class="tt">%%statistics.session.directreplycount%%</span> messages were considered as Direct Replies.</li>
   <li><span class="tt">%%statistics.session.regexusagecount%%</span> messages matched a <a href="regex">Regular Expression</a>.</li>
   <li><span class="tt">%%statistics.session.spamcount%%</span> messages have been tagged as spam (<span class="tt">%%statistics.session.overallspamratio%%%</span> of scanned messages).</li>
   <li>Counting one message per local recipient (for multiple-recipient messages), gives <span class="tt">%%statistics.session.recipientsplittedscancount%%</span> messages, of which <span class="tt">%%statistics.session.recipientsplittedspamcount%%</span> were spam (<span class="tt">%%statistics.session.splitspamratio%%%</span>).</li>
   <li>A typical user received <span class="tt">%%statistics.session.mesgperlocaluser%%</span> messages. <span class="tt">%%statistics.session.spamperlocaluser%%</span> were spam, <span class="tt">%%statistics.session.goodperlocaluser%%</span> were good.</li>
   <li>The average score given by PolluStop to a message was <span class="tt">%%statistics.session.avgscore%%</span>.</li>
   <li>Spam got an average score of <span class="tt">%%statistics.session.avgspamscore%%</span>. Good mail got an average score of <span class="tt">%%statistics.session.avggoodscore%%</span>.</li>
   <li><span class="tt">%%statistics.session.falsepositivecount%%</span> (<span class="tt">%%statistics.session.ratiofalsepos%%%</span>) messages have been reported as false positives, and<br /><span class="tt">%%statistics.session.falsenegativecount%%</span> (<span class="tt">%%statistics.session.ratiofalseneg%%%</span>) as false negatives.</li>
   <!--%%IF settings.ocr_enabled & NOT(EQUALS(statistics.session.ocrcount AND "0"))-->
   <li>The images contained in <span class="tt">%%statistics.session.ocrcount%%</span> messages were sent to the OCR engine, and it took a total of <span class="tt">%%statistics.session.ocrtime%%</span> (wall clock) seconds to process them (<span class="tt">%%statistics.session.avgocrtime%%</span>ms per processed message).</li>
   <li>The OCR engine allowed PolluStop to filter <span class="tt">%%statistics.session.ocrspam%%</span> spam messages it wouldn't have detected otherwise.</li>
   <li>The OCR engine gave an average score of <span class="tt">%%statistics.session.avgocrscore%%</span></li>
   <!--%%ELSE-->
   <li>The OCR didn't process anything yet</li>
   <!--%%ENDIF-->
   <!--%%ELSE-->
   <li>Nothing interesting happened yet</li>
   <!--%%ENDIF-->
   </ul>
   </fieldset>


   <fieldset>
   <legend>Since last statistics reset (%%LOCALDATETIME("^y-^N-^D ^H:^m:^s"):statistics.totals.resettime%% - server time)</legend>
   <ul>
   <!--%%IF NOT(EQUALS(statistics.totals.scannedcount AND "0"))-->
   <li>PolluStop processed <span class="tt">%%statistics.totals.messagecount%%</span> unique messages, for a total of <span class="tt">%%statistics.totals.totalsize%%</span> kB (<span class="tt">%%statistics.totals.avgmessagesize%%</span> kB per message).</li>
   <li>Among the processed messages, <span class="tt">%%statistics.totals.scannedcount%%</span> of them were scanned.</li>
   <li>PolluStop took a total of <span class="tt">%%statistics.totals.processtime%%</span> (wall clock) seconds to scan these messages (<span class="tt">%%statistics.totals.avgprocesstime%%</span>ms per message).</li>
   <li>PolluStop took a total of <span class="tt">%%statistics.totals.processcputime%%</span> (cpu usr+sys) seconds to scan these messages (<span class="tt">%%statistics.totals.avgprocesscputime%%</span>ms per message).</li>
   <li><span class="tt">%%statistics.totals.whitelistedcount%%</span> messages matched the Whitelist.</li>
   <li><span class="tt">%%statistics.totals.blacklistedcount%%</span> messages matched the Blacklist.</li>
   <li><span class="tt">%%statistics.totals.directreplycount%%</span> messages were considered as Direct Replies.</li>
   <li><span class="tt">%%statistics.totals.regexusagecount%%</span> messages matched a <a href="regex">Regular Expression</a>.</li>
   <li><span class="tt">%%statistics.totals.spamcount%%</span> messages have been tagged as spam (<span class="tt">%%statistics.totals.overallspamratio%%%</span> of scanned messages).</li>
   <li>Counting one message per local recipient (for multiple-recipient messages), gives <span class="tt">%%statistics.totals.recipientsplittedscancount%%</span> messages, of which <span class="tt">%%statistics.totals.recipientsplittedspamcount%%</span> were spam (<span class="tt">%%statistics.totals.splitspamratio%%%</span>).</li>
   <li>The average score given by PolluStop to a message was <span class="tt">%%statistics.totals.avgscore%%</span>.</li>
   <li>Spam got an average score of <span class="tt">%%statistics.totals.avgspamscore%%</span>. Good mail got an average score of <span class="tt">%%statistics.totals.avggoodscore%%</span>.</li>
   <li><span class="tt">%%statistics.totals.falsepositivecount%%</span> (<span class="tt">%%statistics.totals.ratiofalsepos%%%</span>) messages have been reported as false positive, and<br /><span class="tt">%%statistics.totals.falsenegativecount%%</span> (<span class="tt">%%statistics.totals.ratiofalseneg%%%</span>) as false negative.</li>
   <li>By weekday.<ul style="list-style:none">
   <li><table style="border:1px solid black;" id="totalsday">
      <tr><td></td><!--%%FORALL day in weekdays--><td class="h">%%day[]%%</td><!--%%ENDFOR day--></tr>
      <tr><td valign="bottom">Messages</td><!--%%FORALL day in statistics.totals.messagecountbyday--><td class="tt"><img alt="bar" src="/point.gif" height="%%day[].norm%%" title="%%day[].value%%" class="graph" /></td><!--%%ENDFOR day--></tr>
      <tr><td valign="bottom">Scanned</td><!--%%FORALL day in statistics.totals.scannedcountbyday--><td class="tt"><img alt="bar" src="/point.gif" height="%%day[].norm%%" title="%%day[].value%%" class="graph" /></td><!--%%ENDFOR day--></tr>
      <tr><td valign="bottom">Spam</td><!--%%FORALL day in statistics.totals.spamcountbyday--><td class="tt"><img alt="bar" src="/point.gif" height="%%day[].norm%%" title="%%day[].value%%" class="graph" /></td><!--%%ENDFOR day--></tr>
   </table></li></ul></li>
   <li>By time of day.<ul style="list-style:none">
   <li><table style="border:1px solid black;" id="totalshour">
      <tr><td></td><td class="h">00</td><td colspan="5"></td><td class="h">06</td><td colspan="5"></td><td class="h">12</td><td colspan="5"></td><td class="h">18</td><td colspan="5"></td></tr>
      <tr><td valign="bottom">Messages</td><!--%%FORALL hour in statistics.totals.messagecountbyhour--><td class="tt"><img alt="bar" src="/point.gif" height="%%hour[].norm%%" title="%%hour[].value%%" class="graph" /></td><!--%%ENDFOR hour--></tr>
      <tr><td valign="bottom">Scanned</td><!--%%FORALL hour in statistics.totals.scannedcountbyhour--><td class="tt"><img alt="bar" src="/point.gif" height="%%hour[].norm%%" title="%%hour[].value%%" class="graph" /></td><!--%%ENDFOR hour--></tr>
      <tr><td valign="bottom">Spam</td><!--%%FORALL hour in statistics.totals.spamcountbyhour--><td class="tt"><img alt="bar" src="/point.gif" height="%%hour[].norm%%" title="%%hour[].value%%" class="graph" /></td><!--%%ENDFOR hour--></tr>
   </table></li></ul></li>
   <!--%%IF settings.ocr_enabled & NOT(EQUALS(statistics.totals.ocrcount AND "0"))-->
   <li>The images contained in <span class="tt">%%statistics.totals.ocrcount%%</span> messages were sent to the OCR engine, and it took a total of <span class="tt">%%statistics.totals.ocrtime%%</span> seconds to process them (<span class="tt">%%statistics.totals.avgocrtime%%</span>ms per processed message).</li>
   <li>The OCR engine allowed PolluStop to filter <span class="tt">%%statistics.totals.ocrspam%%</span> spam messages it wouldn't have detected otherwise.</li>
   <li>The OCR engine gave an average score of <span class="tt">%%statistics.totals.avgocrscore%%</span></li>
   <!--%%ELSE-->
   <li>The OCR didn't process anything yet</li>
   <!--%%ENDIF-->
   <!--%%ELSE-->
   <li>Nothing interesting happened yet</li>
   <!--%%ENDIF-->
   </ul>
   </fieldset>

   <p><input type="submit" name="Refresh" value="Refresh" /></p>
   <!--%%IF serveradminlevel-->
   <fieldset><legend>Reset all statistics</legend>
   <span class="explain">This will erase all current and saved statistics. Once deleted the data is not recoverable.
   <em>Tip: you can backup file pollustop.statistics, which is stored in [pollustop]/data.
   However, restoring this file will require a restart of the filter.</em></span><br /><br />
   <input type="submit" disabled="disabled" name="reset" value="Reset statistics" />&nbsp;<label><input type="checkbox" name="resetconfirm" value="1" onclick="IAmSure(this, 'reset')" />I am sure.</label><br />
   </fieldset><!--%%ENDIF-->

   </form>
   <script type="text/javascript">
      window.setTimeout("window.location.reload()", 30000);
   </script>
<!--%%INCLUDE "i_defaultfoot.incl"-->
