[svn-commits] kpfleming: awstats/trunk r142 - in /awstats/trunk: ./ wwwroot/cgi-bin/ wwwroo...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jan 5 09:40:46 CST 2010


Author: kpfleming
Date: Tue Jan  5 09:40:45 2010
New Revision: 142

URL: http://svnview.digium.com/svn/thirdparty?view=rev&rev=142
Log:
add in Digium modifications

Added:
    awstats/trunk/install.sh   (with props)
Modified:
    awstats/trunk/wwwroot/cgi-bin/awstats.pl
    awstats/trunk/wwwroot/cgi-bin/lib/search_engines.pm

Added: awstats/trunk/install.sh
URL: http://svnview.digium.com/svn/thirdparty/awstats/trunk/install.sh?view=auto&rev=142
==============================================================================
--- awstats/trunk/install.sh (added)
+++ awstats/trunk/install.sh Tue Jan  5 09:40:45 2010
@@ -1,0 +1,17 @@
+#!/bin/sh -x
+
+mkdir -p /etc/awstats
+mkdir -p /var/lib/awstats
+mkdir -p /usr/share/awstats
+
+cp wwwroot/cgi-bin/awstats.model.conf /etc/awstats/awstats.conf
+
+cp wwwroot/cgi-bin/awstats.pl /usr/lib/cgi-bin
+
+cp -R wwwroot/icon /usr/share/awstats
+
+cp -R wwwroot/cgi-bin/plugins /usr/share/awstats
+
+cp -R wwwroot/cgi-bin/lib /usr/share/awstats
+
+cp -R wwwroot/cgi-bin/lang /usr/share/awstats

Propchange: awstats/trunk/install.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: awstats/trunk/install.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: awstats/trunk/install.sh
------------------------------------------------------------------------------
    svn:keywords = Author ID Date Revision

Propchange: awstats/trunk/install.sh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: awstats/trunk/wwwroot/cgi-bin/awstats.pl
URL: http://svnview.digium.com/svn/thirdparty/awstats/trunk/wwwroot/cgi-bin/awstats.pl?view=diff&rev=142&r1=141&r2=142
==============================================================================
--- awstats/trunk/wwwroot/cgi-bin/awstats.pl (original)
+++ awstats/trunk/wwwroot/cgi-bin/awstats.pl Tue Jan  5 09:40:45 2010
@@ -241,6 +241,7 @@
 @ExtraFirstColumnValuesType @ExtraFirstColumnValuesTypeVal
 @ExtraAddAverageRow @ExtraAddSumRow
 @PluginsToLoad 
+ at SkipMethods @OnlyMethods @MaxHostPageExtra
 /;
 @MiscListOrder=('AddToFavourites','JavascriptDisabled','JavaEnabled','DirectorSupport','FlashSupport','RealPlayerSupport','QuickTimeSupport','WindowsMediaPlayerSupport','PDFSupport');
 %MiscListCalc=('TotalMisc'=>'','AddToFavourites'=>'u','JavascriptDisabled'=>'hm','JavaEnabled'=>'hm','DirectorSupport'=>'hm','FlashSupport'=>'hm','RealPlayerSupport'=>'hm','QuickTimeSupport'=>'hm','WindowsMediaPlayerSupport'=>'hm','PDFSupport'=>'hm');
@@ -280,6 +281,11 @@
 @ExtraFirstColumnValuesType = @ExtraFirstColumnValuesTypeVal = ();
 @ExtraAddAverageRow = @ExtraAddSumRow = ();
 @PluginsToLoad = ();
+ at SkipMethods = @OnlyMethods = @MaxHostPageExtra = ();
+use vars qw/
+%ExtraRowkeyHostPages
+/;
+%ExtraRowkeyHostPages = ();
 # ---------- Init hash arrays --------
 use vars qw/
 %BrowsersHashIDLib %BrowsersHashIcon %BrowsersHereAreGrabbers 
@@ -523,7 +529,8 @@
 'Created by',
 'plugins',
 'Regions',
-'Cities'
+'Cities',
+'Excess Pages'
 );
 
 
@@ -1078,6 +1085,26 @@
 }
 
 #------------------------------------------------------------------------------
+# Function:     Check if parameter is in OnlyMethods array
+# Parameters:	host @OnlyMethods (a NOT case sensitive precompiled regex array)
+# Return:		0 Not found, 1 Found
+#------------------------------------------------------------------------------
+sub OnlyMethod{
+	foreach (@OnlyMethods) { if ($_[0] =~ /$_/) { return 1; } }
+	0; # Not in @OnlyMethods
+}
+
+#------------------------------------------------------------------------------
+# Function:     Check if parameter is in SkipMethods array
+# Parameters:	host @SkipMethods (a NOT case sensitive precompiled regex array)
+# Return:		0 Not found, 1 Found
+#------------------------------------------------------------------------------
+sub SkipMethod{
+	foreach (@SkipMethods) { if ($_[0] =~ /$_/) { return 1; } }
+	0; # Not in @SkipMethods
+}
+
+#------------------------------------------------------------------------------
 # Function:     Return day of week of a day
 # Parameters:	$day $month $year
 # Return:		0-6
@@ -1432,19 +1459,40 @@
 			next;
 			}
 
+		if ($param =~ /^OnlyMethods/) {
+		    @OnlyMethods=();
+		    foreach my $elem (split(/\s+/,$value))	{
+			if ($elem =~ /^REGEX\[(.*)\]$/i) { $elem=$1; }
+			else { $elem='^'.quotemeta($elem).'$'; }
+			if ($elem) { push @OnlyMethods, qr/$elem/i; }
+		    }
+		    next;
+		}
+
+		if ($param =~ /^SkipMethods/) {
+		    @SkipMethods=();
+		    foreach my $elem (split(/\s+/,$value))	{
+			if ($elem =~ /^REGEX\[(.*)\]$/i) { $elem=$1; }
+			else { $elem='^'.quotemeta($elem).'$'; }
+			if ($elem) { push @SkipMethods, qr/$elem/i; }
+		    }
+		    next;
+		}
+
  		# Extra parameters
- 		if ($param =~ /^ExtraSectionName(\d+)/)			{ $ExtraName[$1]=$value; next; }
- 		if ($param =~ /^ExtraSectionCodeFilter(\d+)/)  	{ @{$ExtraCodeFilter[$1]}=split(/\s+/,$value); next; }
- 		if ($param =~ /^ExtraSectionCondition(\d+)/)  	{ $ExtraCondition[$1]=$value; next; }
- 		if ($param =~ /^ExtraSectionStatTypes(\d+)/)    { $ExtraStatTypes[$1]=$value; next; }
- 		if ($param =~ /^ExtraSectionFirstColumnTitle(\d+)/) 	{ $ExtraFirstColumnTitle[$1]=$value; next; }
- 		if ($param =~ /^ExtraSectionFirstColumnValues(\d+)/) 	{ $ExtraFirstColumnValues[$1]=$value; next; }
- 		if ($param =~ /^ExtraSectionFirstColumnFunction(\d+)/) 	{ $ExtraFirstColumnFunction[$1]=$value; next; }
- 		if ($param =~ /^ExtraSectionFirstColumnFormat(\d+)/) 	{ $ExtraFirstColumnFormat[$1]=$value; next; }
- 		if ($param =~ /^ExtraSectionAddAverageRow(\d+)/) 	{ $ExtraAddAverageRow[$1]=$value; next; }
- 		if ($param =~ /^ExtraSectionAddSumRow(\d+)/) 	{ $ExtraAddSumRow[$1]=$value; next; }
- 		if ($param =~ /^MaxNbOfExtra(\d+)/) 			{ $MaxNbOfExtra[$1]=$value; next; }
- 		if ($param =~ /^MinHitExtra(\d+)/) 				{ $MinHitExtra[$1]=$value; next; }
+ 		if ($param =~ /^ExtraSectionName(\d+)/)				{ $ExtraName[$1]=$value; next; }
+ 		if ($param =~ /^ExtraSectionCodeFilter(All|\d+)/)  		{ @{$ExtraCodeFilter[$1]}=split(/\s+/,$value); next; }
+ 		if ($param =~ /^ExtraSectionCondition(\d+)/)  			{ $ExtraCondition[$1]=$value; next; }
+ 		if ($param =~ /^ExtraSectionStatTypes(All|\d+)/)    		{ $ExtraStatTypes[$1]=$value; next; }
+ 		if ($param =~ /^ExtraSectionFirstColumnTitle(All|\d+)/) 	{ $ExtraFirstColumnTitle[$1]=$value; next; }
+ 		if ($param =~ /^ExtraSectionFirstColumnValues(\d+)/) 		{ $ExtraFirstColumnValues[$1]=$value; next; }
+ 		if ($param =~ /^ExtraSectionFirstColumnFunction(All|\d+)/) 	{ $ExtraFirstColumnFunction[$1]=$value; next; }
+ 		if ($param =~ /^ExtraSectionFirstColumnFormat(All|\d+)/) 	{ $ExtraFirstColumnFormat[$1]=$value; next; }
+ 		if ($param =~ /^ExtraSectionAddAverageRow(All|\d+)/) 		{ $ExtraAddAverageRow[$1]=$value; next; }
+ 		if ($param =~ /^ExtraSectionAddSumRow(All|\d+)/) 		{ $ExtraAddSumRow[$1]=$value; next; }
+ 		if ($param =~ /^MaxNbOfExtra(All|\d+)/) 			{ $MaxNbOfExtra[$1]=$value; next; }
+ 		if ($param =~ /^MinHitExtra(All|\d+)/)				{ $MinHitExtra[$1]=$value; next; }
+ 		if ($param =~ /^MaxHostPageExtra(All|\d+)/) 			{ $MaxHostPageExtra[$1]=$value; next; }
 
 		# Plugins
 		if ($param =~ /^LoadPlugin/)          			{ push @PluginsToLoad, $value; next; }
@@ -1731,12 +1779,16 @@
 	if ($LevelForSearchEnginesDetection !~ /^\d+/)	{ $LevelForSearchEnginesDetection=2; }
 	if ($LevelForKeywordsDetection !~ /^\d+/)  		{ $LevelForKeywordsDetection=2; }
 	# Optional extra setup section
+	if ($MaxNbOfExtra['All'] !~ /^\d+$/ || $MaxNbOfExtra['All'] < 0) { $MaxNbOfExtra['All']=20; }
+	if ($MaxHostPageExtra['All'] !~ /^\d+$/ || $MaxHostPageExtra['All'] < 0) { $MaxHostPageExtra['All']=1; }
+	if ($MinHitExtra['All'] !~ /^\d+$/ || $MinHitExtra['All'] < 1) { $MinHitExtra['All']=1; }
 	foreach my $extracpt (1.. at ExtraName-1) {
-		if ($ExtraStatTypes[$extracpt] !~ /[PHBL]/)  { $ExtraStatTypes[$extracpt]='PHBL'; }
-		if ($MaxNbOfExtra[$extracpt] !~ /^\d+$/ || $MaxNbOfExtra[$extracpt] < 0) { $MaxNbOfExtra[$extracpt]=20; }
-		if ($MinHitExtra[$extracpt] !~ /^\d+$/ || $MinHitExtra[$extracpt] < 1) { $MinHitExtra[$extracpt]=1; }
+		if ($ExtraStatTypes[$extracpt] !~ /[PHBL]/)  { $ExtraStatTypes[$extracpt]= $ExtraStatTypes['All'] || 'PHBL'; }
+		if ($MaxNbOfExtra[$extracpt] !~ /^\d+$/ || $MaxNbOfExtra[$extracpt] < 0) { $MaxNbOfExtra[$extracpt]=$MaxNbOfExtra['All'] ; }
+		if ($MaxHostPageExtra[$extracpt] !~ /^\d+$/ || $MaxHostPageExtra[$extracpt] < 0) { $MaxHostPageExtra[$extracpt]=$MaxHostPageExtra['All'] ; }
+		if ($MinHitExtra[$extracpt] !~ /^\d+$/ || $MinHitExtra[$extracpt] < 1) { $MinHitExtra[$extracpt]=$MinHitExtra['All']; }
 		if (! $ExtraFirstColumnValues[$extracpt]) { error("Extra section number $extracpt is defined without ExtraSectionFirstColumnValues$extracpt parameter"); }
-		if (! $ExtraFirstColumnFormat[$extracpt]) { $ExtraFirstColumnFormat[$extracpt] = '%s'; }
+		if (! $ExtraFirstColumnFormat[$extracpt]) { $ExtraFirstColumnFormat[$extracpt] = $ExtraFirstColumnFormat['All'] || '%s'; }
 	}
 	# Optional appearance setup section
 	if ($MaxRowsInHTMLOutput !~ /^\d+/ || $MaxRowsInHTMLOutput<1)     { $MaxRowsInHTMLOutput=1000; }
@@ -1868,11 +1920,19 @@
 		debug(" MiscTrackerUrl='$MiscTrackerUrl'",2);
 		foreach (keys %MaxNbOf) { debug(" MaxNbOf{$_}=$MaxNbOf{$_}",2); }
 		foreach (keys %MinHit)  { debug(" MinHit{$_}=$MinHit{$_}",2); }
+		debug(" ExtraCodeFilter['All'] is array ".join(',',@{$ExtraCodeFilter['All']}),2);
+		debug(" ExtraStatTypes['All'] is ".$ExtraStatTypes['All'],2);
+		debug(" ExtraFirstColumnTitle['All'] is ".$ExtraFirstColumnTitle['All'],2);
+		debug(" ExtraFirstColumnFunction['All'] is ".$ExtraFirstColumnFunction['All'],2);
+		debug(" ExtraFirstColumnFormat['All'] is ".$ExtraFirstColumnFormat['All'],2);
 		foreach my $extranum (1.. at ExtraName-1) {
 			debug(" ExtraCodeFilter[$extranum] is array ".join(',',@{$ExtraCodeFilter[$extranum]}),2);
 			debug(" ExtraConditionType[$extranum] is array ".join(',',@{$ExtraConditionType[$extranum]}),2);
 			debug(" ExtraConditionTypeVal[$extranum] is array ".join(',',@{$ExtraConditionTypeVal[$extranum]}),2);
-			debug(" ExtraFirstColumnFunction[$extranum] is array ".join(',',@{$ExtraFirstColumnFunction[$extranum]}),2);
+			debug(" ExtraStatTypes[$extranum] is ".$ExtraStatTypes[$extranum],2);
+			debug(" ExtraFirstColumnTitle[$extranum] is ".$ExtraFirstColumnTitle[$extranum],2);
+			debug(" ExtraFirstColumnFunction[$extranum] is ".$ExtraFirstColumnFunction[$extranum],2);
+			debug(" ExtraFirstColumnFormat[$extranum] is ".$ExtraFirstColumnFormat[$extranum],2);
 			debug(" ExtraFirstColumnValuesType[$extranum] is array ".join(',',@{$ExtraFirstColumnValuesType[$extranum]}),2);
 			debug(" ExtraFirstColumnValuesTypeVal[$extranum] is array ".join(',',@{$ExtraFirstColumnValuesTypeVal[$extranum]}),2);
 		}
@@ -3320,10 +3380,13 @@
 						if ($field[0] ne '') {
 							$count++;
 							if ($SectionsToLoad{"extra_$extranum"}) {
-								if ($ExtraStatTypes[$extranum] =~ /P/i && $field[1]) { ${'_section_' . $extranum . '_p'}{$field[0]}+=$field[1]; }
+								if ($ExtraStatTypes[$extranum] =~ /P/i && $field[1]) {
+								    ${'_section_' . $extranum . '_p'}{$field[0]}+=$field[1];
+								    ${'_section_' . $extranum . '_xp'}{$field[0]}+=$field[3];
+								}
 								${'_section_' . $extranum . '_h'}{$field[0]}+=$field[2];
-								if ($ExtraStatTypes[$extranum] =~ /B/i && $field[3]) { ${'_section_' . $extranum . '_k'}{$field[0]}+=$field[3]; }
-								if ($ExtraStatTypes[$extranum] =~ /L/i && ! ${'_section_' . $extranum . '_l'}{$field[0]} && $field[4]) { ${'_section_' . $extranum . '_l'}{$field[0]}=int($field[4]); }
+								if ($ExtraStatTypes[$extranum] =~ /B/i && $field[4]) { ${'_section_' . $extranum . '_k'}{$field[0]}+=$field[4]; }
+								if ($ExtraStatTypes[$extranum] =~ /L/i && ! ${'_section_' . $extranum . '_l'}{$field[0]} && $field[5]) { ${'_section_' . $extranum . '_l'}{$field[0]}=int($field[5]); }
 								$countloaded++;
 							}
 						}
@@ -3337,7 +3400,13 @@
 					delete $SectionsToLoad{"extra_$extranum"};
 					if ($SectionsToSave{"extra_$extranum"}) {
 						Save_History("extra_$extranum",$year,$month,$date); delete $SectionsToSave{"extra_$extranum"};
-						if ($withpurge) { %{'_section_' . $extranum . '_p'}=(); %{'_section_' . $extranum . '_h'}=(); %{'_section_' . $extranum . '_b'}=(); %{'_section_' . $extranum . '_l'}=(); }
+						if ($withpurge) {
+						    %{'_section_' . $extranum . '_p'}=();
+						    %{'_section_' . $extranum . '_h'}=();
+						    %{'_section_' . $extranum . '_xp'}=();
+						    %{'_section_' . $extranum . '_b'}=();
+						    %{'_section_' . $extranum . '_l'}=();
+						}
 					}
 					if (! scalar %SectionsToLoad) { debug(" Stop reading history file. Got all we need."); last; }
 					next;
@@ -4066,16 +4135,20 @@
 	 		foreach (@keylist) {
 	 			$keysinkeylist{$_}=1;
 	 			my $page=${'_section_' . $extranum . '_p'}{$_}||0;
+	 			my $excesspage=${'_section_' . $extranum . '_xp'}{$_}||0;
 	 			my $bytes=${'_section_' . $extranum . '_k'}{$_}||0;
 	 			my $lastaccess=${'_section_' . $extranum . '_l'}{$_}||'';
-	 			print HISTORYTMP "${xmlrb}".XMLEncodeForHisto($_)."${xmlrs}$page${xmlrs}", ${'_section_' . $extranum . '_h'}{$_}, "${xmlrs}$bytes${xmlrs}$lastaccess${xmlre}\n"; next;
+	 			print HISTORYTMP "${xmlrb}".XMLEncodeForHisto($_)."${xmlrs}$page${xmlrs}", ${'_section_' . $extranum . '_h'}{$_}, "${xmlrs}$excesspage${xmlrs}$bytes${xmlrs}$lastaccess${xmlre}\n";
+				next;
 	 		}
 	 		foreach (keys %{'_section_' . $extranum . '_h'}) {
 	 			if ($keysinkeylist{$_}) { next; }
 	 			my $page=${'_section_' . $extranum . '_p'}{$_}||0;
+	 			my $excesspage=${'_section_' . $extranum . '_xp'}{$_}||0;
 	 			my $bytes=${'_section_' . $extranum . '_k'}{$_}||0;
 	 			my $lastaccess=${'_section_' . $extranum . '_l'}{$_}||'';
-	 			print HISTORYTMP "${xmlrb}".XMLEncodeForHisto($_)."${xmlrs}$page${xmlrs}", ${'_section_' . $extranum . '_h'}{$_}, "${xmlrs}$bytes${xmlrs}$lastaccess${xmlre}\n"; next;
+	 			print HISTORYTMP "${xmlrb}".XMLEncodeForHisto($_)."${xmlrs}$page${xmlrs}", ${'_section_' . $extranum . '_h'}{$_}, "${xmlrs}$excesspage${xmlrs}$bytes${xmlrs}$lastaccess${xmlre}\n";
+				next;
 	 		}
 	 		print HISTORYTMP "${xmleb}END_EXTRA_$extranum${xmlee}\n";
 		}
@@ -4323,7 +4396,7 @@
 	%_emails_h = %_emails_k = %_emails_l = %_emailr_h = %_emailr_k = %_emailr_l = ();
  	for (my $ix=1; $ix < @ExtraName; $ix++) {
  		%{'_section_' . $ix . '_h'} = %{'_section_' . $ix . '_o'} = %{'_section_' . $ix . '_k'}	=
- 		%{'_section_' . $ix . '_l'} = %{'_section_' . $ix . '_p'} = ();
+ 		%{'_section_' . $ix . '_l'} = %{'_section_' . $ix . '_p'} = %{'_section_' . $ix . '_xp'} = ();
  	}
    	foreach my $pluginname (keys %{$PluginsLoaded{'SectionInitHashArray'}})  {
 #   		my $function="SectionInitHashArray_$pluginname()";
@@ -6202,6 +6275,8 @@
 	@OnlyUserAgents=&OptimizeArray(\@OnlyUserAgents,1); if ($Debug) { debug("OnlyUserAgents precompiled regex list is now @OnlyUserAgents",1); }
 	@OnlyFiles=&OptimizeArray(\@OnlyFiles,$URLNotCaseSensitive); if ($Debug) { debug("OnlyFiles precompiled regex list is now @OnlyFiles",1); }
 	@NotPageFiles=&OptimizeArray(\@NotPageFiles,$URLNotCaseSensitive); if ($Debug) { debug("NotPageFiles precompiled regex list is now @NotPageFiles",1); }
+	@OnlyMethods=&OptimizeArray(\@OnlyMethods,$URLNotCaseSensitive); if ($Debug) { debug("OnlyMethods precompiled regex list is now @OnlyMethods",1); }
+	@SkipMethods=&OptimizeArray(\@SkipMethods,$URLNotCaseSensitive); if ($Debug) { debug("SkipMethods precompiled regex list is now @SkipMethods",1); }
 	# Precompile the regex search strings with qr
 	@RobotsSearchIDOrder=map{qr/$_/i} @RobotsSearchIDOrder;
 	@WormsSearchIDOrder=map{qr/$_/i} @WormsSearchIDOrder;
@@ -6262,6 +6337,11 @@
 		&Lock_Update(1);
 	}
 
+	if (stat("$DirData/awstats.$SiteDomain.rowkeyhost")) {
+	    %ExtraRowkeyHostPages = %{Storable::retrieve("$DirData/awstats.$SiteDomain.rowkeyhost")};
+	    unlink("$DirData/awstats.$SiteDomain.rowkeyhost");
+	}
+
 	if ($Debug) { debug("Start Update process (lastprocesseddate=$lastprocesseddate)"); }
 
 	# Open log file
@@ -6531,6 +6611,8 @@
 		elsif (@OnlyUsers && ! &OnlyUser($field[$pos_logname]))  { $qualifdrop="Dropped record (URL $field[$pos_logname] not qualified by OnlyUsers)"; }
 		elsif (@OnlyFiles && ! &OnlyFile($field[$pos_url]))  { $qualifdrop="Dropped record (URL $field[$pos_url] not qualified by OnlyFiles)"; }
 		elsif (@OnlyUserAgents && ! &OnlyUserAgent($field[$pos_agent]))  { $qualifdrop="Dropped record (user agent '$field[$pos_agent]' not qualified by OnlyUserAgents)"; }
+		elsif (@OnlyMethods && ! &OnlyMethod($field[$pos_method]))  { $qualifdrop="Dropped record (method $field[$pos_method] not qualified by OnlyMethods)"; }
+		elsif (@SkipMethods && &SkipMethod($field[$pos_method]))  { $qualifdrop="Dropped record (method $field[$pos_method] not qualified by SkipMethods)"; }
 		if ($qualifdrop) {
 			$NbOfLinesDropped++;
 			if ($Debug) { debug("$qualifdrop: $line",4); }
@@ -7410,64 +7492,66 @@
 
 		# Analyze: Extra
 		#---------------
- 		foreach my $extranum (1.. at ExtraName-1) {
+		if (! $countedtraffic) {
+		    foreach my $extranum (1.. at ExtraName-1) {
 			if ($Debug) { debug("  Process extra analyze $extranum",4); }
 
  			# Check code
  			my $conditionok=0;
- 			if ($ExtraCodeFilter[$extranum])
+			my @condarray = @{$ExtraCodeFilter[$extranum]} || @{$ExtraCodeFilter['All']};
+ 			if (@condarray)
  			{
-	 			foreach my $condnum (0..@{$ExtraCodeFilter[$extranum]}-1) {
-					if ($Debug) { debug("  Check code '$field[$pos_code]' must be '$ExtraCodeFilter[$extranum][$condnum]'",5); }
-					if ($field[$pos_code] eq "$ExtraCodeFilter[$extranum][$condnum]") { $conditionok=1; last; }
-				}
-				if (! $conditionok && @{$ExtraCodeFilter[$extranum]}) { next; }	# End for this section
-				if ($Debug) { debug("  No check on code or code is OK. Now we check other conditions.",5); }
+			    foreach my $condnum (0.. at condarray-1) {
+				if ($Debug) { debug("  Check code '$field[$pos_code]' must be '$condarray[$condnum]'",5); }
+				if ($field[$pos_code] eq "$condarray[$condnum]") { $conditionok=1; last; }
+			    }
+			    if (! $conditionok && @condarray) { next; }	# End for this section
+			    if ($Debug) { debug("  No check on code or code is OK. Now we check other conditions.",5); }
 			}
 			
  			# Check conditions
  			$conditionok=0;
  			foreach my $condnum (0..@{$ExtraConditionType[$extranum]}-1) {
- 				my $conditiontype=$ExtraConditionType[$extranum][$condnum];
- 				my $conditiontypeval=$ExtraConditionTypeVal[$extranum][$condnum];
- 				if ($conditiontype eq 'URL') {
-					if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$urlwithnoquery'",5); }
- 					if ($urlwithnoquery =~ /$conditiontypeval/) { $conditionok=1; last; }
- 				}
- 				elsif ($conditiontype eq 'QUERY_STRING') {
-					if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$standalonequery'",5); }
- 					if ($standalonequery =~ /$conditiontypeval/) {	$conditionok=1; last; }
- 				}
-                elsif ($conditiontype eq 'URLWITHQUERY') {
-                    if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$urlwithnoquery$tokenquery$standalonequery'",5); }
-                    if ("$urlwithnoquery$tokenquery$standalonequery" =~ /$conditiontypeval/) { $conditionok=1; last; }
-                }
- 				elsif ($conditiontype eq 'REFERER') {
-					if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$field[$pos_referer]'",5); }
- 					if ($field[$pos_referer] =~ /$conditiontypeval/) { $conditionok=1; last; }
- 				}
- 				elsif ($conditiontype eq 'UA') {
-					if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$field[$pos_agent]'",5); }
- 					if ($field[$pos_agent] =~ /$conditiontypeval/) { $conditionok=1; last; }
- 				}
- 				elsif ($conditiontype eq 'HOSTINLOG') {
-					if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$field[$pos_host]'",5); }
- 					if ($field[$pos_host] =~ /$conditiontypeval/) { $conditionok=1; last; }
- 				}
- 				elsif ($conditiontype eq 'HOST') {
-					my $hosttouse=($HostResolved?$HostResolved:$Host);
-					if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$hosttouse'",5); }
- 					if ($hosttouse =~ /$conditiontypeval/) { $conditionok=1; last; }
- 				}
-				elsif ($conditiontype eq 'VHOST') {
-					if ($Debug) { debug("  Check condision '$conditiontype' must contain '$conditiontypeval' in '$field[$pos_vh]'",5); }
- 					if ($field[$pos_vh] =~ /$conditiontypeval/) { $conditionok=1; last; }
-				}
- 				elsif ($conditiontype =~ /extra(\d+)/i) {
-					if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$field[$pos_extra[$1]]'",5); }
- 					if ($field[$pos_extra[$1]] =~ /$conditiontypeval/) { $conditionok=1; last; }
-                }
- 				else { error("Wrong value of parameter ExtraSectionCondition$extranum"); }
+			    my $conditiontype=$ExtraConditionType[$extranum][$condnum];
+			    my $conditiontypeval=$ExtraConditionTypeVal[$extranum][$condnum];
+			    if ($conditiontype eq 'URL') {
+				if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$urlwithnoquery'",5); }
+				if ($urlwithnoquery =~ /$conditiontypeval/) { $conditionok=1; last; }
+			    }
+			    elsif ($conditiontype eq 'QUERY_STRING') {
+				if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$standalonequery'",5); }
+				if ($standalonequery =~ /$conditiontypeval/) {	$conditionok=1; last; }
+			    }
+			    elsif ($conditiontype eq 'URLWITHQUERY') {
+				if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$urlwithnoquery$tokenquery$standalonequery'",5); }
+				if ("$urlwithnoquery$tokenquery$standalonequery" =~ /$conditiontypeval/) { $conditionok=1; last; }
+			    }
+			    elsif ($conditiontype eq 'REFERER') {
+				if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$field[$pos_referer]'",5); }
+				if ($field[$pos_referer] =~ /$conditiontypeval/) { $conditionok=1; last; }
+			    }
+			    elsif ($conditiontype eq 'UA') {
+				if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$field[$pos_agent]'",5); }
+				if ($field[$pos_agent] =~ /$conditiontypeval/) { $conditionok=1; last; }
+			    }
+			    elsif ($conditiontype eq 'HOSTINLOG') {
+				if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$field[$pos_host]'",5); }
+				if ($field[$pos_host] =~ /$conditiontypeval/) { $conditionok=1; last; }
+			    }
+			    elsif ($conditiontype eq 'HOST') {
+				my $hosttouse=($HostResolved?$HostResolved:$Host);
+				if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$hosttouse'",5); }
+				if ($hosttouse =~ /$conditiontypeval/) { $conditionok=1; last; }
+			    }
+			    elsif ($conditiontype eq 'VHOST') {
+				if ($Debug) { debug("  Check condision '$conditiontype' must contain '$conditiontypeval' in '$field[$pos_vh]'",5); }
+				if ($field[$pos_vh] =~ /$conditiontypeval/) { $conditionok=1; last; }
+			    }
+			    elsif ($conditiontype =~ /extra(\d+)/i) {
+				if ($Debug) { debug("  Check condition '$conditiontype' must contain '$conditiontypeval' in '$field[$pos_extra[$1]]'",5); }
+				if ($field[$pos_extra[$1]] =~ /$conditiontypeval/) { $conditionok=1; last; }
+			    }
+			    else { error("Wrong value of parameter ExtraSectionCondition$extranum"); }
  			}
 			if (! $conditionok && @{$ExtraConditionType[$extranum]}) { next; }	# End for this section
 			if ($Debug) { debug("  No condition or condition is OK. Now we extract value for first column of extra chart.",5); }
@@ -7476,38 +7560,38 @@
  			my $rowkeyval;
 			my $rowkeyok=0;
  			foreach my $rowkeynum (0..@{$ExtraFirstColumnValuesType[$extranum]}-1) {
- 				my $rowkeytype=$ExtraFirstColumnValuesType[$extranum][$rowkeynum];
- 				my $rowkeytypeval=$ExtraFirstColumnValuesTypeVal[$extranum][$rowkeynum];
-				if ($rowkeytype eq 'URL') { 
-					if ($urlwithnoquery =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
-				} 
- 				elsif ($rowkeytype eq 'QUERY_STRING') {
-					if ($Debug) { debug("  Extract value from '$standalonequery' with regex '$rowkeytypeval'.",5); }
- 					if ($standalonequery =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
- 				}
-                elsif ($rowkeytype eq 'URLWITHQUERY') {
-                    if ("$urlwithnoquery$tokenquery$standalonequery" =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
-                }
- 				elsif ($rowkeytype eq 'REFERER') {
- 					if ($field[$pos_referer] =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
- 				}
- 				elsif ($rowkeytype eq 'UA') {
- 					if ($field[$pos_agent] =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
- 				}
- 				elsif ($rowkeytype eq 'HOSTINLOG') {
- 					if ($field[$pos_host] =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
- 				}
- 				elsif ($rowkeytype eq 'HOST') {
-					my $hosttouse=($HostResolved?$HostResolved:$Host);
- 					if ($hosttouse =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
- 				}
-				elsif ($rowkeytype eq 'VHOST') {
- 					if ($field[$pos_vh] =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
- 				}
- 				elsif ($rowkeytype =~ /extra(\d+)/i) {
- 					if ($field[$pos_extra[$1]] =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
- 				}
- 				else { error("Wrong value of parameter ExtraSectionFirstColumnValues$extranum"); }
+			    my $rowkeytype=$ExtraFirstColumnValuesType[$extranum][$rowkeynum];
+			    my $rowkeytypeval=$ExtraFirstColumnValuesTypeVal[$extranum][$rowkeynum];
+			    if ($rowkeytype eq 'URL') { 
+				if ($urlwithnoquery =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
+			    } 
+			    elsif ($rowkeytype eq 'QUERY_STRING') {
+				if ($Debug) { debug("  Extract value from '$standalonequery' with regex '$rowkeytypeval'.",5); }
+				if ($standalonequery =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
+			    }
+			    elsif ($rowkeytype eq 'URLWITHQUERY') {
+				if ("$urlwithnoquery$tokenquery$standalonequery" =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
+			    }
+			    elsif ($rowkeytype eq 'REFERER') {
+				if ($field[$pos_referer] =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
+			    }
+			    elsif ($rowkeytype eq 'UA') {
+				if ($field[$pos_agent] =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
+			    }
+			    elsif ($rowkeytype eq 'HOSTINLOG') {
+				if ($field[$pos_host] =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
+			    }
+			    elsif ($rowkeytype eq 'HOST') {
+				my $hosttouse=($HostResolved?$HostResolved:$Host);
+				if ($hosttouse =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
+			    }
+			    elsif ($rowkeytype eq 'VHOST') {
+				if ($field[$pos_vh] =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
+			    }
+			    elsif ($rowkeytype =~ /extra(\d+)/i) {
+				if ($field[$pos_extra[$1]] =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; }
+			    }
+			    else { error("Wrong value of parameter ExtraSectionFirstColumnValues$extranum"); }
  			}
 			if (! $rowkeyok)  { next; }									# End for this section
 			if (! $rowkeyval) { $rowkeyval='Failed to extract key'; }
@@ -7517,18 +7601,32 @@
  			if ($ExtraFirstColumnFunction[$extranum])
  			{
  			    # Todo call function on string $rowkeyval
-            }
+			}
  			
  			# Here we got all values to increase counters
- 			if ($PageBool && $ExtraStatTypes[$extranum] =~ /P/i) { ${'_section_' . $extranum . '_p'}{$rowkeyval}++; }
- 			${'_section_' . $extranum . '_h'}{$rowkeyval}++;	# Must be set
- 			if ($ExtraStatTypes[$extranum] =~ /B/i) { ${'_section_' . $extranum . '_k'}{$rowkeyval}+=int($field[$pos_size]); }
- 			if ($ExtraStatTypes[$extranum] =~ /L/i) {
- 				if (${'_section_' . $extranum . '_l'}{$rowkeyval}||0 < $timerecord) { ${'_section_' . $extranum . '_l'}{$rowkeyval}=$timerecord; }
+ 			if ($PageBool && $ExtraStatTypes[$extranum] =~ /P/i) {
+			    if ($MaxHostPageExtra[$extranum]) {
+				$ExtraRowkeyHostPages{$extranum}{$rowkeyval}{$field[$pos_host]}++;
+				if ($ExtraRowkeyHostPages{$extranum}{$rowkeyval}{$field[$pos_host]} > $MaxHostPageExtra[$extranum]) {
+				    ${'_section_' . $extranum . '_xp'}{$rowkeyval}++;
+				} else {
+				    ${'_section_' . $extranum . '_p'}{$rowkeyval}++;
+				}
+			    } else {
+				${'_section_' . $extranum . '_p'}{$rowkeyval}++;
+			    }
+			}
+
+			${'_section_' . $extranum . '_h'}{$rowkeyval}++;	# Must be set
+			
+			if ($ExtraStatTypes[$extranum] =~ /B/i) { ${'_section_' . $extranum . '_k'}{$rowkeyval}+=int($field[$pos_size]); }
+			if ($ExtraStatTypes[$extranum] =~ /L/i) {
+			    if (${'_section_' . $extranum . '_l'}{$rowkeyval}||0 < $timerecord) { ${'_section_' . $extranum . '_l'}{$rowkeyval}=$timerecord; }
  			}
+
 			# Check to avoid too large extra sections
 			if (scalar keys %{'_section_' . $extranum . '_h'} > $ExtraTrackedRowsLimit) {
-				error(<<END_ERROR_TEXT);
+			    error(<<END_ERROR_TEXT);
 The number of values found for extra section $extranum has grown too large.
 In order to prevent awstats from using an excessive amount of memory, the number
 of values is currently limited to $ExtraTrackedRowsLimit. Perhaps you should consider
@@ -7537,7 +7635,8 @@
 ExtraTrackedRowsLimit in your awstats configuration file.
 END_ERROR_TEXT
 			}
- 		}
+		    }
+		}
 
 		# Every 20,000 approved lines after a flush, we test to clean too large hash arrays to flush data in tmp file
 		if (++$counterforflushtest >= 20000) {
@@ -7657,6 +7756,8 @@
 		Save_DNS_Cache_File(\%TmpDNSLookup,"$DirData/$DNSLastUpdateCacheFile","$FileSuffix");	# Save into file using FileSuffix
 	}
 
+	Storable::store(\%ExtraRowkeyHostPages, "$DirData/awstats.$SiteDomain.rowkeyhost");
+
 	if ($EnableLockForUpdate) {
 		# Remove lock
 		&Lock_Update(0);
@@ -7680,7 +7781,7 @@
 	debug("DayRequired=$DayRequired, HourRequired=$HourRequired",2);
 
 	my $max_p; my $max_h; my $max_k; my $max_v;
-	my $total_u; my $total_v; my $total_p; my $total_h; my $total_k; my $total_e; my $total_x; my $total_s; my $total_l; my $total_r;
+	my $total_u; my $total_v; my $total_p; my $total_h; my $total_k; my $total_e; my $total_x; my $total_s; my $total_l; my $total_r; my $total_xp;
 	my $average_u; my $average_v; my $average_p; my $average_h; my $average_k; my $average_s;
 	my $rest_p; my $rest_h; my $rest_k; my $rest_e; my $rest_x; my $rest_s; my $rest_l; my $rest_r;
 	my $average_nb;
@@ -8983,14 +9084,19 @@
 				my $title=$ExtraName[$extranum];
 		 		&tab_head("$title",19,0,"extra$extranum");
 		 		print "<tr bgcolor=\"#$color_TableBGRowTitle\">";
-		 		print "<th>".$ExtraFirstColumnTitle[$extranum]."</th>";
-
-		 		if ($ExtraStatTypes[$extranum] =~ m/P/i) { print "<th bgcolor=\"#$color_p\" width=\"80\">$Message[56]</th>"; }
+		 		print "<th>".($ExtraFirstColumnTitle[$extranum] || $ExtraFirstColumnTitle['All'])."</th>";
+
+		 		if ($ExtraStatTypes[$extranum] =~ m/P/i) {
+				    print "<th bgcolor=\"#$color_p\" width=\"80\">$Message[56]</th>";
+				    if ($MaxHostPageExtra[$extranum]) {
+					print "<th bgcolor=\"#$color_p\" width=\"80\">$Message[173]</th>";
+				    }
+				}
 		 		if ($ExtraStatTypes[$extranum] =~ m/H/i) { print "<th bgcolor=\"#$color_h\" width=\"80\">$Message[57]</th>"; }
 		 		if ($ExtraStatTypes[$extranum] =~ m/B/i) { print "<th bgcolor=\"#$color_k\" width=\"80\">$Message[75]</th>"; }
 		 		if ($ExtraStatTypes[$extranum] =~ m/L/i) { print "<th width=\"120\">$Message[9]</th>"; }
 		 		print "</tr>\n";
-		 		$total_p=$total_h=$total_k=0;
+		 		$total_p=$total_h=$total_k=$total_xp=0;
 		 		#$max_h=1; foreach (values %_login_h) { if ($_ > $max_h) { $max_h = $_; } }
 		 		#$max_k=1; foreach (values %_login_k) { if ($_ > $max_k) { $max_k = $_; } }
 		 		my $count=0;
@@ -9004,12 +9110,20 @@
 				foreach my $key (@keylist) {
 					$keysinkeylist{$key}=1;
 		 			my $firstcol = CleanXSS(DecodeEncodedString($key));
-		 			$total_p+=${'_section_' . $extranum . '_p'}{$key};
 		 			$total_h+=${'_section_' . $extranum . '_h'}{$key};
 		 			$total_k+=${'_section_' . $extranum . '_k'}{$key};
+		 			$total_p+=${'_section_' . $extranum . '_p'}{$key};
+					if ($MaxHostPageExtra[$extranum]) {
+					    $total_xp+=${'_section_' . $extranum . '_xp'}{$key};
+					}
 		 			print "<tr>";
-		 			printf("<td class=\"aws\">$ExtraFirstColumnFormat[$extranum]</td>", $firstcol, $firstcol, $firstcol, $firstcol, $firstcol);
-		 			if ($ExtraStatTypes[$extranum] =~ m/P/i) { print "<td>" . ${'_section_' . $extranum . '_p'}{$key} . "</td>"; }
+		 			printf("<td class=\"aws\">$ExtraFirstColumnFormat[$extranum]</td>", $firstcol, $firstcol, $firstcol, $firstcol, $firstcol, $firstcol);
+		 			if ($ExtraStatTypes[$extranum] =~ m/P/i) {
+					    print "<td>" . ${'_section_' . $extranum . '_p'}{$key} . "</td>";
+					    if ($MaxHostPageExtra[$extranum]) {
+						print "<td>" . ${'_section_' . $extranum . '_xp'}{$key} . "</td>";
+					    }
+					}
 		 			if ($ExtraStatTypes[$extranum] =~ m/H/i) { print "<td>" . ${'_section_' . $extranum . '_h'}{$key} . "</td>"; }
 		 			if ($ExtraStatTypes[$extranum] =~ m/B/i) { print "<td>" . Format_Bytes(${'_section_' . $extranum . '_k'}{$key}) . "</td>"; }
 		 			if ($ExtraStatTypes[$extranum] =~ m/L/i) { print "<td>" . (${'_section_' . $extranum . '_l'}{$key}?Format_Date(${'_section_' . $extranum . '_l'}{$key},1):'-') . "</td>"; }
@@ -9017,35 +9131,48 @@
 		 			$count++;
 				}
 				# If we ask average or sum, we loop on all other records
-				if ($ExtraAddAverageRow[$extranum] || $ExtraAddSumRow[$extranum])
-				{
+				if ($ExtraAddAverageRow[$extranum] || $ExtraAddSumRow[$extranum] ||
+				    $ExtraAddAverageRow['All'] || $ExtraAddSumRow['All']) {
 			 		foreach (keys %{'_section_' . $extranum . '_h'}) {
 			 			if ($keysinkeylist{$_}) { next; }
-			 			$total_p+=${'_section_' . $extranum . '_p'}{$_};
 			 			$total_h+=${'_section_' . $extranum . '_h'}{$_};
 			 			$total_k+=${'_section_' . $extranum . '_k'}{$_};
+			 			$total_p+=${'_section_' . $extranum . '_p'}{$_};
+						if ($MaxHostPageExtra[$extranum]) {
+						    $total_xp+=${'_section_' . $extranum . '_xp'}{$_};
+						}
 						$count++;
 			 		}
 				}
 				# Add average row
-				if ($ExtraAddAverageRow[$extranum]) {
-		 			print "<tr>";
-		 			print "<td class=\"aws\"><b>$Message[96]</b></td>";
-		 			if ($ExtraStatTypes[$extranum] =~ m/P/i) { print "<td>" . ($count?($total_p/$count):"&nbsp;") . "</td>"; }
-		 			if ($ExtraStatTypes[$extranum] =~ m/H/i) { print "<td>" . ($count?($total_h/$count):"&nbsp;") . "</td>"; }
-		 			if ($ExtraStatTypes[$extranum] =~ m/B/i) { print "<td>" . ($count?Format_Bytes($total_k/$count):"&nbsp;") . "</td>"; }
-		 			if ($ExtraStatTypes[$extranum] =~ m/L/i) { print "<td>&nbsp;</td>"; }
-		 			print "</tr>\n";
+				if ($ExtraAddAverageRow[$extranum] || $ExtraAddAverageRow['All']) {
+				    print "<tr>";
+				    print "<td class=\"aws\"><b>$Message[96] ($count - ".($ExtraFirstColumnTitle[$extranum] || $ExtraFirstColumnTitle['All']).")</b></td>";
+				    if ($ExtraStatTypes[$extranum] =~ m/P/i) {
+					print "<td>" . ($count?($total_p/$count):"&nbsp;") . "</td>";
+					if ($MaxHostPageExtra[$extranum]) {
+					    print "<td>" . ($count?($total_xp/$count):"&nbsp;") . "</td>";
+					}
+				    }
+				    if ($ExtraStatTypes[$extranum] =~ m/H/i) { print "<td>" . ($count?($total_h/$count):"&nbsp;") . "</td>"; }
+				    if ($ExtraStatTypes[$extranum] =~ m/B/i) { print "<td>" . ($count?Format_Bytes($total_k/$count):"&nbsp;") . "</td>"; }
+				    if ($ExtraStatTypes[$extranum] =~ m/L/i) { print "<td>&nbsp;</td>"; }
+				    print "</tr>\n";
 				}
 				# Add sum row
-				if ($ExtraAddSumRow[$extranum]) {
-		 			print "<tr>";
-		 			print "<td class=\"aws\"><b>$Message[102]</b></td>";
-		 			if ($ExtraStatTypes[$extranum] =~ m/P/i) { print "<td>" . ($total_p) . "</td>"; }
-		 			if ($ExtraStatTypes[$extranum] =~ m/H/i) { print "<td>" . ($total_h) . "</td>"; }
-		 			if ($ExtraStatTypes[$extranum] =~ m/B/i) { print "<td>" . Format_Bytes($total_k) . "</td>"; }
-		 			if ($ExtraStatTypes[$extranum] =~ m/L/i) { print "<td>&nbsp;</td>"; }
-		 			print "</tr>\n";
+				if ($ExtraAddSumRow[$extranum] || $ExtraAddSumRow['All']) {
+				    print "<tr>";
+				    print "<td class=\"aws\"><b>$Message[102] ($count - ".($ExtraFirstColumnTitle[$extranum] || $ExtraFirstColumnTitle['All']).")</b></td>";
+				    if ($ExtraStatTypes[$extranum] =~ m/P/i) {
+					print "<td>" . ($total_p) . "</td>";
+					if ($MaxHostPageExtra[$extranum]) {
+					    print "<td>" . ($total_xp) . "</td>";
+					}
+				    }
+				    if ($ExtraStatTypes[$extranum] =~ m/H/i) { print "<td>" . ($total_h) . "</td>"; }
+				    if ($ExtraStatTypes[$extranum] =~ m/B/i) { print "<td>" . Format_Bytes($total_k) . "</td>"; }
+				    if ($ExtraStatTypes[$extranum] =~ m/L/i) { print "<td>&nbsp;</td>"; }
+				    print "</tr>\n";
 				}
 		 		&tab_end();
 	   			&html_end(1);
@@ -10743,85 +10870,108 @@
 	 	# BY EXTRA SECTIONS
 	 	#----------------------------
 	 	foreach my $extranum (1.. at ExtraName-1) {
-	 		if ($Debug) { debug("ExtraName$extranum",2); }
-	 		print "$Center<a name=\"extra$extranum\">&nbsp;</a><br />";
-			my $title=$ExtraName[$extranum];
-	 		&tab_head("$title",19,0,"extra$extranum");
-	 		print "<tr bgcolor=\"#$color_TableBGRowTitle\">";
-	 		print "<th>".$ExtraFirstColumnTitle[$extranum];
-			print "&nbsp; - &nbsp; <a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?XMLEncode("$AWScript?${NewLinkParams}output=allextra$extranum"):"$PROG$StaticLinks.allextra$extranum.$StaticExt")."\"$NewLinkTarget>$Message[80]</a>";
-			print "</th>";
-
-	 		if ($ExtraStatTypes[$extranum] =~ m/P/i) { print "<th bgcolor=\"#$color_p\" width=\"80\">$Message[56]</th>"; }
-	 		if ($ExtraStatTypes[$extranum] =~ m/H/i) { print "<th bgcolor=\"#$color_h\" width=\"80\">$Message[57]</th>"; }
-	 		if ($ExtraStatTypes[$extranum] =~ m/B/i) { print "<th bgcolor=\"#$color_k\" width=\"80\">$Message[75]</th>"; }
-	 		if ($ExtraStatTypes[$extranum] =~ m/L/i) { print "<th width=\"120\">$Message[9]</th>"; }
-	 		print "</tr>\n";
-	 		$total_p=$total_h=$total_k=0;
-	 		#$max_h=1; foreach (values %_login_h) { if ($_ > $max_h) { $max_h = $_; } }
-	 		#$max_k=1; foreach (values %_login_k) { if ($_ > $max_k) { $max_k = $_; } }
-	 		my $count=0;
-	 		if ($MaxNbOfExtra[$extranum])
-			{
-				if ($ExtraStatTypes[$extranum] =~ m/P/i) { 
-		 			&BuildKeyList($MaxNbOfExtra[$extranum],$MinHitExtra[$extranum],\%{'_section_' . $extranum . '_h'},\%{'_section_' . $extranum . '_p'});
-		 		}
-		 		else {
-		 			&BuildKeyList($MaxNbOfExtra[$extranum],$MinHitExtra[$extranum],\%{'_section_' . $extranum . '_h'},\%{'_section_' . $extranum . '_h'});
-		 		}
-			}
-			else
-			{
-				@keylist=();
-			}
-			my %keysinkeylist=();
-			foreach my $key (@keylist) {
-				$keysinkeylist{$key}=1;
-	 			my $firstcol = CleanXSS(DecodeEncodedString($key));
-	 			$total_p+=${'_section_' . $extranum . '_p'}{$key};
-	 			$total_h+=${'_section_' . $extranum . '_h'}{$key};
-	 			$total_k+=${'_section_' . $extranum . '_k'}{$key};
-	 			print "<tr>";
-	 			printf("<td class=\"aws\">$ExtraFirstColumnFormat[$extranum]</td>", $firstcol, $firstcol, $firstcol, $firstcol, $firstcol);
-	 			if ($ExtraStatTypes[$extranum] =~ m/P/i) { print "<td>" . ${'_section_' . $extranum . '_p'}{$key} . "</td>"; }

[... 159 lines stripped ...]



More information about the svn-commits mailing list