) {
chomp $_; s/\r$//;
+ $NbOfLinesRead++;
if ($ShowSteps) {
if (++$NbOfLinesShowsteps % $NBOFLINESFORBENCHMARK == 0) {
@@ -5212,7 +5227,7 @@ EOF
if ($ShowHostsStats) { print ($frame?" ":""); print "$Message[45]\n"; print ($frame?" |
\n":" "); }
if ($ShowAuthenticatedUsers) { print ($frame?"| ":""); print "$Message[94]"; print ($frame?" |
\n":" "); }
if ($ShowAuthenticatedUsers) { print ($frame?" ":""); print "$Message[80]\n"; print ($frame?" |
\n":" "); }
- if ($ShowAuthenticatedUsers) { print ($frame?" ":""); print "$Message[9]\n"; print ($frame?" |
\n":" "); }
+ if ($ShowAuthenticatedUsers =~ /L/i) { print ($frame?" ":""); print "$Message[9]\n"; print ($frame?" |
\n":" "); }
if ($ShowRobotsStats) { print ($frame?"| ":""); print "$Message[53]"; print ($frame?" |
\n":" "); }
if ($ShowRobotsStats) { print ($frame?" ":""); print "$Message[80]\n"; print ($frame?" |
\n":" "); }
if ($ShowRobotsStats) { print ($frame?" ":""); print "$Message[9]\n"; print ($frame?" |
\n":" "); }
@@ -5224,8 +5239,8 @@ EOF
if ($ShowSessionsStats) { print ($frame?"| ":""); print "$Message[117]"; print ($frame?" |
\n":" "); }
if ($ShowPagesStats) { print ($frame?"| ":""); print "$Message[29]\n"; print ($frame?" |
\n":" "); }
if ($ShowPagesStats) { print ($frame?" ":""); print "$Message[80]\n"; print ($frame?" |
\n":" "); }
- if ($ShowPagesStats) { print ($frame?" ":""); print "$Message[104]\n"; print ($frame?" |
\n":" "); }
- if ($ShowPagesStats) { print ($frame?" ":""); print "$Message[116]\n"; print ($frame?" |
\n":" "); }
+ if ($ShowPagesStats =~ /E/i) { print ($frame?" ":""); print "$Message[104]\n"; print ($frame?" |
\n":" "); }
+ if ($ShowPagesStats =~ /X/i) { print ($frame?" ":""); print "$Message[116]\n"; print ($frame?" |
\n":" "); }
if ($ShowFileTypesStats) { print ($frame?"| ":""); print "$Message[73]"; print ($frame?" |
\n":" "); }
if ($ShowFileSizesStats) { }
if ($ShowOSStats) { print ($frame?"| ":""); print "$Message[59]"; print ($frame?" |
\n":" "); }
@@ -5249,7 +5264,7 @@ EOF
$linetitle=$ShowCompressionStats+$ShowHTTPErrorsStats;
if ($linetitle) { print "| $Message[2] : | \n"; }
if ($linetitle) { print ($frame?"
\n":""); }
- if ($ShowCompressionStats) { print ($frame?" | | ":""); print "$Message[98]"; print ($frame?" |
\n":" "); }
+ if ($ShowFileTypesStats =~ /C/i) { print ($frame?"| ":""); print "$Message[98]"; print ($frame?" |
\n":" "); }
if ($ShowHTTPErrorsStats) { print ($frame?"| ":""); print "$Message[22]"; print ($frame?" |
\n":" "); }
if ($ShowHTTPErrorsStats) { print ($frame?" ":""); print "$Message[31]\n"; print ($frame?" |
\n":" "); }
if ($linetitle) { print ($frame?"":"\n"); }
@@ -5385,11 +5400,11 @@ EOF
for (my $ix=1; $ix<=12; $ix++) {
my $monthix=sprintf("%02s",$ix);
my $bredde_u=0; my $bredde_v=0;my $bredde_p=0;my $bredde_h=0;my $bredde_k=0;
- if ($max_v > 0) { $bredde_u=int($MonthUnique{$YearRequired.$monthix}/$max_v*$BarHeight/2)+1; }
- if ($max_v > 0) { $bredde_v=int($MonthVisits{$YearRequired.$monthix}/$max_v*$BarHeight/2)+1; }
- if ($max_h > 0) { $bredde_p=int($MonthPages{$YearRequired.$monthix}/$max_h*$BarHeight/2)+1; }
- if ($max_h > 0) { $bredde_h=int($MonthHits{$YearRequired.$monthix}/$max_h*$BarHeight/2)+1; }
- if ($max_k > 0) { $bredde_k=int($MonthBytes{$YearRequired.$monthix}/$max_k*$BarHeight/2)+1; }
+ if ($max_v > 0) { $bredde_u=int($MonthUnique{$YearRequired.$monthix}/$max_v*$BarHeight)+1; }
+ if ($max_v > 0) { $bredde_v=int($MonthVisits{$YearRequired.$monthix}/$max_v*$BarHeight)+1; }
+ if ($max_h > 0) { $bredde_p=int($MonthPages{$YearRequired.$monthix}/$max_h*$BarHeight)+1; }
+ if ($max_h > 0) { $bredde_h=int($MonthHits{$YearRequired.$monthix}/$max_h*$BarHeight)+1; }
+ if ($max_k > 0) { $bredde_k=int($MonthBytes{$YearRequired.$monthix}/$max_k*$BarHeight)+1; }
print "";
print " ";
print " ";
@@ -5490,10 +5505,10 @@ EOF
my $year=$1; my $month=$2; my $day=$3;
if (! DateIsValid($day,$month,$year)) { next; } # If not an existing day, go to next
my $bredde_v=0; my $bredde_p=0; my $bredde_h=0; my $bredde_k=0;
- if ($max_v > 0) { $bredde_v=int(($DayVisits{$year.$month.$day}||0)/$max_v*$BarHeight/2)+1; }
- if ($max_h > 0) { $bredde_p=int(($DayPages{$year.$month.$day}||0)/$max_h*$BarHeight/2)+1; }
- if ($max_h > 0) { $bredde_h=int(($DayHits{$year.$month.$day}||0)/$max_h*$BarHeight/2)+1; }
- if ($max_k > 0) { $bredde_k=int(($DayBytes{$year.$month.$day}||0)/$max_k*$BarHeight/2)+1; }
+ if ($max_v > 0) { $bredde_v=int(($DayVisits{$year.$month.$day}||0)/$max_v*$BarHeight)+1; }
+ if ($max_h > 0) { $bredde_p=int(($DayPages{$year.$month.$day}||0)/$max_h*$BarHeight)+1; }
+ if ($max_h > 0) { $bredde_h=int(($DayHits{$year.$month.$day}||0)/$max_h*$BarHeight)+1; }
+ if ($max_k > 0) { $bredde_k=int(($DayBytes{$year.$month.$day}||0)/$max_k*$BarHeight)+1; }
print " | ";
print " ";
print " ";
@@ -5504,10 +5519,10 @@ EOF
print " | | ";
print ""; # Show average value cell
my $bredde_v=0; my $bredde_p=0; my $bredde_h=0; my $bredde_k=0;
- if ($max_v > 0) { $bredde_v=int($avg_day_v/$max_v*$BarHeight/2)+1; }
- if ($max_h > 0) { $bredde_p=int($avg_day_p/$max_h*$BarHeight/2)+1; }
- if ($max_h > 0) { $bredde_h=int($avg_day_h/$max_h*$BarHeight/2)+1; }
- if ($max_k > 0) { $bredde_k=int($avg_day_k/$max_k*$BarHeight/2)+1; }
+ if ($max_v > 0) { $bredde_v=int($avg_day_v/$max_v*$BarHeight)+1; }
+ if ($max_h > 0) { $bredde_p=int($avg_day_p/$max_h*$BarHeight)+1; }
+ if ($max_h > 0) { $bredde_h=int($avg_day_h/$max_h*$BarHeight)+1; }
+ if ($max_k > 0) { $bredde_k=int($avg_day_k/$max_k*$BarHeight)+1; }
$avg_day_v=sprintf("%.2f",$avg_day_v);
$avg_day_p=sprintf("%.2f",$avg_day_p);
$avg_day_h=sprintf("%.2f",$avg_day_h);
@@ -5672,19 +5687,28 @@ EOF
&html_end;
exit(0);
}
- if ($HTMLOutput eq "alllogins") {
+ if ($HTMLOutput eq "alllogins" || $HTMLOutput eq "lastlogins") {
print "$Center \n";
- &tab_head($Message[94],19);
+ my $title="";
+ if ($HTMLOutput eq "alllogins") { $title.="$Message[94]"; }
+ if ($HTMLOutput eq "lastlogins") { $title.="$Message[9]"; }
+ &tab_head("$title",19);
print " | | $Message[94] : ".(scalar keys %_login_h)." | ";
- print "$Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n";
+ if ($ShowAuthenticatedUsers =~ /P/i) { print "$Message[56] | "; }
+ if ($ShowAuthenticatedUsers =~ /H/i) { print "$Message[57] | "; }
+ if ($ShowAuthenticatedUsers =~ /B/i) { print "$Message[75] | "; }
+ if ($ShowAuthenticatedUsers =~ /L/i) { print "$Message[9] | "; }
+ print "\n";
$total_p=$total_h=$total_k=0;
my $count=0;
- &BuildKeyList($MaxRowsInHTMLOutput,$MinHitHost,\%_login_h,\%_login_p);
+ if ($HTMLOutput eq "alllogins") { &BuildKeyList($MaxRowsInHTMLOutput,$MinHitHost,\%_login_h,\%_login_p); }
+ if ($HTMLOutput eq "lastlogins") { &BuildKeyList($MaxRowsInHTMLOutput,$MinHitHost,\%_login_h,\%_login_l); }
foreach my $key (@keylist) {
print "| $key | ";
- print "$_login_p{$key} | $_login_h{$key} | ".Format_Bytes($_login_k{$key})." | ";
- if ($_login_l{$key}) { print "".Format_Date($_login_l{$key},1)." | "; }
- else { print "- | "; }
+ if ($ShowAuthenticatedUsers =~ /P/i) { print "$_login_p{$key} | "; }
+ if ($ShowAuthenticatedUsers =~ /H/i) { print "$_login_h{$key} | "; }
+ if ($ShowAuthenticatedUsers =~ /B/i) { print "".Format_Bytes($_login_k{$key})." | "; }
+ if ($ShowAuthenticatedUsers =~ /L/i) { print "".($_login_l{$key}?Format_Date($_login_l{$key},1):"-")." | "; }
print "
\n";
$total_p += $_login_p{$key}||0;
$total_h += $_login_h{$key};
@@ -5697,38 +5721,11 @@ EOF
$rest_k=$TotalBytes-$total_k;
if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other logins and/or anonymous
print "| $Message[125] | ";
- print "$rest_p | $rest_h | ".Format_Bytes($rest_k)." | |
\n";
- }
- &tab_end;
- &html_end;
- exit(0);
- }
- if ($HTMLOutput eq "lastlogins") {
- print "$Center
\n";
- &tab_head($Message[9],19);
- print "| $Message[94] : ".(scalar keys %_login_h)." | ";
- print "$Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n";
- $total_p=$total_h=$total_k=0;
- my $count=0;
- &BuildKeyList($MaxRowsInHTMLOutput,$MinHitHost,\%_login_h,\%_login_l);
- foreach my $key (@keylist) {
- print "| $key | ";
- print "$_login_p{$key} | $_login_h{$key} | ".Format_Bytes($_login_k{$key})." | ";
- if ($_login_l{$key}) { print "".Format_Date($_login_l{$key},1)." | "; }
- else { print "- | "; }
+ if ($ShowAuthenticatedUsers =~ /P/i) { print "$rest_p | "; }
+ if ($ShowAuthenticatedUsers =~ /H/i) { print "$rest_h | "; }
+ if ($ShowAuthenticatedUsers =~ /B/i) { print "".Format_Bytes($rest_k)." | "; }
+ if ($ShowAuthenticatedUsers =~ /L/i) { print " | "; }
print "
\n";
- $total_p += $_login_p{$key}||0;
- $total_h += $_login_h{$key};
- $total_k += $_login_k{$key}||0;
- $count++;
- }
- if ($Debug) { debug("Total real / shown : $TotalPages / $total_p - $TotalHits / $total_h - $TotalBytes / $total_h",2); }
- $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 logins and/or anonymous
- print "| $Message[125] | ";
- print "$rest_p | $rest_h | ".Format_Bytes($rest_k)." | |
\n";
}
&tab_end;
&html_end;
@@ -5846,10 +5843,10 @@ EOF
}
else { print "$Message[102]: $cpt $Message[28]"; }
print "";
- print "$Message[29] | ";
- print "$Message[106] | ";
- print "$Message[104] | ";
- print "$Message[116] | ";
+ if ($ShowPagesStats =~ /H/i) { print "$Message[29] | "; }
+ if ($ShowPagesStats =~ /B/i) { print "$Message[106] | "; }
+ if ($ShowPagesStats =~ /E/i) { print "$Message[104] | "; }
+ if ($ShowPagesStats =~ /X/i) { print "$Message[116] | "; }
if ($PluginsLoaded{"etf1"}) { AddOn_ShowFields(""); }
print " | \n";
$total_p=$total_k=$total_e=$total_x=0;
@@ -5885,6 +5882,7 @@ EOF
else {
print "$nompage";
}
+ print "";
my $bredde_p=0; my $bredde_e=0; my $bredde_x=0; my $bredde_k=0;
if ($max_p > 0) { $bredde_p=int($BarWidth*($_url_p{$key}||0)/$max_p)+1; }
if (($bredde_p==1) && $_url_p{$key}) { $bredde_p=2; }
@@ -5894,13 +5892,16 @@ EOF
if (($bredde_x==1) && $_url_x{$key}) { $bredde_x=2; }
if ($max_k > 0) { $bredde_k=int($BarWidth*(($_url_k{$key}||0)/($_url_p{$key}||1))/$max_k)+1; }
if (($bredde_k==1) && $_url_k{$key}) { $bredde_k=2; }
- print "$_url_p{$key} | ".($_url_k{$key}?Format_Bytes($_url_k{$key}/($_url_p{$key}||1)):" ")." | ".($_url_e{$key}?$_url_e{$key}:" ")." | ".($_url_x{$key}?$_url_x{$key}:" ")." | ";
+ if ($ShowPagesStats =~ /H/i) { print "$_url_p{$key} | "; }
+ if ($ShowPagesStats =~ /B/i) { print "".($_url_k{$key}?Format_Bytes($_url_k{$key}/($_url_p{$key}||1)):" ")." | "; }
+ if ($ShowPagesStats =~ /E/i) { print "".($_url_e{$key}?$_url_e{$key}:" ")." | "; }
+ if ($ShowPagesStats =~ /X/i) { print "".($_url_x{$key}?$_url_x{$key}:" ")." | "; }
if ($PluginsLoaded{"etf1"}) { AddOn_ShowFields($key); }
print "";
- print " ";
- print " ";
- print " ";
- print " ";
+ if ($ShowPagesStats =~ /H/i) { print " "; }
+ if ($ShowPagesStats =~ /B/i) { print " "; }
+ if ($ShowPagesStats =~ /E/i) { print " "; }
+ if ($ShowPagesStats =~ /X/i) { print " "; }
print " | \n";
$total_p += $_url_p{$key};
$total_e += $_url_e{$key};
@@ -5913,8 +5914,13 @@ EOF
$rest_e=$TotalEntries-$total_e;
$rest_x=$TotalExits-$total_x;
$rest_k=$TotalBytesPages-$total_k;
- if ($rest_p > 0 || $rest_e > 0 || $rest_k) {
- print "| $Message[2] | ".($rest_p?$rest_p:" ")." | ".($rest_k?Format_Bytes($rest_k/$rest_p||1):" ")." | ".($rest_e?$rest_e:" ")." | ".($rest_x?$rest_x:" ")." | |
\n";
+ if ($rest_p > 0 || $rest_e > 0 || $rest_k > 0) {
+ print "| $Message[2] | ";
+ if ($ShowPagesStats =~ /H/i) { print "".($rest_p?$rest_p:" ")." | "; }
+ if ($ShowPagesStats =~ /B/i) { print "".($rest_k?Format_Bytes($rest_k/$rest_p||1):" ")." | "; }
+ if ($ShowPagesStats =~ /E/i) { print "".($rest_e?$rest_e:" ")." | "; }
+ if ($ShowPagesStats =~ /X/i) { print "".($rest_x?$rest_x:" ")." | "; }
+ print " |
\n";
}
&tab_end;
&html_end;
@@ -6198,11 +6204,11 @@ EOF
for (my $ix=1; $ix<=12; $ix++) {
my $monthix=sprintf("%02s",$ix);
my $bredde_u=0; my $bredde_v=0;my $bredde_p=0;my $bredde_h=0;my $bredde_k=0;
- if ($max_v > 0) { $bredde_u=int($MonthUnique{$YearRequired.$monthix}/$max_v*$BarHeight/2)+1; }
- if ($max_v > 0) { $bredde_v=int($MonthVisits{$YearRequired.$monthix}/$max_v*$BarHeight/2)+1; }
- if ($max_h > 0) { $bredde_p=int($MonthPages{$YearRequired.$monthix}/$max_h*$BarHeight/2)+1; }
- if ($max_h > 0) { $bredde_h=int($MonthHits{$YearRequired.$monthix}/$max_h*$BarHeight/2)+1; }
- if ($max_k > 0) { $bredde_k=int($MonthBytes{$YearRequired.$monthix}/$max_k*$BarHeight/2)+1; }
+ if ($max_v > 0) { $bredde_u=int($MonthUnique{$YearRequired.$monthix}/$max_v*$BarHeight)+1; }
+ if ($max_v > 0) { $bredde_v=int($MonthVisits{$YearRequired.$monthix}/$max_v*$BarHeight)+1; }
+ if ($max_h > 0) { $bredde_p=int($MonthPages{$YearRequired.$monthix}/$max_h*$BarHeight)+1; }
+ if ($max_h > 0) { $bredde_h=int($MonthHits{$YearRequired.$monthix}/$max_h*$BarHeight)+1; }
+ if ($max_k > 0) { $bredde_k=int($MonthBytes{$YearRequired.$monthix}/$max_k*$BarHeight)+1; }
print "";
print " ";
print " ";
@@ -6273,10 +6279,10 @@ EOF
my $year=$1; my $month=$2; my $day=$3;
if (! DateIsValid($day,$month,$year)) { next; } # If not an existing day, go to next
my $bredde_v=0; my $bredde_p=0; my $bredde_h=0; my $bredde_k=0;
- if ($max_v > 0) { $bredde_v=int(($DayVisits{$year.$month.$day}||0)/$max_v*$BarHeight/2)+1; }
- if ($max_h > 0) { $bredde_p=int(($DayPages{$year.$month.$day}||0)/$max_h*$BarHeight/2)+1; }
- if ($max_h > 0) { $bredde_h=int(($DayHits{$year.$month.$day}||0)/$max_h*$BarHeight/2)+1; }
- if ($max_k > 0) { $bredde_k=int(($DayBytes{$year.$month.$day}||0)/$max_k*$BarHeight/2)+1; }
+ if ($max_v > 0) { $bredde_v=int(($DayVisits{$year.$month.$day}||0)/$max_v*$BarHeight)+1; }
+ if ($max_h > 0) { $bredde_p=int(($DayPages{$year.$month.$day}||0)/$max_h*$BarHeight)+1; }
+ if ($max_h > 0) { $bredde_h=int(($DayHits{$year.$month.$day}||0)/$max_h*$BarHeight)+1; }
+ if ($max_k > 0) { $bredde_k=int(($DayBytes{$year.$month.$day}||0)/$max_k*$BarHeight)+1; }
print " | ";
print " ";
print " ";
@@ -6288,10 +6294,10 @@ EOF
# Show average value cell
print " | ";
my $bredde_v=0; my $bredde_p=0; my $bredde_h=0; my $bredde_k=0;
- if ($max_v > 0) { $bredde_v=int($avg_day_v/$max_v*$BarHeight/2)+1; }
- if ($max_h > 0) { $bredde_p=int($avg_day_p/$max_h*$BarHeight/2)+1; }
- if ($max_h > 0) { $bredde_h=int($avg_day_h/$max_h*$BarHeight/2)+1; }
- if ($max_k > 0) { $bredde_k=int($avg_day_k/$max_k*$BarHeight/2)+1; }
+ if ($max_v > 0) { $bredde_v=int($avg_day_v/$max_v*$BarHeight)+1; }
+ if ($max_h > 0) { $bredde_p=int($avg_day_p/$max_h*$BarHeight)+1; }
+ if ($max_h > 0) { $bredde_h=int($avg_day_h/$max_h*$BarHeight)+1; }
+ if ($max_k > 0) { $bredde_k=int($avg_day_k/$max_k*$BarHeight)+1; }
$avg_day_v=sprintf("%.2f",$avg_day_v);
$avg_day_p=sprintf("%.2f",$avg_day_p);
$avg_day_h=sprintf("%.2f",$avg_day_h);
@@ -6376,9 +6382,9 @@ EOF
}
for (@DOWIndex) {
my $bredde_p=0; my $bredde_h=0; my $bredde_k=0;
- if ($max_h > 0) { $bredde_p=int($avg_dayofweek_p[$_]/$max_h*$BarHeight/2)+1; }
- if ($max_h > 0) { $bredde_h=int($avg_dayofweek_h[$_]/$max_h*$BarHeight/2)+1; }
- if ($max_k > 0) { $bredde_k=int($avg_dayofweek_k[$_]/$max_k*$BarHeight/2)+1; }
+ if ($max_h > 0) { $bredde_p=int($avg_dayofweek_p[$_]/$max_h*$BarHeight)+1; }
+ if ($max_h > 0) { $bredde_h=int($avg_dayofweek_h[$_]/$max_h*$BarHeight)+1; }
+ if ($max_k > 0) { $bredde_k=int($avg_dayofweek_k[$_]/$max_k*$BarHeight)+1; }
$avg_dayofweek_p[$_]=sprintf("%.2f",$avg_dayofweek_p[$_]);
$avg_dayofweek_h[$_]=sprintf("%.2f",$avg_dayofweek_h[$_]);
$avg_dayofweek_k[$_]=sprintf("%.2f",$avg_dayofweek_k[$_]);
@@ -6394,11 +6400,28 @@ EOF
print "\n";
print " | \n";
for (@DOWIndex) {
- print "| ".$Message[$_+84]." | ";
+ print "".$Message[$_+84]." | ";
}
- print "
";
+ print "\n";
+ print "
\n";
+
+ # Show data array for days of week
+ print "\n";
+ print "| $Message[4] | ";
+ print "$Message[56] | ";
+ print "$Message[57] | ";
+ print "$Message[75] |
";
+ for (@DOWIndex) {
+ print "";
+ print "| ".$Message[$_+84]." | ";
+ print "",$avg_dayofweek_p[$_]," | ";
+ print "",$avg_dayofweek_h[$_]," | ";
+ print "",Format_Bytes($avg_dayofweek_k[$_])," | ";
+ print "
\n";
+ }
+ print "
\n
\n";
+
+ print "";
print "\n";
&tab_end;
}
@@ -6408,24 +6431,16 @@ EOF
if ($ShowHoursStats) {
if ($Debug) { debug("ShowHoursStats",2); }
print "$Center
\n";
- my $title=$Message[20];
+ my $title="$Message[20]";
if ($PluginsLoaded{"timezone"}) { $title.=($PluginsLoaded{"timezone"}?" (GMT ".($PluginsLoaded{"timezone"}>=0?"+":"").int($PluginsLoaded{"timezone"}/3600).")":"i"); }
- &tab_head($title,19);
- print "\n";
+ &tab_head("$title",19);
+ print " \n";
$max_h=$max_k=1;
for (my $ix=0; $ix<=23; $ix++) {
- print "| $ix | \n"; # width=19 instead of 18 to avoid a MacOS browser bug.
#if ($_time_p[$ix]>$max_p) { $max_p=$_time_p[$ix]; }
if ($_time_h[$ix]>$max_h) { $max_h=$_time_h[$ix]; }
if ($_time_k[$ix]>$max_k) { $max_k=$_time_k[$ix]; }
}
- print "\n";
- print "\n";
- for (my $ix=0; $ix<=23; $ix++) {
- my $hr=($ix+1); if ($hr>12) { $hr=$hr-12; }
- print " | \n";
- }
- print " \n";
print "\n";
for (my $ix=0; $ix<=23; $ix++) {
my $bredde_p=0;my $bredde_h=0;my $bredde_k=0;
@@ -6438,7 +6453,42 @@ EOF
print " ";
print "\n";
}
- print " | \n";
+ print "";
+ # Show clock icon
+ print "";
+ for (my $ix=0; $ix<=23; $ix++) {
+ print "| $ix | \n"; # width=19 instead of 18 to avoid a MacOS browser bug.
+ }
+ print " \n";
+ # Show hour lib
+ print "\n";
+ for (my $ix=0; $ix<=23; $ix++) {
+ my $hr=($ix+1); if ($hr>12) { $hr=$hr-12; }
+ print " | \n";
+ }
+ print " \n";
+
+ print " \n";
+ print " \n";
+
+ # Show data array for hours
+ print "\n";
+ print "| $Message[20] | ";
+ print "$Message[56] | ";
+ print "$Message[57] | ";
+ print "$Message[75] | ";
+ for (my $ix=1; $ix<=23; $ix++) {
+ my $monthix=($ix<10?"0$ix":"$ix");
+ print "";
+ print "| $monthix | ";
+ print "",$_time_p[$monthix]?$_time_p[$monthix]:"0"," | ";
+ print "",$_time_h[$monthix]?$_time_h[$monthix]:"0"," | ";
+ print "",Format_Bytes(int($_time_k[$monthix]))," | ";
+ print " \n";
+ }
+ print " \n \n";
+
+ print " |
\n";
&tab_end;
}
@@ -6534,8 +6584,15 @@ EOF
if ($ShowAuthenticatedUsers) {
if ($Debug) { debug("ShowAuthenticatedUsers",2); }
print "$Center
\n";
- &tab_head("$Message[94] ($Message[77] $MaxNbOfLoginShown) - $Message[80] - $Message[9]",19);
- print "| $Message[94] : ".(scalar keys %_login_h)." | $Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n";
+ my $title="$Message[94] ($Message[77] $MaxNbOfLoginShown) - $Message[80]";
+ if ($ShowAuthenticatedUsers =~ /L/i) { $title.=" - $Message[9]"; }
+ &tab_head("$title",19);
+ print "| $Message[94] : ".(scalar keys %_login_h)." | ";
+ if ($ShowAuthenticatedUsers =~ /P/i) { print "$Message[56] | "; }
+ if ($ShowAuthenticatedUsers =~ /H/i) { print "$Message[57] | "; }
+ if ($ShowAuthenticatedUsers =~ /B/i) { print "$Message[75] | "; }
+ if ($ShowAuthenticatedUsers =~ /L/i) { print "$Message[9] | "; }
+ print "
\n";
$total_p=$total_h=$total_k=0;
$max_h=1; foreach my $key (values %_login_h) { if ($key > $max_h) { $max_h = $key; } }
$max_k=1; foreach my $key (values %_login_k) { if ($key > $max_k) { $max_k = $key; } }
@@ -6547,9 +6604,10 @@ EOF
if ($max_h > 0) { $bredde_h=int($BarWidth*$_login_h{$key}/$max_h)+1; }
if ($max_k > 0) { $bredde_k=int($BarWidth*$_login_k{$key}/$max_k)+1; }
print "| $key | ";
- print "$_login_p{$key} | $_login_h{$key} | ".Format_Bytes($_login_k{$key})." | ";
- if ($_login_l{$key}) { print "".Format_Date($_login_l{$key},1)." | "; }
- else { print "- | "; }
+ if ($ShowAuthenticatedUsers =~ /P/i) { print "$_login_p{$key} | "; }
+ if ($ShowAuthenticatedUsers =~ /H/i) { print "$_login_h{$key} | "; }
+ if ($ShowAuthenticatedUsers =~ /B/i) { print "".Format_Bytes($_login_k{$key})." | "; }
+ if ($ShowAuthenticatedUsers =~ /L/i) { print "".($_login_l{$key}?Format_Date($_login_l{$key},1):"-")." | "; }
#print "";
#print "![\"$Message[56]: \"$Message[56]:](\"$DirIcons\/other\/$BarImageHorizontal_p\") \n";
#print "![\"$Message[57]: \"$Message[57]:](\"$DirIcons\/other\/$BarImageHorizontal_h\") \n";
@@ -6565,7 +6623,12 @@ EOF
$rest_h=$TotalHits-$total_h;
$rest_k=$TotalBytes-$total_k;
if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other login
- print " |
| $Message[125] | $rest_p | $rest_h | ".Format_Bytes($rest_k)." | |
\n";
+ print "| $Message[125] | ";
+ if ($ShowAuthenticatedUsers =~ /P/i) { print "$rest_p | "; }
+ if ($ShowAuthenticatedUsers =~ /H/i) { print "$rest_h | "; }
+ if ($ShowAuthenticatedUsers =~ /B/i) { print "".Format_Bytes($rest_k)." | "; }
+ if ($ShowAuthenticatedUsers =~ /L/i) { print " | "; }
+ print "
\n";
}
&tab_end;
}
@@ -6632,12 +6695,15 @@ EOF
if ($ShowPagesStats) {
if ($Debug) { debug("ShowPagesStats (MaxNbOfPageShown=$MaxNbOfPageShown TotalDifferentPages=$TotalDifferentPages)",2); }
print "$Center
\n";
- &tab_head("$Message[19] ($Message[77] $MaxNbOfPageShown) - $Message[80] - $Message[104] - $Message[116]",19);
+ my $title="$Message[19] ($Message[77] $MaxNbOfPageShown) - $Message[80]";
+ if ($ShowPagesStats =~ /E/i) { $title.=" - $Message[104]"; }
+ if ($ShowPagesStats =~ /X/i) { $title.=" - $Message[116]"; }
+ &tab_head("$title",19);
print "| $TotalDifferentPages $Message[28] | ";
- print "$Message[29] | ";
- print "$Message[106] | ";
- print "$Message[104] | ";
- print "$Message[116] | ";
+ if ($ShowPagesStats =~ /H/i) { print "$Message[29] | "; }
+ if ($ShowPagesStats =~ /B/i) { print "$Message[106] | "; }
+ if ($ShowPagesStats =~ /E/i) { print "$Message[104] | "; }
+ if ($ShowPagesStats =~ /X/i) { print "$Message[116] | "; }
print " |
\n";
$total_p=$total_e=$total_x=$total_k=0;
$max_p=1; $max_k=1;
@@ -6670,6 +6736,7 @@ EOF
else {
print "$nompage";
}
+ print "";
my $bredde_p=0; my $bredde_e=0; my $bredde_x=0; my $bredde_k=0;
if ($max_p > 0) { $bredde_p=int($BarWidth*($_url_p{$key}||0)/$max_p)+1; }
if (($bredde_p==1) && $_url_p{$key}) { $bredde_p=2; }
@@ -6679,12 +6746,15 @@ EOF
if (($bredde_x==1) && $_url_x{$key}) { $bredde_x=2; }
if ($max_k > 0) { $bredde_k=int($BarWidth*(($_url_k{$key}||0)/($_url_p{$key}||1))/$max_k)+1; }
if (($bredde_k==1) && $_url_k{$key}) { $bredde_k=2; }
- print "$_url_p{$key} | ".($_url_k{$key}?Format_Bytes($_url_k{$key}/($_url_p{$key}||1)):" ")." | ".($_url_e{$key}?$_url_e{$key}:" ")." | ".($_url_x{$key}?$_url_x{$key}:" ")." | ";
+ if ($ShowPagesStats =~ /H/i) { print "$_url_p{$key} | "; }
+ if ($ShowPagesStats =~ /B/i) { print "".($_url_k{$key}?Format_Bytes($_url_k{$key}/($_url_p{$key}||1)):" ")." | "; }
+ if ($ShowPagesStats =~ /E/i) { print "".($_url_e{$key}?$_url_e{$key}:" ")." | "; }
+ if ($ShowPagesStats =~ /X/i) { print "".($_url_x{$key}?$_url_x{$key}:" ")." | "; }
print "";
- print "![\"$Message[56]: \"$Message[56]:](\"$DirIcons\/other\/$BarImageHorizontal_p\") ";
- print "![\"$Message[106]: \"$Message[106]:](\"$DirIcons\/other\/$BarImageHorizontal_k\") ";
- print "![\"$Message[104]: \"$Message[104]:](\"$DirIcons\/other\/$BarImageHorizontal_e\") ";
- print " ";
+ if ($ShowPagesStats =~ /H/i) { print "![\"$Message[56]: \"$Message[56]:](\"$DirIcons\/other\/$BarImageHorizontal_p\") "; }
+ if ($ShowPagesStats =~ /B/i) { print "![\"$Message[106]: \"$Message[106]:](\"$DirIcons\/other\/$BarImageHorizontal_k\") "; }
+ if ($ShowPagesStats =~ /E/i) { print "![\"$Message[104]: \"$Message[104]:](\"$DirIcons\/other\/$BarImageHorizontal_e\") "; }
+ if ($ShowPagesStats =~ /X/i) { print " "; }
print " | \n";
$total_p += $_url_p{$key};
$total_e += $_url_e{$key};
@@ -6697,7 +6767,12 @@ EOF
$rest_x=$TotalExits-$total_x;
$rest_k=$TotalBytesPages-$total_k;
if ($rest_p > 0 || $rest_k > 0 || $rest_e > 0 || $rest_x > 0) { # All other urls
- print "| $Message[2] | $rest_p | ".($rest_k?Format_Bytes($rest_k/($rest_p||1)):" ")." | ".($rest_e?$rest_e:" ")." | ".($rest_x?$rest_x:" ")." | |
\n";
+ print "| $Message[2] | ";
+ if ($ShowPagesStats =~ /H/i) { print "$rest_p | "; }
+ if ($ShowPagesStats =~ /B/i) { print "".($rest_k?Format_Bytes($rest_k/($rest_p||1)):" ")." | "; }
+ if ($ShowPagesStats =~ /E/i) { print "".($rest_e?$rest_e:" ")." | "; }
+ if ($ShowPagesStats =~ /X/i) { print "".($rest_x?$rest_x:" ")." | "; }
+ print " |
\n";
}
&tab_end;
}
@@ -6712,13 +6787,9 @@ EOF
if ($ShowCompressionStats) { &tab_head("$Message[73] - $Message[98]",19); }
else { &tab_head("$Message[73]",19); }
print "| $Message[73] | ";
- print " $Message[57] | $Message[15] | ";
- if ($ShowCompressionStats) {
- print "$Message[75] | $Message[100] | $Message[101] | $Message[99] | ";
- }
- else {
- print "$Message[75] | ";
- }
+ if ($ShowFileTypesStats =~ /H/i) { print " $Message[57] | $Message[15] | "; }
+ if ($ShowFileTypesStats =~ /B/i) { print "$Message[75] | "; }
+ if ($ShowFileTypesStats =~ /C/i) { print "$Message[100] | $Message[101] | $Message[99] | "; }
print "
\n";
my $count=0;
foreach my $key (sort { $_filetypes_h{$b} <=> $_filetypes_h{$a} } keys (%_filetypes_h)) {
@@ -6729,19 +6800,17 @@ EOF
else {
print "| $key | ";
}
- print "$_filetypes_h{$key} | $p % | ";
- if ($ShowCompressionStats) {
+ if ($ShowFileTypesStats =~ /H/i) { print "$_filetypes_h{$key} | $p % | "; }
+ if ($ShowFileTypesStats =~ /B/i) { print "".Format_Bytes($_filetypes_k{$key})." | "; }
+ if ($ShowFileTypesStats =~ /C/i) {
if ($_filetypes_gz_in{$key}) {
my $percent=int(100*(1-$_filetypes_gz_out{$key}/$_filetypes_gz_in{$key}));
- printf("%s | %s | %s | %s (%s%) | ",Format_Bytes($_filetypes_k{$key}),Format_Bytes($_filetypes_gz_in{$key}),Format_Bytes($_filetypes_gz_out{$key}),Format_Bytes($_filetypes_gz_in{$key}-$_filetypes_gz_out{$key}),$percent);
+ printf("%s | %s | %s (%s%) | ",Format_Bytes($_filetypes_gz_in{$key}),Format_Bytes($_filetypes_gz_out{$key}),Format_Bytes($_filetypes_gz_in{$key}-$_filetypes_gz_out{$key}),$percent);
}
else {
- printf("%s | | | | ",Format_Bytes($_filetypes_k{$key}));
+ print " | | | ";
}
}
- else {
- printf("%s | ",Format_Bytes($_filetypes_k{$key}));
- }
print "
\n";
$count++;
}