]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
webmin: Add link to popup to show geoip data file version
authoreldy <>
Sun, 5 Dec 2004 22:40:09 +0000 (22:40 +0000)
committereldy <>
Sun, 5 Dec 2004 22:40:09 +0000 (22:40 +0000)
tools/webmin/awstats/config.info
tools/webmin/awstats/edit_config.cgi

index 098623230e78363179a40bcb94ccc913db4cd9bc..44bcf87411a892840be23f4445cd8404a3fcae3a 100644 (file)
@@ -1,6 +1,6 @@
 awstats=Absolute filesystem path to AWStats (CLI),0
 awstats_cgi=Absolute or relative URL path to AWStats (CGI),0
 alt_conf=Sample AWStats configuration file,3,/etc/awstats/awstats.model.conf
-plugin_1_geoip_=Path for GeoIP country database file <small>(if AWStats geoip plugin is enabled)</small>,3,/usr/local/share/GeoIP/GeoIP.dat
-plugin_2_geoip_region=Path for GeoIP region database file <small>(if AWStats geoip_region_maxmind plugin is enabled)</small>,3,/usr/local/share/GeoIP/GeoIPRegion.dat
+plugin_1_geoip=Path for GeoIP country database file <small>(if AWStats geoip plugin is enabled)</small>,3,/usr/local/share/GeoIP/GeoIP.dat
+plugin_2_geoip_region_maxmind=Path for GeoIP region database file <small>(if AWStats geoip_region_maxmind plugin is enabled)</small>,3,/usr/local/share/GeoIP/GeoIPRegion.dat
 plugin_3_geoip_city_maxmind=Path for GeoIP city database file <small>(if AWStats geoip_city_maxmind plugin is enabled)</small>,3,/usr/local/share/GeoIP/GeoIPCity.dat
index e641d5a1d1745388486467a9ff94ebb7c757fd65..04acdf90c611cb1a2fb0b82ec27e882d47673fa2 100644 (file)
@@ -566,7 +566,18 @@ if ($in{'advanced'} == 4) {
 
        print "<tr> <td>Loaded plugins</td> <td>Plugin's parameters</td> <td> &nbsp; </td> </tr>\n";
        foreach my $key (0..(@pconfparam-1)) {
-               print "<tr> <td> <input size=10 name=plugin_$pconfparam[$key] type=checkbox ".($pconfactive[$key]?" checked":"")."><b>$pconfparam[$key]</b></td> <td> <input size=30 name=plugin_param_$pconfparam[$key] type=text value='$pconfvaluep[$key]'> </td> <td> ";
+               print "<tr> <td> <input size=10 name=plugin_$pconfparam[$key] type=checkbox ".($pconfactive[$key]?" checked":"")."><b>$pconfparam[$key]</b></td> <td> <input size=30 name=plugin_param_$pconfparam[$key] type=text value='$pconfvaluep[$key]'> ";
+        my ($p,$geoipdatafile)=();
+        if ($pconfparam[$key] =~ /^geoip$/) { $p="GeoIP Country"; $geoipdatafile=$config{'plugin_1_geoip'}||"/usr/local/share/GeoIP/GeoIP.dat"; }
+        if ($pconfparam[$key] =~ /^geoip_region_maxmind$/) { $p="GeoIP Region"; $geoipdatafile=$config{'plugin_2_geoip_region_maxmind'}||"/usr/local/share/GeoIP/GeoIPRegion.dat"; }
+        if ($pconfparam[$key] =~ /^geoip_city_maxmind$/) { $p="GeoIP City"; $geoipdatafile=$config{'plugin_3_geoip_city_maxmind'}||"/usr/local/share/GeoIP/GeoIPCity.dat"; }
+        if ($p) {
+            # If a geoip plugin
+            my $datafile=$geoipdatafile;
+            if ($pconfvaluep[$key] =~ /^\w+\s+(.+)$/) { $datafile=$1; }
+            print "<a href=\"geoip_version.pl?file=$datafile\">$p database version</a>";
+        }
+               print " </td> <td> ";
                print &hblink($text{'help_help'}, "help.cgi?param=plugin_$pconfparam[$key]")." </td> </tr>\n";
        }       
        print "<tr> <td colspan=3 align=center><a href='edit_config.cgi?".($in{'new'}?"new=1&":"")."&file=$in{'file'}'>$text{'index_hideadvanced'}</a> <input type=\"hidden\" name=\"advanced\" value=\"4\"></td></tr>\n";