From: eldy <>
Date: Sun, 6 Oct 2002 04:30:09 +0000 (+0000)
Subject: ShowxxxStats parmaters accept codes to decide which columns to show in chart.
X-Git-Tag: AWSTATS_5_1_BETA~54
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dae3595fd4d5f4daf768033baa9df8fb97965e4;p=thirdparty%2FAWStats.git
ShowxxxStats parmaters accept codes to decide which columns to show in chart.
---
diff --git a/docs/awstats_config.html b/docs/awstats_config.html
index 4da670d9..5a8c57b8 100644
--- a/docs/awstats_config.html
+++ b/docs/awstats_config.html
@@ -916,52 +916,87 @@ 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
# 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 all its related informations
-
# XYZ - Report is shown with only informations defined by code X,Y and Z
+
# 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:
+
# U = Unique visitors
+
# V = Visits
+
# P = Number of pages
+
# H = Number of hits
+
# B = Bandwith
+
# L = Last access date
+
# E = Entry pages
+
# X = Exit pages
+
# C = Web compression (mod_gzip)
#
# Show AWStats head title and icon
+
# Default: 1, Possible codes: None
ShowHeader=1
# Show menu header with links on detailed reports
+
# Default: 1, Possible codes: None
ShowMenu=1
# Show monthly and daily chart
-
ShowMonthDayStats=1
+
# Default: UVPHB, Possible codes: UVPHB
+
ShowMonthDayStats=UVPHB
# Show days of week chart
-
ShowDaysOfWeekStats=1
+
# Default: PHB, Possible codes: PHB
+
ShowDaysOfWeekStats=PHB
# Show hourly chart
-
ShowHoursStats=1
+
# Default: PHB, Possible codes: PHB
+
ShowHoursStats=PHB
# Show domains/country chart
+
# Default: 1, Possible codes: None
ShowDomainsStats=1
# Show hosts chart
-
ShowHostsStats=1
+
# Default: PHBL, Possible codes: PHBL
+
ShowHostsStats=PHBL
# Show authenticated users chart
-
# ->Codes are P (Nb pages), H (Nb hits), B (bandwidth), L (last access date)
+
# Default: 0, Possible codes: PHBL
ShowAuthenticatedUsers=0
# Show robots chart
+
# Default: 1, Possible codes: None
ShowRobotsStats=1
# Show session chart
+
# Default: 1, Possible codes: None
ShowSessionsStats=1
# Show pages-url chart.
-
# ->Codes are H (Nb hits), B (bandwidth), E (entry), X (exit)
+
# Default: HBEX, Possible codes: HBEX
ShowPagesStats=HBEX
# Show file types chart.
-
# ->Codes are H (Nb hits), B (bandwidth), C (mod_gzip compression statistics)
+
# Default: HB, Possible codes: HBC
ShowFileTypesStats=HB
+
# Show file size chart (Not yet available)
+
# Default: 1, Possible codes: None
+
ShowFileSizesStats=0
# Show browsers chart
+
# Default: 1, Possible codes: None
ShowBrowsersStats=1
# Show Operating systems chart
+
# Default: 1, Possible codes: None
ShowOSStats=1
# Show Origin chart
+
# Default: 1, Possible codes: None
ShowOriginStats=1
# Show keyphrases chart
+
# Default: 1, Possible codes: None
ShowKeyphrasesStats=1
# Show keywords chart
+
# Default: 1, Possible codes: None
ShowKeywordsStats=1
# Show HTTP errors chart
+
# Default: 1, Possible codes: None
ShowHTTPErrorsStats=1
+
# Show EMail senders chart (For use when analyzing mail log files. Not yet available)
+
# Default: HBL, Possible codes: HBL
+
ShowEMailSenders=HBL
+
# Show EMail receiver chart (For use when analyzing mail log files. Not yet available)
+
# Default: HBL, Possible codes: HBL
+
ShowEMailReceivers=HBL
diff --git a/docs/awstats_faq.html b/docs/awstats_faq.html
index 598ddae3..720935a6 100644
--- a/docs/awstats_faq.html
+++ b/docs/awstats_faq.html
@@ -358,7 +358,6 @@ Modify this new config file:
ShowRobotsStats=0
ShowSessionsStats=1
ShowPagesStats=1
-
ShowCompressionStats=0
ShowFileTypesStats=1
ShowFileSizesStats=0
ShowBrowsersStats=0
@@ -381,34 +380,42 @@ log file to replace 'space' char into '_'...
PROBLEM:
What do I have to do to use AWStats to analyze my Sendmail log files.
SOLUTION:
-First you must download SMA to use it as a post-processor for AWStats update process.
-Setup SMA to work with AWStats:
+
+First, install a mail log convertor like SMA to use it
+as a post-processor for AWStats update process.
+Setup SMA to convert your mail log into a format readable by AWStats:
Copy sma (or sma.exe) file and sma.conf into same directory than awstats.pl file.
-Edit sma.conf to change the CLogFormat parameter to :
+Edit sma.conf to change the CLogFormat and ClogSentOnly parameter to :
CLogFormat "%y-%m-%d %h:%n:%s %f %t %F %T SMTP - %z %S"
ClogSentOnly no
-Setup AWStats to analyze SMA processed mail log:
+
+To check that your sma config is correct, run the following command:
+sma -O clog -f /pathtosmaconf/sma.conf /pathtomaillog/maillog > convertedmaillog
+The resulting convertedmaillog file must have records that match the following format:
+2001-01-01 05:38:08 sender@mailsender.com receiver@mailreceiver.com hostrelaysender hostrelayreceiver SMTP - 1 31357
+
+Then setup AWStats to analyze SMA processed mail log:
Copy config awstats.conf file to "awstats.sendmail.conf".
Modify this new config file:
-
LogFile="sma -O clog /var/log/mail/maillog |"
+
LogFile="/pathtosma/sma -O clog -f /pathtosmaconf/sma.conf /pathtomaillog/maillog |"
LogFormat="%time2 %email %email_r %host %host_r %method %url %code %bytesd"
DNSLookup=0
ShowHeader=1
ShowMenu=1
-
ShowMonthDayStats=1
-
ShowDaysOfWeekStats=1
-
ShowHoursStats=1
+
ShowMonthDayStats=HB
+
ShowDaysOfWeekStats=HB
+
ShowHoursStats=HB
ShowDomainsStats=0
-
ShowHostsStats=1
+
ShowHostsStats=HBL
ShowAuthenticatedUsers=0
ShowRobotsStats=0
ShowSessionsStats=0
ShowPagesStats=0
-
ShowCompressionStats=0
ShowFileTypesStats=0
ShowFileSizesStats=0
ShowBrowsersStats=0
@@ -417,8 +424,8 @@ Modify this new config file:
ShowKeyphrasesStats=0
ShowKeywordsStats=0
ShowHTTPErrorsStats=0
-
ShowEMailSenders=1
-
ShowEMailReceivers=1
+
ShowEMailSenders=HBL
+
ShowEMailReceivers=HBL
Now you can use AWStats as usual (run the update process and read statistics).
diff --git a/wwwroot/cgi-bin/awstats.model.conf b/wwwroot/cgi-bin/awstats.model.conf
index e65636b8..3ca1a4d1 100644
--- a/wwwroot/cgi-bin/awstats.model.conf
+++ b/wwwroot/cgi-bin/awstats.model.conf
@@ -564,54 +564,82 @@ DirLang="./lang"
# want to see in those reports.
# Possible values:
# 0 - Topic is not shown at all
-# 1 - Report is shown with all its related informations
-# XYZ - Report is shown with only informations defined by code X,Y and Z
+# 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:
+# U = Unique visitors
+# V = Visits
+# P = Number of pages
+# H = Number of hits
+# B = Bandwith
+# L = Last access date
+# E = Entry pages
+# X = Exit pages
+# C = Web compression (mod_gzip)
#
# Show AWStats head title and icon
+# Default: 1, Possible codes: None
ShowHeader=1
# Show menu header with links on detailed reports
+# Default: 1, Possible codes: None
ShowMenu=1
# Show monthly and daily chart
-ShowMonthDayStats=1
+# Default: UVPHB, Possible codes: UVPHB
+ShowMonthDayStats=UVPHB
# Show days of week chart
-ShowDaysOfWeekStats=1
+# Default: PHB, Possible codes: PHB
+ShowDaysOfWeekStats=PHB
# Show hourly chart
-ShowHoursStats=1
+# Default: PHB, Possible codes: PHB
+ShowHoursStats=PHB
# Show domains/country chart
+# Default: 1, Possible codes: None
ShowDomainsStats=1
# Show hosts chart
-ShowHostsStats=1
+# Default: PHBL, Possible codes: PHBL
+ShowHostsStats=PHBL
# Show authenticated users chart
-# ->Codes are P (Nb pages), H (Nb hits), B (bandwidth), L (last access date)
+# Default: 0, Possible codes: PHBL
ShowAuthenticatedUsers=0
# Show robots chart
+# Default: 1, Possible codes: None
ShowRobotsStats=1
# Show session chart
+# Default: 1, Possible codes: None
ShowSessionsStats=1
# Show pages-url chart.
-# ->Codes are H (Nb hits), B (bandwidth), E (entry), X (exit)
+# Default: HBEX, Possible codes: HBEX
ShowPagesStats=HBEX
# Show file types chart.
-# ->Codes are H (Nb hits), B (bandwidth), C (mod_gzip compression statistics)
+# Default: HB, Possible codes: HBC
ShowFileTypesStats=HB
# Show file size chart (Not yet available)
+# Default: 1, Possible codes: None
ShowFileSizesStats=0
# Show browsers chart
+# Default: 1, Possible codes: None
ShowBrowsersStats=1
# Show Operating systems chart
+# Default: 1, Possible codes: None
ShowOSStats=1
# Show Origin chart
+# Default: 1, Possible codes: None
ShowOriginStats=1
# Show keyphrases chart
+# Default: 1, Possible codes: None
ShowKeyphrasesStats=1
# Show keywords chart
+# Default: 1, Possible codes: None
ShowKeywordsStats=1
# Show HTTP errors chart
+# Default: 1, Possible codes: None
ShowHTTPErrorsStats=1
# Show EMail senders chart (For use when analyzing mail log files. Not yet available)
-ShowEMailSenders=0
+# Default: HBL, Possible codes: HBL
+ShowEMailSenders=HBL
# Show EMail receiver chart (For use when analyzing mail log files. Not yet available)
-ShowEMailReceivers=0
+# Default: HBL, Possible codes: HBL
+ShowEMailReceivers=HBL
# This value can be used to choose maximum number of lines shown for each
diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
index cb4c7b9b..ef1e46c8 100644
--- a/wwwroot/cgi-bin/awstats.pl
+++ b/wwwroot/cgi-bin/awstats.pl
@@ -203,14 +203,13 @@ use vars qw/
@BrowsersSearchIDOrder @OSSearchIDOrder @SearchEnginesSearchIDOrder @WordsToCleanSearchUrl
/;
use vars qw/
-@SessionsRange @Message @HostAliases @AllowAccessFromWebToFollowingAuthenticatedUsers
+@SessionsRange @HostAliases @AllowAccessFromWebToFollowingAuthenticatedUsers
@DefaultFile @OnlyFiles @SkipDNSLookupFor @SkipFiles @SkipHosts @SkipUserAgents
@PluginsToLoad @DOWIndex @RobotsSearchIDOrder
@_from_p @_from_h @_time_p @_time_h @_time_k
@keylist
/;
@SessionsRange=("0s-30s","30s-2mn","2mn-5mn","5mn-15mn","15mn-30mn","30mn-1h","1h+");
-@Message=();
@HostAliases=();
@AllowAccessFromWebToFollowingAuthenticatedUsers=();
@DefaultFile = @OnlyFiles = @SkipDNSLookupFor = @SkipFiles = @SkipHosts = @SkipUserAgents = ();
@@ -348,6 +347,144 @@ use vars qw/ %smtpcodelib /;
%smtpcodelib = (
);
+# DEFAULT MESSAGE
+use vars qw/ @Message /;
+@Message=(
+"Unknown",
+"Unknown (unresolved ip)",
+"Others",
+"View details",
+"Day",
+"Month",
+"Year",
+"Statistics of",
+"First visit",
+"Last visit",
+"Number of visits",
+"Unique visitors",
+"Visit",
+"different keywords",
+"Search",
+"Percent",
+"Traffic",
+"Domains/Countries",
+"Visitors",
+"Pages-URL",
+"Hours",
+"Browsers",
+"HTTP Errors",
+"Referers",
+"Never updated",
+"Visitors domains/countries",
+"hosts",
+"pages",
+"different pages-url",
+"Viewed",
+"Other words",
+"Pages not found",
+"HTTP Error codes",
+"Netscape versions",
+"IE versions",
+"Last Update",
+"Connect to site from",
+"Origin",
+"Direct address / Bookmarks",
+"Origin unknown",
+"Links from an Internet Search Engine",
+"Links from an external page (other web sites except search engines)",
+"Links from an internal page (other page on same site)",
+"Keyphrases used on search engines",
+"Keywords used on search engines",
+"Unresolved IP Address",
+"Unknown OS (Referer field)",
+"Required but not found URLs (HTTP code 404)",
+"IP Address",
+"Error Hits",
+"Unknown browsers (Referer field)",
+"different robots",
+"visits/visitor",
+"Robots/Spiders visitors",
+"Free realtime logfile analyzer for advanced web statistics",
+"of",
+"Pages",
+"Hits",
+"Versions",
+"Operating Systems",
+"Jan",
+"Feb",
+"Mar",
+"Apr",
+"May",
+"Jun",
+"Jul",
+"Aug",
+"Sep",
+"Oct",
+"Nov",
+"Dec",
+"Navigation",
+"Files type",
+"Update now",
+"Bandwidth",
+"Back to main page",
+"Top",
+"dd mmm yyyy - HH:MM",
+"Filter",
+"Full list",
+"Hosts",
+"Known",
+"Robots",
+"Sun",
+"Mon",
+"Tue",
+"Wed",
+"Thu",
+"Fri",
+"Sat",
+"Days of week",
+"Who",
+"When",
+"Authenticated users",
+"Min",
+"Average",
+"Max",
+"Web compression",
+"Bandwidth saved",
+"Compression on",
+"Compression result",
+"Total",
+"different keyphrases",
+"Entry",
+"Code",
+"Average size",
+"Links from a NewsGroup",
+"KB",
+"MB",
+"GB",
+"Grabber",
+"Yes",
+"No",
+"WhoIs info",
+"OK",
+"Exit",
+"Visits duration",
+"Close window",
+"Bytes",
+"Search Keyphrases",
+"Search Keywords",
+"different refering search engines",
+"different refering sites",
+"Other phrases",
+"Anonymous users",
+"Refering search engines",
+"Refering sites",
+"Summary",
+"Exact value not available in 'Year' view",
+"Data value arrays",
+"Sender EMail",
+"Receiver EMail"
+);
+
#-----------------------------------------------------------------------------
@@ -1269,11 +1406,11 @@ sub Check_Config {
if ($MaxRowsInHTMLOutput !~ /^\d+/ || $MaxRowsInHTMLOutput<1) { $MaxRowsInHTMLOutput=1000; }
if ($ShowHeader !~ /[0-1]/) { $ShowHeader=1; }
if ($ShowMenu !~ /[0-1]/) { $ShowMenu=1; }
- if ($ShowMonthDayStats !~ /[0-1]/) { $ShowMonthDayStats=1; }
- if ($ShowDaysOfWeekStats !~ /[0-1]/) { $ShowDaysOfWeekStats=1; }
- if ($ShowHoursStats !~ /[0-1]/) { $ShowHoursStats=1; }
+ if ($ShowMonthDayStats !~ /[01UVPHB]/) { $ShowMonthDayStats="UVPHB"; }
+ if ($ShowDaysOfWeekStats !~ /[01PHBL]/) { $ShowDaysOfWeekStats="PHBL"; }
+ if ($ShowHoursStats !~ /[01PHBL]/) { $ShowHoursStats="PHBL"; }
if ($ShowDomainsStats !~ /[0-1]/) { $ShowDomainsStats=1; }
- if ($ShowHostsStats !~ /[0-1]/) { $ShowHostsStats=1; }
+ if ($ShowHostsStats !~ /[01PHBL]/) { $ShowHostsStats="PHBL"; }
if ($ShowAuthenticatedUsers !~ /[01PHBL]/) { $ShowAuthenticatedUsers=0; }
if ($ShowRobotsStats !~ /[0-1]/) { $ShowRobotsStats=1; }
if ($ShowSessionsStats !~ /[0-1]/) { $ShowSessionsStats=1; }
@@ -1335,142 +1472,12 @@ sub Check_Config {
$color_s =~ s/#//g; if ($color_s !~ /^[0-9|A-Z]+$/i) { $color_s="8888DD"; }
$color_e =~ s/#//g; if ($color_e !~ /^[0-9|A-Z]+$/i) { $color_e="CEC2E8"; }
$color_x =~ s/#//g; if ($color_x !~ /^[0-9|A-Z]+$/i) { $color_x="C1B2E2"; }
- # Default value for Messages
- if (! $Message[0]) { $Message[0]="Unknown"; }
- if (! $Message[1]) { $Message[1]="Unknown (unresolved ip)"; }
- if (! $Message[2]) { $Message[2]="Others"; }
- if (! $Message[3]) { $Message[3]="View details"; }
- if (! $Message[4]) { $Message[4]="Day"; }
- if (! $Message[5]) { $Message[5]="Month"; }
- if (! $Message[6]) { $Message[6]="Year"; }
- if (! $Message[7]) { $Message[7]="Statistics of"; }
- if (! $Message[8]) { $Message[8]="First visit"; }
- if (! $Message[9]) { $Message[9]="Last visit"; }
- if (! $Message[10]) { $Message[10]="Number of visits"; }
- if (! $Message[11]) { $Message[11]="Unique visitors"; }
- if (! $Message[12]) { $Message[12]="Visit"; }
- if (! $Message[13]) { $Message[13]="different keywords"; }
- if (! $Message[14]) { $Message[14]="Search"; }
- if (! $Message[15]) { $Message[15]="Percent"; }
- if (! $Message[16]) { $Message[16]="Traffic"; }
- if (! $Message[17]) { $Message[17]="Domains/Countries"; }
- if (! $Message[18]) { $Message[18]="Visitors"; }
- if (! $Message[19]) { $Message[19]="Pages-URL"; }
- if (! $Message[20]) { $Message[20]="Hours"; }
- if (! $Message[21]) { $Message[21]="Browsers"; }
- if (! $Message[22]) { $Message[22]="HTTP Errors"; }
- if (! $Message[23]) { $Message[23]="Referers"; }
- if (! $Message[24]) { $Message[24]="Never updated"; }
- if (! $Message[25]) { $Message[25]="Visitors domains/countries"; }
- if (! $Message[26]) { $Message[26]="hosts"; }
- if (! $Message[27]) { $Message[27]="pages"; }
- if (! $Message[28]) { $Message[28]="different pages-url"; }
- if (! $Message[29]) { $Message[29]="Viewed"; }
- if (! $Message[30]) { $Message[30]="Other words"; }
- if (! $Message[31]) { $Message[31]="Pages not found"; }
- if (! $Message[32]) { $Message[32]="HTTP Error codes"; }
- if (! $Message[33]) { $Message[33]="Netscape versions"; }
- if (! $Message[34]) { $Message[34]="IE versions"; }
- if (! $Message[35]) { $Message[35]="Last Update"; }
- if (! $Message[36]) { $Message[36]="Connect to site from"; }
- if (! $Message[37]) { $Message[37]="Origin"; }
- if (! $Message[38]) { $Message[38]="Direct address / Bookmarks"; }
- if (! $Message[39]) { $Message[39]="Origin unknown"; }
- if (! $Message[40]) { $Message[40]="Links from an Internet Search Engine"; }
- if (! $Message[41]) { $Message[41]="Links from an external page (other web sites except search engines)"; }
- if (! $Message[42]) { $Message[42]="Links from an internal page (other page on same site)"; }
- if (! $Message[43]) { $Message[43]="Keyphrases used on search engines"; }
- if (! $Message[44]) { $Message[44]="Keywords used on search engines"; }
- if (! $Message[45]) { $Message[45]="Unresolved IP Address"; }
- if (! $Message[46]) { $Message[46]="Unknown OS (Referer field)"; }
- if (! $Message[47]) { $Message[47]="Required but not found URLs (HTTP code 404)"; }
- if (! $Message[48]) { $Message[48]="IP Address"; }
- if (! $Message[49]) { $Message[49]="Error Hits"; }
- if (! $Message[50]) { $Message[50]="Unknown browsers (Referer field)"; }
- if (! $Message[51]) { $Message[51]="different robots"; }
- if (! $Message[52]) { $Message[52]="visits/visitor"; }
- if (! $Message[53]) { $Message[53]="Robots/Spiders visitors"; }
- if (! $Message[54]) { $Message[54]="Free realtime logfile analyzer for advanced web statistics"; }
- if (! $Message[55]) { $Message[55]="of"; }
- if (! $Message[56]) { $Message[56]="Pages"; }
- if (! $Message[57]) { $Message[57]="Hits"; }
- if (! $Message[58]) { $Message[58]="Versions"; }
- if (! $Message[59]) { $Message[59]="Operating Systems"; }
- if (! $Message[60]) { $Message[60]="Jan"; }
- if (! $Message[61]) { $Message[61]="Feb"; }
- if (! $Message[62]) { $Message[62]="Mar"; }
- if (! $Message[63]) { $Message[63]="Apr"; }
- if (! $Message[64]) { $Message[64]="May"; }
- if (! $Message[65]) { $Message[65]="Jun"; }
- if (! $Message[66]) { $Message[66]="Jul"; }
- if (! $Message[67]) { $Message[67]="Aug"; }
- if (! $Message[68]) { $Message[68]="Sep"; }
- if (! $Message[69]) { $Message[69]="Oct"; }
- if (! $Message[70]) { $Message[70]="Nov"; }
- if (! $Message[71]) { $Message[71]="Dec"; }
- if (! $Message[72]) { $Message[72]="Navigation"; }
- if (! $Message[73]) { $Message[73]="Files type"; }
- if (! $Message[74]) { $Message[74]="Update now"; }
- if (! $Message[75]) { $Message[75]="Bandwidth"; }
- if (! $Message[76]) { $Message[76]="Back to main page"; }
- if (! $Message[77]) { $Message[77]="Top"; }
- if (! $Message[78]) { $Message[78]="dd mmm yyyy - HH:MM"; }
- if (! $Message[79]) { $Message[79]="Filter"; }
- if (! $Message[80]) { $Message[80]="Full list"; }
- if (! $Message[81]) { $Message[81]="Hosts"; }
- if (! $Message[82]) { $Message[82]="Known"; }
- if (! $Message[83]) { $Message[83]="Robots"; }
- if (! $Message[84]) { $Message[84]="Sun"; }
- if (! $Message[85]) { $Message[85]="Mon"; }
- if (! $Message[86]) { $Message[86]="Tue"; }
- if (! $Message[87]) { $Message[87]="Wed"; }
- if (! $Message[88]) { $Message[88]="Thu"; }
- if (! $Message[89]) { $Message[89]="Fri"; }
- if (! $Message[90]) { $Message[90]="Sat"; }
- if (! $Message[91]) { $Message[91]="Days of week"; }
- if (! $Message[92]) { $Message[92]="Who"; }
- if (! $Message[93]) { $Message[93]="When"; }
- if (! $Message[94]) { $Message[94]="Authenticated users"; }
- if (! $Message[95]) { $Message[95]="Min"; }
- if (! $Message[96]) { $Message[96]="Average"; }
- if (! $Message[97]) { $Message[97]="Max"; }
- if (! $Message[98]) { $Message[98]="Web compression"; }
- if (! $Message[99]) { $Message[99]="Bandwidth saved"; }
- if (! $Message[100]) { $Message[100]="Compression on"; }
- if (! $Message[101]) { $Message[101]="Compression result"; }
- if (! $Message[102]) { $Message[102]="Total"; }
- if (! $Message[103]) { $Message[103]="different keyphrases"; }
- if (! $Message[104]) { $Message[104]="Entry"; }
- if (! $Message[105]) { $Message[105]="Code"; }
- if (! $Message[106]) { $Message[106]="Average size"; }
- if (! $Message[107]) { $Message[107]="Links from a NewsGroup"; }
- if (! $Message[108]) { $Message[108]="KB"; }
- if (! $Message[109]) { $Message[109]="MB"; }
- if (! $Message[110]) { $Message[110]="GB"; }
- if (! $Message[111]) { $Message[111]="Grabber"; }
- if (! $Message[112]) { $Message[112]="Yes"; }
- if (! $Message[113]) { $Message[113]="No"; }
- if (! $Message[114]) { $Message[114]="WhoIs info"; }
- if (! $Message[115]) { $Message[115]="OK"; }
- if (! $Message[116]) { $Message[116]="Exit"; }
- if (! $Message[117]) { $Message[117]="Visits duration"; }
- if (! $Message[118]) { $Message[118]="Close window"; }
- if (! $Message[119]) { $Message[119]="Bytes"; }
- if (! $Message[120]) { $Message[120]="Search Keyphrases"; }
- if (! $Message[121]) { $Message[121]="Search Keywords"; }
- if (! $Message[122]) { $Message[122]="different refering search engines"; }
- if (! $Message[123]) { $Message[123]="different refering sites"; }
- if (! $Message[124]) { $Message[124]="Other phrases"; }
- if (! $Message[125]) { $Message[125]="Anonymous users"; }
- if (! $Message[126]) { $Message[126]="Refering search engines"; }
- if (! $Message[127]) { $Message[127]="Refering sites"; }
- if (! $Message[128]) { $Message[128]="Summary"; }
- if (! $Message[129]) { $Message[129]="Exact value not available in 'Year' view"; }
- if (! $Message[130]) { $Message[130]="Data value arrays"; }
# Correct param for backward compatibility
- if ($ShowFlagLinks eq "0") { $ShowFlagLinks = ""; }
- if ($ShowFlagLinks eq "1") { $ShowFlagLinks = "en fr de nl es"; }
+ if ($ShowMonthDayStats eq "1") { $ShowMonthDayStats = "UVPHB"; }
+ if ($ShowDaysOfWeekStats eq "1") { $ShowDaysOfWeekStats = "PHBL"; }
+ if ($ShowHoursStats eq "1") { $ShowHoursStats = "PHBL"; }
+ if ($ShowHostsStats eq "1") { $ShowHostsStats = "PHBL"; }
if ($ShowAuthenticatedUsers eq "1") { $ShowAuthenticatedUsers = "PHBL"; }
if ($ShowPagesStats eq "1") { $ShowPagesStats = "HBEX"; }
if ($ShowFileTypesStats eq "1") { $ShowFileTypesStats = "HB"; }
@@ -5272,7 +5279,7 @@ EOF
if ($ShowDomainsStats) { print ($frame?"| ":""); print "$Message[17]"; print ($frame?" |
\n":" "); }
if ($ShowHostsStats) { print ($frame?"| ":""); print "".ucfirst($Message[81]).""; print ($frame?" |
\n":" "); }
if ($ShowHostsStats) { print ($frame?" ":""); print "$Message[80]\n"; print ($frame?" |
\n":" "); }
- if ($ShowHostsStats) { print ($frame?" ":""); print "$Message[9]\n"; print ($frame?" |
\n":" "); }
+ if ($ShowHostsStats =~ /L/i) { print ($frame?" ":""); print "$Message[9]\n"; print ($frame?" |
\n":" "); }
if ($ShowHostsStats) { print ($frame?" ":""); print "$Message[45]\n"; print ($frame?" |
\n":" "); }
if ($ShowAuthenticatedUsers) { print ($frame?"| ":""); print "$Message[94]"; print ($frame?" |
\n":" "); }
if ($ShowAuthenticatedUsers) { print ($frame?" ":""); print "$Message[80]\n"; print ($frame?" |
\n":" "); }
@@ -5280,7 +5287,6 @@ EOF
if ($ShowEMailSenders) { print ($frame?"| ":""); print "$Message[0]"; print ($frame?" |
\n":" "); }
if ($ShowEMailReceivers) { print ($frame?"| ":""); print "$Message[0]"; print ($frame?" |
\n":" "); }
if ($ShowRobotsStats) { print ($frame?"| ":""); print "$Message[53]"; print ($frame?" |
\n":" "); }
- if ($ShowRobotsStats) { print ($frame?"| ":""); print "$Message[53]"; print ($frame?" |
\n":" "); }
if ($ShowRobotsStats) { print ($frame?" ":""); print "$Message[80]\n"; print ($frame?" |
\n":" "); }
if ($ShowRobotsStats) { print ($frame?" ":""); print "$Message[9]\n"; print ($frame?" |
\n":" "); }
if ($linetitle) { print ($frame?"":"\n"); }
@@ -5458,12 +5464,12 @@ EOF
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 "";
- print " ";
- print " ";
+ if ($ShowMonthDayStats =~ /U/i) { print " "; }
+ if ($ShowMonthDayStats =~ /V/i) { print " "; }
print " ";
- print " ";
- print " ";
- print " ";
+ if ($ShowMonthDayStats =~ /P/i) { print " "; }
+ if ($ShowMonthDayStats =~ /H/i) { print " "; }
+ if ($ShowMonthDayStats =~ /B/i) { print " "; }
print " | \n";
}
print "\n";
@@ -5483,20 +5489,20 @@ EOF
# Show data array for month
print "\n";
print "| $Message[5] | ";
- print "$Message[11] | ";
- print "$Message[10] | ";
- print "$Message[56] | ";
- print "$Message[57] | ";
- print "$Message[75] |
";
+ if ($ShowMonthDayStats =~ /U/i) { print "$Message[11] | "; }
+ 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] | "; }
for (my $ix=1; $ix<=12; $ix++) {
my $monthix=($ix<10?"0$ix":"$ix");
print "";
print "| ",$MonthLib{$monthix}," | ";
- print "",$MonthUnique{$YearRequired.$monthix}?$MonthUnique{$YearRequired.$monthix}:"0"," | ";
- print "",$MonthVisits{$YearRequired.$monthix}?$MonthVisits{$YearRequired.$monthix}:"0"," | ";
- print "",$MonthPages{$YearRequired.$monthix}?$MonthPages{$YearRequired.$monthix}:"0"," | ";
- print "",$MonthHits{$YearRequired.$monthix}?$MonthHits{$YearRequired.$monthix}:"0"," | ";
- print "",Format_Bytes(int($MonthBytes{$YearRequired.$monthix}))," | ";
+ if ($ShowMonthDayStats =~ /U/i) { print "",$MonthUnique{$YearRequired.$monthix}?$MonthUnique{$YearRequired.$monthix}:"0"," | "; }
+ if ($ShowMonthDayStats =~ /V/i) { print "",$MonthVisits{$YearRequired.$monthix}?$MonthVisits{$YearRequired.$monthix}:"0"," | "; }
+ if ($ShowMonthDayStats =~ /P/i) { print "",$MonthPages{$YearRequired.$monthix}?$MonthPages{$YearRequired.$monthix}:"0"," | "; }
+ if ($ShowMonthDayStats =~ /H/i) { print "",$MonthHits{$YearRequired.$monthix}?$MonthHits{$YearRequired.$monthix}:"0"," | "; }
+ if ($ShowMonthDayStats =~ /B/i) { print "",Format_Bytes(int($MonthBytes{$YearRequired.$monthix}))," | "; }
print "
\n";
}
print "
\n
";
@@ -5562,10 +5568,10 @@ EOF
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 "";
- print " ";
- print " ";
- print " ";
- print " ";
+ if ($ShowMonthDayStats =~ /V/i) { print " "; }
+ if ($ShowMonthDayStats =~ /P/i) { print " "; }
+ if ($ShowMonthDayStats =~ /H/i) { print " "; }
+ if ($ShowMonthDayStats =~ /B/i) { print " "; }
print " | \n";
}
print " | ";
@@ -5579,10 +5585,10 @@ EOF
$avg_day_p=sprintf("%.2f",$avg_day_p);
$avg_day_h=sprintf("%.2f",$avg_day_h);
$avg_day_k=sprintf("%.2f",$avg_day_k);
- print "
";
- print "
";
- print "
";
- 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";
@@ -5608,10 +5614,10 @@ EOF
# Show data array for days
print "\n";
print "| $Message[4] | ";
- print "$Message[10] | ";
- print "$Message[56] | ";
- print "$Message[57] | ";
- print "$Message[75] |
";
+ 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] | "; }
foreach my $daycursor ($firstdaytoshowtime..$lastdaytoshowtime) {
$daycursor =~ /^(\d\d\d\d)(\d\d)(\d\d)/;
my $year=$1; my $month=$2; my $day=$3;
@@ -5619,10 +5625,10 @@ EOF
my $dayofweekcursor=DayOfWeek($day,$month,$year);
print "";
print "| ",Format_Date("$year$month$day"."000000",2)," | ";
- print "",$DayVisits{$year.$month.$day}?$DayVisits{$year.$month.$day}:"0"," | ";
- print "",$DayPages{$year.$month.$day}?$DayPages{$year.$month.$day}:"0"," | ";
- print "",$DayHits{$year.$month.$day}?$DayHits{$year.$month.$day}:"0"," | ";
- print "",Format_Bytes(int($DayBytes{$year.$month.$day}))," | ";
+ if ($ShowMonthDayStats =~ /V/i) { print "",$DayVisits{$year.$month.$day}?$DayVisits{$year.$month.$day}:"0"," | "; }
+ if ($ShowMonthDayStats =~ /P/i) { print "",$DayPages{$year.$month.$day}?$DayPages{$year.$month.$day}:"0"," | "; }
+ if ($ShowMonthDayStats =~ /H/i) { print "",$DayHits{$year.$month.$day}?$DayHits{$year.$month.$day}:"0"," | "; }
+ if ($ShowMonthDayStats =~ /B/i) { print "",Format_Bytes(int($DayBytes{$year.$month.$day}))," | "; }
print "
\n";
}
print "
\n
";
@@ -5633,60 +5639,28 @@ EOF
&html_end;
exit(0);
}
- if ($HTMLOutput eq "allhosts") {
+ if ($HTMLOutput eq "allhosts" || $HTMLOutput eq "lasthosts") {
print "$Center
\n";
- &tab_head($Message[81],19);
- if ($MonthRequired ne "year") { print "| $Message[81] : $TotalHostsKnown $Message[82], $TotalHostsUnknown $Message[1] - $TotalUnique $Message[11] | "; }
- else { print "
|---|
| $Message[81] : ".(scalar keys %_host_h)." | "; }
- if ($ShowLinksToWhoIs && $LinksToWhoIs) { print "$Message[114] | "; }
- print "$Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n";
- $total_p=$total_h=$total_k=0;
- my $count=0;
- &BuildKeyList($MaxRowsInHTMLOutput,$MinHitHost,\%_host_h,\%_host_p);
- foreach my $key (@keylist) {
- my $host=CleanFromCSSA($key);
- print "| ".($_robot_l{$key}?"":"")."$host".($_robot_l{$key}?"":"")." | ";
- if ($ShowLinksToWhoIs && $LinksToWhoIs) { ShowWhoIsCell($key); }
- print "".($_host_p{$key}?$_host_p{$key}:" ")." | $_host_h{$key} | ".Format_Bytes($_host_k{$key})." | ";
- if ($_host_l{$key}) { print "".Format_Date($_host_l{$key},1)." | "; }
- else { print "- | "; }
- print "
\n";
- $total_p += $_host_p{$key};
- $total_h += $_host_h{$key};
- $total_k += $_host_k{$key}||0;
- $count++;
- }
- if ($Debug) { debug("Total real / shown : $TotalPages / $total_p - $TotalHits / $total_h - $TotalBytes / $total_h",2); }
- $rest_p=$TotalPages-$total_p;
- $rest_h=$TotalHits-$total_h;
- $rest_k=$TotalBytes-$total_k;
- if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other visitors (known or not)
- print "| $Message[2] | ";
- if ($ShowLinksToWhoIs && $LinksToWhoIs) { ShowWhoIsCell(""); }
- print "$rest_p | ".($rest_h?$rest_h:" ")." | ".Format_Bytes($rest_k)." | |
\n";
- }
- &tab_end;
- &html_end;
- exit(0);
- }
- if ($HTMLOutput eq "lasthosts") {
- print "$Center
\n";
- &tab_head($Message[9],19);
+ my $title="";
+ if ($HTMLOutput eq "allhosts") { $title.="$Message[81]"; }
+ if ($HTMLOutput eq "lasthosts") { $title.="$Message[9]"; }
+ &tab_head("$title",19);
if ($MonthRequired ne "year") { print "| $Message[81] : $TotalHostsKnown $Message[82], $TotalHostsUnknown $Message[1] - $TotalUnique $Message[11] | "; }
else { print "
|---|
| $Message[81] : ".(scalar keys %_host_h)." | "; }
if ($ShowLinksToWhoIs && $LinksToWhoIs) { print "$Message[114] | "; }
print "$Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n";
$total_p=$total_h=$total_k=0;
my $count=0;
- &BuildKeyList($MaxRowsInHTMLOutput,$MinHitHost,\%_host_h,\%_host_l);
+ if ($HTMLOutput eq "allhosts") { &BuildKeyList($MaxRowsInHTMLOutput,$MinHitHost,\%_host_h,\%_host_p); }
+ if ($HTMLOutput eq "lasthosts") { &BuildKeyList($MaxRowsInHTMLOutput,$MinHitHost,\%_host_h,\%_host_l); }
foreach my $key (@keylist) {
my $host=CleanFromCSSA($key);
print "| ".($_robot_l{$key}?"":"")."$host".($_robot_l{$key}?"":"")." | ";
if ($ShowLinksToWhoIs && $LinksToWhoIs) { ShowWhoIsCell($key); }
- print "".($_host_p{$key}?$_host_p{$key}:" ")." | $_host_h{$key} | ".Format_Bytes($_host_k{$key})." | ";
- if ($_host_l{$key}) { print "".Format_Date($_host_l{$key},1)." | "; }
- else { print "- | "; }
- print "
\n";
+ if ($ShowHostsStats =~ /P/i) { print "".($_host_p{$key}?$_host_p{$key}:" ")." | "; }
+ 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):"-")." | "; }
$total_p += $_host_p{$key};
$total_h += $_host_h{$key};
$total_k += $_host_k{$key}||0;
@@ -5699,7 +5673,11 @@ EOF
if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other visitors (known or not)
print "| $Message[2] | ";
if ($ShowLinksToWhoIs && $LinksToWhoIs) { ShowWhoIsCell(""); }
- print "$rest_p | $rest_h | ".Format_Bytes($rest_k)." | |
\n";
+ if ($ShowHostsStats =~ /P/i) { print "$rest_p | "; }
+ if ($ShowHostsStats =~ /H/i) { print "".($rest_h?$rest_h:" ")." | "; }
+ if ($ShowHostsStats =~ /B/i) { print "".Format_Bytes($rest_k)." | "; }
+ if ($ShowHostsStats =~ /L/i) { print " | "; }
+ print "\n";
}
&tab_end;
&html_end;
@@ -5707,7 +5685,7 @@ EOF
}
if ($HTMLOutput eq "unknownip") {
print "$Center
\n";
- &tab_head($Message[45],19);
+ &tab_head("$Message[45]",19);
print "| ".(scalar keys %_host_h)." $Message[1] | ";
if ($ShowLinksToWhoIs && $LinksToWhoIs) { print "$Message[114] | "; }
print "$Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n";
@@ -5718,9 +5696,10 @@ EOF
my $host=CleanFromCSSA($key);
print "| $host | ";
if ($ShowLinksToWhoIs && $LinksToWhoIs) { ShowWhoIsCell($key); }
- print "".($_host_p{$key}||" ")." | $_host_h{$key} | ".Format_Bytes($_host_k{$key})." | ";
- if ($_host_l{$key}) { print "".Format_Date($_host_l{$key},1)." | "; }
- else { print "- | "; }
+ if ($ShowHostsStats =~ /P/i) { print "".($_host_p{$key}?$_host_p{$key}:" ")." | "; }
+ 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};
@@ -5734,7 +5713,11 @@ EOF
if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other visitors (known or not)
print "| $Message[82] | ";
if ($ShowLinksToWhoIs && $LinksToWhoIs) { ShowWhoIsCell(""); }
- print "$rest_p | $rest_h | ".Format_Bytes($rest_k)." | |
\n";
+ if ($ShowHostsStats =~ /P/i) { print "$rest_p | "; }
+ if ($ShowHostsStats =~ /H/i) { print "".($rest_h?$rest_h:" ")." | "; }
+ if ($ShowHostsStats =~ /B/i) { print "".Format_Bytes($rest_k)." | "; }
+ if ($ShowHostsStats =~ /L/i) { print " | "; }
+ print "\n";
}
&tab_end;
&html_end;
@@ -5784,20 +5767,23 @@ EOF
&html_end;
exit(0);
}
- if ($HTMLOutput eq "allrobots") {
+ if ($HTMLOutput eq "allrobots" || $HTMLOutput eq "lastrobots") {
print "$Center
\n";
- &tab_head($Message[53],19);
+ my $title="";
+ if ($HTMLOutput eq "allrobots") { $title.="$Message[53]"; }
+ if ($HTMLOutput eq "lastrobots") { $title.="$Message[9]"; }
+ &tab_head("$title",19);
print "| ".(scalar keys %_robot_h)." $Message[51] | ";
print "$Message[57] | $Message[75] | $Message[9] |
\n";
$total_p=$total_h=$total_k=0;
my $count=0;
- &BuildKeyList($MaxRowsInHTMLOutput,$MinHitRobot,\%_robot_h,\%_robot_h);
+ if ($HTMLOutput eq "allrobots") { &BuildKeyList($MaxRowsInHTMLOutput,$MinHitRobot,\%_robot_h,\%_robot_h); }
+ if ($HTMLOutput eq "lastrobots") { &BuildKeyList($MaxRowsInHTMLOutput,$MinHitRobot,\%_robot_h,\%_robot_l); }
foreach my $key (@keylist) {
print "| ".($RobotsHashIDLib{$key}?$RobotsHashIDLib{$key}:$key)." | ";
print "$_robot_h{$key} | ";
print "".Format_Bytes($_robot_k{$key})." | ";
- if ($_robot_l{$key}) { print "".Format_Date($_robot_l{$key},1)." | "; }
- else { print "- | "; }
+ print "".($_robot_l{$key}?Format_Date($_robot_l{$key},1):"-")." | ";
print "
\n";
#$total_p += $_robot_p{$key}||0;
$total_h += $_robot_h{$key};
@@ -5813,42 +5799,11 @@ EOF
$rest_k=$TotalBytesRobots-$total_k;
if ($Debug) { debug("Total real / shown : $TotalPagesRobots / $total_p - $TotalHitsRobots / $total_h - $TotalBytesRobots / $total_k",2); }
if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other login
- print "| $Message[2] | $rest_h | ".(Format_Bytes($rest_k))." | |
\n";
- }
- &tab_end;
- &html_end;
- exit(0);
- }
- if ($HTMLOutput eq "lastrobots") {
- print "$Center
\n";
- &tab_head($Message[9],19);
- print "| ".(scalar keys %_robot_h)." $Message[51] | ";
- print "$Message[57] | $Message[75] | $Message[9] |
\n";
- $total_p=$total_h=$total_k=0;
- my $count=0;
- &BuildKeyList($MaxRowsInHTMLOutput,$MinHitRobot,\%_robot_h,\%_robot_l);
- foreach my $key (@keylist) {
- print "| ".($RobotsHashIDLib{$key}?$RobotsHashIDLib{$key}:$key)." | ";
- print "$_robot_h{$key} | ";
- print "".Format_Bytes($_robot_k{$key})." | ";
- if ($_robot_l{$key}) { print "".Format_Date($_robot_l{$key},1)." | "; }
- else { print "- | "; }
+ print "
| $Message[2] | ";
+ print "$rest_h | ";
+ print "".(Format_Bytes($rest_k))." | ";
+ print " | ";
print "
\n";
- #$total_p += $_robot_p{$key}||0;
- $total_h += $_robot_h{$key};
- $total_k += $_robot_k{$key}||0;
- $count++;
- }
- # For bots we need to count Totals
- my $TotalPagesRobots = 0; #foreach my $val (values %_robot_p) { $TotalPagesRobots+=$val; }
- my $TotalHitsRobots = 0; foreach my $val (values %_robot_h) { $TotalHitsRobots+=$val; }
- my $TotalBytesRobots = 0; foreach my $val (values %_robot_k) { $TotalBytesRobots+=$val; }
- $rest_p=0; #$rest_p=$TotalPagesRobots-$total_p;
- $rest_h=$TotalHitsRobots-$total_h;
- $rest_k=$TotalBytesRobots-$total_k;
- if ($Debug) { debug("Total real / shown : $TotalPagesRobots / $total_p - $TotalHitsRobots / $total_h - $TotalBytesRobots / $total_k",2); }
- if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other login
- print "| $Message[2] | $rest_h | ".(Format_Bytes($rest_k))." | |
\n";
}
&tab_end;
&html_end;
@@ -6242,21 +6197,24 @@ EOF
else { print "| NA | "; }
if ($LastTime) { print "".Format_Date($LastTime,0)." |
\n"; }
else { print "NA | \n"; }
+ # Show main indicators
print "";
- print "| $Message[11] | ";
- print "$Message[10] | ";
- print "$Message[56] | ";
- print "$Message[57] | ";
- print "$Message[75] | ";
+ 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 " | "; }
print "
\n";
print "";
- print "".($MonthRequired eq "year"?"<= $TotalUnique $Message[129]":"$TotalUnique ")." | ";
- print "$TotalVisits ($RatioVisits $Message[52]) | ";
- print "$TotalPages ($RatioPages ".lc($Message[56]."/".$Message[12]).") | ";
- print "$TotalHits ($RatioHits ".lc($Message[57]."/".$Message[12]).") | ";
- print "".Format_Bytes(int($TotalBytes))." ($RatioBytes $Message[108]/".lc($Message[12]).") | ";
+ if ($ShowMonthDayStats =~ /U/i) { print "".($MonthRequired eq "year"?"<= $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 " | "; }
print "
\n";
- print "| ";
+
+ my $colspan=5;
+ print " |
";
# Show monthly stats
print "";
@@ -6280,12 +6238,12 @@ EOF
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 "";
- print " ";
- print " ";
+ if ($ShowMonthDayStats =~ /U/i) { print " "; }
+ if ($ShowMonthDayStats =~ /V/i) { print " "; }
print " ";
- print " ";
- print " ";
- print " ";
+ if ($ShowMonthDayStats =~ /P/i) { print " "; }
+ if ($ShowMonthDayStats =~ /H/i) { print " "; }
+ if ($ShowMonthDayStats =~ /B/i) { print " "; }
print " | \n";
}
print " |
\n";
@@ -6354,10 +6312,10 @@ EOF
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 "";
- print " ";
- print " ";
- print " ";
- print " ";
+ if ($ShowMonthDayStats =~ /V/i) { print " "; }
+ if ($ShowMonthDayStats =~ /P/i) { print " "; }
+ if ($ShowMonthDayStats =~ /H/i) { print " "; }
+ if ($ShowMonthDayStats =~ /B/i) { print " "; }
print " | \n";
}
print " | ";
@@ -6372,10 +6330,10 @@ EOF
$avg_day_p=sprintf("%.2f",$avg_day_p);
$avg_day_h=sprintf("%.2f",$avg_day_h);
$avg_day_k=sprintf("%.2f",$avg_day_k);
- print "
";
- print "
";
- print "
";
- 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";
# Show lib for day
@@ -6393,6 +6351,7 @@ EOF
}
print " | ";
print "$Message[96] | \n";
+
print "\n";
print "\n
\n";
@@ -6418,7 +6377,7 @@ EOF
if ($ShowDaysOfWeekStats) {
if ($Debug) { debug("ShowDaysOfWeekStats",2); }
print "$Center
\n";
- &tab_head($Message[91],18);
+ &tab_head("$Message[91]",18);
print "";
print "";
print "\n";
@@ -6462,9 +6421,9 @@ EOF
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 "";
- print " ";
- print " ";
- print " ";
+ if ($ShowDaysOfWeekStats =~ /P/i) { print " "; }
+ if ($ShowDaysOfWeekStats =~ /H/i) { print " "; }
+ if ($ShowDaysOfWeekStats =~ /B/i) { print " "; }
print " | \n";
}
print " \n";
@@ -6478,15 +6437,15 @@ EOF
# Show data array for days of week
print "\n";
print "| $Message[4] | ";
- print "$Message[56] | ";
- print "$Message[57] | ";
- print "$Message[75] | ";
+ if ($ShowDaysOfWeekStats =~ /P/i) { print "$Message[56] | "; }
+ if ($ShowDaysOfWeekStats =~ /H/i) { print "$Message[57] | "; }
+ if ($ShowDaysOfWeekStats =~ /B/i) { print "$Message[75] | "; }
for (@DOWIndex) {
print "";
print "| ".$Message[$_+84]." | ";
- print "",$avg_dayofweek_p[$_]," | ";
- print "",$avg_dayofweek_h[$_]," | ";
- print "",Format_Bytes($avg_dayofweek_k[$_])," | ";
+ if ($ShowDaysOfWeekStats =~ /P/i) { print "",$avg_dayofweek_p[$_]," | "; }
+ if ($ShowDaysOfWeekStats =~ /H/i) { print "",$avg_dayofweek_h[$_]," | "; }
+ if ($ShowDaysOfWeekStats =~ /B/i) { print "",Format_Bytes($avg_dayofweek_k[$_])," | "; }
print " \n";
}
print " \n \n";
@@ -6518,10 +6477,10 @@ EOF
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 "";
- print " ";
- print " ";
- print " ";
- print " | \n";
+ if ($ShowHoursStats =~ /P/i) { print " "; }
+ if ($ShowHoursStats =~ /H/i) { print " "; }
+ if ($ShowHoursStats =~ /B/i) { print " "; }
+ print "";
}
print "";
# Show clock icon
@@ -6545,32 +6504,34 @@ EOF
print "\n";
print "\n";
print "| $Message[20] | ";
- print "$Message[56] | ";
- print "$Message[57] | ";
- print "$Message[75] | ";
+ if ($ShowHoursStats =~ /P/i) { print "$Message[56] | "; }
+ if ($ShowHoursStats =~ /H/i) { print "$Message[57] | "; }
+ if ($ShowHoursStats =~ /B/i) { print "$Message[75] | "; }
+ print "";
for (my $ix=0; $ix<=11; $ix++) {
my $monthix=($ix<10?"0$ix":"$ix");
print "";
print "| $monthix | ";
- print "",$_time_p[$monthix]?$_time_p[$monthix]:"0"," | ";
- print "",$_time_h[$monthix]?$_time_h[$monthix]:"0"," | ";
- print "",Format_Bytes(int($_time_k[$monthix]))," | ";
+ if ($ShowHoursStats =~ /P/i) { print "",$_time_p[$monthix]?$_time_p[$monthix]:"0"," | "; }
+ if ($ShowHoursStats =~ /H/i) { print "",$_time_h[$monthix]?$_time_h[$monthix]:"0"," | "; }
+ if ($ShowHoursStats =~ /B/i) { print "",Format_Bytes(int($_time_k[$monthix]))," | "; }
print " \n";
}
print " \n";
print " | \n";
print "\n";
print "| $Message[20] | ";
- print "$Message[56] | ";
- print "$Message[57] | ";
- print "$Message[75] | ";
+ if ($ShowHoursStats =~ /P/i) { print "$Message[56] | "; }
+ if ($ShowHoursStats =~ /H/i) { print "$Message[57] | "; }
+ if ($ShowHoursStats =~ /B/i) { print "$Message[75] | "; }
+ print "\n";
for (my $ix=12; $ix<=23; $ix++) {
my $monthix=($ix<10?"0$ix":"$ix");
print "";
print "| $monthix | ";
- print "",$_time_p[$monthix]?$_time_p[$monthix]:"0"," | ";
- print "",$_time_h[$monthix]?$_time_h[$monthix]:"0"," | ";
- print "",Format_Bytes(int($_time_k[$monthix]))," | ";
+ if ($ShowHoursStats =~ /P/i) { print "",$_time_p[$monthix]?$_time_p[$monthix]:"0"," | "; }
+ if ($ShowHoursStats =~ /H/i) { print "",$_time_h[$monthix]?$_time_h[$monthix]:"0"," | "; }
+ if ($ShowHoursStats =~ /B/i) { print "",Format_Bytes(int($_time_k[$monthix]))," | "; }
print " \n";
}
print " \n";
@@ -6587,8 +6548,13 @@ EOF
if ($ShowDomainsStats) {
if ($Debug) { debug("ShowDomainsStats",2); }
print "$Center \n";
- &tab_head($Message[25],19);
- print " | | $Message[17] | $Message[105] | $Message[56] | $Message[57] | $Message[75] | | \n";
+ &tab_head("$Message[25]",19);
+ print "| $Message[17] | $Message[105] | ";
+ print "$Message[56] | ";
+ print "$Message[57] | ";
+ print "$Message[75] | ";
+ print " | ";
+ print " \n";
$total_p=$total_h=$total_k=0;
$max_h=1; foreach my $key (values %_domener_h) { if ($key > $max_h) { $max_h = $key; } }
$max_k=1; foreach my $key (values %_domener_k) { if ($key > $max_k) { $max_k = $key; } }
@@ -6608,7 +6574,9 @@ EOF
else {
print " | $DomainsHashIDLib{$key} | $key | ";
}
- print "$_domener_p{$key} | $_domener_h{$key} | ".Format_Bytes($_domener_k{$key})." | ";
+ print "$_domener_p{$key} | ";
+ print "$_domener_h{$key} | ";
+ print "".Format_Bytes($_domener_k{$key})." | ";
print "";
print "![\"$Message[56]: \"$Message[56]:](\"$DirIcons\/other\/$BarImageHorizontal_p\") \n";
print "![\"$Message[57]: \"$Message[57]:](\"$DirIcons\/other\/$BarImageHorizontal_h\") \n";
@@ -6623,7 +6591,10 @@ EOF
$rest_h=$TotalHits-$total_h;
$rest_k=$TotalBytes-$total_k;
if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other domains (known or not)
- print " | | $Message[2] | $rest_p | $rest_h | ".Format_Bytes($rest_k)." | \n";
+ print " | $Message[2] | ";
+ print "$rest_p | ";
+ print "$rest_h | ";
+ print "".Format_Bytes($rest_k)." | ";
print " | ";
print " \n";
}
@@ -6639,7 +6610,11 @@ EOF
if ($MonthRequired ne "year") { print "| $Message[81] : $TotalHostsKnown $Message[82], $TotalHostsUnknown $Message[1] - $TotalUnique $Message[11] | "; }
else { print "
|---|
| $Message[81] : ".(scalar keys %_host_h)." | "; }
if ($ShowLinksToWhoIs && $LinksToWhoIs) { print "$Message[114] | "; }
- print "$Message[56] | $Message[57] | $Message[75] | $Message[9] | \n";
+ if ($ShowHoursStats =~ /P/i) { print "$Message[56] | "; }
+ if ($ShowHoursStats =~ /H/i) { print "$Message[57] | "; }
+ if ($ShowHoursStats =~ /B/i) { print "$Message[75] | "; }
+ if ($ShowHoursStats =~ /L/i) { print "$Message[9] | "; }
+ print "\n";
$total_p=$total_h=$total_k=0;
my $count=0;
&BuildKeyList($MaxNbOfHostsShown,$MinHitHost,\%_host_h,\%_host_p);
@@ -6647,9 +6622,10 @@ EOF
print "";
print "| $key | ";
if ($ShowLinksToWhoIs && $LinksToWhoIs) { ShowWhoIsCell($key); }
- print "".($_host_p{$key}||" ")." | $_host_h{$key} | ".Format_Bytes($_host_k{$key})." | ";
- if ($_host_l{$key}) { print "".Format_Date($_host_l{$key},1)." | "; }
- else { print "- | "; }
+ if ($ShowHoursStats =~ /P/i) { print "".($_host_p{$key}||" ")." | "; }
+ if ($ShowHoursStats =~ /H/i) { print "$_host_h{$key} | "; }
+ if ($ShowHoursStats =~ /B/i) { print "".Format_Bytes($_host_k{$key})." | "; }
+ if ($ShowHoursStats =~ /L/i) { print "".($_host_l{$key}?Format_Date($_host_l{$key},1):"-")." | "; }
print " \n";
$total_p += $_host_p{$key};
$total_h += $_host_h{$key};
@@ -6662,7 +6638,11 @@ EOF
if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other visitors (known or not)
print "| $Message[2] | ";
if ($ShowLinksToWhoIs && $LinksToWhoIs) { print " | "; }
- print "$rest_p | $rest_h | ".Format_Bytes($rest_k)." | | \n";
+ if ($ShowHoursStats =~ /P/i) { print "$rest_p | "; }
+ if ($ShowHoursStats =~ /H/i) { print "$rest_h | "; }
+ if ($ShowHoursStats =~ /B/i) { print "".Format_Bytes($rest_k)." | "; }
+ if ($ShowHoursStats =~ /L/i) { print " | "; }
+ print "\n";
}
&tab_end;
}
@@ -6695,7 +6675,7 @@ EOF
if ($ShowAuthenticatedUsers =~ /P/i) { print "$_login_p{$key} | "; }
if ($ShowAuthenticatedUsers =~ /H/i) { print "$_login_h{$key} | "; }
if ($ShowAuthenticatedUsers =~ /B/i) { print "".Format_Bytes($_login_k{$key})." | "; }
- if ($ShowAuthenticatedUsers =~ /L/i) { print "".($_login_l{$key}?Format_Date($_login_l{$key},1):"-")." | "; }
+ if ($ShowAuthenticatedUsers =~ /L/i) { print "".($_login_l{$key}?Format_Date($_login_l{$key},1):"-")." | "; }
#print "";
#print "![\"$Message[56]: \"$Message[56]:](\"$DirIcons\/other\/$BarImageHorizontal_p\") \n";
#print "![\"$Message[57]: \"$Message[57]:](\"$DirIcons\/other\/$BarImageHorizontal_h\") \n";
|
|