From: eldy <> Date: Tue, 22 Apr 2003 02:36:40 +0000 (+0000) Subject: Split month summary chart and days of month chart in two different charts in main... X-Git-Tag: AWSTATS_5_5_BETA~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c68efd98d0a84c1bbf4600fe14541ffbd32413d;p=thirdparty%2FAWStats.git Split month summary chart and days of month chart in two different charts in main page. This also means that ShowDaysOfMonthStats and AddDataArrayShowDaysOfMonthStats parameters were added. --- diff --git a/docs/awstats_changelog.txt b/docs/awstats_changelog.txt index e716fb9d..49f4c7e8 100644 --- a/docs/awstats_changelog.txt +++ b/docs/awstats_changelog.txt @@ -26,6 +26,9 @@ New features/improvments: - Optimized code size. - Optimized HTML output report size. - Better support for IPv6 in logresolvemerge.pl. +- Split month summary chart and days of month chart in two different + charts in main page. This also means that ShowDaysOfMonthStats and + AddDataArrayShowDaysOfMonthStats parameters were added. Other/Documentation: - Added Isle of Man, Monserat, and Palestinian flag icon. diff --git a/docs/awstats_config.html b/docs/awstats_config.html index 6dfdaec8..2284f073 100644 --- a/docs/awstats_config.html +++ b/docs/awstats_config.html @@ -117,7 +117,8 @@ when reading it), follow the example:
  • DirLang
  • ShowHeader
  • ShowMenu -
  • ShowMonthDayStats +
  • ShowMonthStats +
  • ShowDaysOfMonthStats
  • ShowDaysOfWeekStats
  • ShowHoursStats
  • ShowDomainsStats @@ -136,7 +137,8 @@ when reading it), follow the example:
  • ShowKeyphrasesStats
  • ShowKeywordsStats
  • ShowHTTPErrorsStats -
  • AddDataArrayMonthDayStats +
  • AddDataArrayMonthStats +
  • AddDataArrayShowDaysOfMonthStats
  • AddDataArrayShowDaysOfWeekStats
  • AddDataArrayShowHoursStats
  • MaxNbOfDomain @@ -1134,20 +1136,21 @@ AWStats 4.1+ supports both keywords AND keyphrases by default with no need of an Show...
    Version :
    3.2 - 5.3 for ShowHeader (deprecated since 5.4)
    -3.2 + for ShowMenu,ShowMonthDayStats,ShowDaysOfWeekStats,ShowHoursStats, +3.2 + for ShowMenu,ShowMonthStats,ShowDaysOfWeekStats,ShowHoursStats, ShowDomainsStats,ShowHostsStats,ShowAuthenticatedUsers,ShowRobotsStats, ShowPagesStats,ShowFileTypesStats,ShowFileSizesStats,ShowBrowsersStats, ShowOSStats,ShowOriginStats,ShowKeyphrasesStats,ShowKeywordsStats,ShowHTTPErrorsStats
    3.2 - 5.0 for ShowCompressionStats (deprecated since 5.1, use code C with ShowFileTypesStats instead)
    4.1 + for ShowSessionsStats, ShowKeywordsStats
    5.1 + for all letters codes
    +5.5 + for ShowDaysOfMonthStats

    # You choose here which reports you want to see in the main page and what you
    # want to see in those reports.
    # Possible values:
    # 0 - Topic is not shown at all
    # 1 - Report is shown with default informations -
    # XYZ - Report is shown with only informations defined by code X,Y,Z -
    # X,Y,Z are code letters among the following: +
    # XYZ - Report is shown with only informations defined by code X,Y,Z... +
    # X,Y,Z... are code letters among the following:
    # U = Unique visitors
    # V = Visits
    # P = Number of pages @@ -1162,9 +1165,12 @@ ShowOSStats,ShowOriginStats,ShowKeyphrasesStats,ShowKeywordsStats,ShowHTTPErrors
    # Show menu header with report links
    # Default: 1, Possible codes: None
    ShowMenu=1 -
    # Show monthly and daily chart +
    # Show monthly chart
    # Default: UVPHB, Possible codes: UVPHB -
    ShowMonthDayStats=UVPHB +
    ShowMonthStats=UVPHB +
    # Show days of month chart +
    # Default: VPHB, Possible codes: VPHB +
    ShowDaysOfMonthStats=VPHB
    # Show days of week chart
    # Default: PHB, Possible codes: PHB
    ShowDaysOfWeekStats=PHB @@ -1226,15 +1232,19 @@ ShowOSStats,ShowOriginStats,ShowKeyphrasesStats,ShowKeywordsStats,ShowHTTPErrors


    AddDataArray...
    -Version : 5.4 +
    +Version :
    +5.4 + for AddDataArrayMonthStats,AddDataArrayShowDaysOfWeekStats,AddDataArrayShowHoursStats
    +5.5 + for AddDataArrayShowDaysOfMonthStats

    # Some graphical reports are followed by the data array of values.
    # If you don't want this array (to reduce report size for example), you can
    # set thoose options to 0.
    # Possible values: 0 or 1
    # Default: 1
    # -
    # Data array values for the ShowMonthDaysStats report -
    AddDataArrayMonthDayStats=1 +
    # Data array values for the ShowMonthStats report +
    AddDataArrayMonthStats=1 +
    # Data array values for the ShowDaysOfMonthStats report +
    AddDataArrayShowDaysOfMonthStats=1
    # Data array values for the ShowDaysOfWeekStats report
    AddDataArrayShowDaysOfWeekStats=1
    # Data array values for the ShowHoursStats report diff --git a/wwwroot/cgi-bin/awstats.model.conf b/wwwroot/cgi-bin/awstats.model.conf index 73944d2e..8642a05c 100644 --- a/wwwroot/cgi-bin/awstats.model.conf +++ b/wwwroot/cgi-bin/awstats.model.conf @@ -755,8 +755,8 @@ DirLang="./lang" # Possible values: # 0 - Topic is not shown at all # 1 - Report is shown with default informations -# XYZ - Report is shown with only informations defined by code X,Y,Z -# X,Y,Z are code letters among the following: +# XYZ - Report is shown with only informations defined by code X,Y,Z... +# X,Y,Z... are code letters among the following: # U = Unique visitors # V = Visits # P = Number of pages @@ -771,9 +771,12 @@ DirLang="./lang" # Show menu header with report links # Default: 1, Possible codes: None ShowMenu=1 -# Show monthly and daily chart +# Show monthly chart # Default: UVPHB, Possible codes: UVPHB -ShowMonthDayStats=UVPHB +ShowMonthStats=UVPHB +# Show days of month chart +# Default: VPHB, Possible codes: VPHB +ShowDaysOfMonthStats=VPHB # Show days of week chart # Default: PHB, Possible codes: PHB ShowDaysOfWeekStats=PHB @@ -839,8 +842,10 @@ ShowHTTPErrorsStats=1 # Possible values: 0 or 1 # Default: 1 # -# Data array values for the ShowMonthDaysStats report -AddDataArrayMonthDayStats=1 +# Data array values for the ShowMonthStats report +AddDataArrayMonthStats=1 +# Data array values for the ShowDaysOfMonthStats report +AddDataArrayShowDaysOfMonthStats=1 # Data array values for the ShowDaysOfWeekStats report AddDataArrayShowDaysOfWeekStats=1 # Data array values for the ShowHoursStats report @@ -1061,8 +1066,8 @@ color_x="C1B2E2" # Background color for number of exit pages (Default = "C1B2 # Plugin: GeoIPfree # Perl modules required: Geo::IPfree version 0.2+ (from Graciliano M.P.) -# Country chart is built from an Internet IP-Country database. Plugin useless -# for intranet only log files. +# Country chart is built from an Internet IP-Country database. +# This plugin is useless for intranet only log files. # Note: You must choose between using this plugin (need Perl Geo::IPfree module) # or the GeoIP plugin (need Perl Geo::IP module from Maxmind). # This plugin reduces AWStats speed of 9% ! @@ -1071,8 +1076,8 @@ color_x="C1B2E2" # Background color for number of exit pages (Default = "C1B2 # Plugin: GeoIP # Perl modules required: Geo::IP (from Maxmind) -# Country chart is built from an Internet IP-Country database. Plugin useless -# for intranet only log files. +# Country chart is built from an Internet IP-Country database. +# This plugin is useless for intranet only log files. # Note: You must choose between using this plugin (need Perl Geo::IP module # from Maxmind) or the GeoIPfree plugin (need Perl Geo::IPfree module). # This plugin reduces AWStats speed of 9% ! @@ -1090,7 +1095,7 @@ color_x="C1B2E2" # Background color for number of exit pages (Default = "C1B2 # Plugin: Graph3D # Perl modules required: None -# Supported charts are nice 3D graphics. +# Supported charts are built by a nice 3D graphic applet. # #LoadPlugin="graph3d" # !!! NOT YET AVAILABLE !!! @@ -1105,9 +1110,9 @@ color_x="C1B2E2" # Background color for number of exit pages (Default = "C1B2 # products orders for example. # For this, edit all parameters of Extra section. Each set of parameter is a # different chart. For several charts, duplicate section changing the number. -# Note that each Extra section reduces AWStats speed by 8%. +# Note: Each Extra section reduces AWStats speed by 8%. # -# WARNING: A wrong setup of Extra section can result in a too large arrays +# WARNING: A wrong setup of Extra section might result in too large arrays # that will consume all your memory, making AWStats unusable after several # updates, so be sure to setup it correctly. # In most cases, you don't need this feature. diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 5764204c..0de91cd0 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -133,26 +133,26 @@ use vars qw/ $AllowToUpdateStatsFromBrowser $ArchiveLogRecords $DetailedReportsOnNewWindows $FirstDayOfWeek $KeyWordsNotSensitive $SaveDatabaseFilesWithPermissionsForEveryone $WarningMessages $DebugMessages -$ShowMenu $ShowMonthDayStats $ShowDaysOfWeekStats +$ShowMenu $ShowMonthStats $ShowDaysOfMonthStats $ShowDaysOfWeekStats $ShowHoursStats $ShowDomainsStats $ShowHostsStats $ShowRobotsStats $ShowWormsStats $ShowSessionsStats $ShowPagesStats $ShowFileTypesStats $ShowOSStats $ShowBrowsersStats $ShowOriginStats $ShowKeyphrasesStats $ShowKeywordsStats $ShowHTTPErrorsStats $ShowFlagLinks $ShowLinksOnUrl -$AddDataArrayMonthDayStats $AddDataArrayShowDaysOfWeekStats $AddDataArrayShowHoursStats +$AddDataArrayMonthStats $AddDataArrayShowDaysOfMonthStats $AddDataArrayShowDaysOfWeekStats $AddDataArrayShowHoursStats /; ($AllowToUpdateStatsFromBrowser, $ArchiveLogRecords, $DetailedReportsOnNewWindows, $FirstDayOfWeek, $KeyWordsNotSensitive, $SaveDatabaseFilesWithPermissionsForEveryone, $WarningMessages, $DebugMessages, -$ShowMenu, $ShowMonthDayStats, $ShowDaysOfWeekStats, +$ShowMenu, $ShowMonthStats, $ShowDaysOfMonthStats, $ShowDaysOfWeekStats, $ShowHoursStats, $ShowDomainsStats, $ShowHostsStats, $ShowRobotsStats, $ShowWormsStats, $ShowSessionsStats, $ShowPagesStats, $ShowFileTypesStats, $ShowOSStats, $ShowBrowsersStats, $ShowOriginStats, $ShowKeyphrasesStats, $ShowKeywordsStats, $ShowHTTPErrorsStats, $ShowFlagLinks, $ShowLinksOnUrl, -$AddDataArrayMonthDayStats, $AddDataArrayShowDaysOfWeekStats, $AddDataArrayShowHoursStats +$AddDataArrayMonthStats, $AddDataArrayShowDaysOfMonthStats, $AddDataArrayShowDaysOfWeekStats, $AddDataArrayShowHoursStats )= -(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1); +(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1); use vars qw/ $LevelForRobotsDetection $LevelForBrowsersDetection $LevelForOSDetection $LevelForRefererAnalyze $LevelForSearchEnginesDetection $LevelForKeywordsDetection @@ -530,7 +530,8 @@ use vars qw/ @Message /; 'Extra/Marketing', 'Screen sizes', 'Worm/Virus attacks', -'Add to favourites' +'Add to favourites', +'Days of month' ); @@ -1028,7 +1029,7 @@ sub Read_Config { #------------------------------------------------------------------------------ # Function: Parse content of a config file -# Parameters: File handle, level +# Parameters: file handle, depth level, file name # Input: - # Output: Global variables # Return: - @@ -1038,11 +1039,13 @@ sub Parse_Config { my $level = $_[1]; my $configFile = $_[2]; my $versionnum=0; - + my $conflinenb=0; + if ($level > 10) { error("$PROG can't read down more than 10 level of includes. Check that no 'included' config files include their parent config file (this cause infinite loop)."); } while (<$confighandle>) { chomp $_; s/\r//; + $conflinenb++; # Extract version from first line if (! $versionnum && $_ =~ /^# AWSTATS CONFIGURE FILE (\d+).(\d+)/i) { @@ -1175,6 +1178,8 @@ sub Parse_Config { # Other that we need to put after MaxNbOfExtra and MinHitExtra if ($param =~ /^MaxNbOf(\w+)/) { $MaxNbOf{$1}=$value; next; } if ($param =~ /^MinHit(\w+)/) { $MinHit{$1}=$value; next; } + # Check if this is a known parameter +# if (! $ConfOk{$param}) { error("Unknown config parameter '$param' found line $conflinenb in file \"configFile\""); } # If parameters was not found previously, defined variable with name of param to value $$param=$value; } @@ -1419,7 +1424,8 @@ sub Check_Config { # Optional appearance setup section if ($MaxRowsInHTMLOutput !~ /^\d+/ || $MaxRowsInHTMLOutput<1) { $MaxRowsInHTMLOutput=1000; } if ($ShowMenu !~ /[0-1]/) { $ShowMenu=1; } - if ($ShowMonthDayStats !~ /[01UVPHB]/) { $ShowMonthDayStats='UVPHB'; } + if ($ShowMonthStats !~ /[01UVPHB]/) { $ShowMonthStats='UVPHB'; } + if ($ShowDaysOfMonthStats !~ /[01VPHB]/) { $ShowDaysOfMonthStats='VPHB'; } if ($ShowDaysOfWeekStats !~ /[01PHBL]/) { $ShowDaysOfWeekStats='PHBL'; } if ($ShowHoursStats !~ /[01PHBL]/) { $ShowHoursStats='PHBL'; } if ($ShowDomainsStats !~ /[01PHB]/) { $ShowDomainsStats='PHB'; } @@ -1440,7 +1446,8 @@ sub Check_Config { if ($ShowKeyphrasesStats !~ /[0-1]/) { $ShowKeyphrasesStats=1; } if ($ShowKeywordsStats !~ /[0-1]/) { $ShowKeywordsStats=1; } if ($ShowHTTPErrorsStats !~ /[0-1]/) { $ShowHTTPErrorsStats=1; } - if ($AddDataArrayMonthDayStats !~ /[0-1]/) { $AddDataArrayMonthDayStats=1; } + if ($AddDataArrayMonthStats !~ /[0-1]/) { $AddDataArrayMonthStats=1; } + if ($AddDataArrayShowDaysOfMonthStats !~ /[0-1]/) { $AddDataArrayShowDaysOfMonthStats=1; } if ($AddDataArrayShowDaysOfWeekStats !~ /[0-1]/) { $AddDataArrayShowDaysOfWeekStats=1; } if ($AddDataArrayShowHoursStats !~ /[0-1]/) { $AddDataArrayShowHoursStats=1; } my @maxnboflist=('Domain','HostsShown','LoginShown','RobotShown','WormsShown','PageShown','ScreenSizesShown','RefererShown','KeyphrasesShown','KeywordsShown','EMailsShown'); @@ -1487,7 +1494,8 @@ sub Check_Config { $color_x =~ s/#//g; if ($color_x !~ /^[0-9|A-Z]+$/i) { $color_x='C1B2E2'; } # Correct param if default value is asked - if ($ShowMonthDayStats eq '1') { $ShowMonthDayStats = 'UVPHB'; } + if ($ShowMonthStats eq '1') { $ShowMonthStats = 'UVPHB'; } + if ($ShowDaysOfMonthStats eq '1') { $ShowDaysOfMonthStats = 'VPHB'; } if ($ShowDaysOfWeekStats eq '1') { $ShowDaysOfWeekStats = 'PHBL'; } if ($ShowHoursStats eq '1') { $ShowHoursStats = 'PHBL'; } if ($ShowDomainsStats eq '1') { $ShowDomainsStats = 'PHB'; } @@ -1728,7 +1736,7 @@ sub Read_History_With_TmpUpdate { # When $SectionsToLoad{'time'}=$order++; # Always loaded because needed to count TotalPages, TotalHits, TotalBandwidth if ($UpdateStats || $MigrateStats || ($HTMLOutput{'main'} && $ShowHostsStats) || $HTMLOutput{'allhosts'} || $HTMLOutput{'lasthosts'} || $HTMLOutput{'unknownip'}) { $SectionsToLoad{'visitor'}=$order++; } # Must be before day, sider and session section - if ($UpdateStats || $MigrateStats || ($HTMLOutput{'main'} && ($ShowDaysOfWeekStats || $ShowMonthDayStats)) || $HTMLOutput{'alldays'}) { $SectionsToLoad{'day'}=$order++; } + if ($UpdateStats || $MigrateStats || ($HTMLOutput{'main'} && ($ShowDaysOfWeekStats || $ShowDaysOfMonthStats)) || $HTMLOutput{'alldays'}) { $SectionsToLoad{'day'}=$order++; } # Who if ($UpdateStats || $MigrateStats || ($HTMLOutput{'main'} && $ShowDomainsStats) || $HTMLOutput{'alldomains'}) { $SectionsToLoad{'domain'}=$order++; } if ($UpdateStats || $MigrateStats || ($HTMLOutput{'main'} && $ShowAuthenticatedUsers) || $HTMLOutput{'alllogins'} || $HTMLOutput{'lastlogins'}) { $SectionsToLoad{'login'}=$order++; } @@ -6019,7 +6027,7 @@ if (scalar keys %HTMLOutput) { if ($MonthRequired eq 'all' || $monthix eq $MonthRequired) { &Read_History_With_TmpUpdate($YearRequired,$monthix,0,0,"all"); # Read full history file } - elsif (($HTMLOutput{'main'} && $ShowMonthDayStats) || $HTMLOutput{'alldays'}) { + elsif (($HTMLOutput{'main'} && $ShowMonthStats) || $HTMLOutput{'alldays'}) { &Read_History_With_TmpUpdate($YearRequired,$monthix,0,0,"general time"); # Read general and time sections. } } @@ -6164,11 +6172,12 @@ if (scalar keys %HTMLOutput) { my $linetitle=1; print "\n"; # When - $linetitle=&AtLeastOneNotNull($ShowMonthDayStats,$ShowDaysOfWeekStats,$ShowHoursStats); + $linetitle=&AtLeastOneNotNull($ShowMonthStats,$ShowDaysOfMonthStats,$ShowDaysOfWeekStats,$ShowHoursStats); if ($linetitle) { print "$Message[93]: \n"; } if ($linetitle) { print ($frame?"\n":""); } - if ($ShowMonthDayStats) { print ($frame?"":""); print "$Message[5]/$Message[4]"; print ($frame?"\n":"   "); } + if ($ShowMonthStats) { print ($frame?"":""); print "$Message[128]"; print ($frame?"\n":"   "); } #if ($ShowMonthDayStats) { print ($frame?"   \"...\" ":""); print "$Message[130]\n"; print ($frame?"\n":"   "); } + if ($ShowDaysOfMonthStats) { print ($frame?"":""); print "$Message[138]"; print ($frame?"\n":"   "); } if ($ShowDaysOfWeekStats) { print ($frame?"":""); print "$Message[91]"; print ($frame?"\n":"   "); } if ($ShowHoursStats) { print ($frame?"":""); print "$Message[20]"; print ($frame?"\n":"   "); } if ($linetitle) { print ($frame?"":"\n"); } @@ -7387,12 +7396,12 @@ if (scalar keys %HTMLOutput) { } if ($HTMLOutput{'main'}) { - # MONTHDAY + # SUMMARY #--------------------------------------------------------------------- - if ($ShowMonthDayStats) { - if ($Debug) { debug("ShowMonthDayStats",2); } - print "$Center 
    \n"; - my $title="$Message[5]/$Message[4]"; + if ($ShowMonthStats) { + if ($Debug) { debug("ShowMonthStats",2); } + print "$Center 
    \n"; + my $title="$Message[128]"; &tab_head("$title",0); my $NewLinkParams=${QueryString}; @@ -7425,24 +7434,23 @@ if (scalar keys %HTMLOutput) { else { print "NA\n"; } # Show main indicators print ""; - if ($ShowMonthDayStats =~ /U/i) { print "$Message[11]"; } else { print " "; } - if ($ShowMonthDayStats =~ /V/i) { print "$Message[10]"; } else { print " "; } - if ($ShowMonthDayStats =~ /P/i) { print "$Message[56]"; } else { print " "; } - if ($ShowMonthDayStats =~ /H/i) { print "$Message[57]"; } else { print " "; } - if ($ShowMonthDayStats =~ /B/i) { print "$Message[75]"; } else { print " "; } + if ($ShowMonthStats =~ /U/i) { print "$Message[11]"; } else { print " "; } + if ($ShowMonthStats =~ /V/i) { print "$Message[10]"; } else { print " "; } + if ($ShowMonthStats =~ /P/i) { print "$Message[56]"; } else { print " "; } + if ($ShowMonthStats =~ /H/i) { print "$Message[57]"; } else { print " "; } + if ($ShowMonthStats =~ /B/i) { print "$Message[75]"; } else { print " "; } print "\n"; print ""; - if ($ShowMonthDayStats =~ /U/i) { print "".($MonthRequired eq 'all'?"<= $TotalUnique
    $Message[129]":"$TotalUnique
     ").""; } else { print " "; } - if ($ShowMonthDayStats =~ /V/i) { print "$TotalVisits
    ($RatioVisits $Message[52])"; } else { print " "; } - if ($ShowMonthDayStats =~ /P/i) { print "$TotalPages
    ($RatioPages ".lc($Message[56]."/".$Message[12]).")"; } else { print " "; } - if ($ShowMonthDayStats =~ /H/i) { print "$TotalHits
    ($RatioHits ".lc($Message[57]."/".$Message[12]).")"; } else { print " "; } - if ($ShowMonthDayStats =~ /B/i) { print "".Format_Bytes(int($TotalBytes))."
    ($RatioBytes $Message[108]/".lc($Message[12]).")"; } else { print " "; } + if ($ShowMonthStats =~ /U/i) { print "".($MonthRequired eq 'all'?"<= $TotalUnique
    $Message[129]":"$TotalUnique
     ").""; } else { print " "; } + if ($ShowMonthStats =~ /V/i) { print "$TotalVisits
    ($RatioVisits $Message[52])"; } else { print " "; } + if ($ShowMonthStats =~ /P/i) { print "$TotalPages
    ($RatioPages ".lc($Message[56]."/".$Message[12]).")"; } else { print " "; } + if ($ShowMonthStats =~ /H/i) { print "$TotalHits
    ($RatioHits ".lc($Message[57]."/".$Message[12]).")"; } else { print " "; } + if ($ShowMonthStats =~ /B/i) { print "".Format_Bytes(int($TotalBytes))."
    ($RatioBytes $Message[108]/".lc($Message[12]).")"; } else { print " "; } print "\n"; my $colspan=5; print ""; - # Show monthly stats $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 "
    "; @@ -7476,12 +7484,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 ""; - if ($ShowMonthDayStats =~ /U/i) { print "\"$Message[11]:"; } - if ($ShowMonthDayStats =~ /V/i) { print "\"$Message[10]:"; } + if ($ShowMonthStats =~ /U/i) { print "\"$Message[11]:"; } + if ($ShowMonthStats =~ /V/i) { print "\"$Message[10]:"; } print " "; - if ($ShowMonthDayStats =~ /P/i) { print "\"$Message[56]:"; } - if ($ShowMonthDayStats =~ /H/i) { print "\"$Message[57]:"; } - if ($ShowMonthDayStats =~ /B/i) { print "\"$Message[75]:"; } + if ($ShowMonthStats =~ /P/i) { print "\"$Message[56]:"; } + if ($ShowMonthStats =~ /H/i) { print "\"$Message[57]:"; } + if ($ShowMonthStats =~ /B/i) { print "\"$Message[75]:"; } print "\n"; } print " "; @@ -7513,44 +7521,72 @@ if (scalar keys %HTMLOutput) { print "\n
    \n"; # Show data array for month - if ($AddDataArrayMonthDayStats) { + if ($AddDataArrayMonthStats) { print "\n"; print ""; - if ($ShowMonthDayStats =~ /U/i) { print ""; } - if ($ShowMonthDayStats =~ /V/i) { print ""; } - if ($ShowMonthDayStats =~ /P/i) { print ""; } - if ($ShowMonthDayStats =~ /H/i) { print ""; } - if ($ShowMonthDayStats =~ /B/i) { print ""; } + if ($ShowMonthStats =~ /U/i) { print ""; } + if ($ShowMonthStats =~ /V/i) { print ""; } + if ($ShowMonthStats =~ /P/i) { print ""; } + if ($ShowMonthStats =~ /H/i) { print ""; } + if ($ShowMonthStats =~ /B/i) { print ""; } print "\n"; for (my $ix=1; $ix<=12; $ix++) { my $monthix=sprintf("%02s",$ix); print ""; print ""; - if ($ShowMonthDayStats =~ /U/i) { print ""; } - if ($ShowMonthDayStats =~ /V/i) { print ""; } - if ($ShowMonthDayStats =~ /P/i) { print ""; } - if ($ShowMonthDayStats =~ /H/i) { print ""; } - if ($ShowMonthDayStats =~ /B/i) { print ""; } + if ($ShowMonthStats =~ /U/i) { print ""; } + if ($ShowMonthStats =~ /V/i) { print ""; } + if ($ShowMonthStats =~ /P/i) { print ""; } + if ($ShowMonthStats =~ /H/i) { print ""; } + if ($ShowMonthStats =~ /B/i) { print ""; } print "\n"; } # Average row # TODO # Total row print ""; - if ($ShowMonthDayStats =~ /U/i) { print ""; } - if ($ShowMonthDayStats =~ /V/i) { print ""; } - if ($ShowMonthDayStats =~ /P/i) { print ""; } - if ($ShowMonthDayStats =~ /H/i) { print ""; } - if ($ShowMonthDayStats =~ /B/i) { print ""; } + if ($ShowMonthStats =~ /U/i) { print ""; } + if ($ShowMonthStats =~ /V/i) { print ""; } + if ($ShowMonthStats =~ /P/i) { print ""; } + if ($ShowMonthStats =~ /H/i) { print ""; } + if ($ShowMonthStats =~ /B/i) { print ""; } print "\n"; print "
    $Message[5]$Message[11]$Message[10]$Message[56]$Message[57]$Message[75]$Message[11]$Message[10]$Message[56]$Message[57]$Message[75]
    $MonthLib{$monthix} $YearRequired",$MonthUnique{$YearRequired.$monthix}?$MonthUnique{$YearRequired.$monthix}:"0","",$MonthVisits{$YearRequired.$monthix}?$MonthVisits{$YearRequired.$monthix}:"0","",$MonthPages{$YearRequired.$monthix}?$MonthPages{$YearRequired.$monthix}:"0","",$MonthHits{$YearRequired.$monthix}?$MonthHits{$YearRequired.$monthix}:"0","",Format_Bytes(int($MonthBytes{$YearRequired.$monthix})),"",$MonthUnique{$YearRequired.$monthix}?$MonthUnique{$YearRequired.$monthix}:"0","",$MonthVisits{$YearRequired.$monthix}?$MonthVisits{$YearRequired.$monthix}:"0","",$MonthPages{$YearRequired.$monthix}?$MonthPages{$YearRequired.$monthix}:"0","",$MonthHits{$YearRequired.$monthix}?$MonthHits{$YearRequired.$monthix}:"0","",Format_Bytes(int($MonthBytes{$YearRequired.$monthix})),"
    $Message[102]$total_u$total_v$total_p$total_h".Format_Bytes($total_k)."$total_u$total_v$total_p$total_h".Format_Bytes($total_k)."
    \n
    \n"; } - # Show daily stats + print "
    \n"; + print "\n"; + &tab_end; + } + + print "\n \n\n"; + + # BY DAY OF MONTH + #--------------------------------------------------------------------- + if ($ShowDaysOfMonthStats) { + if ($Debug) { debug("ShowDaysOfMonthStats",2); } + print "$Center 
    \n"; + my $title="$Message[138]"; + &tab_head("$title",0); + print ""; + print "
    "; + print "\n"; + + my $NewLinkParams=${QueryString}; + $NewLinkParams =~ s/(^|&)update(=\w*|$)//i; + $NewLinkParams =~ s/(^|&)staticlinks(=\w*|$)//i; + $NewLinkParams =~ s/(^|&)year=[^&]*//i; + $NewLinkParams =~ s/(^|&)month=[^&]*//i; + $NewLinkParams =~ s/(^|&)framename=[^&]*//i; + $NewLinkParams =~ tr/&/&/s; $NewLinkParams =~ s/^&//; $NewLinkParams =~ s/&$//; + if ($NewLinkParams) { $NewLinkParams="${NewLinkParams}&"; } + my $NewLinkTarget=''; + if ($FrameName eq 'mainright') { $NewLinkTarget=" target=_parent"; } + $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 "
    "; +# print ""; # Define total and max $max_v=$max_h=$max_k=0; # Start from 0 because can be lower than 1 foreach my $daycursor ($firstdaytoshowtime..$lastdaytoshowtime) { @@ -7604,10 +7640,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 ""; @@ -7622,10 +7658,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 ($ShowMonthDayStats =~ /V/i) { print "\"$Message[10]:"; } - if ($ShowMonthDayStats =~ /P/i) { print "\"$Message[56]:"; } - if ($ShowMonthDayStats =~ /H/i) { print "\"$Message[57]:"; } - if ($ShowMonthDayStats =~ /B/i) { print "\"$Message[75]:"; } + if ($ShowDaysOfMonthStats =~ /V/i) { print "\"$Message[10]:"; } + if ($ShowDaysOfMonthStats =~ /P/i) { print "\"$Message[56]:"; } + if ($ShowDaysOfMonthStats =~ /H/i) { print "\"$Message[57]:"; } + if ($ShowDaysOfMonthStats =~ /B/i) { print "\"$Message[75]:"; } print "\n"; print "\n"; # Show lib for day @@ -7648,13 +7684,13 @@ if (scalar keys %HTMLOutput) { print "
    "; - if ($ShowMonthDayStats =~ /V/i) { print "\"$Message[10]:"; } - if ($ShowMonthDayStats =~ /P/i) { print "\"$Message[56]:"; } - if ($ShowMonthDayStats =~ /H/i) { print "\"$Message[57]:"; } - if ($ShowMonthDayStats =~ /B/i) { print "\"$Message[75]:"; } + if ($ShowDaysOfMonthStats =~ /V/i) { print "\"$Message[10]:"; } + if ($ShowDaysOfMonthStats =~ /P/i) { print "\"$Message[56]:"; } + if ($ShowDaysOfMonthStats =~ /H/i) { print "\"$Message[57]:"; } + if ($ShowDaysOfMonthStats =~ /B/i) { print "\"$Message[75]:"; } print " 
    \n
    \n"; # Show data array for days - if ($AddDataArrayMonthDayStats) { + if ($AddDataArrayShowDaysOfMonthStats) { print "\n"; print ""; - if ($ShowMonthDayStats =~ /V/i) { print ""; } - if ($ShowMonthDayStats =~ /P/i) { print ""; } - if ($ShowMonthDayStats =~ /H/i) { print ""; } - if ($ShowMonthDayStats =~ /B/i) { print ""; } + if ($ShowDaysOfMonthStats =~ /V/i) { print ""; } + if ($ShowDaysOfMonthStats =~ /P/i) { print ""; } + if ($ShowDaysOfMonthStats =~ /H/i) { print ""; } + if ($ShowDaysOfMonthStats =~ /B/i) { print ""; } foreach my $daycursor ($firstdaytoshowtime..$lastdaytoshowtime) { $daycursor =~ /^(\d\d\d\d)(\d\d)(\d\d)/; my $year=$1; my $month=$2; my $day=$3; @@ -7662,25 +7698,25 @@ if (scalar keys %HTMLOutput) { my $dayofweekcursor=DayOfWeek($day,$month,$year); print ""; print ""; - if ($ShowMonthDayStats =~ /V/i) { print ""; } - if ($ShowMonthDayStats =~ /P/i) { print ""; } - if ($ShowMonthDayStats =~ /H/i) { print ""; } - if ($ShowMonthDayStats =~ /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"; } # Average row print ""; - if ($ShowMonthDayStats =~ /V/i) { print ""; } - if ($ShowMonthDayStats =~ /P/i) { print ""; } - if ($ShowMonthDayStats =~ /H/i) { print ""; } - if ($ShowMonthDayStats =~ /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"; # Total row print ""; - if ($ShowMonthDayStats =~ /V/i) { print ""; } - if ($ShowMonthDayStats =~ /P/i) { print ""; } - if ($ShowMonthDayStats =~ /H/i) { print ""; } - if ($ShowMonthDayStats =~ /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 "
    $Message[4]$Message[10]$Message[56]$Message[57]$Message[75]
    $Message[10]$Message[56]$Message[57]$Message[75]
    ",Format_Date("$year$month$day"."000000",2),"",$DayVisits{$year.$month.$day}?$DayVisits{$year.$month.$day}:"0","",$DayPages{$year.$month.$day}?$DayPages{$year.$month.$day}:"0","",$DayHits{$year.$month.$day}?$DayHits{$year.$month.$day}:"0","",Format_Bytes(int($DayBytes{$year.$month.$day})),"",$DayVisits{$year.$month.$day}?$DayVisits{$year.$month.$day}:"0","",$DayPages{$year.$month.$day}?$DayPages{$year.$month.$day}:"0","",$DayHits{$year.$month.$day}?$DayHits{$year.$month.$day}:"0","",Format_Bytes(int($DayBytes{$year.$month.$day})),"
    $Message[96]$average_v$average_p$average_h$average_k$average_v$average_p$average_h$average_k
    $Message[102]$total_v$total_p$total_h".Format_Bytes($total_k)."$total_v$total_p$total_h".Format_Bytes($total_k)."
    \n
    "; } @@ -7689,8 +7725,6 @@ if (scalar keys %HTMLOutput) { print "\n"; &tab_end; } - - print "\n \n\n"; # BY DAY OF WEEK #------------------------- @@ -7751,7 +7785,7 @@ if (scalar keys %HTMLOutput) { for (@DOWIndex) { print "".$Message[$_+84].""; } - print "\n"; + print "\n\n"; print "
    \n"; # Show data array for days of week diff --git a/wwwroot/cgi-bin/lang/awstats-en.txt b/wwwroot/cgi-bin/lang/awstats-en.txt index 3ebe9550..65d909aa 100644 --- a/wwwroot/cgi-bin/lang/awstats-en.txt +++ b/wwwroot/cgi-bin/lang/awstats-en.txt @@ -137,4 +137,5 @@ message133=Reported period message134=Extra/Marketing message135=Screen sizes message136=Worm/Virus attacks -message137=Add to favourites \ No newline at end of file +message137=Add to favourites +message138=Days of month \ No newline at end of file diff --git a/wwwroot/cgi-bin/lang/awstats-fr.txt b/wwwroot/cgi-bin/lang/awstats-fr.txt index d376a2aa..d22bc8ce 100644 --- a/wwwroot/cgi-bin/lang/awstats-fr.txt +++ b/wwwroot/cgi-bin/lang/awstats-fr.txt @@ -137,4 +137,5 @@ message133=P message134=Extra/Marketing message135=Résolution écran message136=Attaques Worm/Virus -message137=Ajout aux favoris \ No newline at end of file +message137=Ajout aux favoris +message138=Jours du mois \ No newline at end of file