From: eldy <> Date: Thu, 13 Sep 2001 22:32:06 +0000 (+0000) Subject: Add a lot of new parameters (Showxxx to choose views on main page). X-Git-Tag: AWSTATS_1_0~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=905b4d802ac2f4765a3e0f839c9cebb4e8cfa91f;p=thirdparty%2FAWStats.git Add a lot of new parameters (Showxxx to choose views on main page). --- diff --git a/wwwroot/cgi-bin/awstats.model.conf b/wwwroot/cgi-bin/awstats.model.conf index e6819ada..ec9f66dc 100644 --- a/wwwroot/cgi-bin/awstats.model.conf +++ b/wwwroot/cgi-bin/awstats.model.conf @@ -272,18 +272,50 @@ WarningMessages=1 # Expires=0 +# You choose here which summary report you want to see in the main page. +# Whatever is your setup here, all detailed reports are still available. +# So if you setup to 1 only ShowHeader, ShowMenu and ShowMonthDayStats, all +# links in menu will point to detailed views. +# Possible values: 1 or 0 +# +ShowHeader=1 # Show AWStats head title and icon +ShowMenu=1 # Show menu header with links on detailed reports +ShowMonthDayStats=1 +ShowDomainsStats=1 +ShowHostsStats=1 +ShowRobotsStats=1 +ShowHoursStats=1 +ShowDaysOfWeekStats=0 # Not yet available +ShowPagesStats=1 +ShowFileTypesStats=0 # Not yet available +ShowFileSizesStats=0 # Not yet available +ShowBrowsersStats=1 +ShowOSStats=1 +ShowOriginStats=1 +ShowKeywordsStats=1 +ShowAuthenticatedUsers=0 # Not yet available +ShowHTTPErrorsStats=1 + # Flags with link to other languages translation are visible. +# This parameter is used only if ShowHeader is set to 1. # Possible values: 1 or 0 # Default: 1 # ShowFlagLinks=1 -# Each URL shown in stats page are links you can click. +# Each URL shown in stats report views are links you can click. # Possible values: 1 or 0 # Default: 1 # ShowLinksOnUrl=1 +# This parameter ask your browser to open detailed reports into a different +# window than the main page. +# Possible values: 1 or 0 +# Default: 1 +# +OpenDetailedReportOnNewWindows=1 + # You can put here HTML code that will be added at the end of AWStats reports. # Great to add advert ban. # Default: "" diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 479359f3..df4e46d8 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -71,7 +71,7 @@ $found, $internal_link, $new) = (); %MonthBytes = %MonthHits = %MonthHostsKnown = %MonthHostsUnknown = %MonthPages = %MonthUnique = %MonthVisits = %monthlib = %monthnum = (); -$VERSION="3.2 (build 1)"; +$VERSION="3.2 (build 2)"; $Lang="en"; # Default value @@ -826,21 +826,22 @@ EOF print "\n\n"; print "\n"; # Write logo, flags and product name - print "\n"; - print "\n"; - if ($LogoLink =~ "http://awstats.sourceforge.net") { - print "\n"; - } - else { - print "\n"; + if ($ShowHeader) { + print "
AWStats\n"; - Show_Flag_Links($Lang); - print "\"$PROG
\n"; + print "\n"; + if ($LogoLink =~ "http://awstats.sourceforge.net") { + print "\n"; + } + else { + print "\n"; + } + #print "HomePage •\; Back
\n"; + print "\n"; + print "
AWStats\n"; + Show_Flag_Links($Lang); + print "\"$PROG
$Message[54]
\n"; + #print "
\n"; } - #print "HomePage •\; Back
\n"; - print "$Message[54]\n"; - print "\n"; - - print "
\n"; } } @@ -1040,6 +1041,23 @@ sub Read_Config_File { if ($param =~ /^DefaultFile/) { $DefaultFile=$value; next; } if ($param =~ /^WarningMessages/) { $WarningMessages=$value; next; } if ($param =~ /^Expires/) { $Expires=$value; next; } + if ($param =~ /^ShowHeader/) { $ShowHeader=$value; next; } + if ($param =~ /^ShowMenu/) { $ShowMenu=$value; next; } + if ($param =~ /^ShowMonthDayStats/) { $ShowMonthDayStats=$value; next; } + if ($param =~ /^ShowDomainsStats/) { $ShowDomainsStats=$value; next; } + if ($param =~ /^ShowHostsStats/) { $ShowHostsStats=$value; next; } + if ($param =~ /^ShowRobotsStats/) { $ShowRobotsStats=$value; next; } + if ($param =~ /^ShowHoursStats/) { $ShowHoursStats=$value; next; } + if ($param =~ /^ShowDaysOfWeekStats/) { $ShowDaysOfWeekStats=$value; next; } + if ($param =~ /^ShowPagesStats/) { $ShowPagesStats=$value; next; } + if ($param =~ /^ShowFileTypesStats/) { $ShowFileTypesStats=$value; next; } + if ($param =~ /^ShowFileSizesStats/) { $ShowFileSizesStats=$value; next; } + if ($param =~ /^ShowBrowsersStats/) { $ShowBrowsersStats=$value; next; } + if ($param =~ /^ShowOSStats/) { $ShowOSStats=$value; next; } + if ($param =~ /^ShowOriginStats/) { $ShowOriginStats=$value; next; } + if ($param =~ /^ShowKeywordsStats/) { $ShowKeywordsStats=$value; next; } + if ($param =~ /^ShowAuthenticatedUsers/) { $ShowAuthenticatedUsers=$value; next; } + if ($param =~ /^ShowHTTPErrorsStats/) { $ShowHTTPErrorsStats=$value; next; } if ($param =~ /^ShowFlagLinks/) { $ShowFlagLinks=$value; next; } if ($param =~ /^ShowLinksOnUrl/) { $ShowLinksOnUrl=$value; next; } if ($param =~ /^HTMLEndSection/) { $HTMLEndSection=$value; next; } @@ -1184,6 +1202,23 @@ sub Check_Config { if ($DefaultFile eq "") { $DefaultFile="index.html"; } if ($WarningMessages !~ /[0-1]/) { $WarningMessages=1; } if ($Expires !~ /^[\d][\d]*/) { $Expires=0; } + if ($ShowHeader !~ /[0-1]/) { $ShowHeader=1; } + if ($ShowMenu !~ /[0-1]/) { $ShowMenu=1; } + if ($ShowMonthDayStats !~ /[0-1]/) { $ShowMonthDayStats=1; } + if ($ShowDomainsStats !~ /[0-1]/) { $ShowDomainsStats=1; } + if ($ShowHostsStats !~ /[0-1]/) { $ShowHostsStats=1; } + if ($ShowRobotsStats !~ /[0-1]/) { $ShowRobotsStats=1; } + if ($ShowHoursStats !~ /[0-1]/) { $ShowHoursStats=1; } + if ($ShowDaysOfWeekStats !~ /[0-1]/) { $ShowDaysOfWeekStats=1; } + if ($ShowPagesStats !~ /[0-1]/) { $ShowPagesStats=1; } + if ($ShowFileTypesStats !~ /[0-1]/) { $ShowFileTypesStats=1; } + if ($ShowFileSizesStats !~ /[0-1]/) { $ShowFileSizeStats=1; } + if ($ShowBrowsersStats !~ /[0-1]/) { $ShowBrowsersStats=1; } + if ($ShowOSStats !~ /[0-1]/) { $ShowOSStats=1; } + if ($ShowOriginStats !~ /[0-1]/) { $ShowOriginStats=1; } + if ($ShowKeywordsStats !~ /[0-1]/) { $ShowKeywordsStats=1; } + if ($ShowHTTPErrorsStats !~ /[0-1]/) { $ShowHTTPErrorsStats=1; } + if ($ShowAuthenticatedUsers !~ /[0-1]/) { $ShowAuthenticatedUsers=1; } if ($ShowFlagLinks !~ /[0-1]/) { $ShowFlagLinks=1; } if ($ShowLinksOnURL !~ /[0-1]/) { $ShowLinksOnURL=1; } if ($BarWidth !~ /^[\d][\d]*/) { $BarWidth=260; } @@ -2658,37 +2693,53 @@ EOF # INFO #--------------------------------------------------------------------- - print "$CENTER 
"; - print ""; - print ""; - print ""; - print "\n"; - if ($QueryString !~ /output=/i) { # If main page asked - print "\n"; - # Traffic - print ""; - print "\n"; - # Navigation - print ""; - print "\n"; - # Referers - print ""; - print "\n"; - # Others - print ""; - print "\n"; - } - else { - if ($ShowBackLink) { print "\n"; } + if ($ShowMenu) { + print "$CENTER 
"; + print "
$Message[7] : $SiteToAnalyze
$Message[35] : "; - foreach my $key (sort keys %LastUpdate) { if ($LastUpdate < $LastUpdate{$key}) { $LastUpdate = $LastUpdate{$key}; } } - if ($LastUpdate) { print Format_Date($LastUpdate); } - else { print "Never updated"; } - print "       "; - if ($AllowToUpdateStatsFromBrowser) { print "$Message[74]"; } - print "
 
$Message[16] : $Message[17]   ".ucfirst($Message[26])."   $Message[53]   $Message[20]   $Message[45]
$Message[72] : $Message[19]   $Message[21]   $Message[59]   $Message[33]   $Message[34]
$Message[23] : $Message[37]   $Message[24]
$Message[2] : $Message[22]   $Message[31]
$Message[76]
"; + print ""; + print ""; + print "\n"; + if ($QueryString !~ /output=/i) { # If main page asked + print "\n"; + # Traffic + print ""; + print "\n"; + # Navigation + print ""; + print "\n"; + # Referers + print ""; + print "\n"; + # Others + print ""; + print "\n"; + } + else { + if ($ShowBackLink) { print "\n"; } + } + print "
$Message[7] : $SiteToAnalyze
$Message[35] : "; + foreach my $key (sort keys %LastUpdate) { if ($LastUpdate < $LastUpdate{$key}) { $LastUpdate = $LastUpdate{$key}; } } + if ($LastUpdate) { print Format_Date($LastUpdate); } + else { print "Never updated"; } + print "       "; + if ($AllowToUpdateStatsFromBrowser) { print "$Message[74]"; } + print "
 
$Message[16] : "; + print "$Message[17]   "; + print "".ucfirst($Message[26])."   "; + print "$Message[53]   "; + print "$Message[20]   "; + print "$Message[45]
$Message[72] : "; + print "$Message[19]   "; + print "$Message[21]   "; + print "$Message[59]   "; + print "$Message[33]   "; + print "$Message[34]
$Message[23] : "; + print "$Message[37]   "; + print "$Message[24]
$Message[2] : "; + print "$Message[22]   "; + print "$Message[31]
$Message[76]
\n"; + print "
\n
\n"; } - print "\n"; - print "
\n\n"; if ($QueryString =~ /output=lasthosts/i) { print "$CENTER 
";