From: eldy <>
Date: Sat, 14 Dec 2002 18:53:04 +0000 (+0000)
Subject: Added: full list and last visits for email senders/receivers chart.
X-Git-Tag: AWSTATS_5_3_BETA~1
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=591aa5c9f3c453b507a2d0efcada893e5830e443;p=thirdparty%2FAWStats.git
Added: full list and last visits for email senders/receivers chart.
---
diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
index 236220a7..802bf020 100644
--- a/wwwroot/cgi-bin/awstats.pl
+++ b/wwwroot/cgi-bin/awstats.pl
@@ -7732,6 +7732,102 @@ EOF
&tab_end;
}
+ # BY SENDER EMAIL
+ #----------------------------
+ if ($ShowEMailSenders) {
+ if ($Debug) { debug("ShowEMailSenders",2); }
+ print "$Center
\n";
+ my $title="$Message[131] ($Message[77] $MaxNbOfEMailsShown) - $Message[80]";
+ if ($ShowEMailSenders =~ /L/i) { $title.=" - $Message[9]"; }
+ &tab_head("$title",19);
+ print "
| $Message[131] : ".(scalar keys %_emails_h)." | ";
+ if ($ShowEMailSenders =~ /H/i) { print "$Message[57] | "; }
+ if ($ShowEMailSenders =~ /B/i) { print "$Message[75] | "; }
+ if ($ShowEMailSenders =~ /M/i) { print "$Message[106] | "; }
+ if ($ShowEMailSenders =~ /L/i) { print "$Message[9] | "; }
+ print "
\n";
+ $total_p=$total_h=$total_k=0;
+ $max_h=1; foreach my $key (values %_emails_h) { if ($key > $max_h) { $max_h = $key; } }
+ $max_k=1; foreach my $key (values %_emails_k) { if ($key > $max_k) { $max_k = $key; } }
+ my $count=0;
+ &BuildKeyList($MaxNbOfEMailsShown,$MinHitEMail,\%_emails_h,\%_emails_h);
+ foreach my $key (@keylist) {
+ my $bredde_h=0;my $bredde_k=0;
+ if ($max_h > 0) { $bredde_h=int($BarWidth*$_emails_h{$key}/$max_h)+1; }
+ if ($max_k > 0) { $bredde_k=int($BarWidth*$_emails_k{$key}/$max_k)+1; }
+ print "| $key | ";
+ if ($ShowEMailSenders =~ /H/i) { print "$_emails_h{$key} | "; }
+ if ($ShowEMailSenders =~ /B/i) { print "".Format_Bytes($_emails_k{$key})." | "; }
+ if ($ShowEMailSenders =~ /M/i) { print "".Format_Bytes($_emails_k{$key}/($_emails_h{$key}||1))." | "; }
+ if ($ShowEMailSenders =~ /L/i) { print "".($_emails_l{$key}?Format_Date($_emails_l{$key},1):'-')." | "; }
+ print "
\n";
+ #$total_p += $_emails_p{$key};
+ $total_h += $_emails_h{$key};
+ $total_k += $_emails_k{$key};
+ $count++;
+ }
+ $rest_p=0; # $rest_p=$TotalPages-$total_p;
+ $rest_h=$TotalHits-$total_h;
+ $rest_k=$TotalBytes-$total_k;
+ if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other sender emails
+ print "| $Message[2] | ";
+ if ($ShowEMailSenders =~ /H/i) { print "$rest_h | "; }
+ if ($ShowEMailSenders =~ /B/i) { print "".Format_Bytes($rest_k)." | "; }
+ if ($ShowEMailSenders =~ /M/i) { print "".Format_Bytes($rest_k/($rest_h||1))." | "; }
+ if ($ShowEMailSenders =~ /L/i) { print " | "; }
+ print "
\n";
+ }
+ &tab_end;
+ }
+
+ # BY RECEIVER EMAIL
+ #----------------------------
+ if ($ShowEMailReceivers) {
+ if ($Debug) { debug("ShowEMailReceivers",2); }
+ print "$Center
\n";
+ my $title="$Message[132] ($Message[77] $MaxNbOfEMailsShown) - $Message[80]";
+ if ($ShowEMailReceivers =~ /L/i) { $title.=" - $Message[9]"; }
+ &tab_head("$title",19);
+ print "| $Message[132] : ".(scalar keys %_emailr_h)." | ";
+ if ($ShowEMailReceivers =~ /H/i) { print "$Message[57] | "; }
+ if ($ShowEMailReceivers =~ /B/i) { print "$Message[75] | "; }
+ if ($ShowEMailReceivers =~ /M/i) { print "$Message[106] | "; }
+ if ($ShowEMailReceivers =~ /L/i) { print "$Message[9] | "; }
+ print "
\n";
+ $total_p=$total_h=$total_k=0;
+ $max_h=1; foreach my $key (values %_emailr_h) { if ($key > $max_h) { $max_h = $key; } }
+ $max_k=1; foreach my $key (values %_emailr_k) { if ($key > $max_k) { $max_k = $key; } }
+ my $count=0;
+ &BuildKeyList($MaxNbOfEMailsShown,$MinHitEMail,\%_emailr_h,\%_emailr_h);
+ foreach my $key (@keylist) {
+ my $bredde_h=0;my $bredde_k=0;
+ if ($max_h > 0) { $bredde_h=int($BarWidth*$_emailr_h{$key}/$max_h)+1; }
+ if ($max_k > 0) { $bredde_k=int($BarWidth*$_emailr_k{$key}/$max_k)+1; }
+ print "| $key | ";
+ if ($ShowEMailReceivers =~ /H/i) { print "$_emailr_h{$key} | "; }
+ if ($ShowEMailReceivers =~ /B/i) { print "".Format_Bytes($_emailr_k{$key})." | "; }
+ if ($ShowEMailReceivers =~ /M/i) { print "".Format_Bytes($_emailr_k{$key}/($_emailr_h{$key}||1))." | "; }
+ if ($ShowEMailReceivers =~ /L/i) { print "".($_emailr_l{$key}?Format_Date($_emailr_l{$key},1):'-')." | "; }
+ print "
\n";
+ #$total_p += $_emailr_p{$key};
+ $total_h += $_emailr_h{$key};
+ $total_k += $_emailr_k{$key};
+ $count++;
+ }
+ $rest_p=0; # $rest_p=$TotalPages-$total_p;
+ $rest_h=$TotalHits-$total_h;
+ $rest_k=$TotalBytes-$total_k;
+ if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other receiver emails
+ print "| $Message[2] | ";
+ if ($ShowEMailReceivers =~ /H/i) { print "$rest_h | "; }
+ if ($ShowEMailReceivers =~ /B/i) { print "".Format_Bytes($rest_k)." | "; }
+ if ($ShowEMailReceivers =~ /M/i) { print "".Format_Bytes($rest_k/($rest_h||1))." | "; }
+ if ($ShowEMailReceivers =~ /L/i) { print " | "; }
+ print "
\n";
+ }
+ &tab_end;
+ }
+
# BY LOGIN
#----------------------------
if ($ShowAuthenticatedUsers) {
@@ -8242,102 +8338,6 @@ EOF
&tab_end;
}
- # BY SENDER EMAIL
- #----------------------------
- if ($ShowEMailSenders) {
- if ($Debug) { debug("ShowEMailSenders",2); }
- print "$Center
\n";
- my $title="$Message[131] ($Message[77] $MaxNbOfEMailsShown) - $Message[80]";
- if ($ShowEMailSenders =~ /L/i) { $title.=" - $Message[9]"; }
- &tab_head("$title",19);
- print "| $Message[131] : ".(scalar keys %_emails_h)." | ";
- if ($ShowEMailSenders =~ /H/i) { print "$Message[57] | "; }
- if ($ShowEMailSenders =~ /B/i) { print "$Message[75] | "; }
- if ($ShowEMailSenders =~ /M/i) { print "$Message[106] | "; }
- if ($ShowEMailSenders =~ /L/i) { print "$Message[9] | "; }
- print "
\n";
- $total_p=$total_h=$total_k=0;
- $max_h=1; foreach my $key (values %_emails_h) { if ($key > $max_h) { $max_h = $key; } }
- $max_k=1; foreach my $key (values %_emails_k) { if ($key > $max_k) { $max_k = $key; } }
- my $count=0;
- &BuildKeyList($MaxNbOfEMailsShown,$MinHitEMail,\%_emails_h,\%_emails_h);
- foreach my $key (@keylist) {
- my $bredde_h=0;my $bredde_k=0;
- if ($max_h > 0) { $bredde_h=int($BarWidth*$_emails_h{$key}/$max_h)+1; }
- if ($max_k > 0) { $bredde_k=int($BarWidth*$_emails_k{$key}/$max_k)+1; }
- print "| $key | ";
- if ($ShowEMailSenders =~ /H/i) { print "$_emails_h{$key} | "; }
- if ($ShowEMailSenders =~ /B/i) { print "".Format_Bytes($_emails_k{$key})." | "; }
- if ($ShowEMailSenders =~ /M/i) { print "".Format_Bytes($_emails_k{$key}/($_emails_h{$key}||1))." | "; }
- if ($ShowEMailSenders =~ /L/i) { print "".($_emails_l{$key}?Format_Date($_emails_l{$key},1):'-')." | "; }
- print "
\n";
- #$total_p += $_emails_p{$key};
- $total_h += $_emails_h{$key};
- $total_k += $_emails_k{$key};
- $count++;
- }
- $rest_p=0; # $rest_p=$TotalPages-$total_p;
- $rest_h=$TotalHits-$total_h;
- $rest_k=$TotalBytes-$total_k;
- if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other sender emails
- print "| $Message[2] | ";
- if ($ShowEMailSenders =~ /H/i) { print "$rest_h | "; }
- if ($ShowEMailSenders =~ /B/i) { print "".Format_Bytes($rest_k)." | "; }
- if ($ShowEMailSenders =~ /M/i) { print "".Format_Bytes($rest_k/($rest_h||1))." | "; }
- if ($ShowEMailSenders =~ /L/i) { print " | "; }
- print "
\n";
- }
- &tab_end;
- }
-
- # BY RECEIVER EMAIL
- #----------------------------
- if ($ShowEMailReceivers) {
- if ($Debug) { debug("ShowEMailReceivers",2); }
- print "$Center
\n";
- my $title="$Message[132] ($Message[77] $MaxNbOfEMailsShown) - $Message[80]";
- if ($ShowEMailReceivers =~ /L/i) { $title.=" - $Message[9]"; }
- &tab_head("$title",19);
- print "| $Message[132] : ".(scalar keys %_emailr_h)." | ";
- if ($ShowEMailReceivers =~ /H/i) { print "$Message[57] | "; }
- if ($ShowEMailReceivers =~ /B/i) { print "$Message[75] | "; }
- if ($ShowEMailReceivers =~ /M/i) { print "$Message[106] | "; }
- if ($ShowEMailReceivers =~ /L/i) { print "$Message[9] | "; }
- print "
\n";
- $total_p=$total_h=$total_k=0;
- $max_h=1; foreach my $key (values %_emailr_h) { if ($key > $max_h) { $max_h = $key; } }
- $max_k=1; foreach my $key (values %_emailr_k) { if ($key > $max_k) { $max_k = $key; } }
- my $count=0;
- &BuildKeyList($MaxNbOfEMailsShown,$MinHitEMail,\%_emailr_h,\%_emailr_h);
- foreach my $key (@keylist) {
- my $bredde_h=0;my $bredde_k=0;
- if ($max_h > 0) { $bredde_h=int($BarWidth*$_emailr_h{$key}/$max_h)+1; }
- if ($max_k > 0) { $bredde_k=int($BarWidth*$_emailr_k{$key}/$max_k)+1; }
- print "| $key | ";
- if ($ShowEMailReceivers =~ /H/i) { print "$_emailr_h{$key} | "; }
- if ($ShowEMailReceivers =~ /B/i) { print "".Format_Bytes($_emailr_k{$key})." | "; }
- if ($ShowEMailReceivers =~ /M/i) { print "".Format_Bytes($_emailr_k{$key}/($_emailr_h{$key}||1))." | "; }
- if ($ShowEMailReceivers =~ /L/i) { print "".($_emailr_l{$key}?Format_Date($_emailr_l{$key},1):'-')." | "; }
- print "
\n";
- #$total_p += $_emailr_p{$key};
- $total_h += $_emailr_h{$key};
- $total_k += $_emailr_k{$key};
- $count++;
- }
- $rest_p=0; # $rest_p=$TotalPages-$total_p;
- $rest_h=$TotalHits-$total_h;
- $rest_k=$TotalBytes-$total_k;
- if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other receiver emails
- print "| $Message[2] | ";
- if ($ShowEMailReceivers =~ /H/i) { print "$rest_h | "; }
- if ($ShowEMailReceivers =~ /B/i) { print "".Format_Bytes($rest_k)." | "; }
- if ($ShowEMailReceivers =~ /M/i) { print "".Format_Bytes($rest_k/($rest_h||1))." | "; }
- if ($ShowEMailReceivers =~ /L/i) { print " | "; }
- print "
\n";
- }
- &tab_end;
- }
-
# BY EXTRA SECTIONS
#----------------------------
foreach my $extranum (1..@ExtraName-1) {