awstats/ 0000777 0001750 0001750 00000000000 11477023014 012733 5 ustar ldestail ldestail awstats/config 0000777 0001750 0001750 00000000216 07754047674 014152 0 ustar ldestail ldestail awstats=/usr/local/awstats/wwwroot/cgi-bin/awstats.pl
awstats_cgi=http://127.0.0.1/awstats/awstats.pl
alt_conf=/etc/awstats/awstats.model.conf awstats/uninstall.pl 0000777 0001750 0001750 00000000161 07731113340 015302 0 ustar ldestail ldestail # uninstall.pl
# Called when webmin is uninstalled
require 'awstats-lib.pl';
sub module_uninstall
{
}
1;
awstats/defaultacl 0000777 0001750 0001750 00000000114 07754047614 015000 0 ustar ldestail ldestail noconfig=0
view=1
update=1
dir=/etc/awstats ~/awstats
user=*
global=1
add=1
awstats/save_config.cgi 0000777 0001750 0001750 00000007250 10065355524 015717 0 ustar ldestail ldestail #!/usr/bin/perl
# save_config.cgi
# Save, create or delete options for a config file
require './awstats-lib.pl';
&foreign_require("cron", "cron-lib.pl");
&ReadParse();
&error_setup($text{'save_err'});
if (! $in{'file'}) { $in{'file'}=$in{'new'}; }
if ($in{'new'} && ! $access{'add'}) { &error($text{'edit_ecannot'}); }
if (! $in{'new'} && $access{'edit'}) { &error($text{'edit_ecannot'}); }
if ($in{'view'}) {
my $dir=$in{'file'}; $dir =~ s/[\\\/][^\\\/]+$//;
if (! $dir) { $dir="/etc/awstats"; }
&can_edit_config($in{'file'}) || &error($text{'edit_efilecannot'}." ".$in{'file'});
# Re-direct to the view page
&redirect("view_config.cgi/".&urlize(&urlize($in{'file'}))."/index.html");
}
elsif ($in{'delete'}) {
my $dir=$in{'file'}; $dir =~ s/[\\\/][^\\\/]+$//;
if (! $dir) { $dir="/etc/awstats"; }
&can_edit_config($in{'file'}) || &error($text{'edit_efilecannot'}." ".$in{'file'});
# Delete this config file from the configuration
local $cfile = $in{'file'};
local $cfileold = $in{'file'}.".old";
&lock_file($cfile); unlink($cfile); &unlock_file($cfile);
&lock_file($cfileold); unlink($cfileold); &unlock_file($cfileold);
&webmin_log("delete", "log", $cfile);
# Create or delete the cron job
# &lock_file($job->{'file'});
# &foreign_call("cron", "delete_cron_job", $job);
# &unlock_file($job->{'file'});
}
else {
# Validate and store inputs. $in{'new'} is new file to create or update.
if (!$in{'new'} && !$in{'file'}) { &error($text{'save_efile'}); }
my $dir=$in{'file'}; $dir =~ s/[\\\/][^\\\/]+$//;
if (! $dir) { $dir="/etc/awstats"; }
if (! &can_edit_config($dir)) {
&error(&text('save_edir',"$dir")."
\n".&text('index_changeallowed',"Menu Webmin - Utilisateurs Webmin puis clic sur $text{'index_title'}")."
\n");
}
if ($in{'new'} && -r $in{'$file'}) { &error($text{'save_fileexists'}); }
if (! -d $dir) { &error($text{'save_dirnotexists'}); }
my $modelconf=$config{'alt_conf'};
# If create by copy
if ($in{'new'} && $in{'create_mode'} eq 'by_copy') {
$modelconf=$in{'file_to_copy'};
$in{'new'} =~ s/([^\\\/]+)$//;
my $to=$1;
if (! $modelconf || ! -r $modelconf) { &error('You must choose a config to copy'); }
# Add a new config file
&system_logged("cp '$modelconf' '$dir/$to'");
}
else {
%conf=();
foreach my $key (keys %in) {
if ($key eq 'file') { next; }
if ($key eq 'new') { next; }
if ($key eq 'submit') { next; }
if ($key eq 'oldfile') { next; }
$conf{$key} = $in{$key};
if ($conf{key} ne ' ') {
$conf{$key} =~ s/^\s+//;
$conf{$key} =~ s/\s+$//;
}
}
if ($conf{'LogSeparator'} eq '') { $conf{'LogSeparator'}=' '; }
# Check data
my $logfile='';
if ($conf{'LogFile'} !~ /|\s*$/) { # LogFile is not a piped valued
$logfile=$conf{'LogFile'};
}
else { # LogFile is piped
# It can be
# '/xxx/maillogconvert.pl standard /aaa/mail.log |'
# '/xxx/logresolvermerge.pl *'
# TODO test something here ?
}
if ($logfile && ! -r $logfile) { &error(&text(save_errLogFile,$logfile)); }
if (! $conf{'SiteDomain'}) { &error(&text(save_errSiteDomain,$conf{'SiteDomain'})); }
if (! -d $conf{'DirData'}) { &error(&text(save_errDirData,$conf{'DirData'})); }
if ($in{'new'}) {
# Add a new config file
&system_logged("cp '$modelconf' '$in{'new'}'");
}
# Update the config file's options
local $cfile = $in{'file'};
&lock_file($cfile);
&update_config($cfile, \%conf);
&unlock_file($cfile);
}
&webmin_log($in{'new'} ? "create" : "modify", "log", $in{'file'});
}
&redirect("");
awstats/config.info.zh_TW.UTF-8 0000777 0001750 0001750 00000002767 10777234256 016746 0 ustar ldestail ldestail awstats=更新 AWStats 紀錄的完整檔案路徑和指令
(例如:/usr/local/awstats/wwwroot/cgi-bin/awstats.pl),0
awstats_cgi=AWStats CGI 的 URL 絕對或者是相對路徑
(例如:/awstats/awstats.pl),0
alt_conf=AWStats 設定檔樣本,3,/etc/awstats/awstats.model.conf
plugin_1_geoip=Maxmind GeoIP 國家資料庫檔案 路徑
(如果 AWStats geoip 擴充套件始啟動的情況下),3,/usr/local/share/GeoIP/GeoIP.dat
plugin_2_geoip_region_maxmind=Maxmind GeoIP 區域資料庫檔案 路徑
(如果 AWStats geoip_region_maxmind 擴充套件始啟動的情況下),3,/usr/local/share/GeoIP/GeoIPRegion.dat
plugin_3_geoip_city_maxmind=Maxmind GeoIP 程式資料庫檔案 路徑
(如果 AWStats geoip_city_maxmind 擴充套件始啟動的情況下),3,/usr/local/share/GeoIP/GeoIPCity.dat
plugin_4_geoip_isp_maxmind=Maxmind GeoIP isp 資料庫檔案 路徑
(如果 AWStats geoip_isp_maxmind 擴充套件始啟動的情況下),3,/usr/local/share/GeoIP/GeoIPISP.dat
plugin_5_geoip_org_maxmind=Maxmind GeoIP org 資料庫檔案 路徑
(如果 AWStats geoip_org_maxmind 擴充套件始啟動的情況下),3,/usr/local/share/GeoIP/GeoIPOrg.dat
awstats/help.cgi 0000777 0001750 0001750 00000003045 07733455424 014372 0 ustar ldestail ldestail #!/usr/bin/perl
# help.cgi
# Show help for a config parameter
require './awstats-lib.pl';
&ReadParse();
# Display file contents
&header($title || $text{'help_title'}, "", undef, 0, 1, 1);
print "