awstats/0040777000175700010010000000000010176535011012016 5ustar LaurentAucunawstats/acl_security.pl0100555000175700010010000000463210014464036015037 0ustar LaurentAucun do 'awstats-lib.pl'; # acl_security_form(&options) # Output HTML for editing security options for the awstats module sub acl_security_form { print " $text{'acl_view'}\n"; printf " %s\n", $_[0]->{'view'} ? "checked" : "", $text{'yes'}; printf " %s \n", $_[0]->{'view'} ? "" : "checked", $text{'no'}; print " $text{'acl_global'}\n"; printf " %s\n", $_[0]->{'global'} ? "checked" : "", $text{'yes'}; printf " %s \n", $_[0]->{'global'} ? "" : "checked", $text{'no'}; print " $text{'acl_add'}\n"; printf " %s\n", $_[0]->{'add'} ? "checked" : "", $text{'yes'}; printf " %s \n", $_[0]->{'add'} ? "" : "checked", $text{'no'}; print " $text{'acl_update'}\n"; printf " %s\n", $_[0]->{'update'} ? "checked" : "", $text{'yes'}; printf " %s \n", $_[0]->{'update'} ? "" : "checked", $text{'no'}; print " $text{'acl_user'}\n"; printf " %s\n", $_[0]->{'user'} eq "" ? "checked" : "", $text{'acl_this'}; printf " %s\n", $_[0]->{'user'} eq "*" ? "checked" : "", $text{'acl_any'}; printf "\n", $_[0]->{'user'} eq "*" || $_[0]->{'user'} eq "" ? "" : "checked"; printf " %s \n", $_[0]->{'user'} eq "*" ? "" : $_[0]->{'user'}, &user_chooser_button("user"); print " $text{'acl_dir'}\n"; print " \n"; } # acl_security_save(&options) # Parse the form for security options for the shell module sub acl_security_save { $_[0]->{'view'} = $in{'view'}; $_[0]->{'global'} = $in{'global'}; $_[0]->{'add'} = $in{'add'}; $_[0]->{'update'} = $in{'update'}; $_[0]->{'dir'} = $in{'dir'}; $_[0]->{'user'} = $in{'user_def'} == 2 ? "*" : $in{'user_def'} == 1 ? "" : $in{'user'}; } awstats/awstats-lib.pl0100777000175700010010000003467510161324231014616 0ustar LaurentAucun# awstats-lib.pl # Common functions for editing the awstats config file do '../web-lib.pl'; require '../javascript-lib.pl'; &init_config(); #$config{'awstats'}||='/usr/local/awstats/wwwroot/cgi-bin/awstats.pl'; $config{'awstats_conf'}||='/etc/awstats'; $config{'alt_conf'}||='/etc/awstats/awstats.model.conf'; $ENV{'AWSTATS_DEL_GATEWAY_INTERFACE'}=1; $cron_cmd = "$module_config_directory/awstats.pl"; %access = &get_module_acl(); #------------------------------------------------------------------------------ # Function: Show help tooltip # Parameters: message urltotooltip # Input: None # Output: None # Return: None #------------------------------------------------------------------------------ sub hblink { my $t=shift; my $url=shift; print "$t"; } #------------------------------------------------------------------------------ # Function: Update the awstats config file # Parameters: configfile conf # Input: None # Output: None # Return: None #------------------------------------------------------------------------------ sub update_config { my ($file,$conf)=@_; if (! $file) { error("Call to update_config with wrong parameter"); } open(FILE, $file) || error("Failed to open $file for update"); open(FILETMP, ">$file.tmp") || error("Failed to open $file.tmp for writing"); # $%conf contains param and values my %confchanged=(); my $conflinenb = 0; # First, change values that are already present in old config file while() { my $savline=$_; chomp $_; s/\r//; $conflinenb++; # Remove comments not at beginning of line $_ =~ s/\s#.*$//; # Extract param and value my ($param,$value)=split(/=/,$_,2); $param =~ s/^\s+//; $param =~ s/\s+$//; $value =~ s/#.*$//; $value =~ s/^[\s\'\"]+//; $value =~ s/[\s\'\"]+$//; if ($param) { # cleanparam is param without begining # my $cleanparam=$param; my $wascleaned=0; if ($cleanparam =~ s/^#//) { $wascleaned=1; } if ($cleanparam !~ /LoadPlugin/i && defined($conf->{$cleanparam})) { # Value was provided from submit form in %conf hash array so we change line with this new value $savline = "$cleanparam=\"".($conf->{$cleanparam})."\"\n"; $confchanged{$cleanparam}=1; } if ($cleanparam =~ /^LoadPlugin/i && $conf->{"advanced"} == 4) { # It's a plugin load directive my ($pluginname,$pluginparam)=split(/\s/,$value,2); if ($conf->{"plugin_$pluginname"}) { # Plugin loaded is asked $savline = "$cleanparam=\"$pluginname".($conf->{"plugin_param_$pluginname"}?" ".$conf->{"plugin_param_$pluginname"}:"")."\"\n"; } else { # Plugin loaded is not asked $savline = "#$cleanparam=\"$pluginname".($conf->{"plugin_param_$pluginname"}?" ".$conf->{"plugin_param_$pluginname"}:"")."\"\n"; } $confchanged{"plugin_$pluginname"}=1; } } # Write line print FILETMP "$savline"; } # Now add values for directives that were not present in old config file foreach my $key (keys %$conf) { if ($key eq 'advanced') { next; } # param to know if plugin setup section was opened if ($key =~ /^plugin_/) { next; } # field from plugin section, not an awstats directive if ($confchanged{$key}) { next; } # awstats directive already changed print FILETMP "\n"; print FILETMP "# Param $key added by AWStats Webmin module\n"; print FILETMP "$key=\"$conf->{$key}\"\n"; } # Now add plugin load that were not already present in old config file foreach my $key (keys %$conf) { my $pluginname = $key; if ($pluginname !~ s/^plugin_//) { next; } # not a plugin load row if ($pluginname =~ /^param_/) { next; } # not a plugin load row if ($confchanged{"plugin_$pluginname"}) { next; } # awstats directive or load plugin already changed print FILETMP "\n"; print FILETMP "# Plugin load for plugin $pluginname added by AWStats Webmin module\n"; print FILETMP "LoadPlugin=\"$pluginname".($conf->{"plugin_param_$pluginname"}?" ".$conf->{"plugin_param_$pluginname"}:"")."\"\n"; } close(FILE); close(FILETMP); # Move file to file.sav if (rename("$file","$file.old")==0) { error("Failed to make backup of current config file to $file.old"); } # Move tmp file into config file if (rename("$file.tmp","$file")==0) { error("Failed to move tmp config file $file.tmp to $file"); } return 0; } #------------------------------------------------------------------------------ # Function: Read config file to return value of dirdata parameter # Parameters: configfile # Input: None # Output: None # Return: string dirdata #------------------------------------------------------------------------------ sub get_dirdata { my $dirdata="notfound"; my ($file)=@_; if (! $file) { error("Call to get_dirdata with wrong parameter"); } open(FILE, "<$file") || error("Failed to open $file for read"); # First, search value of DirData parameter while() { my $savline=$_; chomp $_; s/\r//; # Remove comments not at beginning of line $_ =~ s/\s#.*$//; # Extract param and value my ($param,$value)=split(/=/,$_,2); $param =~ s/^\s+//; $param =~ s/\s+$//; $value =~ s/#.*$//; $value =~ s/^[\s\'\"]+//; $value =~ s/[\s\'\"]+$//; if ($param) { # cleanparam is param without begining # my $cleanparam=$param; my $wascleaned=0; if ($cleanparam =~ s/^#//) { $wascleaned=1; } if ($cleanparam =~ /^DirData/) { $dirdata=$value; last; } } } close(FILE); return $dirdata; } use vars qw/ $regclean1 $regclean2 /; $regclean1=qr/<(recnb|\/td)>/i; $regclean2=qr/<\/?[^<>]+>/i; #------------------------------------------------------------------------------ # Function: Clean tags in a string # Parameters: stringtodecode # Input: None # Output: None # Return: decodedstring #------------------------------------------------------------------------------ sub CleanFromTags { my $stringtoclean=shift; $stringtoclean =~ s/$regclean1/ /g; # Replace or with space $stringtoclean =~ s/$regclean2//g; # Remove return $stringtoclean; } #------------------------------------------------------------------------------ # Function: Format value in bytes in a string (Bytes, Kb, Mb, Gb) # Parameters: bytes (integer value or "0.00") # Input: None # Output: None # Return: "x.yz MB" or "x.yy KB" or "x Bytes" or "0" #------------------------------------------------------------------------------ sub Format_Bytes { my $bytes = shift||0; my $fudge = 1; # Do not use exp/log function to calculate 1024power, function make segfault on some unix/perl versions if ($bytes >= ($fudge << 30)) { return sprintf("%.2f", $bytes/1073741824)." $text{'all_gb'}"; } if ($bytes >= ($fudge << 20)) { return sprintf("%.2f", $bytes/1048576)." $text{'all_mb'}"; } if ($bytes >= ($fudge << 10)) { return sprintf("%.2f", $bytes/1024)." $text{'all_kb'}"; } if ($bytes < 0) { $bytes="?"; } return int($bytes).(int($bytes)?" $text{'all_b'}":""); } #------------------------------------------------------------------------------ # Function: Format a number # Parameters: number # Input: None # Output: None # Return: "999 999 999 999" #------------------------------------------------------------------------------ sub Format_Number { my $number = shift||0; $number=~s/(\d)(\d\d\d)$/$1 $2/; $number=~s/(\d)(\d\d\d\s\d\d\d)$/$1 $2/; $number=~s/(\d)(\d\d\d\s\d\d\d\s\d\d\d)$/$1 $2/; return $number; } #------------------------------------------------------------------------------ # Function: save_directive(&config, name, [value]*) # Parameters: &config name [value]* # Input: None # Output: None # Return: None #------------------------------------------------------------------------------ sub save_directive { local ($conf, $name, @values) = @_; local @old = &find($name, $conf); local $lref = &read_file_lines($conf->[0]->{'file'}); local $i; for($i=0; $i<@old || $i<@values; $i++) { if ($i < @old && $i < @values) { # Just replacing a line $lref->[$old[$i]->{'line'}] = "$name $values[$i]"; } elsif ($i < @old) { # Deleting a line splice(@$lref, $old[$i]->{'line'}, 1); &renumber($conf, $old[$i]->{'line'}, -1); } elsif ($i < @values) { # Adding a line if (@old) { # after the last one of the same type splice(@$lref, $old[$#old]->{'line'}+1, 0, "$name $values[$i]"); &renumber($conf, $old[$#old]->{'line'}+1, 1); } else { # at end of file push(@$lref, "$name $values[$i]"); } } } } #------------------------------------------------------------------------------ # Function: renumber # Parameters: &config line offset # Input: None # Output: None # Return: None #------------------------------------------------------------------------------ sub renumber { foreach $c (@{$_[0]}) { $c->{'line'} += $_[2] if ($c->{'line'} >= $_[1]); } } #------------------------------------------------------------------------------ # Function: temp_file_name # Parameters: file # Input: None # Output: None # Return: temp_file #------------------------------------------------------------------------------ sub temp_file_name { local $p = $_[0]; $p =~ s/^\///; $p =~ s/\//_/g; return "$module_config_directory/$p.tmp"; } #------------------------------------------------------------------------------ # Function: find # Parameters: name &config #------------------------------------------------------------------------------ sub find { local @rv; foreach $c (@{$_[1]}) { push(@rv, $c) if (lc($c->{'name'}) eq lc($_[0])); } return wantarray ? @rv : $rv[0]; } #------------------------------------------------------------------------------ # Function: find_value # Parameters: name &config #------------------------------------------------------------------------------ sub find_value { local @rv = map { $_->{'value'} } &find(@_); return wantarray ? @rv : $rv[0]; } #------------------------------------------------------------------------------ # Function: all_config_files # Parameters: file #------------------------------------------------------------------------------ sub all_config_files { $_[0] =~ /^(.*)\/([^\/]+)$/; local $dir = $1; local $base = $2; local ($f, @rv); opendir(DIR, $dir); foreach $f (readdir(DIR)) { if ($f =~ /^\Q$base\E/ && -f "$dir/$f") { push(@rv, "$dir/$f"); } } closedir(DIR); return @rv; } #------------------------------------------------------------------------------ # Function: Get the configuration for some log file # Parameters: path #------------------------------------------------------------------------------ sub get_config { local %rv; &read_file($_[0], \%rv) || return undef; return \%rv; } #------------------------------------------------------------------------------ # Function: generate_report_as_pdf # Parameters: file, handle, escape #------------------------------------------------------------------------------ sub generate_report_as_pdf { local $h = $_[1]; local $lconf = &get_config($_[0]); local @all = &all_config_files($_[0]); if (!@all) { print $h "Log file $_[0] does not exist\n"; return; } local ($a, %mtime); foreach $a (@all) { local @st = stat($a); $mtime{$a} = $st[9]; } local $type = $lconf->{'type'} == 1 ? "" : $lconf->{'type'} == 2 ? "-F squid" : $lconf->{'type'} == 3 ? "-F ftp" : ""; local $cfile = &temp_file_name($_[0]); local $conf = -r $cfile ? "-c $cfile" : ""; if ($lconf->{'over'}) { unlink("$lconf->{'dir'}/awstats.current"); unlink("$lconf->{'dir'}/awstats.hist"); } local $user = $lconf->{'user'} || "root"; if ($user ne "root" && -r $cfile) { chmod(0644, $cfile); } foreach $a (sort { $mtime{$a} <=> $mtime{$b} } @all) { local $cmd = "$config{'awstats'} $conf -o '$lconf->{'dir'}' $type -p '$a'"; if ($user ne "root") { $cmd = "su \"$user\" -c \"$cmd\""; } open(OUT, "$cmd 2>&1 |"); while() { print $h $_[2] ? &html_escape($_) : $_; } close(OUT); return 0 if ($?); &additional_config("exec", undef, $cmd); } return 1; } #------------------------------------------------------------------------------ # Function: spaced_buttons #------------------------------------------------------------------------------ sub spaced_buttons { local $pc = int(100 / scalar(@_)); print "\n"; foreach $b (@_) { local $al = $b eq $_[0] && scalar(@_) != 1 ? "align=left" : $b eq $_[@_-1] && scalar(@_) != 1 ? "align=right" : "align=center"; print "\n"; } print "\n"; print "
$b
\n"; } #------------------------------------------------------------------------------ # Function: Scan directory $dir for config file. Return an array with full path #------------------------------------------------------------------------------ sub scan_config_dir { my $dir=shift; opendir(DIR, $dir) || return; local @rv = grep { /^awstats\.(.*)conf$/ } sort readdir(DIR); closedir(DIR); foreach my $file (0..@rv-1) { if ($rv[$file] eq 'awstats.model.conf') { next; } $rv[$file]="$dir/".$rv[$file]; #print "$rv[0]\n
"; } return @rv; } #------------------------------------------------------------------------------ # Function: can_edit_config #------------------------------------------------------------------------------ sub can_edit_config { foreach $d (split(/\s+/, $access{'dir'})) { local $ok = &is_under_directory($d, $_[0]); return 1 if ($ok); } return 0; } 1; awstats/awstats-webmin_changelog.txt0100777000175700010010000000434610172230465017543 0ustar LaurentAucunAWStats-Webmin module Changelog ------------------------------- $Revision: 1.17 $ - $Author: eldy $ - $Date: 2005/01/15 15:05:25 $ 1.400 New features/improvements: - Some change to add scheduler management for update process. - Creating new config files can be done by copying an old one. - Add a page for a summary of all config files on same pages. - Added a row number on each row of index page. - Translation more complete. - Report GeoIP country, regions, city, isp and organizations versions. 1.300 New features/improvements: - Added a warning to explain to add '/private/etc' to webmin ACL for MacOS users. - A first screen for the schedule update feature. - Better description for ACL page. Fixes: - Translation was in french for some texts, whatever was choosed language. 1.210 New features/improvements: - Added following parameters parameter in edit config area: BuildHistoryFormat BuildReportFormat LevelForFileTypesDetection LevelForWormsDetection URLWithQueryWithOnlyFollowingParameters ShowWormsStats - Removed LinkToIPWhoIs and LinkToWhoIs obsolete parameters. - Module setup parameter awstats_conf has been removed since now directories into wich you can scan/edit AWStats configuration files are defined in ACL users. Defined to /etc/awstats by default. Also added a link the the ACL page to edit this directory listing. - Added a streaming server log file type. Fixes: - Better error messages - Fixed ACL management on directory that contains config files. Other/Documentation: - Added german translation. 1.100 New features/improvements: - All AWStats config parameters can be edited. - Added management of plugins - Added a file/dir selector for parameters that are files or directories. - Added javascript test in edit config pages. - Added a check that LogFile used with maillogconvert.pl has a 'Mail' type. Fixes: - Modify of old config files add the new parameters if not found. - Fixed wrong value saved for LogSeparator parameter. - Better check of old versions incompatibility. - Fix help page for parameters not found in model config file. - Fixed check of logfile for piped values. - Minor bug fixes. Other/Documentation: - Added French translation. - Removed unused files. 1.000 - First release version. awstats/config0100555000175700010010000000021607754050072013206 0ustar LaurentAucunawstats=/usr/local/awstats/wwwroot/cgi-bin/awstats.pl awstats_cgi=http://127.0.0.1/awstats/awstats.pl alt_conf=/etc/awstats/awstats.model.confawstats/config.info0100777000175700010010000000174110155335215014144 0ustar LaurentAucunawstats=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 (if AWStats geoip plugin is enabled),3,/usr/local/share/GeoIP/GeoIP.dat plugin_2_geoip_region_maxmind=Path for GeoIP region database file (if AWStats geoip_region_maxmind plugin is enabled),3,/usr/local/share/GeoIP/GeoIPRegion.dat plugin_3_geoip_city_maxmind=Path for GeoIP city database file (if AWStats geoip_city_maxmind plugin is enabled),3,/usr/local/share/GeoIP/GeoIPCity.dat plugin_4_geoip_isp_maxmind=Path for GeoIP isp database file (if AWStats geoip_isp_maxmind plugin is enabled),3,/usr/local/share/GeoIP/GeoIPISP.dat plugin_5_geoip_org_maxmind=Path for GeoIP org database file (if AWStats geoip_org_maxmind plugin is enabled),3,/usr/local/share/GeoIP/GeoIPOrg.dat awstats/defaultacl0100555000175700010010000000011407754032770014047 0ustar LaurentAucunnoconfig=0 view=1 update=1 dir=/etc/awstats ~/awstats user=* global=1 add=1 awstats/edit_config.cgi0100777000175700010010000014114710156402203014756 0ustar LaurentAucun#!/usr/bin/perl # edit_config.cgi # Display a form for adding a new config or editing an existing one. require './awstats-lib.pl'; &ReadParse(); if (! $access{'global'}) { &error($text{'edit_ecannot'}); } my $filecontent=""; my $filetoopen=""; if ($in{'new'}) { $filetoopen=$config{'alt_conf'}; } else { $filetoopen=$in{'file'}; } if ($in{'new'}) { $access{'add'} || &error($text{'edit_ecannot'}); &header($text{'edit_title1'}, ""); } else { &can_edit_config($in{'file'}) || &error($text{'edit_ecannot'}); &header($text{'edit_title2'}, ""); } # Get parameters $lconf = &get_config($filetoopen); foreach my $key (keys %$lconf) { $lconf->{$key}=~s/^\s*//g; $lconf->{$key}=~s/^*[\"\']//; $lconf->{$key}=~s/#.*$//; $lconf->{$key}=~s/\s*$//g; $lconf->{$key}=~s/[\"\']\s*$//; } # Put in @conflist, list of all existing config my @conflist=(); foreach my $dir (split(/\s+/, $access{'dir'})) { push(@conflist, map { $_->{'custom'} = 1; $_ } &scan_config_dir($dir)); } print "
\n"; print < function Submit_onClick() { EOF # If create if ($in{'new'} && scalar @conflist) { print < 1) ? argv[1] : 640; var h = (argc > 2) ? argv[2] : 450; var wfeatures="directories=0,menubar=1,status=0,resizable=1,scrollbars=1,toolbar=0,width="+l+",height="+h+",left=" + eval("(screen.width - l)/2") + ",top=" + eval("(screen.height - h)/2"); fen=window.open(tmp,'window',wfeatures); } EOF if (-d "/private/etc" && ! &can_edit_config("/private/etc")) { # For MacOS users print "Warning: It seems that you are a MacOS user. With MacOS, the '/etc/awstats' directory is not a hard directory but a link to '/private/etc/awstats' which is not by default an allowed directory to store config files, so if you want to store config files in '/etc/awstats', you must first change the Webmin ACL for AWStats module to add '/private/etc' in the allowed directories list:
\n"; print &text('index_changeallowed',"Webmin - Webmin Users", $text{'index_title'})."
\n"; } print "
\n"; print "\n"; print "\n"; print "
"; if ($in{'new'}) { print &text('edit_headernew'); } else { print &text('edit_header',$in{'file'}); } print "
\n"; my $filenametosave=""; if ($in{'new'}) { print "\n"; print "
$text{'edit_add'} \n"; my $newfile="/etc/awstats/awstats.newconfig.conf"; print ""; print "
\n"; if (scalar @conflist) { print "
".$text{'edit_create_by_copy'}; print "
\n"; print "\n"; print "\n"; print "
$text{'edit_config_to_copy'} \n"; print ""; print "
\n"; } print "
".$text{'edit_create_from_scratch'}; print "
\n"; print "\n"; } else { print "\n"; } print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; if ($in{'advanced'} == 1) { print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; } else { print "\n"; } print "\n"; print "\n"; if ($in{'advanced'} == 2) { print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; } else { print "\n"; } print "\n"; print "\n"; if ($in{'advanced'} == 3) { print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; # print "\n"; # print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; # print "\n"; print "\n"; } else { print "\n"; } print "\n"; print "\n"; if ($in{'advanced'} == 4) { my $conflinenb = 0; my @pconfparam=(); my @pconfvalue=(); my @pconfvaluep=(); my %pluginlinefound=(); # Search the loadable plugins in edited config file open(FILE, $filetoopen) || error("Failed to open $filetoopen for reading plugins' config"); while() { my $savline=$_; chomp $_; s/\r//; $conflinenb++; if ($_ =~ /^#?LoadPlugin/i) { # Extract param and value my ($load,$value)=split(/=/,$_,2); # Remove comments not at beginning of line $param =~ s/^\s+//; $param =~ s/\s+$//; $value =~ s/#.*$//; $value =~ s/^[\s\'\"]+//g; $value =~ s/[\s\'\"]+$//g; ($value1,$value2)=split(/\s/,$value,2); if ($value1 =~ /^graph3d$/i) { next; } if (! $pluginlinefound{$value1}) { # To avoid plugin to be shown twice $pluginlinefound{$value1}=1; push @pconfparam, $value1; push @pconfvaluep, $value2; my $active=0; if ($load !~ /#.*LoadPlugin/i) { $active=1; } push @pconfactive, $active; } } } close FILE; # Search the loadable plugins in sample config file (if not new) if (! $in{'new'}) { open(FILE, $config{'alt_conf'}) || error("Failed to open $config{'alt_conf'} for reading available plugins"); while() { my $savline=$_; chomp $_; s/\r//; $conflinenb++; if ($_ =~ /^#?LoadPlugin/i) { # Extract param and value my ($load,$value)=split(/=/,$_,2); # Remove comments not at beginning of line $param =~ s/^\s+//; $param =~ s/\s+$//; $value =~ s/#.*$//; $value =~ s/^[\s\'\"]+//g; $value =~ s/[\s\'\"]+$//g; ($value1,$value2)=split(/\s/,$value,2); if ($value1 =~ /^graph3d$/i) { next; } if (! $pluginlinefound{$value1}) { # To avoid plugin to be shown twice push @pconfparam, $value1; push @pconfvaluep, $value2; # Plugin in sample but not in config file is by default not enabled. my $active=0; push @pconfactive, $active; } } } close FILE; } print "\n"; foreach my $key (0..(@pconfparam-1)) { print "\n"; } print "\n"; } else { print "\n"; } print "\n"; if ($advanced) { print "\n"; print "\n"; print "\n"; } print "
MAIN SETUP SECTION (Required to make AWStats work)

LogFile* ".&file_chooser_button("LogFile",0,0)." "; print &hblink($text{'help_help'}, "help.cgi?param=LogFile")."
LogType* "; print "\n"; print " "; print &hblink($text{'help_help'}, "help.cgi?param=LogType")."
LogFormat* "; print &hblink($text{'help_help'}, "help.cgi?param=LogFormat"),"
LogSeparator "; print &hblink($text{'help_help'}, "help.cgi?param=LogSeparator")."
SiteDomain* "; print &hblink($text{'help_help'}, "help.cgi?param=SiteDomain")."
HostAliases "; print &hblink($text{'help_help'}, "help.cgi?param=HostAliases")."
DNSLookup "; print &hblink($text{'help_help'}, "help.cgi?param=DNSLookup")."
DirData "; print &hblink($text{'help_help'}, "help.cgi?param=DirData")."
DirCgi "; print &hblink($text{'help_help'}, "help.cgi?param=DirCgi")."
DirIcons "; print &hblink($text{'help_help'}, "help.cgi?param=DirIcons")."
AllowToUpdateStatsFromBrowser "; print &hblink($text{'help_help'}, "help.cgi?param=AllowToUpdateStatsFromBrowser")."
AllowFullYearView "; print &hblink($text{'help_help'}, "help.cgi?param=AllowFullYearView")."
* ".$text{'help_starrequired'}." "; print "

OPTIONAL SETUP SECTION (Not required but increase AWStats features)

EnableLockForUpdate "; print &hblink($text{'help_help'}, "help.cgi?param=EnableLockForUpdate")."
DNSStaticCacheFile ".&file_chooser_button("DNSStaticCacheFile",0,0)." "; print &hblink($text{'help_help'}, "help.cgi?param=DNSStaticCacheFile")."
DNSLastUpdateCacheFile "; print &hblink($text{'help_help'}, "help.cgi?param=DNSLastUpdateCacheFile")."
SkipDNSLookupFor "; print &hblink($text{'help_help'}, "help.cgi?param=SkipDNSLookupFor")."
AllowAccessFromWebToAuthenticatedUsersOnly "; print &hblink($text{'help_help'}, "help.cgi?param=AllowAccessFromWebToAuthenticatedUsersOnly")."
AllowAccessFromWebToFollowingAuthenticatedUsers ".&user_chooser_button('AllowAccessFromWebToFollowingAuthenticatedUsers', multiple, 0)." "; print &hblink($text{'help_help'}, "help.cgi?param=AllowAccessFromWebToFollowingAuthenticatedUsers")."
AllowAccessFromWebToFollowingIPAddresses "; print &hblink($text{'help_help'}, "help.cgi?param=AllowAccessFromWebToFollowingIPAddresses")."
CreateDirDataIfNotExists "; print &hblink($text{'help_help'}, "help.cgi?param=CreateDirDataIfNotExists")."
BuildHistoryFormat "; print &hblink($text{'help_help'}, "help.cgi?param=BuildHistoryFormat")."
BuildReportFormat "; print &hblink($text{'help_help'}, "help.cgi?param=BuildReportFormat")."
SaveDatabaseFilesWithPermissionsForEveryone "; print &hblink($text{'help_help'}, "help.cgi?param=SaveDatabaseFilesWithPermissionsForEveryone")."
PurgeLogFile "; print &hblink($text{'help_help'}, "help.cgi?param=PurgeLogFile")."
ArchiveLogRecords "; print &hblink($text{'help_help'}, "help.cgi?param=ArchiveLogRecords")."
KeepBackupOfHistoricFiles "; print &hblink($text{'help_help'}, "help.cgi?param=KeepBackupOfHistoricFiles")."
DefaultFile "; print &hblink($text{'help_help'}, "help.cgi?param=DefaultFile")."
SkipHosts "; print &hblink($text{'help_help'}, "help.cgi?param=SkipHosts")."
SkipUserAgents "; print &hblink($text{'help_help'}, "help.cgi?param=SkipUserAgents")."
SkipFiles "; print &hblink($text{'help_help'}, "help.cgi?param=SkipFiles")."
OnlyHosts "; print &hblink($text{'help_help'}, "help.cgi?param=OnlyHosts")."
OnlyUserAgents "; print &hblink($text{'help_help'}, "help.cgi?param=OnlyUserAgents")."
OnlyFiles "; print &hblink($text{'help_help'}, "help.cgi?param=OnlyFiles")."
NotPageList "; print &hblink($text{'help_help'}, "help.cgi?param=NotPageList")."
ValidHTTPCodes "; print &hblink($text{'help_help'}, "help.cgi?param=ValidHTTPCodes")."
ValidSMTPCodes "; print &hblink($text{'help_help'}, "help.cgi?param=ValidSMTPCodes")."
AuthenticatedUsersNotCaseSensitive "; print &hblink($text{'help_help'}, "help.cgi?param=AuthenticatedUsersNotCaseSensitive")."
URLNotCaseSensitive "; print &hblink($text{'help_help'}, "help.cgi?param=URLNotCaseSensitive")."
URLWithAnchor "; print &hblink($text{'help_help'}, "help.cgi?param=URLWithAnchor")."
URLQuerySeparators "; print &hblink($text{'help_help'}, "help.cgi?param=URLQuerySeparators")."
URLWithQuery "; print &hblink($text{'help_help'}, "help.cgi?param=URLWithQuery")."
URLWithQueryWithOnlyFollowingParameters "; print &hblink($text{'help_help'}, "help.cgi?param=URLWithQueryWithOnlyFollowingParameters")."
URLWithQueryWithoutFollowingParameters "; print &hblink($text{'help_help'}, "help.cgi?param=URLWithQueryWithoutFollowingParameters")."
URLReferrerWithQuery "; print &hblink($text{'help_help'}, "help.cgi?param=URLReferrerWithQuery")."
WarningMessages "; print &hblink($text{'help_help'}, "help.cgi?param=WarningMessages")."
ErrorMessages "; print &hblink($text{'help_help'}, "help.cgi?param=ErrorMessages")."
DebugMessages "; print &hblink($text{'help_help'}, "help.cgi?param=DebugMessages")."
NbOfLinesForCorruptedLog "; print &hblink($text{'help_help'}, "help.cgi?param=NbOfLinesForCorruptedLog")."
WrapperScript "; print &hblink($text{'help_help'}, "help.cgi?param=WrapperScript")."
DecodeUA "; print &hblink($text{'help_help'}, "help.cgi?param=DecodeUA")."
MiscTrackerUrl "; print &hblink($text{'help_help'}, "help.cgi?param=MiscTrackerUrl")."
$text{'index_hideadvanced'}
$text{'index_advanced1'}


OPTIONAL ACCURACY SETUP SECTION (Not required but increase AWStats features)

LevelForBrowsersDetection "; print &hblink($text{'help_help'}, "help.cgi?param=LevelForBrowsersDetection")."
LevelForOSDetection "; print &hblink($text{'help_help'}, "help.cgi?param=LevelForOSDetection")."
LevelForRefererAnalyze "; print &hblink($text{'help_help'}, "help.cgi?param=LevelForRefererAnalyze")."
LevelForRobotsDetection "; print &hblink($text{'help_help'}, "help.cgi?param=LevelForRobotsDetection")."
LevelForSearchEnginesDetection "; print &hblink($text{'help_help'}, "help.cgi?param=LevelForSearchEnginesDetection")."
LevelForKeywordsDetection "; print &hblink($text{'help_help'}, "help.cgi?param=LevelForKeywordsDetection")."
LevelForFileTypesDetection "; print &hblink($text{'help_help'}, "help.cgi?param=LevelForFileTypesDetection")."
LevelForWormsDetection "; print &hblink($text{'help_help'}, "help.cgi?param=LevelForWormsDetection")."
$text{'index_hideadvanced'}
$text{'index_advanced2'}


OPTIONAL APPEARANCE SETUP SECTION (Not required but increase AWStats features)

UseFramesWhenCGI "; print &hblink($text{'help_help'}, "help.cgi?param=UseFramesWhenCGI")."
DetailedReportsOnNewWindows "; print &hblink($text{'help_help'}, "help.cgi?param=DetailedReportsOnNewWindows")."
Expires "; print &hblink($text{'help_help'}, "help.cgi?param=Expires")."
MaxRowsInHTMLOutput "; print &hblink($text{'help_help'}, "help.cgi?param=MaxRowsInHTMLOutput")."
Lang "; print &hblink($text{'help_help'}, "help.cgi?param=Lang")."
DirLang ".&file_chooser_button("DirLang",1,0)." "; print &hblink($text{'help_help'}, "help.cgi?param=DirLang")."
ShowMenu "; print &hblink($text{'help_help'}, "help.cgi?param=ShowMenu")."
ShowMonthStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowMonthStats")."
ShowDaysOfMonthStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowDaysOfMonthStats")."
ShowDaysOfWeekStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowDaysOfWeekStats")."
ShowHoursStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowHoursStats")."
ShowDomainsStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowDomainsStats")."
ShowHostsStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowHostsStats")."
ShowAuthenticatedUsers "; print &hblink($text{'help_help'}, "help.cgi?param=ShowAuthenticatedUsers")."
ShowRobotsStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowRobotsStats")."
ShowWormsStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowWormsStats")."
ShowEMailSenders "; print &hblink($text{'help_help'}, "help.cgi?param=ShowEMailSenders")."
ShowEMailReceivers "; print &hblink($text{'help_help'}, "help.cgi?param=ShowEMailReceivers")."
ShowSessionsStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowSessionsStats")."
ShowPagesStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowPagesStats")."
ShowFileTypesStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowFileTypesStats")."
ShowFileSizesStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowFileSizesStats")."
ShowOSStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowOSStats")."
ShowBrowsersStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowBrowsersStats")."
ShowScreenSizeStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowScreenSizeStats")."
ShowOriginStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowOriginStats")."
ShowKeyphrasesStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowKeyphrasesStats")."
ShowKeywordsStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowKeywordsStats")."
ShowMiscStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowMiscStats")."
ShowHTTPErrorsStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowHTTPErrorsStats")."
ShowSMTPErrorsStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowSMTPErrorsStats")."
ShowClusterStats "; print &hblink($text{'help_help'}, "help.cgi?param=ShowClusterStats")."
AddDataArrayMonthStats "; print &hblink($text{'help_help'}, "help.cgi?param=AddDataArrayMonthStats")."
AddDataArraySHowDaysOfMonthStats "; print &hblink($text{'help_help'}, "help.cgi?param=AddDataArraySHowDaysOfMonthStats")."
AddDataArrayShowDaysOfWeekStats "; print &hblink($text{'help_help'}, "help.cgi?param=AddDataArrayShowDaysOfWeekStats")."
AddDataArrayShowHoursStats "; print &hblink($text{'help_help'}, "help.cgi?param=AddDataArrayShowHoursStats")."
IncludeInternalLinksInOriginSection "; print &hblink($text{'help_help'}, "help.cgi?param=IncludeInternalLinksInOriginSection")."
MaxNbOfDomain "; print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfDomain ")."
MinHitDomain "; print &hblink($text{'help_help'}, "help.cgi?param=MinHitDomain ")."
MaxNbOfHostsShown "; print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfHostsShown ")."
MinHitHost "; print &hblink($text{'help_help'}, "help.cgi?param=MinHitHost ")."
MaxNbOfLoginShown "; print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfLoginShown ")."
MinHitLogin "; print &hblink($text{'help_help'}, "help.cgi?param=MinHitLogin ")."
MaxNbOfRobotShown "; print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfRobotShown ")."
MinHitRobot "; print &hblink($text{'help_help'}, "help.cgi?param=MinHitRobot ")."
MaxNbOfPageShown "; print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfPageShown ")."
MinHitFile "; print &hblink($text{'help_help'}, "help.cgi?param=MinHitFile ")."
MaxNbOfOsShown "; print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfOsShown ")."
MinHitOs "; print &hblink($text{'help_help'}, "help.cgi?param=MinHitOs ")."
MaxNbOfBrowsersShown "; print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfBrowsersShown ")."
MinHitBrowser "; print &hblink($text{'help_help'}, "help.cgi?param=MinHitBrowser ")."
MaxNbOfScreenSizesShown "; print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfScreenSizesShown ")."
MinHitScreenSize "; print &hblink($text{'help_help'}, "help.cgi?param=MinHitScreenSize ")."
MaxNbOfRefererShown "; print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfRefererShown ")."
MinHitRefer "; print &hblink($text{'help_help'}, "help.cgi?param=MinHitRefer ")."
MaxNbOfKeyphrasesShown "; print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfKeyphrasesShown ")."
MinHitKeyphrase "; print &hblink($text{'help_help'}, "help.cgi?param=MinHitKeyphrase ")."
MaxNbOfKeywordsShown "; print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfKeywordsShown ")."
MinHitKeyword "; print &hblink($text{'help_help'}, "help.cgi?param=MinHitKeyword ")."
MaxNbOfEMailsShown "; print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfEMailsShown ")."
MinHitEMail "; print &hblink($text{'help_help'}, "help.cgi?param=MinHitEMail ")."
FirstDayOfWeek "; print &hblink($text{'help_help'}, "help.cgi?param=FirstDayOfWeek")."
ShowFlagLinks "; print &hblink($text{'help_help'}, "help.cgi?param=ShowFlagLinks")."
ShowLinksOnUrl "; print &hblink($text{'help_help'}, "help.cgi?param=ShowLinksOnUrl")."
UseHTTPSLinkForUrl "; print &hblink($text{'help_help'}, "help.cgi?param=UseHTTPSLinkForUrl")."
MaxLengthOfShownURL "; print &hblink($text{'help_help'}, "help.cgi?param=MaxLengthOfShownURL")."
LinksToWhoIs "; # print &hblink($text{'help_help'}, "help.cgi?param=LinksToWhoIs")."
LinksToIPWhoIs "; # print &hblink($text{'help_help'}, "help.cgi?param=LinksToIPWhoIs")."
HTMLHeadSection "; print &hblink($text{'help_help'}, "help.cgi?param=HTMLHeadSection")."
HTMLEndSection "; print &hblink($text{'help_help'}, "help.cgi?param=HTMLEndSection")."
Logo "; print &hblink($text{'help_help'}, "help.cgi?param=Logo")."
LogoLink "; print &hblink($text{'help_help'}, "help.cgi?param=LogoLink")."
BarWidth / BarHeight / "; print &hblink($text{'help_help'}, "help.cgi?param=BarWidth ")."
StyleSheet "; print &hblink($text{'help_help'}, "help.cgi?param=StyleSheet")."
color_Background "; # print &hblink($text{'help_help'}, "help.cgi?param=color_Background")."
color_TableBGTitle "; # print &hblink($text{'help_help'}, "help.cgi?param=color_TableBGTitle")."
color_TableTitle "; # print &hblink($text{'help_help'}, "help.cgi?param=color_TableTitle")."
color_TableBG "; # print &hblink($text{'help_help'}, "help.cgi?param=color_TableBG")."
color_TableRowTitle "; # print &hblink($text{'help_help'}, "help.cgi?param=color_TableRowTitle")."
color_TableBGRowTitle "; # print &hblink($text{'help_help'}, "help.cgi?param=color_TableBGRowTitle")."
color_TableBorder "; # print &hblink($text{'help_help'}, "help.cgi?param=color_TableBorder")."
color_text "; # print &hblink($text{'help_help'}, "help.cgi?param=color_text")."
color_textpercent "; # print &hblink($text{'help_help'}, "help.cgi?param=color_textpercent")."
color_titletext "; # print &hblink($text{'help_help'}, "help.cgi?param=color_titletext")."
color_weekend "; # print &hblink($text{'help_help'}, "help.cgi?param=color_weekend")."
color_link "; # print &hblink($text{'help_help'}, "help.cgi?param=color_link")."
color_hover "; # print &hblink($text{'help_help'}, "help.cgi?param=color_hover")."
color_u "; # print &hblink($text{'help_help'}, "help.cgi?param=color_u")."
color_v "; # print &hblink($text{'help_help'}, "help.cgi?param=color_v")."
color_p "; # print &hblink($text{'help_help'}, "help.cgi?param=color_p")."
color_h "; # print &hblink($text{'help_help'}, "help.cgi?param=color_h")."
color_k "; # print &hblink($text{'help_help'}, "help.cgi?param=color_k")."
color_s "; # print &hblink($text{'help_help'}, "help.cgi?param=color_s")."
color_e "; # print &hblink($text{'help_help'}, "help.cgi?param=color_e")."
color_x "; # print &hblink($text{'help_help'}, "help.cgi?param=color_x")."
$text{'index_hideadvanced'}
$text{'index_advanced3'}


PLUGINS SETUP SECTION (Not required but increase AWStats features)

Loaded plugins Plugin's parameters  
$pconfparam[$key] "; my ($type,$p,$geoipdatafile)=(); if ($pconfparam[$key] =~ /^geoip$/) { $type="geoip_country"; $p="GeoIP Country"; $geoipdatafile=$config{'plugin_1_geoip'}||"/usr/local/share/GeoIP/GeoIP.dat"; } if ($pconfparam[$key] =~ /^geoip_region_maxmind$/) { $type="geoip_region"; $p="GeoIP Region"; $geoipdatafile=$config{'plugin_2_geoip_region_maxmind'}||"/usr/local/share/GeoIP/GeoIPRegion.dat"; } if ($pconfparam[$key] =~ /^geoip_city_maxmind$/) { $type="geoip_city"; $p="GeoIP City"; $geoipdatafile=$config{'plugin_3_geoip_city_maxmind'}||"/usr/local/share/GeoIP/GeoIPCity.dat"; } if ($pconfparam[$key] =~ /^geoip_isp_maxmind$/) { $type="geoip_isp"; $p="GeoIP ISP"; $geoipdatafile=$config{'plugin_4_geoip_isp_maxmind'}||"/usr/local/share/GeoIP/GeoIPISP.dat"; } if ($pconfparam[$key] =~ /^geoip_org_maxmind$/) { $type="geoip_org"; $p="GeoIP Organization"; $geoipdatafile=$config{'plugin_5_geoip_org_maxmind'}||"/usr/local/share/GeoIP/GeoIPOrg.dat"; } if ($p) { # If a geoip plugin my $datafile=$geoipdatafile; if ($pconfvaluep[$key] =~ /^\w+\s+(.+)$/) { $datafile=$1; } print "$p database version"; } print " "; print &hblink($text{'help_help'}, "help.cgi?param=plugin_$pconfparam[$key]")."
$text{'index_hideadvanced'}
$text{'index_advanced4'}



$text{'index_hideadvanced'}

\n"; print "
\n"; @b=(); if ($in{'new'}) { push(@b, ""); } else { if ($access{'global'}) { push(@b, ""); } if ($access{'add'}) { push(@b, ""); } } &spaced_buttons(@b); print "
\n"; # Back to config list print "
\n"; &footer("", $text{'index_return'}); awstats/geoip_info.cgi0100777000175700010010000000353110165615542014630 0ustar LaurentAucun#!/usr/bin/perl # geoip_info.cgi # Report geoip informations require './awstats-lib.pl'; &ReadParse(); if (! $access{'update'}) { &error($text{'geoip_cannot'}); } my $conf=""; my $dir=""; if ($in{'file'} =~ /awstats\.(.*)\.conf$/) { $conf=$1; } if ($in{'file'} =~ /^(.*)[\\\/][^\\\/]+$/) { $dir=$1; } # Display file contents &header($title || $text{'geoip_title'}, ""); print "
\n"; my $type=$in{'type'}; my $size=-1; print "GeoIP information for file ".$in{'file'}."

\n"; # Try to get the GeoIP data file version at end of file if (-f "$in{'file'}") { my @st=stat($in{'file'}); my $size = $st[7]; my ($sec,$min,$hour,$day,$month,$year,$wday,$yday) = localtime($st[9]); $year+=1900; $month++; print "Geoip data file type: $type
\n"; print "Geoip data file size: $size bytes
\n"; printf("Geoip data file date: %04s-%02s-%02s %02s:%02s:%02s
\n",$year,$month,$day,$hour,$min,$sec); my $version='unknown'; # Try to get version from API # Try to get version from file if (! $version || $version eq 'unknown') { if (open(GEOIPFILE,"<$in{'file'}")) { my $seekpos=($size-100); if ($seekpos < 0) { $seekpos=0; } binmode GEOIPFILE; seek(GEOIPFILE,$seekpos,0); my $nbread=0; while (($nbread < 100) && ($line=)) { $nbread++; if ($line =~ /(Geo-.*)Copyright/i) { $version=$1; last; } } close (GEOIPFILE); } } print "Geoip data file version: $version
\n"; } else { print "GeoIP datafile $in{'file'} does not exist or can not be read.
\n"; } print "
\n"; # Back to config list print "
\n"; &footer("", $text{'index_return'}); 0; awstats/help.cgi0100555000175700010010000000304507733452170013437 0ustar LaurentAucun#!/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 "
\n"; my $helpparam=$in{'param'}; my $isplugin=0; if ($helpparam =~ s/^plugin_//) { $isplugin=1; } if ($isplugin) { print &text('help_subtitleplugin',$helpparam)."

\n"; } else { print &text('help_subtitle',$helpparam)."

\n"; } open(CONF, $config{'alt_conf'}) || &error("Failed to open sample config file"); my $output=""; my $savoutput=""; my $found=0; while() { chomp $_; s/\r//; my $line="$_"; if ($line !~ /#LoadPlugin/i && $line =~ s/^#//) { if ($line =~ /-----------------/) { if ($output) { $savoutput=$output; } $output=""; next; } $line =~ s//>/g; $output.="$line
"; } else { # Remove comments $_ =~ s/\s#.*$//; # Extract param and value my ($param,$value)=split(/=/,$_,2); $param =~ s/^\s+//; $param =~ s/\s+$//; if (defined($param) && defined($value)) { if ((! $isplugin && $param =~ /$helpparam/i) || ($isplugin && $value =~ /$helpparam/i)) { $found=1; last; } else { if ($output) { $savoutput=$output; } $output=""; } } } } close(CONF); if ($found) { if ($output) { print "$output\n"; } else { print "$savoutput"; } } else { print &text('help_notfound',$config{'alt_conf'}); # print "Parameter not found in your sample file $config{'alt_conf'}.\nMay be your AWStats version does not support it, so no help is available."; } 0; awstats/images/0040777000175700010010000000000010176535011013263 5ustar LaurentAucunawstats/images/hh.png0100777000175700010010000000041207611526030014366 0ustar LaurentAucun‰PNG  IHDR%±„/tEXtCreation Timejeu. 16 janv. 2003 13:50:24 +0100þ°O$tIMEÓ 2#s fi pHYs ð ðB¬4˜gAMA± üa*PLTE””ÆÎ!ÎÖBçï{ÿÿ­÷ÿœ÷ÿ„çïsÞçcÖÞRÆÎ1µ½¥­­­#W–4(IDATxÚc¸ÉÀÈpžaÆ õ ! Á ^ ö " ü_hð*CÞIEND®B`‚awstats/images/hk.png0100777000175700010010000000040607611526030014374 0ustar LaurentAucun‰PNG  IHDR%±„/tEXtCreation Timejeu. 16 janv. 2003 13:51:50 +0100ïø tIMEÓ 39—s®R pHYs ð ðB¬4˜gAMA± üa'PLTEN2€QˆV q%µœR²±?«¢.¤•• Ž}ˆmxLfA5QÍ'IDATxÚc8ÀÀÀp€aÆ  @èÀ`À À ÎÀy…ø&ƒ‘-IEND®B`‚awstats/images/hp.png0100777000175700010010000000041507611526030014401 0ustar LaurentAucun‰PNG  IHDR%±„/tEXtCreation Timejeu. 16 janv. 2003 13:54:20 +0100ËMtIMEÓ 6?dó pHYs ð ðB¬4˜gAMA± üa-PLTEB”JÎ!cÖB„ï{­ÿ­Æÿ­½ÿœ½ÿ„¥ïs”çcŒÞR{Î)Z½9­R­i;¾(IDATxÚcxÀÀÀpáÆ   će˜ƒk IEND®B`‚awstats/images/hu.png0100777000175700010010000000025610172225712014410 0ustar LaurentAucun‰PNG  IHDR 絓¥bKGDÿÿÿ ½§“ pHYs ð ðB¬4˜tIMEÕ*}hŽ°;IDATxÚÁ¡À0 AÍ!Cч*#u¥Ï¤C›½X ³Ï=R‘uYtoŽÍwš¶ñžô|Y+òÍ$9“ø›vIEND®B`‚awstats/images/hv.png0100777000175700010010000000030310172225631014402 0ustar LaurentAucun‰PNG  IHDR šùÁ'PLTEÖÎRÞÆcïÞ{÷çœ÷ï­ïç¥çÞœÞÖŒÖ΄νk½µJ­œJ½­Zì ŸƒbKGDˆH pHYs ð ðB¬4˜tIMEÕ)ÆúÀâ"IDATxÚc```P`0`p``H`(`h`˜À°€aÃ(ºá­›IEND®B`‚awstats/images/icon.gif0100555000175700010010000000264607777022560014721 0ustar LaurentAucunGIF87a00÷JR{JR„JZŒRR{RR„RZ{RZ„RZŒRZ”RZœRZ¥ÿÿÿZZsZZ„Zc„ZcŒZc”Zc¥Zc­Zc½ZkµZk½ZkÆZkÎcZZccscc{cc„ccŒcc”ckŒck½ckÆcsÎkZZkc„kk„kkŒkk”kk½ksÎk{Öss”s{½s{Ö{cR{kR{kc{s{{{œ{{Æ{„µ{„½{„΄{„„„µ„„Æ„Œ¥„ŒÆ„ŒÖŒ{”Œ„ŒŒ„­ŒŒœŒŒ½Œ”ÎŒ”ÞŒœÞ”{””„„”ŒŒœ{½œ„kœŒœœœÎœ¥Îœ¥Þ¥„k¥Œk¥”¥¥¥½¥¥Î­””­­½­­Îµ”{µœ{µ¥­µ¥ÎµµÆµµÎµ½Þ½œ{½¥„½¥œ½­Ö½½Ö½½ç½ÆÞ½ÆçÆ¥¥Æ­”Æ­¥ÆÆÖÎsÆÎ{Î΄ÆÎŒÆΔ­Î”ÎέŒÎ­œÎµ”ε¥Îµ½ÎÎÖÎÎÞÎÎçÎÖïÖ„ÎÖŒÎÖ”ÎÖœÎÖœÖÖ¥ÖÖµŒÖ½œÖÖÞÖÖçÖÞïÞœÖÞ¥ÖÞ­ÖÞ­ÞÞµŒÞµÞÞ½”Þ½œÞƵÞç÷çµÞç½Þç½ççÆœçÆÞçÆççÎççÖÎçÞÖççÞçççççïçç÷çï÷ïÎ¥ïÎçïÎïïÖïïÞÎïÞÖïÞïïçïïï÷÷ç÷÷ï÷÷÷÷÷÷ÿ÷ÿÿÿ÷ïÿ÷÷ÿ÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ,00þH° Áƒ*\È°¡Ã‡#JœH±¢Å‹3jÜȱ£ÇtxÍÈg|ÜP¢$ŒË%ÑHúxFÅ?¼˜ñråS˜%Û@Zã1ËzHqÓÇ—2ŠJªˆF$I¢ ³Ð@©”2OÊxéÓ‡ÍTz¬<¤(4z†i0`€*n¹rÅ œ7}~ ,Ùv0š60Ѭ!ŒÐGÝ0œHÑ ¤L¢8‰àÀ¼@ÍL‚zª&ƺÒÁ?ê2xÄ —2oâ(Š¢(Q`˜ˆ¾U[2Ï@Ig fP€A Hªtéƒèʤ9Tt¼©ÁÙ¤ÛÅ aÕ]xAŒ0þOÞÅ ¢8sJÙa†úÀÅ¡M3äC¨`˜ˆG®œ¹¦?¡”„5Ô˜hY7Ð\P€-ØàDyˆhâ‰%©„B CÄDžFƒ8hÀNpaÞ#Šh±È(„°„EC‰È€ƒl`­-‡ˆ5BJXĘ@a´Ÿ 68p€ *"âÇ (TÂBØ÷ÒAZ,E^F¡×—Kát`iòÀÃ9œ Áœs®@f+( €—gD…K*èJ€.ÑÁ@Љª B +œ '@hžz*Ä€0„ $0€4¸AreÜðD C^p[6tH}%=QÀ&`€„Rl#° QU‡B‚ƒà ^€ ®rvp ”…‰àù D;¤±’›@?0Û 7Í- °Ž¤‚º¾"ð­hqº¾–X" |@Ǿe¡‚ À€9XKð.EüðÄWlñÅg¬ñÆwLq@;awstats/images/info.png0100777000175700010010000000120110035256462014722 0ustar LaurentAucun‰PNG  IHDR(-SgAMA± üaAPLTE>k>m>nDm@l EqCq'\~,p—'hŽV„Fl 0W Cn*a:§;€¨ÿÿÿHgT€ Cs)KGt<¥GŽ²I‘¶$RoaŠ O~6a -O=i!aŽBˆ±Q™¾VšÁL³?{ž5q”-n˜M}?r6c.Nd”G¶VžÃ)Wt-n”XƒHv0Z-S`?l,R%K*NM}OQ~Pz9c2V&G8c:k)J%F.P-T,Q'O)JÙÉ[½tRNS@æØfbKGDˆH pHYs  ÒÝ~ütIMEÑ 8|"„n©IDATxœc` 021³°"¸lìœ\Ü<¼lP>¿€ °ˆ¨TD\BRJHHZFVNÌWPTRVQUS×ÐÔÒÖ 0éêé ›˜‚ÌÌ-”U„„,­¬mlí@öŽ 3œœ]\ÝÜAž^ÞBB>¾~þ`Sƒ‚CB†„…GDBÝÅŸs[TR²}DJ*Œié™Yؽ š@Ú|ÆqçIEND®B`‚awstats/images/smallicon.gif0100555000175700010010000000175707752244612015751 0ustar LaurentAucunGIF89a‡JR{JR„JZŒRR{RR„RZ{RZ„RZŒRZ”RZœRZ¥ÿÿÿZZsZZ„Zc„ZcŒZc”Zc¥Zc­Zc½ZkµZk½ZkÆZkÎcZZccscc{cc„ccŒcc”ckŒck½ckÆcsÎkZZkc„kk„kkŒkk”kk½ksÎk{Öss”s{½s{Ö{cR{kR{kc{s{{{œ{{Æ{„µ{„½{„΄{„„„µ„„Æ„Œ¥„ŒÆ„ŒÖŒ{”Œ„ŒŒ„­ŒŒœŒŒ½Œ”ÎŒ”ÞŒœÞ”{””„„”ŒŒœ{½œ„kœŒœœœÎœ¥Îœ¥Þ¥„k¥Œk¥”¥¥¥½¥¥Î­””­­½­­Îµ”{µœ{µ¥­µ¥ÎµµÆµµÎµ½Þ½œ{½¥„½¥œ½­Ö½½Ö½½ç½ÆÞ½ÆçÆ¥¥Æ­”Æ­¥ÆÆÖÎsÆÎ{Î΄ÆÎŒÆΔ­Î”ÎέŒÎ­œÎµ”ε¥Îµ½ÎÎÖÎÎÞÎÎçÎÖïÖ„ÎÖŒÎÖ”ÎÖœÎÖœÖÖ¥ÖÖµŒÖ½œÖÖÞÖÖçÖÞïÞœÖÞ¥ÖÞ­ÖÞ­ÞÞµŒÞµÞÞ½”Þ½œÞƵÞç÷çµÞç½Þç½ççÆœçÆÞçÆççÎççÖÎçÞÖççÞçççççïçç÷çï÷ïÎ¥ïÎçïÎïïÖïïÞÎïÞÖïÞïïçïïï÷÷ç÷÷ï÷÷÷÷÷÷ÿ÷ÿÿÿ÷ïÿ÷÷ÿ÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!ù ,ÌH° Áƒ*\È°¡Ã‡ŠèCI˜0Ñ<Ì ‡7e©‘x‚ahPä œ>5 <ÔfÆ5 xa¥Lœ(‰0N´9‘ÐÀ¡ `pQÅMœR,jÌ”YPf˜Z8q£ÉR©$BÆÀHº ªQ#B-Q–D2AxäÀ7î QJ.TÀ@ Un´½ p Œi’ÀjÀF /¬¹À@$T@±3>”&{qµë×°cË^;awstats/index.cgi0100777000175700010010000002225210161332231013605 0ustar LaurentAucun#!/usr/bin/perl # index.cgi # Display available config files # $Revision: 1.17 $ - $Author: eldy $ - $Date: 2004/12/19 17:04:25 $ require './awstats-lib.pl'; # Check if awstats is actually installed if (!&has_command($config{'awstats'})) { &header($text{'index_title'}, "", undef, 1, 1, 0, undef); print "
\n"; print "

",&text('index_eawstats', "$config{'awstats'}","$gconfig{'webprefix'}/config.cgi?$module_name"),"

\n"; print "


\n"; &footer("/", $text{'index'}); exit; } # Check AWStats URL # TODO # Get the version number $out = `$config{'awstats'} 2>&1`; if ($out !~ /^----- awstats (\S+)\.(\S+)\s(\S+\s\S+)/) { &header($text{'index_title'}, "", undef, 1, 1, 0, undef); if ($out =~ /^content-type/i) { # To old version. Does not support CLI launch from CGI_GATEWAY interface print "

",&text('index_eversion', "$config{'awstats'}", "5.7 or older", "5.8"),"

\n"; print "


\n"; &footer("/", $text{'index'}); exit; } print "
\n"; print "

",&text('index_egetversion', "$config{'awstats'}", "

$out
", "$gconfig{'webprefix'}/config.cgi?$module_name"),"

\n"; print "


\n"; &footer("/", $text{'index'}); exit; } &header($text{'index_title'}, "", undef, 1, 1, 0, undef, undef, undef, &text('index_version', "$1.$2 $3")); my $widthtooltip=560; print < EOF print "
\n"; if ($1 < 5 || ($1 == 5 && $2 < 8)) { print "

",&text('index_eversion', "$config{'awstats'}", "$1.$2", "5.8"),"

\n"; print "


\n"; &footer("/", $text{'index'}); exit; } # Check if sample file exists if (!-r $config{'alt_conf'}) { print "

",&text('index_econf', "$config{'alt_conf'}", "$gconfig{'webprefix'}/config.cgi?$module_name"),"

\n"; print "


\n"; &footer("/", $text{'index'}); exit; } my @configdirtoscan=split(/\s+/, $access{'dir'}); if (! @configdirtoscan) { print &text('index_nodirallowed',"$remote_user")."
\n"; print &text('index_changeallowed',"Webmin - Utilisateurs Webmin", $text{'index_title'})."
\n"; print "
\n"; # print "

",&text('index_econfdir', "$config{'awstats_conf'}", # "$gconfig{'webprefix'}/config.cgi?$module_name"),"

\n"; print "


\n"; &footer("/", $text{'index'}); exit; } # Query apache and squid for their logfiles %auto = map { $_, 1 } split(/,/, $config{'auto'}); if (&foreign_check("apache") && $auto{'apache'}) { &foreign_require("apache", "apache-lib.pl"); $confapache = &apache::get_config(); @dirs = ( &apache::find_all_directives($confapache, "CustomLog"), &apache::find_all_directives($confapache, "TransferLog") ); $root = &apache::find_directive_struct("ServerRoot", $confapache); foreach $d (@dirs) { local $lf = $d->{'words'}->[0]; next if ($lf =~ /^\|/); if ($lf !~ /^\//) { $lf = "$root->{'words'}->[0]/$lf"; } open(FILE, $lf); local $line = ; close(FILE); if (!$line || $line =~ /^([a-zA-Z0-9\.\-]+)\s+\S+\s+\S+\s+\[\d+\/[a-zA-z]+\/\d+:\d+:\d+:\d+\s+[0-9\+\-]+\]/) { push(@config, { 'file' => $lf, 'type' => 1 }); } } } # Build list of config files from allowed directories foreach my $dir (split(/\s+/, $access{'dir'})) { my @conflist=(); push(@conflist, map { $_->{'custom'} = 1; $_ } &scan_config_dir($dir)); foreach my $file (@conflist) { next if (!&can_edit_config($file)); push @config, $file; } } # Write message for allowed directories print &text('index_allowed',"$remote_user"); print ":
\n"; foreach my $dir (split(/\s/,$access{'dir'})) { print "$dir
"; } print "
\n"; print &text('index_changeallowed',"Webmin - Webmin Users", $text{'index_title'})."
\n"; print "
"; my $nbofallowedconffound=0; if (scalar @config) { # Loop on each config file foreach my $l (@config) { next if (!&can_edit_config($l)); $nbofallowedconffound++; # Head of config file's table list if ($nbofallowedconffound == 1) { print "$text{'index_add'}

\n" if ($access{'add'}); if (scalar @config >= 2 && $access{'view'}) { print "$text{'index_viewall'}

\n"; } print "\n"; print ""; print ""; print ""; print ""; print ""; print "\n"; print "\n"; } # Config file line #local @files = &all_config_files($l); #next if (!@files); local $lconf = &get_config($l); my $conf=""; my $dir=""; if ($l =~ /awstats([^\\\/]*)\.conf$/) { $conf=$1; } if ($l =~ /^(.*)[\\\/][^\\\/]+$/) { $dir=$1; } my $confwithoutdot=$conf; $confwithoutdot =~ s/^\.+//; local ($size, $latest); local @st=stat($l); my ($sec,$min,$hour,$day,$month,$year,$wday,$yday) = localtime($st[9]); $year+=1900; $month++; print '
'; printf("Configuration file: %s
\n",$l); printf("Created/Changed: %04s-%02s-%02s %02s:%02s:%02s
\n",$year,$month,$day,$hour,$min,$sec); print '
'; print "\n"; print ""; print ""; print ""; printf("",$year,$month,$day,$hour,$min,$sec); # Database size #print ""; if ($access{'update'}) { # Update print ""; print "\n"; } else { print ""; print ""; } # print "\n"; # print "\n"; # print "\n"; # if ($lconf->{'dir'} && -r "$lconf->{'dir'}/index.html") { if ($access{'view'}) { if ($config{'awstats_cgi'}) { print "\n"; } else { print ""; } } else { print ""; } print "\n"; } if ($nbofallowedconffound > 0) { print "
$text{'index_path'}$text{'index_create'}$text{'index_update'}$text{'index_view'}
$text{'index_scheduled'}$text{'index_now'}
$nbofallowedconffound"; print "$confwithoutdot"; if ($access{'global'}) { # Edit config print "
$text{'index_edit'}\n"; } print "
%04s-%02s-%02s %02s:%02s:%02sNA$text{'index_sched2'}$text{'index_update2'}NANA",$size > 10*1024*1024 ? int($size/1024/1024)." MB" : # $size > 10*1024 ? int($size/1024)." KB" : # $size ? "$size B" : $text{'index_empty'},"$latest",$lconf->{'sched'} ? $text{'yes'} # : $text{'no'},"$text{'index_view2'}".&text('index_cgi', "$gconfig{'webprefix'}/config.cgi?$module_name")."NA

\n"; } } if (! $nbofallowedconffound) { print "

$text{'index_noconfig'}


\n"; } print "
\n"; &footer("/", $text{'index'}); awstats/install_check.pl0100555000175700010010000000057507754036402015167 0ustar LaurentAucun# install_check.pl do 'awstats-lib.pl'; # is_installed(mode) # For mode 1, returns 2 if AWStats is installed and configured for use by # Webmin, 1 if installed but not configured, or 0 otherwise. # For mode 0, returns 1 if installed, 0 if not sub is_installed { if (! -r $config{'awstats'}) { return 0; } if ($_[0]) { if (-r $config{'alt_conf'}) { return 2; } } return 1; } awstats/lang/0040777000175700010010000000000010176535011012737 5ustar LaurentAucunawstats/lang/de0100555000175700010010000001143210014474204013242 0ustar LaurentAucunindex_title=AWStats Logfile Analyse index_version=AWStats Version $1 index_eawstats=Das Logfile Analyse Programm $1 wurde nicht auf Ihrem System gefunden. Vieleicht ist es nicht installiert, oder Ihre module configuration ist fehlerhaft. index_econfdir=Das AWStats Konfigurations Verzeichniss $1 wurde nicht auf Ihrem System gefunden. Vieleicht ist es nicht installiert, oder Ihre module configuration ist fehlerhaft. index_econf=Die AWStats Beispiel-Konfigurations Datei $1 wurde nicht auf ihrem System gefunden. Vieleicht ist es nicht installiert, oder Ihre module configuration ist fehlerhaft. index_cgi=CGI path not configured index_add=Hinzufügen einer neuen Analyse-Konfiguration. index_path=Konfigurations Datei index_type=Typ index_size=Größe index_create=Erstellt/Geändert index_noconfig=Es wurden keine Analyse-Konfigurations Dateien gefunden bzw. hinzugefügt. index_edit=Konfiguration Bearbeiten/Löschen index_del=Konfiguration Löschen index_scheduled=Eingeplant index_now=Jetzt index_update=Statistik aktualisieren index_update2=Aktualisieren index_view=Statistik anzeigen index_view2=Anzeigen index_return=Konfigurations Dateien index_eversion=Das AWStats Programm auf Ihrem System hat die Version $2, aber dieses Modul unterstüzt nur Versionen $3 und aufwärts. index_egetversion=Die Versions Nr. Ihrer AWStats Installation konnte nicht ermittelt werden. Die Abfrage ergab : $2.
May be your module configuration fehlerhaft. index_advanced1=Direktiven für den OPTIONALEN EINSTELLUNGS BEREICH anzeigen index_advanced2=Direktiven für die OPTIONALEN DETAIL-EINSTELLUNGEN anzeigen index_advanced3=Direktiven für das OPTIONALE ERSCHEINUNGSBILD anzeigen index_advanced4=Direktiven für die OPTIONALEN PLUGINS anzeigen index_advanced5=Direktiven für die OPTIONALEN EXTRA EINSTGELLUNGEN anzeigen index_hideadvanced=Optionale Direktiven verbergen index_nodirallowed=Der Benutzer $1 hat kein berechtigtes Verzeichniss zum lesen/speichern von AWStats Konfigurationen index_allowed=Ihr Benutzer-Konto $1 ist berechtigt, um Dateien anzusehen/bearbeiten in index_changeallowed=Berechtigungen für Verzeichnisse, die es Ihnen erlaube AWStats Konfigurationen zu listen/berabeiten, kann Ihnen der Webmin Administrator über den Benutzer ACL Editor zuweisen (Menu $1 then clic on $2) edit_title1=Konfiguration hinzufügen edit_title2=Konfiguration bearbeiten edit_header=Bearbeitungs Assisitent für die Konfiguration $1 edit_headernew=Assistent zum Erstellen von Konfigurationen edit_file=Datei Inhalt edit_add=Dateiname der zu erstellenden Konfigurationsdatei edit_user=AWStats unter folgendem Benutzer ausführen edit_ecannot=Sie sind nicht berechtigt, diese Konfiguration zu bearbeiten edit_efilecannot=Die Konfigurationsdatei '$1' liegt nicht in einem berechtigten Verzeichniss. save_err=Fehler beim Erzeugen der Konfigurationsdatei save_efile=Dateiname für die Konfigurationsdatei wurde nicht angegeben save_fileexists=Konfigurationsdatei existiert bereits save_edir=Für das gewählte Verzeichniss '$1' zum speichern der Konfigurationen existieren keine Webmin Rechte. save_ecannot=Sie haben keinen Berechtigung zum erzeugen/ansehen von Auswertugen unter $1 save_errLogFile=Fehler im LogFile Parameter. Das Logfile $1 existiert nicht, oder nicht lesbar save_errLogFormat=Fehler im LogFormat Parameter. Der parameter ist nicht definiert save_errSiteDomain=Fehler im SiteDomain Parameter. Der Parameter ist nicht definiert save_errDirData=Fehler im DirData Parameter. Der Parameter ist nicht definiert oder das verzeichniss existiert nicht save_dirnotexists=Verzeichniss existiert nicht update_title=Statistik aktualisieren update_ecannot=Sie sind nicht berechtigt die Statistik zu aktualisieren scheduled_title=Statistik Aktualisierung einplanen scheduled_ecannot=Sie sind nicht berechtigt, die Statistik zu aktualisieren oder einzuplanen log_create_log=Erstellte Awstats Konfigurationsdatei $1 log_modify_log=AWStats Konfigurationsdatei geändert $1 log_delete_log=Gelöschte AWStats Konfigurationsdatei $1 log_generate_log=Aktualisiere folgende AWStats Konfigurationsdatei $1 acl_view=Darf Auswertungen für Bestehende Konfigurationen anzeigen ? acl_global=Darf AWStats Konfigurationen bearbeiten ? acl_add=Darf Konfigurationen bearbeiten und löschen ? acl_update=Darf Auswertungen für Bestehende Konfigurationen anzeigen ? acl_user=AWStats unter folgendem Unix benutzer ausführen acl_this=Aktueller Webmin Benutzer acl_any=Jeder Benutzer acl_dir=Berechtigung zum Ansehen und Berabeiten von Konfigurationen unter help_title=Hilfe Seite help_subtitle=Help for config file parameter $1 help_subtitleplugin=Help for plugin $1 help_notfound=Parameter wurde nicht in Ihrer Beispiel Datei $1 gefunden.
May be your AWStats version does not support it, so no help is available. help_help=Hilfeawstats/lang/en0100777000175700010010000001224710161324035013266 0ustar LaurentAucunall_gb=GB all_mb=MB all_kb=KB all_b=Bytes index_title=AWStats Logfile Analyzer index_version=AWStats version $1 index_eawstats=The logfile analysis command $1 was not found on your system. Maybe AWStats is not installed, or your module configuration is incorrect. index_econfdir=The AWStats configuration directory $1 was not found on your system. Maybe AWStats is not installed, or your module configuration is incorrect. index_econf=The AWStats sample configuration file $1 was not found on your system. Maybe AWStats is not installed, or your module configuration is incorrect. index_cgi=CGI path not configured index_add=Add a new config file for analysis. index_path=Config file index_type=Type index_size=Size index_create=Created/Modified index_databasesize=Database size index_noconfig=No config files were found or have been added for analysis. index_edit=Edit/Delete config index_del=Delete config index_scheduled=Scheduled index_sched2=Scheduler index_now=Now index_update=Update stats index_update2=Update index_view=View stats index_view2=View index_return=Config files list index_eversion=The AWStats command $1 on your system is version $2, but this module only supports versions $3 and above. index_egetversion=Failed to get the version of AWStats. Command $1 returned : $2.
May be your module configuration is incorrect. index_advanced1=View directives for OPTIONAL SETUP SECTION index_advanced2=View directives for OPTIONAL ACCURACY SETUP SECTION index_advanced3=View directives for OPTIONAL APPEARANCE SETUP SECTION index_advanced4=View directives for OPTIONAL PLUGINS SETUP SECTION index_advanced5=View directives for OPTIONAL EXTRA SETUP SECTION index_hideadvanced=Hide optional directives index_nodirallowed=Your user $1 has no allowed directory to read/store AWStats configuration files. index_allowed=Your account $1 is allowed to view/edit config files into (or that are links to) index_changeallowed=Permissions on directories into which you are allowed to scan/edit AWStats configuration files can be granted to you by a webmin administrator from the Webmin user ACL editor (Menu $1 then clic on $2) index_viewall=Show a summary of all available configurations edit_title1=Add config File edit_title2=Edit config File edit_header=Editor Assistant for config file $1 edit_headernew=Config file Builder Assistant edit_file=File content edit_add=Config file name to create edit_create_by_copy=Create a new config file by copying an existing one edit_create_from_scratch=Create a new config file with folowing parameters edit_config_to_copy=Config file name to copy edit_user=Run AWStats as user edit_ecannot=You are not allowed to edit this config file edit_efilecannot=The config file '$1' is not in an allowed directory save_err=Error in config file build save_efile=Config file name was not entered save_fileexists=Config file already exists save_edir=Directory '$1' choosed to write your config file into is not allowed by Webmin permissions. save_ecannot=You are only allowed to view or generate reports for config under $1 save_errLogFile=Error in LogFile parameter. Log file $1 does not exists or is not readable save_errLogFormat=Error in LogFormat parameter. Parameter is nto defined save_errSiteDomain=Error in SiteDomain parameter. Parameter is not defined save_errDirData=Error in DirData parameter. Parameter is not defined or directory does not exists save_dirnotexists=Directory does not exists update_title=Update statistics update_ecannot=You are not allowed to update statistics update_run=Run update process with command update_finished=Update process finished update_wait=Please wait schedule_title=Schedule statistic's update schedule_ecannot=You are not allowed to update or schedule update process log_create_log=Created AWStats config file $1 log_modify_log=Modified AWStats config file $1 log_delete_log=Deleted AWStats config file $1 log_generate_log=Update AWStats statistics for $1 acl_view=Can view reports for existing config files? acl_global=Can edit awstats config files? acl_add=Can add and delete config files? acl_update=Can update stats for existing config files? acl_user=Run AWStats as Unix user acl_this=Current webmin user acl_any=Any user acl_dir=Only allow viewing reports and editing config for config files under (hard directory paths, no links) help_title=Help page help_subtitle=Help for config file parameter $1 help_subtitleplugin=Help for plugin $1 help_notfound=Parameter not found in your sample file $1.
May be your AWStats version does not support it, so no help is available. help_help=Help help_starrequired=required parameters with no default value. They can't be empty. viewall_title=Summary for all configurations files viewall_notallowed=You don't have rights to see statisitics viewall_allowed=This page presents a summary of all configurations files found in directories allowed to user $1 viewall_period=Period viewall_u=Unique visitors viewall_v=Visits viewall_p=Pages viewall_h=Hits viewall_k=Bandwith month01=January month02=February month03=Mars month04=April month05=May month06=June month07=July month08=August month09=September month10=October month11=November month12=Decemberawstats/lang/fr0100777000175700010010000001402210161324046013266 0ustar LaurentAucunall_gb=Go all_mb=Mo all_kb=Ko all_b=Octets index_title=Analyseur de Logs AWStats index_version=AWStats version $1 index_eawstats=La commande du log analyseur $1 n'a pas été trouvée sur le système. Peut-etre AWStats n'est-il pas installé, ou la configuration du module est incorrecte. index_econfdir=Le répertoire des fichiers de configuration AWStats $1 n'a pas été trouvé sur le système. Peut-etre AWStats n'est-il pas installé, ou la configuration du module est incorrecte. index_econf=Le fichier de configuration modèle $1 n'a pas été trouvé sur le système. Peut-etre AWStats n'est-il pas installé, ou la configuration du module est incorrecte. index_cgi=CGI path non configuré index_add=Ajout d'un nouveau fichier de configuration d'analyse index_path=Fichier configuration index_type=Type index_size=Taille index_create=Créé/Modifié index_noconfig=Aucun fichier de configuration n'a été trouvé ou ajouté pour analyse, dans le ou les répertoires autorisés. index_edit=Edition/Suppression index_del=Suppression config index_scheduled=Programmée index_now=Immédiate index_sched2=Programme index_update=Mise à jour stats index_update2=Mettre à jour index_view=Voir les stats index_view2=Voir index_return=Liste des fichiers de configuration index_eversion=La commande AWStats $1 sur votre système est en version $2, mais ce module ne gère que les version $3 ou supérieures. index_egetversion=Echec de la récupération de la varsion d'AWStats. La command $1 a retourné : $2.
Peut-etre la configuration du module est incorrecte. index_advanced1=Voir paramètres de la 'OPTIONAL SETUP SECTION' index_advanced2=Voir paramètres de la 'OPTIONAL ACCURACY SETUP SECTION' index_advanced3=Voir paramètres de la 'OPTIONAL APPEARANCE SETUP SECTION' index_advanced4=Voir paramètres de la 'OPTIONAL PLUGINS SETUP SECTION' index_advanced5=Voir paramètres de la 'OPTIONAL EXTRA SETUP SECTION' index_hideadvanced=Cacher paramètres optionnels index_allowed=Votre login $1 est autorisé à voir/editer les fichiers de config dans (ou pointant vers) index_nodirallowed=Votre compte $1 n'a aucun répertoire autorisé en lecture/écriture de fichier de configuration AWStats. index_changeallowed=Les permissions des répertoires dans lesquels vous pouvez voir/éditer des fichiers de configuration AWStats peuvent vous être accordées par un administrateur Webmin via l'éditeur des ACL utilisateurs Webmin (Menu $1 puis clic sur $2) index_viewall=Voir un résumé pour toutes les configurations disponibles edit_title1=Ajout d'un fichier de config edit_title2=Edition d'un fichier de config edit_header=Assistant d'édition du fichier de configuration $1 edit_headernew=Assistant de création de nouveau fichier de configuration edit_file=Contenu du fichier edit_add=Nom du fichier de config à créer edit_create_by_copy=Créer une nouvelle configuration par recopie d'une existante edit_create_from_scratch=Créer une nouvelle configuration avec les paramètres suivants edit_config_to_copy=Nom de la configuration à recopier edit_user=Lancer AWStats sous l'utilisateur edit_ecannot=Vous n'êtes pas autorisés à éditer ce fichier de configuration edit_efilecannot=Le fichier de configuration '$1' n'est pas dans un répertoire autorisé save_err=Erreur dans la construction du fichier de configuration save_efile=Le nom du fichier de configuration n'a pas été entré save_fileexists=Fichier de configuration déjà existant save_edir=Le répertoire '$1', choisi pour le fichier de configuration n'est pas autorisé par les permissions Webmin. save_ecannot=Vous n'êtes autorisés à voir ou générer des rapports que pour des fichiers de config dans $1 save_errLogFile=Erreur sur le paramètre LogFile. Le fichier de log $1 n'existe pas ou n'est pas lisible save_errLogFormat=Erreur sur le paramètre LogFormat. Paramètre non défini save_errSiteDomain=Erreur sur le paramètre SiteDomain. Paramètre non défini save_errDirData=Erreur sur le paramètre DirData. Paramètre non défini ou répertoire inexistant save_dirnotexists=Répertoire inexistant update_title=Mise à jour des statistiques update_ecannot=Vous n'êtes pas autorisé à mettre à jour les statistiques update_run=Lancement de la mise à jour par la commande update_finished=Mise a jour terminée update_wait=Merci de patienter schedule_title=Programmation de mise à jour schedule_ecannot=Vous n'êtes pas autorisé à mettre à jour ou programmer une mise à jour des statistiques log_create_log=Fichier de config AWStats $1 créé log_modify_log=Fichier de config AWStats $1 modifié log_delete_log=Fichier de config AWStats $1 effacé log_generate_log=Mise à jour statistiques AWStats pour $1 acl_view=Peut voir les stats pour les fichiers config existant? acl_global=Peut editer les fichiers config AWStats? acl_add=Peut ajouter/supprimer des fichiers config? acl_update=Peut mettre à jour les stats pour les fichiers config existants? acl_user=Lancer AWStats sour l'utilisateur Unix acl_this=Utilisateur webmin actuel acl_any=Tout utilisateur acl_dir=Autorise la vue de stats et l'édition de fichier de config pour les fichiers config dans (chemin de répertoires en durs, pas de liens) help_title=Page d'aide help_subtitle=Aide sur le paramètre de configuration $1 help_subtitleplugin=Aide sur le plugin $1 help_notfound=Paramètre non trouvé dans votre fichier de configuration modèle $1.
Peut-être votre version d'AWStats ne le supporte pas, aussi aucune aide n'est disponible. help_help=Aide help_starrequired=paramètres obligatoires sans valeurs par défaut. Ils ne peuvent etre vide. viewall_title=Résumé pour tout fichier de configuration viewall_notallowed=Vous n'avez pas les droits pour voir les stats viewall_allowed=Cette page présente un résumé de toutes les configurations trouvés dans les répertoires autorisés à l'utilisateur $1 viewall_period=Période viewall_u=Visiteurs uniques viewall_v=Visites viewall_p=Pages viewall_h=Hits viewall_k=Bande passante month01=Janvier month02=Février month03=Mars month04=Avril month05=Mai month06=Juin month07=Juillet month08=Aout month09=Septembre month10=Octobre month11=Novembre month12=Décembreawstats/log_parser.pl0100555000175700010010000000103507730661620014511 0ustar LaurentAucun# log_parser.pl # Functions for parsing this module's logs do 'awstats-lib.pl'; # parse_webmin_log(user, script, action, type, object, ¶ms) # Converts logged information from this module into human-readable form sub parse_webmin_log { local ($user, $script, $action, $type, $object, $p) = @_; if ($type eq "log") { return &text("log_${action}_log", "".&html_escape($object).""); } elsif ($type eq "global") { return $object eq "-" ? $text{"log_global"} : &text("log_global2", "".&html_escape($object).""); } } awstats/module.info0100555000175700010010000000057310014500540014145 0ustar LaurentAucuncategory=system desc=AWStats Logfile Analyzer longdesc=Generate and analyze graphicaly statistics from web, proxy, wap, ftp or mail server log files name=AWStats version=1.300 depends=webmin 1.030 depends=cron 1.000 depends=logrotate 1.131 desc_fr=Analyseur de Logs AWStats long_desc_fr=Génération et analyse graphique de statistiques à partir des logs de server web, ftp ou mailawstats/postinstall.pl0100555000175700010010000000007310037567656014741 0ustar LaurentAucun require 'awstats-lib.pl'; sub module_install { } 1; awstats/save_config.cgi0100555000175700010010000000725010065340231014756 0ustar LaurentAucun#!/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/schedule_stats.cgi0100777000175700010010000000641710136731443015527 0ustar LaurentAucun#!/usr/bin/perl # schedule_stats.cgi # schedule AWStats update process from cron or logrotate require './awstats-lib.pl'; &ReadParse(); if (! $access{'update'}) { &error($text{'schedule_cannot'}); } my $conf=""; my $dir=""; if ($in{'file'} =~ /awstats\.(.*)\.conf$/) { $conf=$1; } if ($in{'file'} =~ /^(.*)[\\\/][^\\\/]+$/) { $dir=$1; } # Display file contents &header($title || $text{'schedule_title'}, ""); print "
\n"; print "AWStats scheduled update processes detected for config file ".$in{'file'}."
\n"; print "
\n"; print "
\n"; # Load other modules lib &foreign_require("cron", "cron-lib.pl"); &foreign_require("logrotate", "logrotate-lib.pl"); # For global update print "List of update processes scheduled by a cron task :

"; print "\n"; print ""; print "\n"; my $globalupdate=0; my $confupdate=0; if ( foreign_installed('cron', 0) ) { # Show cron found my $regupdateall="awstats_updateall\.pl"; my $regupdate="awstats\.pl"; foreach my $j (grep { $_->{'command'} =~ /$regupdate/ || $_->{'command'} =~ /$regupdateall/ } &foreign_call("cron","list_cron_jobs")) { my $global=0; if ($j->{'command'} =~ /$regupdateall/) { $globalupdate++; $global=1; } my $confparam=""; if ($j->{'command'} =~ /$regupdate/) { $j->{'command'} =~ /config=(\S+)/; $confparam=$1; if ($confparam ne $conf) { next; } } print ""; print ""; print ""; print ""; if ($global) { print ""; } else { print ""; } print ""; print ""; } } else { print ""; } print "
UserTaskActiveNote on taskAction
".$j->{'user'}."".$j->{'command'}."".($j->{'active'}?'yes':'no')."Update all config filesUpdate this config file only{'index'}."\">Jump to cron task
Webmin cron module is not installed. It is required to setup cron scheduled tasks
"; print "
\n"; print "Add an AWStats cron task to update all AWStats config files
"; print "(You must add the command \"/usr/local/awstats/tools/awstats_updateall.pl now >/dev/null\")
\n"; print "
\n"; print "Add an AWStats cron task to update config file $conf
\n"; print "(You must add the command \"$config{'awstats'} -update -config=$conf >/dev/null\")
\n"; print "
\n"; print "
\n"; print "
\n"; # For logrotate scheduling print "List of update processes scheduled by a logrotate task :

"; print "\n"; print ""; print "\n"; if ( foreign_installed('logrotate', 0) ) { print ""; } else { print ""; } print "
Logrotate fileTaskNote on taskAction
This feature is not yet available
Webmin logrotate module is not installed. It is required to setup logrotate scheduled tasks
"; print "

\n"; # Back to config list print "
\n"; &footer("", $text{'index_return'}); 0; awstats/uninstall.pl0100555000175700010010000000016107730751250014363 0ustar LaurentAucun# uninstall.pl # Called when webmin is uninstalled require 'awstats-lib.pl'; sub module_uninstall { } 1; awstats/update_stats.cgi0100644000175700010010000000171610136731545015206 0ustar LaurentAucun#!/usr/bin/perl # update_stats.cgi # Run AWStats update process # $Revision: 1.5 $ - $Author: eldy $ - $Date: 2004/10/24 13:51:33 $ require './awstats-lib.pl'; &ReadParse(); if (! $access{'update'}) { &error($text{'update_ecannot'}); } my $conf=""; my $dir=""; if ($in{'file'} =~ /awstats\.(.*)\.conf$/) { $conf=$1; } if ($in{'file'} =~ /^(.*)[\\\/][^\\\/]+$/) { $dir=$1; } # Display file contents &header($title || $text{'update_title'}, ""); print "
\n"; my $command=$config{'awstats'}." -update -config=$conf -configdir=$dir"; print $text{'update_run'}.":\n
\n"; print "$command
\n"; print $text{'update_wait'}."...
\n"; print "
\n"; &foreign_require("proc", "proc-lib.pl"); proc::safe_process_exec_logged($command,$config{'user'},undef, STDOUT,undef, 1, 1, 0); #$retour=`$command 2>&1`; #print "$retour\n"; print "
\n"; print $text{'update_finished'}.".
\n"; print "
\n"; # Back to config list &footer("", $text{'index_return'}); 0; awstats/view_all.cgi0100777000175700010010000004024410172230071014302 0ustar LaurentAucun#!/usr/bin/perl # view_all.cgi # Display summary of all available config files # $Revision: 1.5 $ - $Author: eldy $ - $Date: 2005/01/15 15:01:13 $ require './awstats-lib.pl'; &ReadParse(); my $BarWidth=120; my $BarHeight=3; # Check if awstats is actually installed if (!&has_command($config{'awstats'})) { &header($text{'index_title'}, "", undef, 1, 1, 0, undef); print "
\n"; print "

",&text('index_eawstats', "$config{'awstats'}","$gconfig{'webprefix'}/config.cgi?$module_name"),"

\n"; print "


\n"; &footer("/", $text{'index'}); exit; } &header($text{'viewall_title'}, "", undef, 1, 1, 0, undef, undef, undef, undef); my $widthtooltip=560; print < EOF print "
\n"; if (! $access{'view'}) { print &text('viewall_notallowed')."
\n"; } my @configdirtoscan=split(/\s+/, $access{'dir'}); if (! @configdirtoscan) { print &text('index_nodirallowed',"$remote_user")."
\n"; print &text('index_changeallowed',"Webmin - Utilisateurs Webmin", $text{'index_title'})."
\n"; print "
\n"; # print "

",&text('index_econfdir', "$config{'awstats_conf'}", # "$gconfig{'webprefix'}/config.cgi?$module_name"),"

\n"; print "


\n"; &footer("/", $text{'index'}); exit; } # Build list of config files from allowed directories foreach my $dir (split(/\s+/, $access{'dir'})) { my @conflist=(); push(@conflist, map { $_->{'custom'} = 1; $_ } &scan_config_dir($dir)); foreach my $file (@conflist) { next if (!&can_edit_config($file)); push @config, $file; } } # Write message for allowed directories print &text('viewall_allowed',"$remote_user"); print ":
\n"; foreach my $dir (split(/\s/,$access{'dir'})) { print "$dir
"; } print "
\n"; print &text('index_changeallowed',"Webmin - Webmin Users", $text{'index_title'})."
\n"; print "
"; $starttime=time(); ($nowsec,$nowmin,$nowhour,$nowday,$nowmonth,$nowyear,$nowwday,$nowyday) = localtime($starttime); if ($nowyear < 100) { $nowyear+=2000; } else { $nowyear+=1900; } $nowmonth=sprintf("%02d",$nowmonth+1); my $YearRequired=$in{'year'}||$nowyear; my $MonthRequired=$in{'month'}||$nowmonth; my %dirdata=(); my %view_u=(); my %view_v=(); my %view_p=(); my %view_h=(); my %view_k=(); my %notview_p=(); my %notview_h=(); my %notview_k=(); my %version=(); my %lastupdate=(); my $max_u=0; my $max_v=0; my $max_p=0; my $max_h=0; my $max_k=0; my $nomax_p=0; my $nomax_h=0; my $nomax_k=0; my %ListOfYears=($nowyear=>1); # If required year not in list, we add it $ListOfYears{$YearRequired}||=$MonthRequired; # Set dirdata for config file my $nbofallowedconffound=0; if (scalar @config) { # Loop on each config file foreach my $l (@config) { next if (!&can_edit_config($l)); $nbofallowedconffound++; # Read data files $dirdata{$l}=get_dirdata($l); } } # Show summary informations $nbofallowedconffound=0; if (scalar @config) { my %foundendmap=(); my %error=(); # Loop on each config file to get info #-------------------------------------- foreach my $l (@config) { next if (!&can_edit_config($l)); # Config file line #local @files = &all_config_files($l); #next if (!@files); local $lconf = &get_config($l); my $conf=""; my $dir=""; if ($l =~ /awstats([^\\\/]*)\.conf$/) { $conf=$1; } if ($l =~ /^(.*)[\\\/][^\\\/]+$/) { $dir=$1; } my $confwithoutdot=$conf; $confwithoutdot =~ s/^\.+//; # Read data file for config $l my $dirdata=$dirdata{$l}; if (! $dirdata) { $dirdata="."; } my $filedata=$dirdata."/awstats${MonthRequired}${YearRequired}${conf}.txt"; my $linenb=0; my $posgeneral=0; if (! -f "$filedata") { $error{$l}="No data for this month"; } elsif (open(FILE, "<$filedata")) { $linenb=0; while() { if ($linenb++ > 100) { last; } my $savline=$_; chomp $_; s/\r//; # Remove comments not at beginning of line $_ =~ s/\s#.*$//; # Extract param and value my ($param,$value)=split(/=/,CleanFromTags($_),2); $param =~ s/^\s+//; $param =~ s/\s+$//; $value =~ s/#.*$//; $value =~ s/^[\s\'\"]+//; $value =~ s/[\s\'\"]+$//; if ($param) { # cleanparam is param without begining # my $cleanparam=$param; my $wascleaned=0; if ($cleanparam =~ s/^#//) { $wascleaned=1; } if ($cleanparam =~ /^AWSTATS DATA FILE (.*)$/) { $version{$l}=$1; next; } if ($cleanparam =~ /^POS_GENERAL\s+(\d+)/) { $posgeneral=$1; next; } if ($cleanparam =~ /^POS_TIME\s+(\d+)/) { $postime=$1; next; } if ($cleanparam =~ /^END_MAP/) { $foundendmap{$l}=1; last; } } } if ($foundendmap{$l}) { # Map section was completely read, we can jump to data GENERAL if ($posgeneral) { $linenb=0; my ($foundu,$foundv,$foundl)=(0,0,0); seek(FILE,$posgeneral,0); while () { if ($linenb++ > 50) { last; } # To protect against full file scan $line=$_; chomp $line; $line =~ s/\r$//; $line=CleanFromTags($line); if ($line =~ /TotalUnique\s+(\d+)/) { $view_u{$l}=$1; if ($1 > $max_u) { $max_u=$1; } $foundu++; } elsif ($line =~ /TotalVisits\s+(\d+)/) { $view_v{$l}=$1; if ($1 > $max_v) { $max_v=$1; } $foundv++; } elsif ($line =~ /LastUpdate\s+(\d+)/) { $lastupdate{$l}=$1; $foundl++; } if ($foundu && $foundv && $foundl) { last; } } } else { $error{$l}.="Mapping for section GENERAL was wrong."; } # Map section was completely read, we can jump to data TIME if ($postime) { seek(FILE,$postime,0); $linenb=0; while () { if ($linenb++ > 50) { last; } # To protect against full file scan $line=$_; chomp $line; $line =~ s/\r$//; $line=CleanFromTags($line); if ($line =~ /^(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/) { $view_p{$l}+=$2; $view_h{$l}+=$3; $view_k{$l}+=$4; $noview_p{$l}+=$5; $noview_h{$l}+=$6; $noview_k{$l}+=$7; } if ($line =~ /^END_TIME/) { last; } } if ($view_p{$l} > $max_p) { $max_p=$view_p{$l}; } if ($view_h{$l} > $max_h) { $max_h=$view_h{$l}; } if ($view_k{$l} > $max_k) { $max_k=$view_k{$l}; } if ($noview_p{$l} > $nomax_p) { $nomax_p=$noview_p{$l}; } if ($noview_h{$l} > $nomax_h) { $nomax_h=$noview_h{$l}; } if ($noview_k{$l} > $nomax_k) { $nomax_k=$noview_k{$l}; } } else { $error{$l}.="Mapping for section TIME was wrong."; } } close(FILE); } else { $error{$l}="Failed to open $filedata for read"; } } # Loop on each config file to show info #-------------------------------------- foreach my $l (@config) { next if (!&can_edit_config($l)); $nbofallowedconffound++; # Config file line #local @files = &all_config_files($l); #next if (!@files); local $lconf = &get_config($l); my $conf=""; my $dir=""; if ($l =~ /awstats([^\\\/]*)\.conf$/) { $conf=$1; } if ($l =~ /^(.*)[\\\/][^\\\/]+$/) { $dir=$1; } my $confwithoutdot=$conf; $confwithoutdot =~ s/^\.+//; # Read data file for config $l my $dirdata=$dirdata{$l}; if (! $dirdata) { $dirdata="."; } my $filedata=$dirdata."/awstats${MonthRequired}${YearRequired}${conf}.txt"; # Head of config file's table list if ($nbofallowedconffound == 1) { print "\n"; print "\n"; print ""; print "\n"; print "\n"; print "
".&text('viewall_period').":"; print "\n"; print "\n"; print ""; print "
\n"; print "\n"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "\n"; } my @st=stat($l); my $size = $st[7]; my ($sec,$min,$hour,$day,$month,$year,$wday,$yday) = localtime($st[9]); $year+=1900; $month++; print '
'; printf("Configuration file: %s
\n",$l); printf("Created/Changed: %04s-%02s-%02s %02s:%02s:%02s
\n",$year,$month,$day,$hour,$min,$sec); print "
\n"; my @st2=stat($filedata); printf("Data file for period: %s
\n",$filedata); printf("Data file size for period: %s".($st2[7]?" bytes":"")."
\n",($st2[7]?$st2[7]:"unknown")); printf("Data file version: %s",($version{$l}?" $version{$l}":"unknown")."
"); printf("Last update: %s",($lastupdate{$l}?" $lastupdate{$l}":"unknown")); print '
'; print "\n"; print ""; print ""; print ""; if ($error{$l}) { print ""; } elsif (! $foundendmap{$l}) { print ""; } else { print ""; print ""; print ""; print ""; print ""; # Print bargraph print ''; } if ($access{'view'}) { if ($config{'awstats_cgi'}) { print "\n"; } else { print ""; } } else { print ""; } print "\n"; } if ($nbofallowedconffound > 0) { print "
$text{'index_path'}$text{'viewall_u'}$text{'viewall_v'}$text{'viewall_p'}$text{'viewall_h'}$text{'viewall_k'} $text{'index_view'}
$nbofallowedconffound"; print "$confwithoutdot"; if ($access{'global'}) { # Edit config print "
$text{'index_edit'}"; } print "
"; print "$error{$l}"; print ""; print "Unable to read summary info in data file. File may have been built by a too old AWStats version. File was built by version: $version{$l}."; print ""; print Format_Number($view_u{$l}); print ""; print Format_Number($view_v{$l}); print ""; print Format_Number($view_p{$l}); print ""; print Format_Number($view_h{$l}); print ""; print Format_Bytes($view_k{$l}); print "'; my $bredde_u=0; my $bredde_v=0; my $bredde_p=0; my $bredde_h=0; my $bredde_k=0; my $nobredde_p=0; my $nobredde_h=0; my $nobredde_k=0; if ($max_u > 0) { $bredde_u=int($BarWidth*($view_u{$l}||0)/$max_u)+1; } if ($max_v > 0) { $bredde_v=int($BarWidth*($view_v{$l}||0)/$max_v)+1; } if ($max_p > 0) { $bredde_p=int($BarWidth*($view_p{$l}||0)/$max_p)+1; } if ($max_h > 0) { $bredde_h=int($BarWidth*($view_h{$l}||0)/$max_h)+1; } if ($max_k > 0) { $bredde_k=int($BarWidth*($view_k{$l}||0)/$max_k)+1; } if ($nomax_p > 0) { $nobredde_p=int($BarWidth*($noview_p{$l}||0)/$nomax_p)+1; } if ($nomax_h > 0) { $nobredde_h=int($BarWidth*($noview_h{$l}||0)/$nomax_h)+1; } if ($nomax_k > 0) { $nobredde_k=int($BarWidth*($noview_k{$l}||0)/$nomax_k)+1; } if (1) { print "
"; } if (1) { print "
"; } if (1) { print "
"; } if (1) { print "
"; } if (1) { print "
"; } print '
$text{'index_view2'}".&text('index_cgi', "$gconfig{'webprefix'}/config.cgi?$module_name")."NA

\n"; } } if (! $nbofallowedconffound) { print "

$text{'index_noconfig'}


\n"; } # Back to config list print "
\n"; &footer("", $text{'index_return'});