From: eldy <>
Date: Sun, 8 Dec 2002 20:55:00 +0000 (+0000)
Subject: Reduced HTML report size.
X-Git-Tag: AWSTATS_5_3_BETA~28
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a74276b5e4a37a7d5df1bd7d444b511f64cede3;p=thirdparty%2FAWStats.git
Reduced HTML report size.
---
diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
index d83cb899..c51cae5d 100644
--- a/wwwroot/cgi-bin/awstats.pl
+++ b/wwwroot/cgi-bin/awstats.pl
@@ -1630,7 +1630,7 @@ sub Check_Config {
$ExtraConditionTypeVal[$extranum][$part]=($URLNotCaseSensitive?lc($conditiontypeval):$conditiontypeval);
$part++;
}
- my $part=0;
+ $part=0;
foreach my $rowkeycouple (split(/\s\|\s/, $ExtraFirstColumnValues[$extranum])) {
my ($rowkeytype, $rowkeytypeval)=split(/,/,$rowkeycouple,2);
$ExtraFirstColumnValuesType[$extranum][$part]=$rowkeytype;
@@ -4235,7 +4235,7 @@ if ($ENV{'GATEWAY_INTERFACE'}) { # Run from a browser
# Expires must be GMT ANSI asctime and must be after Content-type to avoid pb with some servers (SAMBAR)
#my $ExpireDelayInHTTPHeader=0;
#print "Expires: ".(gmtime($starttime()+$ExpireDelayInHTTPHeader))."\n";
- print "\n\n";
+ print "\n";
if ($ENV{'CONTENT_LENGTH'}) {
binmode STDIN;
read(STDIN, $QueryString, $ENV{'CONTENT_LENGTH'});
@@ -7168,13 +7168,13 @@ EOF
print "\n";
print "\n";
# Show lib for day
- print "
";
+ print "
";
foreach my $daycursor ($firstdaytoshowtime..$lastdaytoshowtime) {
$daycursor =~ /^(\d\d\d\d)(\d\d)(\d\d)/;
my $year=$1; my $month=$2; my $day=$3;
if (! DateIsValid($day,$month,$year)) { next; } # If not an existing day, go to next
my $dayofweekcursor=DayOfWeek($day,$month,$year);
- print "| ";
+ print " | ";
print ($day==$nowday && $month==$nowmonth && $year==$nowyear?'':'');
print "$day ".$MonthLib{$month}."";
print ($day==$nowday && $month==$nowmonth && $year==$nowyear?'':'');
@@ -7198,27 +7198,27 @@ 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 $dayofweekcursor=DayOfWeek($day,$month,$year);
- print " |
";
- print "| ",Format_Date("$year$month$day"."000000",2)," | ";
- if ($ShowMonthDayStats =~ /V/i) { print "",$DayVisits{$year.$month.$day}?$DayVisits{$year.$month.$day}:"0"," | "; }
- if ($ShowMonthDayStats =~ /P/i) { print "",$DayPages{$year.$month.$day}?$DayPages{$year.$month.$day}:"0"," | "; }
- if ($ShowMonthDayStats =~ /H/i) { print "",$DayHits{$year.$month.$day}?$DayHits{$year.$month.$day}:"0"," | "; }
- if ($ShowMonthDayStats =~ /B/i) { print "",Format_Bytes(int($DayBytes{$year.$month.$day}))," | "; }
+ print "
";
+ print "| ",Format_Date("$year$month$day"."000000",2)," | ";
+ if ($ShowMonthDayStats =~ /V/i) { print "",$DayVisits{$year.$month.$day}?$DayVisits{$year.$month.$day}:"0"," | "; }
+ if ($ShowMonthDayStats =~ /P/i) { print "",$DayPages{$year.$month.$day}?$DayPages{$year.$month.$day}:"0"," | "; }
+ if ($ShowMonthDayStats =~ /H/i) { print "",$DayHits{$year.$month.$day}?$DayHits{$year.$month.$day}:"0"," | "; }
+ if ($ShowMonthDayStats =~ /B/i) { print "",Format_Bytes(int($DayBytes{$year.$month.$day}))," | "; }
print "
\n";
}
# Average row
- print "| $Message[96] | ";
- if ($ShowMonthDayStats =~ /V/i) { print "$average_v | "; }
- if ($ShowMonthDayStats =~ /P/i) { print "$average_p | "; }
- if ($ShowMonthDayStats =~ /H/i) { print "$average_h | "; }
- if ($ShowMonthDayStats =~ /B/i) { print "$average_k | "; }
+ print "
| $Message[96] | ";
+ if ($ShowMonthDayStats =~ /V/i) { print "$average_v | "; }
+ if ($ShowMonthDayStats =~ /P/i) { print "$average_p | "; }
+ if ($ShowMonthDayStats =~ /H/i) { print "$average_h | "; }
+ if ($ShowMonthDayStats =~ /B/i) { print "$average_k | "; }
print "
\n";
# Total row
- print "| $Message[102] | ";
- if ($ShowMonthDayStats =~ /V/i) { print "$total_v | "; }
- if ($ShowMonthDayStats =~ /P/i) { print "$total_p | "; }
- if ($ShowMonthDayStats =~ /H/i) { print "$total_h | "; }
- if ($ShowMonthDayStats =~ /B/i) { print "".Format_Bytes($total_k)." | "; }
+ print "
| $Message[102] | ";
+ if ($ShowMonthDayStats =~ /V/i) { print "$total_v | "; }
+ if ($ShowMonthDayStats =~ /P/i) { print "$total_p | "; }
+ if ($ShowMonthDayStats =~ /H/i) { print "$total_h | "; }
+ if ($ShowMonthDayStats =~ /B/i) { print "".Format_Bytes($total_k)." | "; }
print "
\n";
print "\n
";
@@ -7309,11 +7309,11 @@ EOF
if ($ShowDaysOfWeekStats =~ /H/i) { print "$Message[57] | "; }
if ($ShowDaysOfWeekStats =~ /B/i) { print "$Message[75] | "; }
for (@DOWIndex) {
- print "";
- print "| ".$Message[$_+84]." | ";
- if ($ShowDaysOfWeekStats =~ /P/i) { print "",$avg_dayofweek_p[$_]," | "; }
- if ($ShowDaysOfWeekStats =~ /H/i) { print "",$avg_dayofweek_h[$_]," | "; }
- if ($ShowDaysOfWeekStats =~ /B/i) { print "",Format_Bytes($avg_dayofweek_k[$_])," | "; }
+ print "
";
+ print "| ".$Message[$_+84]." | ";
+ if ($ShowDaysOfWeekStats =~ /P/i) { print "",$avg_dayofweek_p[$_]," | "; }
+ if ($ShowDaysOfWeekStats =~ /H/i) { print "",$avg_dayofweek_h[$_]," | "; }
+ if ($ShowDaysOfWeekStats =~ /B/i) { print "",Format_Bytes($avg_dayofweek_k[$_])," | "; }
print "
\n";
}
print "\n
\n";
@@ -7348,9 +7348,9 @@ EOF
if ($ShowHoursStats =~ /P/i) { print "
"; }
if ($ShowHoursStats =~ /H/i) { print "
"; }
if ($ShowHoursStats =~ /B/i) { print "
"; }
- print "";
+ print "\n";
}
- print "";
+ print "\n";
# Show hour lib
print "";
for (my $ix=0; $ix<=23; $ix++) {
@@ -7837,16 +7837,16 @@ EOF
my $keywithoutcumul=$key; $keywithoutcumul =~ s/cumul$//i;
my $libbrowser=$BrowsersHashIDLib{$keywithoutcumul}||$keywithoutcumul;
my $nameicon=$BrowsersHashIcon{$keywithoutcumul}||"notavailable";
- if ($libbrowser eq "netscape") { $libbrowser="Netscape ($Message[58])"; }
- if ($libbrowser eq "msie") { $libbrowser="MS Internet Explorer ($Message[58])"; }
- print "
 | $libbrowser | ".($BrowsersHereAreGrabbers{$key}?"$Message[112]":"$Message[113]")." | $new_browser_h{$key} | $p % |
\n";
+ if ($libbrowser eq 'netscape') { $libbrowser="Netscape ($Message[58])"; }
+ if ($libbrowser eq 'msie') { $libbrowser="MS Internet Explorer ($Message[58])"; }
+ print " | $libbrowser | ".($BrowsersHereAreGrabbers{$key}?"$Message[112]":"$Message[113]")." | $new_browser_h{$key} | $p % |
\n";
}
$count++;
}
&tab_end;
}
- print "\n \n\n";
+ print "\n \n\n";
# BY REFERENCE
#---------------------------