From: eldy <> Date: Sat, 20 Sep 2003 07:36:56 +0000 (+0000) Subject: Various changes/fix on PDF export. X-Git-Tag: AWSTATS_5_9_BETA~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79d2f184a212530d285018bcd8ea0d68aead686e;p=thirdparty%2FAWStats.git Various changes/fix on PDF export. --- diff --git a/docs/awstats_changelog.txt b/docs/awstats_changelog.txt index b5ce60a2..c76d7f9c 100644 --- a/docs/awstats_changelog.txt +++ b/docs/awstats_changelog.txt @@ -11,8 +11,36 @@ Fixes: Support mail errors in qmail log files. Return code for postfix log were all reported in error for mails sent to several recipients when one recipient was in error. +- Fixed wrong percentage in cluster report. +- Fixed wrong parsing for qmail log files. +- Return code for postfix log were all reported in error for mails sent to several + recipients when one recipient was in error. +- Fix a not closing HTML TR tag in full list of hosts. +- awstats_buildstaticpages.pl can accept month on 1 digit. +- awstats_buildstaticpages.pl no more try to build pages awstats.misc.html and + awstats.filetypes.html that does not exists. +- A lot of fix in PDF export: + Graph in PDF export are no more inverted. + The link "close window" in generated PDF pages is replaced by "back + to main page". + Infos popup window from hostinfo plugin is not included in PDF export. Popup can't + work into PDF. + PDF export seems to work correctly now. + New features/improvements: - AWStats Webmin module updated to 1.1 +- Added the AllowFullYearView parameter. +- Year entry in combo box is now the localized text for "Year" instead of '---' +- Support of some exchange format in maillogconvert.pl +- Option -noloadplugin of awstats_buildstaticpages.pl can accept a list of + plugins separated by comma. +- Support mail errors for qmail log files. +- Added the -diricons option from awstats_buildstaticpages.pl + + +Other/Documentation: +- Added rpm, deb and msi mime types +- Added documentation page for using AWStats Webmin module diff --git a/tools/awstats_buildstaticpages.pl b/tools/awstats_buildstaticpages.pl index 6f2bf696..7eeb145e 100644 --- a/tools/awstats_buildstaticpages.pl +++ b/tools/awstats_buildstaticpages.pl @@ -230,14 +230,15 @@ if ($QueryString =~ /(^|-|&)month=(year)/i) { error("month=year is a deprecated if ($QueryString =~ /(^|-|&)debug=(\d+)/i) { $Debug=$2; } if ($QueryString =~ /(^|-|&)config=([^&]+)/i) { $SiteConfig="$2"; } if ($QueryString =~ /(^|-|&)awstatsprog=([^&]+)/i) { $Awstats="$2"; } -if ($QueryString =~ /(^|-|&)buildpdf=([^&]+)/i) { $HtmlDoc="$2"; $BuildPDF=1; } +if ($QueryString =~ /(^|-|&)buildpdf/i) { $BuildPDF=1; } +if ($QueryString =~ /(^|-|&)buildpdf=([^&]+)/i) { $HtmlDoc="$2"; } if ($QueryString =~ /(^|-|&)staticlinksext=([^&]+)/i) { $StaticExt="$2"; } if ($QueryString =~ /(^|-|&)dir=([^&]+)/i) { $OutputDir="$2"; } if ($QueryString =~ /(^|-|&)diricons=([^&]+)/i) { $DirIcons="$2"; } if ($QueryString =~ /(^|-|&)update/i) { $Update=1; } if ($QueryString =~ /(^|-|&)date/i) { $Date=1; } if ($QueryString =~ /(^|-|&)year=(\d\d\d\d)/i) { $YearRequired="$2"; } -if ($QueryString =~ /(^|-|&)month=(\d\d)/i || $QueryString =~ /(^|-|&)month=(all)/i) { $MonthRequired="$2"; } +if ($QueryString =~ /(^|-|&)month=(\d{1,2})/i || $QueryString =~ /(^|-|&)month=(all)/i) { $MonthRequired="$2"; } if ($QueryString =~ /(^|-|&)lang=([^&]+)/i) { $Lang="$2"; } if ($OutputDir) { if ($OutputDir !~ /[\\\/]$/) { $OutputDir.="/"; } } @@ -260,11 +261,12 @@ if (! $SiteConfig) { print " and awstatsbuildstaticpages_options can be\n"; print " -awstatsprog=pathtoawstatspl AWStats software (awstats.pl) path\n"; print " -dir=outputdir Output directory for generated pages\n"; + print " -diricons=icondir Relative path to use as icon dir in links\n"; print " -date Used to add build date in built pages file name\n"; print " -staticlinksext=xxx For pages with .xxx extension instead of .html\n"; print " -buildpdf[=pathtohtmldoc] Build a PDF file after building HTML pages.\n"; print " Output directory must contains icon directory\n"; - print " when this option is used (need 'htmldoc').\n"; + print " when this option is used (need 'htmldoc')\n"; print "\n"; print "New versions and FAQ at http://awstats.sourceforge.net\n"; exit 0; @@ -290,8 +292,8 @@ debug("AwstatsDir=$AwstatsDir"); # Check if HTMLDOC prog is found if ($BuildPDF) { my $HtmlDocFound=0; - if (-s "$HtmlDoc") { $HtmlDocFound=1; } - elsif (-s "/usr/bin/htmldoc") { + if (-x "$HtmlDoc") { $HtmlDocFound=1; } + elsif (-x "/usr/bin/htmldoc") { $HtmlDoc='/usr/bin/htmldoc'; $HtmlDocFound=1; } @@ -313,17 +315,19 @@ if ($ShowEMailSenders) { push @OutputList,'allemails'; push @OutputList,'lastema if ($ShowEMailReceivers) { push @OutputList,'allemailr'; push @OutputList,'lastemailr'; } if ($ShowSessionsStats) { push @OutputList,'session'; } if ($ShowPagesStats) { push @OutputList,'urldetail'; push @OutputList,'urlentry'; push @OutputList,'urlexit'; } -if ($ShowFileTypesStats) { push @OutputList,'filetypes'; } -#if ($ShowFileSizesStats) { push @OutputList,'filesize'; } +#if ($ShowFileTypesStats) { push @OutputList,'filetypes'; } # There is dedicated page for filetypes if ($ShowOSStats) { push @OutputList,'osdetail'; push @OutputList,'unknownos'; } if ($ShowBrowsersStats) { push @OutputList,'browserdetail'; push @OutputList,'unknownbrowser'; } if ($ShowScreenSizeStats) { push @OutputList,'screensize'; } if ($ShowOriginStats) { push @OutputList,'refererse'; push @OutputList,'refererpages'; } if ($ShowKeyphrasesStats) { push @OutputList,'keyphrases'; } if ($ShowKeywordsStats) { push @OutputList,'keywords'; } -if ($ShowMiscStats) { push @OutputList,'misc'; } -if ($ShowHTTPErrorsStats) { push @OutputList,'errors'; push @OutputList,'errors404'; } -if ($ShowSMTPErrorsStats) { push @OutputList,'errors'; } +#if ($ShowMiscStats) { push @OutputList,'misc'; } # There is no dedicated page for misc +if ($ShowHTTPErrorsStats) { + #push @OutputList,'errors'; # There is no dedicated page for errors + push @OutputList,'errors404'; +} +#if ($ShowSMTPErrorsStats) { push @OutputList,'errors'; } # Launch awstats update if ($Update) { @@ -343,7 +347,7 @@ if ($Date) { my $cpt=0; -my $smallcommand="\"$Awstats\" -config=$SiteConfig".($BuildPDF?" -noloadplugin=tooltips":"")." -staticlinks".($OutputSuffix ne $SiteConfig?"=$OutputSuffix":""); +my $smallcommand="\"$Awstats\" -config=$SiteConfig".($BuildPDF?" -buildpdf -noloadplugin=tooltips,rawlog,hostinfo":"")." -staticlinks".($OutputSuffix ne $SiteConfig?"=$OutputSuffix":""); if ($StaticExt && $StaticExt ne 'html') { $smallcommand.=" -staticlinksext=$StaticExt"; } if ($DirIcons) { $smallcommand.=" -diricons=$DirIcons"; } if ($Lang) { $smallcommand.=" -lang=$Lang"; } @@ -377,7 +381,7 @@ for my $output (@OutputList) { # Build pdf file if ($QueryString =~ /(^|-|&)buildpdf/i) { # my $pdffile=$pages[0]; $pdffile=~s/\.\w+$/\.pdf/; - my $command="\"$HtmlDoc\" -t pdf --webpage --quiet --no-title --textfont helvetica --left 16 --bottom 8 --top 8 --browserwidth 800 --headfootsize 8.0 --fontsize 7.0 --outfile awstats.$OutputSuffix.pdf @pages\n"; + my $command="\"$HtmlDoc\" -t pdf --webpage --quiet --no-title --textfont helvetica --left 16 --bottom 8 --top 8 --browserwidth 800 --headfootsize 8.0 --fontsize 7.0 --header xtx --footer xd/ --outfile awstats.$OutputSuffix.pdf @pages\n"; print "Build PDF file : $command\n"; $retour=`$command 2>&1`; my $signal_num=$? & 127; @@ -385,7 +389,7 @@ if ($QueryString =~ /(^|-|&)buildpdf/i) { my $exit_value=$? >> 8; if ($? || $retour =~ /error/) { if ($retour) { error("Failed to build PDF file with following error: $retour"); } - else { error("Failed to launch htmldoc process with exit: Return code=$exit_value, Killer signal num=$signal_num, Core dump=$dumped_core"); } + else { error("Failed to run successfuly htmldoc process: Return code=$exit_value, Killer signal num=$signal_num, Core dump=$dumped_core"); } } $cpt++; } diff --git a/wwwroot/cgi-bin/awstats.model.conf b/wwwroot/cgi-bin/awstats.model.conf index 14dd25d7..e1dbc05c 100644 --- a/wwwroot/cgi-bin/awstats.model.conf +++ b/wwwroot/cgi-bin/awstats.model.conf @@ -232,10 +232,10 @@ AllowToUpdateStatsFromBrowser=0 # line or value '-Year-' from CGI combo form to have a report for all year, # AWStats needs to reload all data for full year, and resort them completely, # requiring a large amount of time, memory and CPU. This might be a problem -# for web hosting providers that offer AWStats for large sites on shared -# servers to non CPU cautious customers. -# For this reason, the 'full year' is only enable on Command Line by default. -# You can change this by setting this parameter to 0, 1, 2 or 3. +# for web hosting providers that offer AWStats for large sites, on shared +# servers, to non CPU cautious customers. +# For this reason, the 'full year' is only enabled on Command Line by default. +# You can change this by setting this parameter to 0, 1 (recommanded), 2 or 3. # Possible values: # 0 - Never allowed # 1 - Allowed on CLI only, -Year- value in combo is not visible diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index b8b54250..e073760a 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -729,7 +729,9 @@ sub tab_head { my $title=shift; my $tooltip=shift; my $width=shift||70; - print "\n"; + if ($width == 70 && $QueryString =~ /buildpdf/i) { print "
\n"; } + else { print "
\n"; } + if ($tooltip) { print ""; } @@ -738,7 +740,8 @@ sub tab_head { } print "\n"; print "
$title  
\n"; - print "\n"; + if ($width == 70 && $QueryString =~ /buildpdf/i) { print "
\n"; } + else { print "
\n"; } } #------------------------------------------------------------------------------ @@ -5133,7 +5136,7 @@ if ($QueryString =~ /(^|&)staticlinksext=([^&]+)/i) { $StaticExt="$2"; } if ($QueryString =~ /(^|&)framename=([^&]+)/i) { $FrameName="$2"; } if ($QueryString =~ /(^|&)debug=(\d+)/i) { $Debug=$2; } if ($QueryString =~ /(^|&)updatefor=(\d+)/i) { $UpdateFor=$2; } -if ($QueryString =~ /(^|&)noloadplugin=([^&]+)/i) { $NoLoadPlugin{"$2"}=1; } +if ($QueryString =~ /(^|&)noloadplugin=([^&]+)/i) { foreach my $plugin (split(/,/,$2)) { $NoLoadPlugin{"$plugin"}=1; } } if ($QueryString =~ /(^|&)limitflush=(\d+)/i) { $LIMITFLUSH=$2; } # Get/Define output if ($QueryString =~ /(^|&)output(=[^&]*|)(.*)&output(=[^&]*|)(&|$)/i) { error("Only 1 output option is allowed","","",1); } @@ -6725,12 +6728,14 @@ if (scalar keys %HTMLOutput) { print "\n"; } - print "
\n"; - print "
"; - print "\n"; - -# if ($FrameName ne 'mainright' && $FrameName ne 'mainleft') { print "
\n"; } -# else { print "
\n"; } + if ($QueryString !~ /buildpdf/i) { + print "
\n"; + print "
\n"; + print "\n"; + } + else { + print "
\n"; + } if ($FrameName ne 'mainright') { # Print Statistics Of @@ -6740,10 +6745,10 @@ if (scalar keys %HTMLOutput) { # Logo and flags if ($FrameName ne 'mainleft') { if ($LogoLink =~ "http://awstats.sourceforge.net") { - print ""; @@ -6751,7 +6756,6 @@ if (scalar keys %HTMLOutput) { print "\n"; } if ($FrameName ne 'mainleft') { - # Print Last Update print ""; print ""; @@ -6821,9 +6825,13 @@ if (scalar keys %HTMLOutput) { } print "\n"; } - print "
\n"; + print ""; } else { - print "\n"; + print ""; } if (! $StaticLinks) { print "
"; Show_Flag_Links($Lang); } print "
$Message[35]: "; @@ -6780,10 +6784,10 @@ if (scalar keys %HTMLOutput) { # Logo and flags if ($FrameName eq 'mainright') { if ($LogoLink =~ "http://awstats.sourceforge.net") { - print "\n"; + print "\n"; } else { - print "\n"; + print "\n"; } if (! $StaticLinks) { print "
"; Show_Flag_Links($Lang); } print "
\n"; - - print "
\n"; + if ($QueryString !~ /buidpdf/i) { + print "
\n"; + print "
\n"; + } + else { + print "\n"; + } if ($FrameName ne 'mainleft') { print "\n"; } else { print "
\n"; } @@ -6944,7 +6952,7 @@ if (scalar keys %HTMLOutput) { $NewLinkParams =~ s/(^|&)urlfilter=[^&]*//i; $NewLinkParams =~ s/(^|&)refererpagesfilter=[^&]*//i; $NewLinkParams =~ tr/&/&/s; $NewLinkParams =~ s/&$//; - if (! $DetailedReportsOnNewWindows || $FrameName eq 'mainright') { + if (! $DetailedReportsOnNewWindows || $FrameName eq 'mainright' || $QueryString =~ /buildpdf/i) { print "$Message[76]\n"; } else { @@ -7063,11 +7071,11 @@ if (scalar keys %HTMLOutput) { # if ($FrameName eq 'mainright') { $NewLinkTarget=" target=\"_parent\""; } # # # Show monthly stats -# print ""; -# print "
"; +# print ""; +# print "
"; # # print ""; -# print ""; +# print ""; # $max_v=$max_p=$max_h=$max_k=1; # for (my $ix=1; $ix<=12; $ix++) { # my $monthix=sprintf("%02s",$ix); @@ -7086,12 +7094,12 @@ if (scalar keys %HTMLOutput) { # 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 "\n"; # } # print "\n"; @@ -7130,18 +7138,18 @@ if (scalar keys %HTMLOutput) { # } # print "
"; -# if ($ShowMonthDayStats =~ /U/i) { print ""; } -# if ($ShowMonthDayStats =~ /V/i) { print ""; } +# if ($ShowMonthDayStats =~ /U/i) { print ""; } +# if ($ShowMonthDayStats =~ /V/i) { print ""; } # print " "; -# if ($ShowMonthDayStats =~ /P/i) { print ""; } -# if ($ShowMonthDayStats =~ /H/i) { print ""; } -# if ($ShowMonthDayStats =~ /B/i) { print ""; } +# if ($ShowMonthDayStats =~ /P/i) { print ""; } +# if ($ShowMonthDayStats =~ /H/i) { print ""; } +# if ($ShowMonthDayStats =~ /B/i) { print ""; } # print "
\n
"; # -# print "
\n"; +# print "
\n"; # print "\n"; # &tab_end; # # print "
\n"; # # &tab_head("$Message[4]",0); -# print ""; -# print "
"; +# print ""; +# print "
"; # # print ""; -# print ""; +# print ""; # # Get max_v, max_h and max_k values # $max_v=$max_h=$max_k=0; # Start from 0 because can be lower than 1 # foreach my $daycursor ($firstdaytoshowtime..$lastdaytoshowtime) { @@ -7191,10 +7199,10 @@ if (scalar keys %HTMLOutput) { # 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 "\n"; # } # print ""; @@ -7208,10 +7216,10 @@ if (scalar keys %HTMLOutput) { # $average_p=sprintf("%.2f",$average_p); # $average_h=sprintf("%.2f",$average_h); # $average_k=sprintf("%.2f",$average_k); -# if ($ShowMonthDayStats =~ /V/i) { print ""; } -# if ($ShowMonthDayStats =~ /P/i) { print ""; } -# if ($ShowMonthDayStats =~ /H/i) { print ""; } -# if ($ShowMonthDayStats =~ /B/i) { print ""; } +# if ($ShowMonthDayStats =~ /V/i) { print ""; } +# if ($ShowMonthDayStats =~ /P/i) { print ""; } +# if ($ShowMonthDayStats =~ /H/i) { print ""; } +# if ($ShowMonthDayStats =~ /B/i) { print ""; } # print ""; # print "\n"; # print "\n"; @@ -7257,7 +7265,7 @@ if (scalar keys %HTMLOutput) { # } # print "
"; -# if ($ShowMonthDayStats =~ /V/i) { print ""; } -# if ($ShowMonthDayStats =~ /P/i) { print ""; } -# if ($ShowMonthDayStats =~ /H/i) { print ""; } -# if ($ShowMonthDayStats =~ /B/i) { print ""; } +# if ($ShowMonthDayStats =~ /V/i) { print ""; } +# if ($ShowMonthDayStats =~ /P/i) { print ""; } +# if ($ShowMonthDayStats =~ /H/i) { print ""; } +# if ($ShowMonthDayStats =~ /B/i) { print ""; } # print " 
\n
"; # -# print "
\n"; +# print "
\n"; # print "\n"; # &tab_end; # &html_end; @@ -7366,6 +7374,7 @@ if (scalar keys %HTMLOutput) { if ($ShowHostsStats =~ /H/i) { print "$_host_h{$key}"; } if ($ShowHostsStats =~ /B/i) { print "".Format_Bytes($_host_k{$key}).""; } if ($ShowHostsStats =~ /L/i) { print "".($_host_l{$key}?Format_Date($_host_l{$key},1):'-').""; } + print "\n"; $total_p += $_host_p{$key}; $total_h += $_host_h{$key}; $total_k += $_host_k{$key}||0; @@ -8091,11 +8100,11 @@ if (scalar keys %HTMLOutput) { print "\n"; my $colspan=5; - print ""; + print ""; $average_nb=$average_u=$average_v=$average_p=$average_h=$average_k=0; $total_u=$total_v=$total_p=$total_h=$total_k=0; - print "
"; + print "
"; print ""; $max_v=$max_p=$max_h=$max_k=1; # Define total and max @@ -8115,7 +8124,7 @@ if (scalar keys %HTMLOutput) { # Define average # TODO # Show bars for month - print ""; + print ""; print "\n"; for (my $ix=1; $ix<=12; $ix++) { my $monthix=sprintf("%02s",$ix); @@ -8126,12 +8135,12 @@ if (scalar keys %HTMLOutput) { 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 "\n"; } print ""; @@ -8196,7 +8205,7 @@ if (scalar keys %HTMLOutput) { print "
 "; - if ($ShowMonthStats =~ /U/i) { print ""; } - if ($ShowMonthStats =~ /V/i) { print ""; } - print " "; - if ($ShowMonthStats =~ /P/i) { print ""; } - if ($ShowMonthStats =~ /H/i) { print ""; } - if ($ShowMonthStats =~ /B/i) { print ""; } + if ($ShowMonthStats =~ /U/i) { print ""; } + if ($ShowMonthStats =~ /V/i) { print ""; } + if ($QueryString !~ /buildpdf/i) { print " "; } + if ($ShowMonthStats =~ /P/i) { print ""; } + if ($ShowMonthStats =~ /H/i) { print ""; } + if ($ShowMonthStats =~ /B/i) { print ""; } print " 
\n
\n"; } - print "
\n"; + print "
\n"; print "\n"; &tab_end; } @@ -8211,8 +8220,8 @@ if (scalar keys %HTMLOutput) { my $title="$Message[138]"; &tab_head("$title",0); print ""; - print "
"; - print "\n"; + print "\n"; &tab_end; } @@ -8373,8 +8382,8 @@ if (scalar keys %HTMLOutput) { print "$Center 
\n"; &tab_head("$Message[91]",18); print ""; - print "
"; + print "\n"; my $NewLinkParams=${QueryString}; $NewLinkParams =~ s/(^|&)update(=\w*|$)//i; @@ -8280,10 +8289,10 @@ if (scalar keys %HTMLOutput) { 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 "\n"; } print ""; @@ -8298,10 +8307,10 @@ if (scalar keys %HTMLOutput) { $average_p=sprintf("%.2f",$average_p); $average_h=sprintf("%.2f",$average_h); $average_k=(int($average_k)?Format_Bytes(sprintf("%.2f",$average_k)):"0.00"); - if ($ShowDaysOfMonthStats =~ /V/i) { print ""; } - if ($ShowDaysOfMonthStats =~ /P/i) { print ""; } - if ($ShowDaysOfMonthStats =~ /H/i) { print ""; } - if ($ShowDaysOfMonthStats =~ /B/i) { print ""; } + if ($ShowDaysOfMonthStats =~ /V/i) { print ""; } + if ($ShowDaysOfMonthStats =~ /P/i) { print ""; } + if ($ShowDaysOfMonthStats =~ /H/i) { print ""; } + if ($ShowDaysOfMonthStats =~ /B/i) { print ""; } print "\n"; print "\n"; # Show lib for day @@ -8313,7 +8322,7 @@ if (scalar keys %HTMLOutput) { my $dayofweekcursor=DayOfWeek($day,$month,$year); print ""; print ($day==$nowday && $month==$nowmonth && $year==$nowyear?'':''); - print "$day
".$MonthNumLib{$month}.""; + print "$day
".$MonthNumLib{$month}.""; print ($day==$nowday && $month==$nowmonth && $year==$nowyear?'
':''); print "\n"; } @@ -8361,7 +8370,7 @@ if (scalar keys %HTMLOutput) { print "
"; - if ($ShowDaysOfMonthStats =~ /V/i) { print ""; } - if ($ShowDaysOfMonthStats =~ /P/i) { print ""; } - if ($ShowDaysOfMonthStats =~ /H/i) { print ""; } - if ($ShowDaysOfMonthStats =~ /B/i) { print ""; } + if ($ShowDaysOfMonthStats =~ /V/i) { print ""; } + if ($ShowDaysOfMonthStats =~ /P/i) { print ""; } + if ($ShowDaysOfMonthStats =~ /H/i) { print ""; } + if ($ShowDaysOfMonthStats =~ /B/i) { print ""; } print " 
\n
"; } - print "
\n"; + print "\n"; print "
"; - print "\n"; + print "
"; + print "\n"; $max_h=$max_k=0; # Start from 0 because can be lower than 1 # Get average value for day of week my @avg_dayofweek_nb = my @avg_dayofweek_p = my @avg_dayofweek_h = my @avg_dayofweek_k = (); @@ -8414,10 +8423,10 @@ if (scalar keys %HTMLOutput) { # Remove decimal part if 0 if ($avg_dayofweek_p[$_] == int($avg_dayofweek_p[$_])) { $avg_dayofweek_p[$_]=int($avg_dayofweek_p[$_]); } if ($avg_dayofweek_h[$_] == int($avg_dayofweek_h[$_])) { $avg_dayofweek_h[$_]=int($avg_dayofweek_h[$_]); } - print "\n"; } print "\n"; @@ -8459,23 +8468,23 @@ if (scalar keys %HTMLOutput) { my $title="$Message[20]"; if ($PluginsLoaded{'GetTimeZoneTitle'}{'timezone'}) { $title.=" (GMT ".(GetTimeZoneTitle_timezone()>=0?"+":"").int(GetTimeZoneTitle_timezone()).")"; } &tab_head("$title",19); - print "
"; - if ($ShowDaysOfWeekStats =~ /P/i) { print ""; } - if ($ShowDaysOfWeekStats =~ /H/i) { print ""; } - if ($ShowDaysOfWeekStats =~ /B/i) { print ""; } + print ""; + if ($ShowDaysOfWeekStats =~ /P/i) { print ""; } + if ($ShowDaysOfWeekStats =~ /H/i) { print ""; } + if ($ShowDaysOfWeekStats =~ /B/i) { print ""; } print "
\n"; + print "\n";
\n"; $max_h=$max_k=1; for (my $ix=0; $ix<=23; $ix++) { #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 $bredde_p=0;my $bredde_h=0;my $bredde_k=0; if ($max_h > 0) { $bredde_p=int($BarHeight*$_time_p[$ix]/$max_h)+1; } if ($max_h > 0) { $bredde_h=int($BarHeight*$_time_h[$ix]/$max_h)+1; } if ($max_k > 0) { $bredde_k=int($BarHeight*$_time_k[$ix]/$max_k)+1; } print "\n"; } print "\n"; @@ -8496,11 +8505,14 @@ if (scalar keys %HTMLOutput) { print "\n"; print "
"; - if ($ShowHoursStats =~ /P/i) { print ""; } - if ($ShowHoursStats =~ /H/i) { print ""; } - if ($ShowHoursStats =~ /B/i) { print ""; } + if ($ShowHoursStats =~ /P/i) { print ""; } + if ($ShowHoursStats =~ /H/i) { print ""; } + if ($ShowHoursStats =~ /B/i) { print ""; } print "
\n"; + print "
\n"; # Show data array for hours if ($AddDataArrayShowHoursStats) { - print "
\n"; + print "\n"; + print ""; + print ""; + print "\n"; - print "
\n"; + print "\n"; print ""; if ($ShowHoursStats =~ /P/i) { print ""; } @@ -8517,7 +8529,11 @@ if (scalar keys %HTMLOutput) { print "\n"; } print "
$Message[20]$Message[56]
\n"; - print "
\n"; + + print " 
\n"; + print "\n"; print ""; if ($ShowHoursStats =~ /P/i) { print ""; } @@ -8534,8 +8550,9 @@ if (scalar keys %HTMLOutput) { print "\n"; } print "
$Message[20]$Message[56]
\n"; - print "
\n
\n"; + + print "
\n"; + print "
\n"; } print "