From: eldy <>
Date: Thu, 7 Dec 2000 23:23:24 +0000 (+0000)
Subject: Correct bug of bad links when web site requested for stats is not site where awstats...
X-Git-Tag: AWSTATS_1_0~369
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16b8ea9ccf04c028853dcac543232fd0a6cd037c;p=thirdparty%2FAWStats.git
Correct bug of bad links when web site requested for stats is not site where awstats is runned from.
---
diff --git a/awstats.pl b/awstats.pl
index f6a0c10d..cada3a47 100644
--- a/awstats.pl
+++ b/awstats.pl
@@ -13,7 +13,7 @@
#-------------------------------------------------------
# Defines
#-------------------------------------------------------
-$VERSION="2.23p";
+$VERSION="2.23q";
$Lang=0;
# Default value
@@ -1476,8 +1476,8 @@ if ($YearRequired eq "") { $YearRequired=$nowyear; }
if ($QueryString =~ /month=/) { $MonthRequired=$QueryString; $MonthRequired =~ s/.*month=//; $MonthRequired =~ s/&.*//; }
if ($MonthRequired eq "") { $MonthRequired=$nowmonth; }
-$BrowsersHash{"netscape"}="Netscape (Versions)";
-$BrowsersHash{"msie"}="MS Internet Explorer (Versions)";
+$BrowsersHash{"netscape"}="Netscape (Versions)";
+$BrowsersHash{"msie"}="MS Internet Explorer (Versions)";
if (@HostAliases == 0) {
warning("Warning: HostAliases parameter is not defined, $PROG will choose \"$LocalSite localhost 127.0.0.1\".");
@@ -1515,14 +1515,14 @@ print "\n
";
-print "
\n";
+print "
\n";
if ($ShowFlagLinks == 1) {
- if ($Lang != 0) { print "
\n"; }
- if ($Lang != 1) { print "
\n"; }
- if ($Lang != 2) { print "
\n"; }
- if ($Lang != 3) { print "
\n"; }
- if ($Lang != 4) { print "
\n"; }
- if ($Lang != 5) { print "
\n"; }
+ if ($Lang != 0) { print "
\n"; }
+ if ($Lang != 1) { print "
\n"; }
+ if ($Lang != 2) { print "
\n"; }
+ if ($Lang != 3) { print "
\n"; }
+ if ($Lang != 4) { print "
\n"; }
+ if ($Lang != 5) { print "
\n"; }
print "
";
}
print "$message[54][$Lang]
\n";
@@ -2554,7 +2554,7 @@ if ($MonthRequired eq "year") { print "
$message[5][$Lang] $monthlib{$MonthRequired} $YearRequired "; }
# Show links for possible years
foreach $key (keys %listofyears) {
- print "$message[6][$Lang] $key ";
+ print "$message[6][$Lang] $key ";
}
print " | ";
print "$message[9][$Lang] | ";
@@ -2595,19 +2595,19 @@ for ($ix=1; $ix<=12; $ix++) {
$bredde_k=$MonthBytes{$monthix.$YearRequired}/$max_k*$BarHeight/2;
$kilo=int(($MonthBytes{$monthix.$YearRequired}/1024)*100)/100;
print "";
- print " ";
- print " ";
+ print " ";
+ print " ";
print " ";
- print " ";
- print " ";
- print " ";
+ print " ";
+ print " ";
+ print " ";
print " | \n";
}
print "";
for ($ix=1; $ix<=12; $ix++) {
$monthix=$ix; if ($monthix < 10) { $monthix="0$monthix"; }
- print "| $monthlib{$monthix} | ";
+ print "$monthlib{$monthix} | ";
}
print "
";
@@ -2657,9 +2657,9 @@ foreach $key (@sortdomains_p) {
}
print "$_domener_p{$key} | $_domener_h{$key} | $kilo | ";
print "";
- print "![\"$message[56][$Lang]:](\"$DirIcons\/other\/$BarImageHorizontal_p\") \n";
- print "![\"$message[57][$Lang]:](\"$DirIcons\/other\/$BarImageHorizontal_h\") \n";
- print " ";
+ print "![\"$message[56][$Lang]: \"$message[56][$Lang]:](\"$DirIcons\/other\/$BarImageHorizontal_p\") \n";
+ print "![\"$message[57][$Lang]: \"$message[57][$Lang]:](\"$DirIcons\/other\/$BarImageHorizontal_h\") \n";
+ print " ";
print " | \n";
}
&tab_end;
@@ -2677,7 +2677,7 @@ foreach $key (@sorthosts_p)
if ($_hostmachine_h{$key}>=$MinHitHost) {
$kilo=int(($_hostmachine_k{$key}/1024)*100)/100;
if ($key eq "Unknown") {
- print "| $message[1][$Lang] | $_hostmachine_p{$key} | $_hostmachine_h{$key} | $kilo | $message[3][$Lang] |
\n";
+ print "| $message[1][$Lang] | $_hostmachine_p{$key} | $_hostmachine_h{$key} | $kilo | $message[3][$Lang] |
\n";
}
else {
$yearcon=substr($_hostmachine_l{$key},0,4);
@@ -2746,7 +2746,7 @@ foreach $key (@sortsiders) {
if ($ShowLinksOnUrl) { print "$nompage"; }
else { print "$nompage"; }
$bredde=$BarWidth*$_sider_p{$key}/$max+1;
- print "$_sider_p{$key} | ![\"$message[56][$Lang]:](\"$DirIcons\/other\/$BarImageHorizontal_p\") | \n";
+ print "$_sider_p{$key} | ![\"$message[56][$Lang]: \"$message[56][$Lang]:](\"$DirIcons\/other\/$BarImageHorizontal_p\") | \n";
}
$count++;
}
@@ -2779,15 +2779,16 @@ print "\n";
print "\n\n";
for ($ix=0; $ix<=23; $ix++) {
- if ($max_h > 0) { $bredde_p=$BarHeight*$_time_p[$ix]/$max_h+1; }
- if ($max_h > 0) { $bredde_h=$BarHeight*$_time_h[$ix]/$max_h+1; }
- if ($max_k > 0) { $bredde_k=$BarHeight*$_time_k[$ix]/$max_k+1; }
- $kilo=int(($_time_k[$ix]/1024)*100)/100;
- print "";
- print " ";
- print " ";
- print " ";
- print " | \n";
+ $bredde_p=0;$bredde_h=0;$bredde_k=0;
+ if ($max_h > 0) { $bredde_p=($BarHeight*$_time_p[$ix]/$max_h)+1; }
+ if ($max_h > 0) { $bredde_h=($BarHeight*$_time_h[$ix]/$max_h)+1; }
+ if ($max_k > 0) { $bredde_k=($BarHeight*$_time_k[$ix]/$max_k)+1; }
+ $kilo=int(($_time_k[$ix]/1024)*100)/100;
+ print "";
+ print " ";
+ print " ";
+ print " ";
+ print " | \n";
}
print "
\n";
@@ -2803,7 +2804,7 @@ print "| Browser | | $message[0][$Lang] | $_browser_h{$key} | $p % |
\n";
+ print "| $message[0][$Lang] | $_browser_h{$key} | $p % |
\n";
}
else {
print "| $BrowsersHash{$key} | $_browser_h{$key} | $p % |
\n";
@@ -2821,7 +2822,7 @@ print "| OS | |  | $message[0][$Lang] | $_os_h{$key} | ";
+ print "
|---|
 | $message[0][$Lang] | $_os_h{$key} | ";
print "$p % |
\n";
}
else {
@@ -2919,7 +2920,7 @@ foreach $key (@sorterrors) {
$p=int($_errors_h{$key}/$TotalErrors*1000)/10;
if ($httpcode{$key}) { print ""; }
else { print "
"; }
- if ($key == 404) { print "| $key | "; }
+ if ($key == 404) { print "$key | "; }
else { print "$key | "; }
if ($httpcode{$key}) { print "$httpcode{$key} | $_errors_h{$key} | $p % |
\n"; }
else { print "Unknown error | $_errors_h{$key} | $p % | \n"; }