From: eldy <> Date: Fri, 10 Dec 2004 22:28:39 +0000 (+0000) Subject: New: Added geoip_org_maxmind plugin and geoip_isp_maxmind plugin X-Git-Tag: AWSTATS_6_3_RELEASE~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42f3bcbb5d9dbab0b9218d0f608f4569e01b6aec;p=thirdparty%2FAWStats.git New: Added geoip_org_maxmind plugin and geoip_isp_maxmind plugin --- diff --git a/wwwroot/cgi-bin/plugins/geoip_city_maxmind.pm b/wwwroot/cgi-bin/plugins/geoip_city_maxmind.pm index 0997116b..196406ec 100755 --- a/wwwroot/cgi-bin/plugins/geoip_city_maxmind.pm +++ b/wwwroot/cgi-bin/plugins/geoip_city_maxmind.pm @@ -289,7 +289,23 @@ sub ShowInfoHost_geoip_city_maxmind { my $param="$_[0]"; # <----- if ($param eq '__title__') { - print "GeoIP
City"; + my $NewLinkParams=${QueryString}; + $NewLinkParams =~ s/(^|&)update(=\w*|$)//i; + $NewLinkParams =~ s/(^|&)output(=\w*|$)//i; + $NewLinkParams =~ s/(^|&)staticlinks(=\w*|$)//i; + $NewLinkParams =~ s/(^|&)framename=[^&]*//i; + my $NewLinkTarget=''; + if ($DetailedReportsOnNewWindows) { $NewLinkTarget=" target=\"awstatsbis\""; } + if (($FrameName eq 'mainleft' || $FrameName eq 'mainright') && $DetailedReportsOnNewWindows < 2) { + $NewLinkParams.="&framename=mainright"; + $NewLinkTarget=" target=\"mainright\""; + } + $NewLinkParams =~ tr/&/&/s; $NewLinkParams =~ s/^&//; $NewLinkParams =~ s/&$//; + if ($NewLinkParams) { $NewLinkParams="${NewLinkParams}&"; } + + print ""; + print "GeoIP
City
"; + print ""; } elsif ($param) { my $ip=0; diff --git a/wwwroot/cgi-bin/plugins/geoip_isp_maxmind.pm b/wwwroot/cgi-bin/plugins/geoip_isp_maxmind.pm index ef768b82..2745dc62 100644 --- a/wwwroot/cgi-bin/plugins/geoip_isp_maxmind.pm +++ b/wwwroot/cgi-bin/plugins/geoip_isp_maxmind.pm @@ -104,8 +104,8 @@ sub AddHTMLGraph_geoip_isp_maxmind { my $rest_p; my $rest_h; my $rest_k; if ($Debug) { debug(" Plugin geoip_isp_maxmind: AddHTMLGraph $categ $menu $menulink $menutext"); } - my $title='Cities'; - &tab_head("$title",19,0,'cities'); + my $title='ISP'; + &tab_head("$title",19,0,'isp'); print "ISP : ".((scalar keys %_isp_h)-($_isp_h{'unknown'}?1:0)).""; if ($ShowISP =~ /P/i) { print "$Message[56]"; } if ($ShowISP =~ /P/i) { print "$Message[15]"; } @@ -185,7 +185,23 @@ sub ShowInfoHost_geoip_isp_maxmind { my $param="$_[0]"; # <----- if ($param eq '__title__') { - print "GeoIP
ISP"; + my $NewLinkParams=${QueryString}; + $NewLinkParams =~ s/(^|&)update(=\w*|$)//i; + $NewLinkParams =~ s/(^|&)output(=\w*|$)//i; + $NewLinkParams =~ s/(^|&)staticlinks(=\w*|$)//i; + $NewLinkParams =~ s/(^|&)framename=[^&]*//i; + my $NewLinkTarget=''; + if ($DetailedReportsOnNewWindows) { $NewLinkTarget=" target=\"awstatsbis\""; } + if (($FrameName eq 'mainleft' || $FrameName eq 'mainright') && $DetailedReportsOnNewWindows < 2) { + $NewLinkParams.="&framename=mainright"; + $NewLinkTarget=" target=\"mainright\""; + } + $NewLinkParams =~ tr/&/&/s; $NewLinkParams =~ s/^&//; $NewLinkParams =~ s/&$//; + if ($NewLinkParams) { $NewLinkParams="${NewLinkParams}&"; } + + print ""; + print "GeoIP
ISP
"; + print ""; } elsif ($param) { my $ip=0; diff --git a/wwwroot/cgi-bin/plugins/geoip_org_maxmind.pm b/wwwroot/cgi-bin/plugins/geoip_org_maxmind.pm index d9c1faab..4eabaf10 100644 --- a/wwwroot/cgi-bin/plugins/geoip_org_maxmind.pm +++ b/wwwroot/cgi-bin/plugins/geoip_org_maxmind.pm @@ -104,8 +104,8 @@ sub AddHTMLGraph_geoip_org_maxmind { my $rest_p; my $rest_h; my $rest_k; if ($Debug) { debug(" Plugin geoip_org_maxmind: AddHTMLGraph $categ $menu $menulink $menutext"); } - my $title='Cities'; - &tab_head("$title",19,0,'cities'); + my $title='Organizations'; + &tab_head("$title",19,0,'org'); print "Organizations : ".((scalar keys %_org_h)-($_org_h{'unknown'}?1:0)).""; if ($ShowISP =~ /P/i) { print "$Message[56]"; } if ($ShowISP =~ /P/i) { print "$Message[15]"; } @@ -185,7 +185,23 @@ sub ShowInfoHost_geoip_org_maxmind { my $param="$_[0]"; # <----- if ($param eq '__title__') { - print "GeoIP
Org"; + my $NewLinkParams=${QueryString}; + $NewLinkParams =~ s/(^|&)update(=\w*|$)//i; + $NewLinkParams =~ s/(^|&)output(=\w*|$)//i; + $NewLinkParams =~ s/(^|&)staticlinks(=\w*|$)//i; + $NewLinkParams =~ s/(^|&)framename=[^&]*//i; + my $NewLinkTarget=''; + if ($DetailedReportsOnNewWindows) { $NewLinkTarget=" target=\"awstatsbis\""; } + if (($FrameName eq 'mainleft' || $FrameName eq 'mainright') && $DetailedReportsOnNewWindows < 2) { + $NewLinkParams.="&framename=mainright"; + $NewLinkTarget=" target=\"mainright\""; + } + $NewLinkParams =~ tr/&/&/s; $NewLinkParams =~ s/^&//; $NewLinkParams =~ s/&$//; + if ($NewLinkParams) { $NewLinkParams="${NewLinkParams}&"; } + + print ""; + print "GeoIP
Org
"; + print ""; } elsif ($param) { my $ip=0; diff --git a/wwwroot/cgi-bin/plugins/geoip_region_maxmind.pm b/wwwroot/cgi-bin/plugins/geoip_region_maxmind.pm index 7c5ab0fb..6b86e950 100755 --- a/wwwroot/cgi-bin/plugins/geoip_region_maxmind.pm +++ b/wwwroot/cgi-bin/plugins/geoip_region_maxmind.pm @@ -282,7 +282,23 @@ sub ShowInfoHost_geoip_region_maxmind { my $param="$_[0]"; # <----- if ($param eq '__title__') { - print "GeoIP
Region"; + my $NewLinkParams=${QueryString}; + $NewLinkParams =~ s/(^|&)update(=\w*|$)//i; + $NewLinkParams =~ s/(^|&)output(=\w*|$)//i; + $NewLinkParams =~ s/(^|&)staticlinks(=\w*|$)//i; + $NewLinkParams =~ s/(^|&)framename=[^&]*//i; + my $NewLinkTarget=''; + if ($DetailedReportsOnNewWindows) { $NewLinkTarget=" target=\"awstatsbis\""; } + if (($FrameName eq 'mainleft' || $FrameName eq 'mainright') && $DetailedReportsOnNewWindows < 2) { + $NewLinkParams.="&framename=mainright"; + $NewLinkTarget=" target=\"mainright\""; + } + $NewLinkParams =~ tr/&/&/s; $NewLinkParams =~ s/^&//; $NewLinkParams =~ s/&$//; + if ($NewLinkParams) { $NewLinkParams="${NewLinkParams}&"; } + + print ""; + print "GeoIP
Region
"; + print ""; } elsif ($param) { my $ip=0;