]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Added: full list and last visits for email senders/receivers chart.
authoreldy <>
Sat, 14 Dec 2002 18:53:04 +0000 (18:53 +0000)
committereldy <>
Sat, 14 Dec 2002 18:53:04 +0000 (18:53 +0000)
wwwroot/cgi-bin/awstats.pl

index 236220a7f18249ca1a9b4fa1cafd412e02b7babc..802bf0206cfc78c65571f48308a68c82e3a53110 100644 (file)
@@ -7732,6 +7732,102 @@ EOF
                &tab_end;
        }
 
+       # BY SENDER EMAIL
+       #----------------------------
+       if ($ShowEMailSenders) {
+               if ($Debug) { debug("ShowEMailSenders",2); }
+               print "$Center<a name=\"EMAILSENDERS\">&nbsp;</a><BR>\n";
+               my $title="$Message[131] ($Message[77] $MaxNbOfEMailsShown) &nbsp; - &nbsp; <a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?"$AWScript?${NewLinkParams}output=allemails":"$PROG$StaticLinks.allemails.html")."\"$NewLinkTarget>$Message[80]</a>";
+               if ($ShowEMailSenders =~ /L/i) { $title.=" &nbsp; - &nbsp; <a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?"$AWScript?${NewLinkParams}output=lastemails":"$PROG$StaticLinks.lastemails.html")."\"$NewLinkTarget>$Message[9]</a>"; }
+               &tab_head("$title",19);
+               print "<TR bgcolor=\"#$color_TableBGRowTitle\"><TH>$Message[131] : ".(scalar keys %_emails_h)."</TH>";
+               if ($ShowEMailSenders =~ /H/i) { print "<TH bgcolor=\"#$color_h\" width=80>$Message[57]</TH>"; }
+               if ($ShowEMailSenders =~ /B/i) { print "<TH bgcolor=\"#$color_k\" width=80>$Message[75]</TH>"; }
+               if ($ShowEMailSenders =~ /M/i) { print "<TH bgcolor=\"#$color_k\" width=80>$Message[106]</TH>"; }
+               if ($ShowEMailSenders =~ /L/i) { print "<TH width=120>$Message[9]</TH>"; }
+               print "</TR>\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 "<TR><TD CLASS=AWL>$key</TD>";
+                       if ($ShowEMailSenders =~ /H/i) { print "<TD>$_emails_h{$key}</TD>"; }
+                       if ($ShowEMailSenders =~ /B/i) { print "<TD>".Format_Bytes($_emails_k{$key})."</TD>"; }
+                       if ($ShowEMailSenders =~ /M/i) { print "<TD>".Format_Bytes($_emails_k{$key}/($_emails_h{$key}||1))."</TD>"; }
+                       if ($ShowEMailSenders =~ /L/i) { print "<TD>".($_emails_l{$key}?Format_Date($_emails_l{$key},1):'-')."</TD>"; }
+                       print "</TR>\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 "<TR><TD CLASS=AWL><font color=\"#$color_other\">$Message[2]</font></TD>";
+                       if ($ShowEMailSenders =~ /H/i) { print "<TD>$rest_h</TD>"; }
+                       if ($ShowEMailSenders =~ /B/i) { print "<TD>".Format_Bytes($rest_k)."</TD>"; }
+                       if ($ShowEMailSenders =~ /M/i) { print "<TD>".Format_Bytes($rest_k/($rest_h||1))."</TD>"; }
+                       if ($ShowEMailSenders =~ /L/i) { print "<TD>&nbsp;</TD>"; }
+                       print "</TR>\n";
+               }
+               &tab_end;
+       }
+
+       # BY RECEIVER EMAIL
+       #----------------------------
+       if ($ShowEMailReceivers) {
+               if ($Debug) { debug("ShowEMailReceivers",2); }
+               print "$Center<a name=\"EMAILRECEIVERS\">&nbsp;</a><BR>\n";
+               my $title="$Message[132] ($Message[77] $MaxNbOfEMailsShown) &nbsp; - &nbsp; <a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?"$AWScript?${NewLinkParams}output=allemailr":"$PROG$StaticLinks.allemailr.html")."\"$NewLinkTarget>$Message[80]</a>";
+               if ($ShowEMailReceivers =~ /L/i) { $title.=" &nbsp; - &nbsp; <a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?"$AWScript?${NewLinkParams}output=lastemailr":"$PROG$StaticLinks.lastemailr.html")."\"$NewLinkTarget>$Message[9]</a>"; }
+               &tab_head("$title",19);
+               print "<TR bgcolor=\"#$color_TableBGRowTitle\"><TH>$Message[132] : ".(scalar keys %_emailr_h)."</TH>";
+               if ($ShowEMailReceivers =~ /H/i) { print "<TH bgcolor=\"#$color_h\" width=80>$Message[57]</TH>"; }
+               if ($ShowEMailReceivers =~ /B/i) { print "<TH bgcolor=\"#$color_k\" width=80>$Message[75]</TH>"; }
+               if ($ShowEMailReceivers =~ /M/i) { print "<TH bgcolor=\"#$color_k\" width=80>$Message[106]</TH>"; }
+               if ($ShowEMailReceivers =~ /L/i) { print "<TH width=120>$Message[9]</TH>"; }
+               print "</TR>\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 "<TR><TD CLASS=AWL>$key</TD>";
+                       if ($ShowEMailReceivers =~ /H/i) { print "<TD>$_emailr_h{$key}</TD>"; }
+                       if ($ShowEMailReceivers =~ /B/i) { print "<TD>".Format_Bytes($_emailr_k{$key})."</TD>"; }
+                       if ($ShowEMailReceivers =~ /M/i) { print "<TD>".Format_Bytes($_emailr_k{$key}/($_emailr_h{$key}||1))."</TD>"; }
+                       if ($ShowEMailReceivers =~ /L/i) { print "<TD>".($_emailr_l{$key}?Format_Date($_emailr_l{$key},1):'-')."</TD>"; }
+                       print "</TR>\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 "<TR><TD CLASS=AWL><font color=\"#$color_other\">$Message[2]</font></TD>";
+                       if ($ShowEMailReceivers =~ /H/i) { print "<TD>$rest_h</TD>"; }
+                       if ($ShowEMailReceivers =~ /B/i) { print "<TD>".Format_Bytes($rest_k)."</TD>"; }
+                       if ($ShowEMailReceivers =~ /M/i) { print "<TD>".Format_Bytes($rest_k/($rest_h||1))."</TD>"; }
+                       if ($ShowEMailReceivers =~ /L/i) { print "<TD>&nbsp;</TD>"; }
+                       print "</TR>\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<a name=\"EMAILSENDERS\">&nbsp;</a><BR>\n";
-               my $title="$Message[131] ($Message[77] $MaxNbOfEMailsShown) &nbsp; - &nbsp; <a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?"$AWScript?${NewLinkParams}output=allemails":"$PROG$StaticLinks.allemails.html")."\"$NewLinkTarget>$Message[80]</a>";
-               if ($ShowEMailSenders =~ /L/i) { $title.=" &nbsp; - &nbsp; <a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?"$AWScript?${NewLinkParams}output=lastemails":"$PROG$StaticLinks.lastemails.html")."\"$NewLinkTarget>$Message[9]</a>"; }
-               &tab_head("$title",19);
-               print "<TR bgcolor=\"#$color_TableBGRowTitle\"><TH>$Message[131] : ".(scalar keys %_emails_h)."</TH>";
-               if ($ShowEMailSenders =~ /H/i) { print "<TH bgcolor=\"#$color_h\" width=80>$Message[57]</TH>"; }
-               if ($ShowEMailSenders =~ /B/i) { print "<TH bgcolor=\"#$color_k\" width=80>$Message[75]</TH>"; }
-               if ($ShowEMailSenders =~ /M/i) { print "<TH bgcolor=\"#$color_k\" width=80>$Message[106]</TH>"; }
-               if ($ShowEMailSenders =~ /L/i) { print "<TH width=120>$Message[9]</TH>"; }
-               print "</TR>\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 "<TR><TD CLASS=AWL>$key</TD>";
-                       if ($ShowEMailSenders =~ /H/i) { print "<TD>$_emails_h{$key}</TD>"; }
-                       if ($ShowEMailSenders =~ /B/i) { print "<TD>".Format_Bytes($_emails_k{$key})."</TD>"; }
-                       if ($ShowEMailSenders =~ /M/i) { print "<TD>".Format_Bytes($_emails_k{$key}/($_emails_h{$key}||1))."</TD>"; }
-                       if ($ShowEMailSenders =~ /L/i) { print "<TD>".($_emails_l{$key}?Format_Date($_emails_l{$key},1):'-')."</TD>"; }
-                       print "</TR>\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 "<TR><TD CLASS=AWL><font color=\"#$color_other\">$Message[2]</font></TD>";
-                       if ($ShowEMailSenders =~ /H/i) { print "<TD>$rest_h</TD>"; }
-                       if ($ShowEMailSenders =~ /B/i) { print "<TD>".Format_Bytes($rest_k)."</TD>"; }
-                       if ($ShowEMailSenders =~ /M/i) { print "<TD>".Format_Bytes($rest_k/($rest_h||1))."</TD>"; }
-                       if ($ShowEMailSenders =~ /L/i) { print "<TD>&nbsp;</TD>"; }
-                       print "</TR>\n";
-               }
-               &tab_end;
-       }
-
-       # BY RECEIVER EMAIL
-       #----------------------------
-       if ($ShowEMailReceivers) {
-               if ($Debug) { debug("ShowEMailReceivers",2); }
-               print "$Center<a name=\"EMAILRECEIVERS\">&nbsp;</a><BR>\n";
-               my $title="$Message[132] ($Message[77] $MaxNbOfEMailsShown) &nbsp; - &nbsp; <a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?"$AWScript?${NewLinkParams}output=allemailr":"$PROG$StaticLinks.allemailr.html")."\"$NewLinkTarget>$Message[80]</a>";
-               if ($ShowEMailReceivers =~ /L/i) { $title.=" &nbsp; - &nbsp; <a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?"$AWScript?${NewLinkParams}output=lastemailr":"$PROG$StaticLinks.lastemailr.html")."\"$NewLinkTarget>$Message[9]</a>"; }
-               &tab_head("$title",19);
-               print "<TR bgcolor=\"#$color_TableBGRowTitle\"><TH>$Message[132] : ".(scalar keys %_emailr_h)."</TH>";
-               if ($ShowEMailReceivers =~ /H/i) { print "<TH bgcolor=\"#$color_h\" width=80>$Message[57]</TH>"; }
-               if ($ShowEMailReceivers =~ /B/i) { print "<TH bgcolor=\"#$color_k\" width=80>$Message[75]</TH>"; }
-               if ($ShowEMailReceivers =~ /M/i) { print "<TH bgcolor=\"#$color_k\" width=80>$Message[106]</TH>"; }
-               if ($ShowEMailReceivers =~ /L/i) { print "<TH width=120>$Message[9]</TH>"; }
-               print "</TR>\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 "<TR><TD CLASS=AWL>$key</TD>";
-                       if ($ShowEMailReceivers =~ /H/i) { print "<TD>$_emailr_h{$key}</TD>"; }
-                       if ($ShowEMailReceivers =~ /B/i) { print "<TD>".Format_Bytes($_emailr_k{$key})."</TD>"; }
-                       if ($ShowEMailReceivers =~ /M/i) { print "<TD>".Format_Bytes($_emailr_k{$key}/($_emailr_h{$key}||1))."</TD>"; }
-                       if ($ShowEMailReceivers =~ /L/i) { print "<TD>".($_emailr_l{$key}?Format_Date($_emailr_l{$key},1):'-')."</TD>"; }
-                       print "</TR>\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 "<TR><TD CLASS=AWL><font color=\"#$color_other\">$Message[2]</font></TD>";
-                       if ($ShowEMailReceivers =~ /H/i) { print "<TD>$rest_h</TD>"; }
-                       if ($ShowEMailReceivers =~ /B/i) { print "<TD>".Format_Bytes($rest_k)."</TD>"; }
-                       if ($ShowEMailReceivers =~ /M/i) { print "<TD>".Format_Bytes($rest_k/($rest_h||1))."</TD>"; }
-                       if ($ShowEMailReceivers =~ /L/i) { print "<TD>&nbsp;</TD>"; }
-                       print "</TR>\n";
-               }
-               &tab_end;
-       }
-
        # BY EXTRA SECTIONS
        #----------------------------
        foreach my $extranum (1..@ExtraName-1) {