--- awstats.pl Sat Aug 23 10:57:44 2003
+++ /home/sdh300/public_html/cgi-bin/awstats.cgi Tue Sep 9 16:27:45 2003
@@ -51,6 +51,7 @@
$PluginMode
$TotalUnique $TotalVisits $TotalHostsKnown $TotalHostsUnknown
$TotalPages $TotalHits $TotalBytes $TotalEntries $TotalExits $TotalBytesPages $TotalDifferentPages
+$TotalV6Pages $TotalV6Hits $TotalV6Bytes
$TotalKeyphrases $TotalKeywords $TotalDifferentKeyphrases $TotalDifferentKeywords
$TotalSearchEnginesPages $TotalSearchEnginesHits $TotalRefererPages $TotalRefererHits $TotalDifferentSearchEngines $TotalDifferentReferer
$FrameName $Center $FileConfig $FileSuffix $Host $DayRequired $MonthRequired $YearRequired
@@ -149,7 +150,7 @@
$FirstDayOfWeek $KeyWordsNotSensitive $SaveDatabaseFilesWithPermissionsForEveryone
$WarningMessages $DebugMessages $ShowLinksOnUrl
$ShowMenu $ShowMonthStats $ShowDaysOfMonthStats $ShowDaysOfWeekStats
-$ShowHoursStats $ShowDomainsStats $ShowHostsStats
+$ShowHoursStats $ShowDomainsStats $ShowHostsStats $ShowHostTypeStats
$ShowRobotsStats $ShowWormsStats $ShowSessionsStats $ShowPagesStats $ShowFileTypesStats
$ShowOSStats $ShowBrowsersStats $ShowOriginStats
$ShowKeyphrasesStats $ShowKeywordsStats $ShowMiscStats $ShowHTTPErrorsStats
@@ -531,7 +532,10 @@
'Size',
'First',
'Last',
-'Exclude filter'
+'Exclude filter',
+'Address Type',
+'IPv4',
+'IPv6',
);
@@ -1479,6 +1483,7 @@
if ($ShowHoursStats !~ /[01PHBL]/) { $ShowHoursStats='PHBL'; }
if ($ShowDomainsStats !~ /[01PHB]/) { $ShowDomainsStats='PHB'; }
if ($ShowHostsStats !~ /[01PHBL]/) { $ShowHostsStats='PHBL'; }
+ if ($ShowHostTypeStats !~ /[01PHB]/) { $ShowHostTypeStats='PHB'; }
if ($ShowAuthenticatedUsers !~ /[01PHBL]/) { $ShowAuthenticatedUsers=0; }
if ($ShowRobotsStats !~ /[01HBL]/) { $ShowRobotsStats='HBL'; }
if ($ShowWormsStats !~ /[01HL]/) { $ShowWormsStats='HL'; }
@@ -1551,6 +1556,7 @@
if ($ShowHoursStats eq '1') { $ShowHoursStats = 'PHBL'; }
if ($ShowDomainsStats eq '1') { $ShowDomainsStats = 'PHB'; }
if ($ShowHostsStats eq '1') { $ShowHostsStats = 'PHBL'; }
+ if ($ShowHostTypeStats eq '1') { $ShowHostTypeStats = 'PHB'; }
if ($ShowEMailSenders eq '1') { $ShowEMailSenders = 'HBML'; }
if ($ShowEMailReceivers eq '1') { $ShowEMailReceivers = 'HBML'; }
if ($ShowAuthenticatedUsers eq '1') { $ShowAuthenticatedUsers = 'PHBL'; }
@@ -2124,6 +2130,7 @@
if (! $_) { error("History file \"$filetoread\" is corrupted (in section VISITOR). Last line read is number $countlines.\nCorrect the line, restore a recent backup of this file, or remove it (data for this month will be lost).","","",1); }
my @field=split(/\s+/,$_); $countlines++;
my $count=0;my $countloaded=0;
+ $TotalV6Hits = $TotalV6Bytes = $TotalV6Pages = 0;
while ($field[0] ne 'END_VISITOR') {
if ($field[0]) {
$count++;
@@ -2195,6 +2202,16 @@
elsif ($HTMLOutput{'main'} && ($MonthRequired eq 'all' || $countloaded < $MaxNbOf{'HostsShown'})) { $loadrecord=1; }
}
}
+
+ # count up v6 stats (we can find v4 stats by subtracting
+ # from the total)
+
+ if ($ShowHostTypeStats && $field[0] =~ /^[0-9a-z\:]*$/i) {
+ $TotalV6Pages += $field[1];
+ $TotalV6Hits += $field[2];
+ $TotalV6Bytes += $field[3];
+ }
+
if ($loadrecord) {
if ($field[1]) { $_host_p{$field[0]}+=$field[1]; }
if ($field[2]) { $_host_h{$field[0]}+=$field[2]; }
@@ -6861,6 +6878,7 @@
# &html_end;
# exit(0);
# }
+
if ($HTMLOutput{'alldomains'}) {
print "$Center
\n";
# Show domains list
@@ -6985,6 +7003,7 @@
&tab_end;
&html_end;
}
+
if ($HTMLOutput{'unknownip'}) {
print "$Center
\n";
&tab_head("$Message[45]",19);
@@ -8338,6 +8357,70 @@
}
&tab_end;
}
+
+ if ($ShowHostTypeStats) {
+ print "$Center
\n";
+ &tab_head($Message[154],19);
+ print "