config root man

Current Path : /home/tools/awstats/tools/webmin/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : /home/tools/awstats/tools/webmin/awstats-1.1.wbm

awstats/0040755000175700010010000000000007733600002012010 5ustar  LaurentAucunawstats/acl_security.pl0100444000175700010010000000447207730111620015035 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 "<tr> <td><b>$text{'acl_view'}</b></td>\n";
printf "<td nowrap><input type=radio name=view value=1 %s> %s\n",
	$_[0]->{'view'} ? "checked" : "", $text{'yes'};
printf "<input type=radio name=view value=0 %s> %s</td> </tr>\n",
	$_[0]->{'view'} ? "" : "checked", $text{'no'};

print "<tr> <td><b>$text{'acl_global'}</b></td>\n";
printf "<td nowrap><input type=radio name=global value=1 %s> %s\n",
	$_[0]->{'global'} ? "checked" : "", $text{'yes'};
printf "<input type=radio name=global value=0 %s> %s</td> </tr>\n",
	$_[0]->{'global'} ? "" : "checked", $text{'no'};

print "<tr> <td><b>$text{'acl_add'}</b></td>\n";
printf "<td nowrap><input type=radio name=add value=1 %s> %s\n",
	$_[0]->{'add'} ? "checked" : "", $text{'yes'};
printf "<input type=radio name=add value=0 %s> %s</td> </tr>\n",
	$_[0]->{'add'} ? "" : "checked", $text{'no'};

print "<tr> <td><b>$text{'acl_update'}</b></td>\n";
printf "<td nowrap><input type=radio name=update value=1 %s> %s\n",
        $_[0]->{'update'} ? "checked" : "", $text{'yes'};
printf "<input type=radio name=update value=0 %s> %s</td> </tr>\n",
        $_[0]->{'update'} ? "" : "checked", $text{'no'};

print "<tr> <td><b>$text{'acl_user'}</b></td>\n";
printf "<td colspan=3><input type=radio name=user_def value=1 %s> %s\n",
	$_[0]->{'user'} eq "" ? "checked" : "", $text{'acl_this'};
printf "<input type=radio name=user_def value=2 %s> %s\n",
	$_[0]->{'user'} eq "*" ? "checked" : "", $text{'acl_any'};
printf "<input type=radio name=user_def value=0 %s>\n",
	$_[0]->{'user'} eq "*" || $_[0]->{'user'} eq "" ? "" : "checked";
printf "<input name=user size=8 value='%s'> %s</td> </tr>\n",
	$_[0]->{'user'} eq "*" ? "" : $_[0]->{'user'},
	&user_chooser_button("user");

print "<tr> <td><b>$text{'acl_dir'}</b></td>\n";
print "<td colspan=3><input name=dir size=50 value='$_[0]->{'dir'}'></td> </tr>\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.pl0100444000175700010010000001671507733463404014621 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();


# Show help tooltip
sub hblink
{
	my $t=shift;
	my $url=shift;
	print "<a href=\"javascript:neww('$url');\">$t</a>";
}


# update_config($configfile,%conf)
# Update the awstats config file
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(<FILE>) {
	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;
}

# save_directive(&config, name, [value]*)
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]");
			}
		}
	}
}

# renumber(&config, line, offset)
sub renumber
{
foreach $c (@{$_[0]}) {
	$c->{'line'} += $_[2] if ($c->{'line'} >= $_[1]);
	}
}

# temp_file_name(file)
sub temp_file_name
{
local $p = $_[0];
$p =~ s/^\///;
$p =~ s/\//_/g;
return "$module_config_directory/$p.tmp";
}

# find(name, &config)
sub find
{
local @rv;
foreach $c (@{$_[1]}) {
	push(@rv, $c) if (lc($c->{'name'}) eq lc($_[0]));
	}
return wantarray ? @rv : $rv[0];
}

# find_value(name, &config)
sub find_value
{
local @rv = map { $_->{'value'} } &find(@_);
return wantarray ? @rv : $rv[0];
}

# all_config_files(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;
}

# get_config(path)
# Get the configuration for some log file
sub get_config
{
local %rv;
&read_file($_[0], \%rv) || return undef;
return \%rv;
}

# generate_report_as_pdf(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(<OUT>) {
		print $h $_[2] ? &html_escape($_) : $_;
		}
	close(OUT);
	return 0 if ($?);
	&additional_config("exec", undef, $cmd);
	}
return 1;
}

# spaced_buttons(button, ...)
sub spaced_buttons
{
local $pc = int(100 / scalar(@_));
print "<table width=100%><tr>\n";
foreach $b (@_) {
	local $al = $b eq $_[0] && scalar(@_) != 1 ? "align=left" : $b eq $_[@_-1] && scalar(@_) != 1 ? "align=right" : "align=center";
	print "<td width=$pc% $al>$b</td>\n";
	}
print "</tr>\n";
print "</table>\n";
}

# scan_config_dir()
sub scan_config_dir
{
# Scan directory $DIRCONFIG
opendir(DIR, $config{'awstats_conf'}) || die "Can't scan directory $DIRCONFIG";
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]="$config{'awstats_conf'}/".$rv[$file];
	#print "$rv[0]\n<br>";
}
return @rv;
}

# can_edit_config(file)
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.txt0100444000175700010010000000151607733575110017536 0ustar  LaurentAucunAWStats-Webmin module Changelog
-------------------------------
$Revision: 1.4 $ - $Author: eldy $ - $Date: 2003/09/22 13:33:59 $ 


1.1

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.

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.

Other/Documentation:
- Added French translation.
- Removed unused files.



1.0

- First release version.
awstats/config0100444000175700010010000000034507733466654013224 0ustar  LaurentAucunawstats=/usr/local/awstats/wwwroot/cgi-bin/awstats.pl
awstats_cgi=http://127.0.0.1/cgi-bin/awstats.pl
awstats_conf=/etc/awstats
#awstats_plugins=/usr/local/awstats/wwwroot/cgi-bin/plugins
alt_conf=/etc/awstats/awstats.model.conf
awstats/config.info0100444000175700010010000000055207733466650014152 0ustar  LaurentAucunawstats=Absolute filesystem path to AWStats (CLI),0
awstats_cgi=Absolute or relative URL path to AWStats (CGI),0
awstats_conf=Path to AWStats configuration files' directory,3,/etc/awstats
#awstats_plugins=Path to AWStats plugins' directory,3,/usr/local/awstats/wwwroot/cgi-bin/plugins
alt_conf=Sample AWStats configuration file,3,/etc/awstats/awstats.model.conf
awstats/defaultacl0100444000175700010010000000010207730726640014041 0ustar  LaurentAucunnoconfig=0
view=1
update=1
dir=/etc/awstats
user=*
global=1
add=1
awstats/edit_config.cgi0100555000175700010010000012466307733575072015002 0ustar  LaurentAucun#!/usr/bin/perl
# edit_log.cgi
# Display a form for adding a new logfile or editing an existing one.
# Allows you to set the schedule on which the log is analysed

require './awstats-lib.pl';
&foreign_require("cron", "cron-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*$//;
}

print "<hr>\n";

print <<EOF;
<SCRIPT LANGUAGE="JavaScript">
function Submit_onClick() {
	if (document.editconfig.LogFormat.value=='') {
		alert('$text{save_errLogFormat}');
		document.editconfig.LogFormat.focus();
		return false;
	}
	if (document.editconfig.LogFile.value.match(/maillogconvert.pl/)!=null && document.editconfig.LogType.value != 'M') {
		alert('Your log file is preprocessed by maillogconvert.pl but is not defined as a "Mail" log type.\\nChange LogFile or LogType parameter.');
		document.editconfig.LogType.focus();
		return false;
	}
	if (document.editconfig.SiteDomain.value=='') {
		alert('$text{save_errSiteDomain}');
		document.editconfig.SiteDomain.focus();
		return false;
	}
	if (document.editconfig.DirData.value=='') {
		alert('$text{save_errDirData}');
		document.editconfig.DirData.focus();
		return false;
	}
	return true;
}

function neww(id) {
	var argv = neww.arguments;
	var argc = neww.arguments.length;
	tmp=id;
	var l = (argc > 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);
}
</SCRIPT>
EOF


print "<form name='editconfig' action='save_config.cgi'>\n";

print "<table border width=100%>\n";
print "<tr $tb> <td><b>";
if ($in{'new'}) {
	print &text('edit_headernew');
}
else {
	print &text('edit_header',$in{'file'});
}
print "</b></td> </tr>\n";
print "<tr $cb> <td><table width=100%>\n";



my $filenametosave="";
if ($in{'new'}) {
	print "<tr> <td><b>$text{'edit_add'}</b></td> <td>\n";
	print "<input type=text name=new size=40 value='$config{'awstats_conf'}/awstats.newconfig.conf'>";
	print "</td> <td> </td> </tr>\n";
	print "<tr> <td colspan=3><hr></td> </tr>\n";
} else {
	print "<input type=hidden name=file value='$in{'file'}'>\n";
}
print "<input type=hidden name=oldfile value='$in{'file'}'>\n";

print "<tr> <td colspan=3>MAIN SETUP SECTION (Required to make AWStats work)<br><hr></td> </tr>\n";

print "<tr> <td><b>LogFile</b></td> <td> <input type=text name=LogFile size=40 value='$lconf->{'LogFile'}'> ".&file_chooser_button("LogFile",0,0)." </td> <td> ";
print &hblink($text{'help_help'}, "help.cgi?param=LogFile")." </td> </tr>\n";
print "<tr> <td><b>LogType</b></td> <td> ";
print "<select name=LogType><option value='W'".($lconf->{'LogType'} eq 'W'?" selected":"").">W (Web server log file)</option>\n";
print "<option value='M'".($lconf->{'LogType'} eq 'M'?" selected":"").">M (Mail server log file)</option>\n";
print "<option value='F'".($lconf->{'LogType'} eq 'F'?" selected":"").">F (Ftp server log file)</option>\n";
print "</select>\n";
print "</td> <td> ";
print &hblink($text{'help_help'}, "help.cgi?param=LogType")." </td> </tr>\n";
print "<tr> <td><b>LogFormat</b></td> <td> <input name=LogFormat type=text size=40 value='$lconf->{'LogFormat'}'> </td> <td> ";
print &hblink($text{'help_help'}, "help.cgi?param=LogFormat")," </td> </tr>\n";
print "<tr> <td><b>LogSeparator</b></td> <td> <input size=10 name=LogSeparator type=text value='$lconf->{'LogSeparator'}'> </td> <td> ";
print &hblink($text{'help_help'}, "help.cgi?param=LogSeparator")." </td> </tr>\n";
print "<tr> <td><b>SiteDomain</b></td> <td> <input name=SiteDomain type=text value='$lconf->{'SiteDomain'}'> </td> <td> ";
print &hblink($text{'help_help'}, "help.cgi?param=SiteDomain")." </td> </tr>\n";
print "<tr> <td><b>HostAliases</b></td> <td> <input size=40 name=HostAliases type=text value='$lconf->{'HostAliases'}'> </td> <td> ";
print &hblink($text{'help_help'}, "help.cgi?param=HostAliases")." </td> </tr>\n";
print "<tr> <td><b>DNSLookup</b></td> <td> <input size=10 name=DNSLookup type=text value='$lconf->{'DNSLookup'}'> </td> <td> ";
print &hblink($text{'help_help'}, "help.cgi?param=DNSLookup")." </td> </tr>\n";
print "<tr> <td><b>DirData</b></td> <td> <input size=40 name=DirData type=text value='$lconf->{'DirData'}'> </td> <td> ";
print &hblink($text{'help_help'}, "help.cgi?param=DirData")." </td> </tr>\n";
print "<tr> <td><b>DirCgi</b></td> <td> <input size=30 name=DirCgi type=text value='$lconf->{'DirCgi'}'> </td> <td> ";
print &hblink($text{'help_help'}, "help.cgi?param=DirCgi")." </td> </tr>\n";
print "<tr> <td><b>DirIcons</b></td> <td> <input size=30 name=DirIcons type=text value='$lconf->{'DirIcons'}'> </td> <td> ";
print &hblink($text{'help_help'}, "help.cgi?param=DirIcons")." </td> </tr>\n";
print "<tr> <td><b>AllowToUpdateStatsFromBrowser</b></td> <td> <input size=10 name=AllowToUpdateStatsFromBrowser type=text value='$lconf->{'AllowToUpdateStatsFromBrowser'}'> </td> <td> ";
print &hblink($text{'help_help'}, "help.cgi?param=AllowToUpdateStatsFromBrowser")." </td> </tr>\n";
print "<tr> <td><b>AllowFullYearView</b></td> <td> <input size=10 name=AllowFullYearView type=text value='$lconf->{'AllowFullYearView'}'> </td> <td> ";
print &hblink($text{'help_help'}, "help.cgi?param=AllowFullYearView")." </td> </tr>\n";


print "<tr> <td colspan=3><br>OPTIONAL SETUP SECTION (Not required but increase AWStats features)<br><hr></td> </tr>\n";
if ($in{'advanced'} == 1) {
	print "<tr> <td><b>EnableLockForUpdate</b></td> <td> <input size=10 name=EnableLockForUpdate type=text value='$lconf->{'EnableLockForUpdate'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=EnableLockForUpdate")." </td> </tr>\n";
	print "<tr> <td><b>DNSStaticCacheFile</b></td> <td> <input size=30 name=DNSStaticCacheFile type=text value='$lconf->{'DNSStaticCacheFile'}'> ".&file_chooser_button("DNSStaticCacheFile",0,0)."</td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=DNSStaticCacheFile")." </td> </tr>\n";
	print "<tr> <td><b>DNSLastUpdateCacheFile</b></td> <td> <input size=30 name=DNSLastUpdateCacheFile type=text value='$lconf->{'DNSLastUpdateCacheFile'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=DNSLastUpdateCacheFile")." </td> </tr>\n";
	print "<tr> <td><b>SkipDNSLookupFor</b></td> <td> <input size=30 name=SkipDNSLookupFor type=text value='$lconf->{'SkipDNSLookupFor'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=SkipDNSLookupFor")." </td> </tr>\n";
	print "<tr> <td><b>AllowAccessFromWebToAuthenticatedUsersOnly</b></td> <td> <input size=10 name=AllowAccessFromWebToAuthenticatedUsersOnly type=text value='$lconf->{'AllowAccessFromWebToAuthenticatedUsersOnly'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=AllowAccessFromWebToAuthenticatedUsersOnly")." </td> </tr>\n";
	print "<tr> <td><b>AllowAccessFromWebToFollowingAuthenticatedUsers</b></td> <td> <input size=30 name=AllowAccessFromWebToFollowingAuthenticatedUsers type=text value='$lconf->{'AllowAccessFromWebToFollowingAuthenticatedUsers'}'> ".&user_chooser_button('AllowAccessFromWebToFollowingAuthenticatedUsers', multiple, 0)."</td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=AllowAccessFromWebToFollowingAuthenticatedUsers")." </td> </tr>\n";
	print "<tr> <td><b>AllowAccessFromWebToFollowingIPAddresses</b></td> <td> <input size=30 name=AllowAccessFromWebToFollowingIPAddresses type=text value='$lconf->{'AllowAccessFromWebToFollowingIPAddresses'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=AllowAccessFromWebToFollowingIPAddresses")." </td> </tr>\n";
	print "<tr> <td><b>CreateDirDataIfNotExists</b></td> <td> <input size=10 name=CreateDirDataIfNotExists type=text value='$lconf->{'CreateDirDataIfNotExists'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=CreateDirDataIfNotExists")." </td> </tr>\n";
	print "<tr> <td><b>SaveDatabaseFilesWithPermissionsForEveryone</b></td> <td> <input size=10 name=SaveDatabaseFilesWithPermissionsForEveryone type=text value='$lconf->{'SaveDatabaseFilesWithPermissionsForEveryone'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=SaveDatabaseFilesWithPermissionsForEveryone")." </td> </tr>\n";
	print "<tr> <td><b>PurgeLogFile</b></td> <td> <input size=10 name=PurgeLogFile type=text value='$lconf->{'PurgeLogFile'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=PurgeLogFile")." </td> </tr>\n";
	print "<tr> <td><b>ArchiveLogRecords</b></td> <td> <input size=10 name=ArchiveLogRecords type=text value='$lconf->{'ArchiveLogRecords'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ArchiveLogRecords")." </td> </tr>\n";
	print "<tr> <td><b>KeepBackupOfHistoricFiles</b></td> <td> <input size=10 name=KeepBackupOfHistoricFiles type=text value='$lconf->{'KeepBackupOfHistoricFiles'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=KeepBackupOfHistoricFiles")." </td> </tr>\n";
	print "<tr> <td><b>DefaultFile</b></td> <td> <input size=20 name=DefaultFile type=text value='$lconf->{'DefaultFile'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=DefaultFile")." </td> </tr>\n";
	print "<tr> <td><b>SkipHosts</b></td> <td> <input size=30 name=SkipHosts type=text value='$lconf->{'SkipHosts'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=SkipHosts")." </td> </tr>\n";
	print "<tr> <td><b>SkipUserAgents</b></td> <td> <input size=30 name=SkipUserAgents type=text value='$lconf->{'SkipUserAgents'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=SkipUserAgents")." </td> </tr>\n";
	print "<tr> <td><b>SkipFiles</b></td> <td> <input size=30 name=SkipFiles type=text value='$lconf->{'SkipFiles'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=SkipFiles")." </td> </tr>\n";
	print "<tr> <td><b>OnlyHosts</b></td> <td> <input size=30 name=OnlyHosts type=text value='$lconf->{'OnlyHosts'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=OnlyHosts")." </td> </tr>\n";
	print "<tr> <td><b>OnlyUserAgents</b></td> <td> <input size=30 name=OnlyUserAgents type=text value='$lconf->{'OnlyUserAgents'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=OnlyUserAgents")." </td> </tr>\n";
	print "<tr> <td><b>OnlyFiles</b></td> <td> <input size=30 name=OnlyFiles type=text value='$lconf->{'OnlyFiles'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=OnlyFiles")." </td> </tr>\n";
	print "<tr> <td><b>NotPageList</b></td> <td> <input size=30 name=NotPageList type=text value='$lconf->{'NotPageList'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=NotPageList")." </td> </tr>\n";
	print "<tr> <td><b>ValidHTTPCodes</b></td> <td> <input size=20 name=ValidHTTPCodes type=text value='$lconf->{'ValidHTTPCodes'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ValidHTTPCodes")." </td> </tr>\n";
	print "<tr> <td><b>ValidSMTPCodes</b></td> <td> <input size=20 name=ValidSMTPCodes type=text value='$lconf->{'ValidSMTPCodes'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ValidSMTPCodes")." </td> </tr>\n";
	print "<tr> <td><b>AuthenticatedUsersNotCaseSensitive</b></td> <td> <input size=10 name=AuthenticatedUsersNotCaseSensitive type=text value='$lconf->{'AuthenticatedUsersNotCaseSensitive'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=AuthenticatedUsersNotCaseSensitive")." </td> </tr>\n";
	print "<tr> <td><b>URLNotCaseSensitive</b></td> <td> <input size=10 name=URLNotCaseSensitive type=text value='$lconf->{'URLNotCaseSensitive'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=URLNotCaseSensitive")." </td> </tr>\n";
	print "<tr> <td><b>URLWithAnchor</b></td> <td> <input size=10 name=URLWithAnchor type=text value='$lconf->{'URLWithAnchor'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=URLWithAnchor")." </td> </tr>\n";
	print "<tr> <td><b>URLQuerySeparators</b></td> <td> <input size=10 name=URLQuerySeparators type=text value='$lconf->{'URLQuerySeparators'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=URLQuerySeparators")." </td> </tr>\n";
	print "<tr> <td><b>URLWithQuery</b></td> <td> <input size=10 name=URLWithQuery type=text value='$lconf->{'URLWithQuery'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=URLWithQuery")." </td> </tr>\n";
	print "<tr> <td><b>URLWithQueryWithoutFollowingParameters</b></td> <td> <input size=30 name=URLWithQueryWithoutFollowingParameters type=text value='$lconf->{'URLWithQueryWithoutFollowingParameters'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=URLWithQueryWithoutFollowingParameters")." </td> </tr>\n";
	print "<tr> <td><b>URLReferrerWithQuery</b></td> <td> <input size=10 name=URLReferrerWithQuery type=text value='$lconf->{'URLReferrerWithQuery'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=URLReferrerWithQuery")." </td> </tr>\n";
	print "<tr> <td><b>WarningMessages</b></td> <td> <input size=10 name=WarningMessages type=text value='$lconf->{'WarningMessages'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=WarningMessages")." </td> </tr>\n";
	print "<tr> <td><b>ErrorMessages</b></td> <td> <input size=40 name=ErrorMessages type=text value='$lconf->{'ErrorMessages'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ErrorMessages")." </td> </tr>\n";
	print "<tr> <td><b>DebugMessages</b></td> <td> <input size=10 name=DebugMessages type=text value='$lconf->{'DebugMessages'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=DebugMessages")." </td> </tr>\n";
	print "<tr> <td><b>NbOfLinesForCorruptedLog</b></td> <td> <input size=10 name=NbOfLinesForCorruptedLog type=text value='$lconf->{'NbOfLinesForCorruptedLog'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=NbOfLinesForCorruptedLog")." </td> </tr>\n";
	print "<tr> <td><b>WrapperScript</b></td> <td> <input size=20 name=WrapperScript type=text value='$lconf->{'WrapperScript'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=WrapperScript")." </td> </tr>\n";
	print "<tr> <td><b>DecodeUA</b></td> <td> <input size=10 name=DecodeUA type=text value='$lconf->{'DecodeUA'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=DecodeUA")." </td> </tr>\n";
	print "<tr> <td><b>MiscTrackerUrl</b></td> <td> <input size=30 name=MiscTrackerUrl type=text value='$lconf->{'MiscTrackerUrl'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MiscTrackerUrl")." </td> </tr>\n";
	print "<tr> <td colspan=3 align=center><a href='edit_config.cgi?".($in{'new'}?"new=1&":"")."&file=$in{'file'}'>$text{'index_hideadvanced'}</a></td></tr>\n";
}
else {
	print "<tr> <td colspan=3 align=center><a href='edit_config.cgi?".($in{'new'}?"new=1&":"")."advanced=1&file=$in{'file'}'>$text{'index_advanced1'}</a></td></tr>\n";
}
print "<tr> <td colspan=3><br></td> </tr>\n";

print "<tr> <td colspan=3><br>OPTIONAL ACCURACY SETUP SECTION (Not required but increase AWStats features)<br><hr></td> </tr>\n";
if ($in{'advanced'} == 2) {
	print "<tr> <td><b>LevelForRobotsDetection</b></td> <td> <input size=10 type=text name=LevelForRobotsDetection value='$lconf->{'LevelForRobotsDetection'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=LevelForRobotsDetection")." </td> </tr>\n";
	print "<tr> <td><b>LevelForBrowsersDetection</b></td> <td> <input size=10 type=text name=LevelForBrowsersDetection value='$lconf->{'LevelForBrowsersDetection'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=LevelForBrowsersDetection")." </td> </tr>\n";
	print "<tr> <td><b>LevelForOSDetection</b></td> <td> <input size=10 type=text name=LevelForOSDetection value='$lconf->{'LevelForOSDetection'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=LevelForOSDetection")." </td> </tr>\n";
	print "<tr> <td><b>LevelForRefererAnalyze</b></td> <td> <input size=10 type=text name=LevelForRefererAnalyze value='$lconf->{'LevelForRefererAnalyze'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=LevelForRefererAnalyze")." </td> </tr>\n";
	print "<tr> <td colspan=3 align=center><a href='edit_config.cgi?".($in{'new'}?"new=1&":"")."&file=$in{'file'}'>$text{'index_hideadvanced'}</a></td></tr>\n";
} else {
	print "<tr> <td colspan=3 align=center><a href='edit_config.cgi?".($in{'new'}?"new=1&":"")."advanced=2&file=$in{'file'}'>$text{'index_advanced2'}</a></td></tr>\n";
}	
print "<tr> <td colspan=3><br></td> </tr>\n";

print "<tr> <td colspan=3><br>OPTIONAL APPEARANCE SETUP SECTION (Not required but increase AWStats features)<br><hr></td> </tr>\n";
if ($in{'advanced'} == 3) {
	print "<tr> <td><b>UseFramesWhenCGI</b></td> <td> <input size=10 name=UseFramesWhenCGI type=text value='$lconf->{'UseFramesWhenCGI'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=UseFramesWhenCGI")." </td> </tr>\n";
	print "<tr> <td><b>DetailedReportsOnNewWindows</b></td> <td> <input size=10 name=DetailedReportsOnNewWindows type=text value='$lconf->{'DetailedReportsOnNewWindows'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=DetailedReportsOnNewWindows")." </td> </tr>\n";
	print "<tr> <td><b>Expires</b></td> <td> <input size=10 name=Expires type=text value='$lconf->{'Expires'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=Expires")." </td> </tr>\n";
	print "<tr> <td><b>MaxRowsInHTMLOutput</b></td> <td> <input size=10 name=MaxRowsInHTMLOutput type=text value='$lconf->{'MaxRowsInHTMLOutput'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MaxRowsInHTMLOutput")." </td> </tr>\n";
	print "<tr> <td><b>Lang</b></td> <td> <input size=10 name=Lang type=text value='$lconf->{'Lang'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=Lang")." </td> </tr>\n";
	print "<tr> <td><b>DirLang</b></td> <td> <input size=30 name=DirLang type=text value='$lconf->{'DirLang'}'> ".&file_chooser_button("DirLang",1,0)."</td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=DirLang")." </td> </tr>\n";
	print "<tr> <td><b>ShowMenu</b></td> <td> <input size=10 name=ShowMenu type=text value='$lconf->{'ShowMenu'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowMenu")." </td> </tr>\n";
	print "<tr> <td><b>ShowMonthStats</b></td> <td> <input size=10 name=ShowMonthStats type=text value='$lconf->{'ShowMonthStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowMonthStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowDaysOfMonthStats</b></td> <td> <input size=10 name=ShowDaysOfMonthStats type=text value='$lconf->{'ShowDaysOfMonthStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowDaysOfMonthStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowDaysOfWeekStats</b></td> <td> <input size=10 name=ShowDaysOfWeekStats type=text value='$lconf->{'ShowDaysOfWeekStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowDaysOfWeekStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowHoursStats</b></td> <td> <input size=10 name=ShowHoursStats type=text value='$lconf->{'ShowHoursStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowHoursStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowDomainsStats</b></td> <td> <input size=10 name=ShowDomainsStats type=text value='$lconf->{'ShowDomainsStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowDomainsStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowHostsStats</b></td> <td> <input size=10 name=ShowHostsStats type=text value='$lconf->{'ShowHostsStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowHostsStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowAuthenticatedUsers</b></td> <td> <input size=10 name=ShowAuthenticatedUsers type=text value='$lconf->{'ShowAuthenticatedUsers'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowAuthenticatedUsers")." </td> </tr>\n";
	print "<tr> <td><b>ShowRobotsStats</b></td> <td> <input size=10 name=ShowRobotsStats type=text value='$lconf->{'ShowRobotsStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowRobotsStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowEMailSenders</b></td> <td> <input size=10 name=ShowEMailSenders type=text value='$lconf->{'ShowEMailSenders'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowEMailSenders")." </td> </tr>\n";
	print "<tr> <td><b>ShowEMailReceivers</b></td> <td> <input size=10 name=ShowEMailReceivers type=text value='$lconf->{'ShowEMailReceivers'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowEMailReceivers")." </td> </tr>\n";
	print "<tr> <td><b>ShowSessionsStats</b></td> <td> <input size=10 name=ShowSessionsStats type=text value='$lconf->{'ShowSessionsStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowSessionsStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowPagesStats</b></td> <td> <input size=10 name=ShowPagesStats type=text value='$lconf->{'ShowPagesStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowPagesStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowFileTypesStats</b></td> <td> <input size=10 name=ShowFileTypesStats type=text value='$lconf->{'ShowFileTypesStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowFileTypesStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowFileSizesStats</b></td> <td> <input size=10 name=ShowFileSizesStats type=text value='$lconf->{'ShowFileSizesStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowFileSizesStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowOSStats</b></td> <td> <input size=10 name=ShowOSStats type=text value='$lconf->{'ShowOSStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowOSStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowBrowsersStats</b></td> <td> <input size=10 name=ShowBrowsersStats type=text value='$lconf->{'ShowBrowsersStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowBrowsersStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowScreenSizeStats</b></td> <td> <input size=10 name=ShowScreenSizeStats type=text value='$lconf->{'ShowScreenSizeStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowScreenSizeStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowOriginStats</b></td> <td> <input size=10 name=ShowOriginStats type=text value='$lconf->{'ShowOriginStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowOriginStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowKeyphrasesStats</b></td> <td> <input size=10 name=ShowKeyphrasesStats type=text value='$lconf->{'ShowKeyphrasesStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowKeyphrasesStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowKeywordsStats</b></td> <td> <input size=10 name=ShowKeywordsStats type=text value='$lconf->{'ShowKeywordsStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowKeywordsStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowMiscStats</b></td> <td> <input size=10 name=ShowMiscStats type=text value='$lconf->{'ShowMiscStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowMiscStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowHTTPErrorsStats</b></td> <td> <input size=10 name=ShowHTTPErrorsStats type=text value='$lconf->{'ShowHTTPErrorsStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowHTTPErrorsStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowSMTPErrorsStats</b></td> <td> <input size=10 name=ShowSMTPErrorsStats type=text value='$lconf->{'ShowSMTPErrorsStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowSMTPErrorsStats")." </td> </tr>\n";
	print "<tr> <td><b>ShowClusterStats</b></td> <td> <input size=10 name=ShowClusterStats type=text value='$lconf->{'ShowClusterStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowClusterStats")." </td> </tr>\n";
	print "<tr> <td><b>AddDataArrayMonthStats</b></td> <td> <input size=10 name=AddDataArrayMonthStats type=text value='$lconf->{'AddDataArrayMonthStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=AddDataArrayMonthStats")." </td> </tr>\n";
	print "<tr> <td><b>AddDataArraySHowDaysOfMonthStats</b></td> <td> <input size=10 name=AddDataArraySHowDaysOfMonthStats type=text value='$lconf->{'AddDataArrayShowDaysOfMonthStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=AddDataArraySHowDaysOfMonthStats")." </td> </tr>\n";
	print "<tr> <td><b>AddDataArrayShowDaysOfWeekStats</b></td> <td> <input size=10 name=AddDataArrayShowDaysOfWeekStats type=text value='$lconf->{'AddDataArrayShowDaysOfWeekStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=AddDataArrayShowDaysOfWeekStats")." </td> </tr>\n";
	print "<tr> <td><b>AddDataArrayShowHoursStats</b></td> <td> <input size=10 name=AddDataArrayShowHoursStats type=text value='$lconf->{'AddDataArrayShowHoursStats'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=AddDataArrayShowHoursStats")." </td> </tr>\n";
	print "<tr> <td><b>MaxNbOfDomain </b></td> <td> <input size=10 name=MaxNbOfDomain type=text value='$lconf->{'MaxNbOfDomain '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfDomain ")." </td> </tr>\n";
	print "<tr> <td><b>MinHitDomain  </b></td> <td> <input size=10 name=MinHitDomain type=text value='$lconf->{'MinHitDomain  '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MinHitDomain  ")." </td> </tr>\n";
	print "<tr> <td><b>MaxNbOfHostsShown </b></td> <td> <input size=10 name=MaxNbOfHostsShown  type=text value='$lconf->{'MaxNbOfHostsShown '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfHostsShown ")." </td> </tr>\n";
	print "<tr> <td><b>MinHitHost    </b></td> <td> <input size=10 name=MinHitHost     type=text value='$lconf->{'MinHitHost    '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MinHitHost    ")." </td> </tr>\n";
	print "<tr> <td><b>MaxNbOfLoginShown </b></td> <td> <input size=10 name=MaxNbOfLoginShown  type=text value='$lconf->{'MaxNbOfLoginShown '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfLoginShown ")." </td> </tr>\n";
	print "<tr> <td><b>MinHitLogin   </b></td> <td> <input size=10 name=MinHitLogin    type=text value='$lconf->{'MinHitLogin   '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MinHitLogin   ")." </td> </tr>\n";
	print "<tr> <td><b>MaxNbOfRobotShown </b></td> <td> <input size=10 name=MaxNbOfRobotShown  type=text value='$lconf->{'MaxNbOfRobotShown '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfRobotShown ")." </td> </tr>\n";
	print "<tr> <td><b>MinHitRobot   </b></td> <td> <input size=10 name=MinHitRobot    type=text value='$lconf->{'MinHitRobot   '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MinHitRobot   ")." </td> </tr>\n";
	print "<tr> <td><b>MaxNbOfPageShown </b></td> <td> <input size=10 name=MaxNbOfPageShown  type=text value='$lconf->{'MaxNbOfPageShown '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfPageShown ")." </td> </tr>\n";
	print "<tr> <td><b>MinHitFile    </b></td> <td> <input size=10 name=MinHitFile     type=text value='$lconf->{'MinHitFile    '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MinHitFile    ")." </td> </tr>\n";
	print "<tr> <td><b>MaxNbOfOsShown </b></td> <td> <input size=10 name=MaxNbOfOsShown  type=text value='$lconf->{'MaxNbOfOsShown '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfOsShown ")." </td> </tr>\n";
	print "<tr> <td><b>MinHitOs      </b></td> <td> <input size=10 name=MinHitOs       type=text value='$lconf->{'MinHitOs      '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MinHitOs      ")." </td> </tr>\n";
	print "<tr> <td><b>MaxNbOfBrowsersShown </b></td> <td> <input size=10 name=MaxNbOfBrowsersShown  type=text value='$lconf->{'MaxNbOfBrowsersShown '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfBrowsersShown ")." </td> </tr>\n";
	print "<tr> <td><b>MinHitBrowser </b></td> <td> <input size=10 name=MinHitBrowser  type=text value='$lconf->{'MinHitBrowser '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MinHitBrowser ")." </td> </tr>\n";
	print "<tr> <td><b>MaxNbOfScreenSizesShown </b></td> <td> <input size=10 name=MaxNbOfScreenSizesShown  type=text value='$lconf->{'MaxNbOfScreenSizesShown '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfScreenSizesShown ")." </td> </tr>\n";
	print "<tr> <td><b>MinHitScreenSize </b></td> <td> <input size=10 name=MinHitScreenSize  type=text value='$lconf->{'MinHitScreenSize '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MinHitScreenSize ")." </td> </tr>\n";
	print "<tr> <td><b>MaxNbOfRefererShown </b></td> <td> <input size=10 name=MaxNbOfRefererShown  type=text value='$lconf->{'MaxNbOfRefererShown '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfRefererShown ")." </td> </tr>\n";
	print "<tr> <td><b>MinHitRefer   </b></td> <td> <input size=10 name=MinHitRefer    type=text value='$lconf->{'MinHitRefer   '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MinHitRefer   ")." </td> </tr>\n";
	print "<tr> <td><b>MaxNbOfKeyphrasesShown </b></td> <td> <input size=10 name=MaxNbOfKeyphrasesShown  type=text value='$lconf->{'MaxNbOfKeyphrasesShown '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfKeyphrasesShown ")." </td> </tr>\n";
	print "<tr> <td><b>MinHitKeyphrase </b></td> <td> <input size=10 name=MinHitKeyphrase  type=text value='$lconf->{'MinHitKeyphrase '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MinHitKeyphrase ")." </td> </tr>\n";
	print "<tr> <td><b>MaxNbOfKeywordsShown </b></td> <td> <input size=10 name=MaxNbOfKeywordsShown  type=text value='$lconf->{'MaxNbOfKeywordsShown '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfKeywordsShown ")." </td> </tr>\n";
	print "<tr> <td><b>MinHitKeyword </b></td> <td> <input size=10 name=MinHitKeyword  type=text value='$lconf->{'MinHitKeyword '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MinHitKeyword ")." </td> </tr>\n";
	print "<tr> <td><b>MaxNbOfEMailsShown </b></td> <td> <input size=10 name=MaxNbOfEMailsShown  type=text value='$lconf->{'MaxNbOfEMailsShown '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfEMailsShown ")." </td> </tr>\n";
	print "<tr> <td><b>MinHitEMail   </b></td> <td> <input size=10 name=MinHitEMail    type=text value='$lconf->{'MinHitEMail   '}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MinHitEMail   ")." </td> </tr>\n";
	print "<tr> <td><b>FirstDayOfWeek</b></td> <td> <input size=10 name=FirstDayOfWeek type=text value='$lconf->{'FirstDayOfWeek'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=FirstDayOfWeek")." </td> </tr>\n";
	print "<tr> <td><b>ShowFlagLinks</b></td> <td> <input size=30 name=ShowFlagLinks type=text value='$lconf->{'ShowFlagLinks'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowFlagLinks")." </td> </tr>\n";
	print "<tr> <td><b>ShowLinksOnUrl</b></td> <td> <input size=10 name=ShowLinksOnUrl type=text value='$lconf->{'ShowLinksOnUrl'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=ShowLinksOnUrl")." </td> </tr>\n";
	print "<tr> <td><b>UseHTTPSLinkForUrl</b></td> <td> <input size=10 name=UseHTTPSLinkForUrl type=text value='$lconf->{'UseHTTPSLinkForUrl'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=UseHTTPSLinkForUrl")." </td> </tr>\n";
	print "<tr> <td><b>MaxLengthOfURL</b></td> <td> <input size=10 name=MaxLengthOfURL type=text value='$lconf->{'MaxLengthOfURL'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=MaxLengthOfURL")." </td> </tr>\n";
	print "<tr> <td><b>LinksToWhoIs</b></td> <td> <input size=40 name=LinksToWhoIs type=text value='$lconf->{'LinksToWhoIs'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=LinksToWhoIs")." </td> </tr>\n";
	print "<tr> <td><b>LinksToIPWhoIs</b></td> <td> <input size=40 name=LinksToIPWhoIs type=text value='$lconf->{'LinksToIPWhoIs'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=LinksToIPWhoIs")." </td> </tr>\n";
	print "<tr> <td><b>HTMLHeadSection</b></td> <td> <input size=30 name=HTMLHeadSection type=text value='$lconf->{'HTMLHeadSection'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=HTMLHeadSection")." </td> </tr>\n";
	print "<tr> <td><b>HTMLEndSection</b></td> <td> <input size=40 name=HTMLEndSection type=text value='$lconf->{'HTMLEndSection'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=HTMLEndSection")." </td> </tr>\n";
	print "<tr> <td><b>Logo</b></td> <td> <input size=30 name=Logo type=text value='$lconf->{'Logo'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=Logo")." </td> </tr>\n";
	print "<tr> <td><b>LogoLink</b></td> <td> <input size=30 name=LogoLink type=text value='$lconf->{'LogoLink'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=LogoLink")." </td> </tr>\n";
	print "<tr> <td><b>BarWidth / BarHeight</b></td> <td> <input size=10 name=BarWidth    type=text value='$lconf->{'BarWidth   '}'> / <input size=10 name=BarHeight   type=text value='$lconf->{'BarHeight  '}'></td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=BarWidth   ")." </td> </tr>\n";
	print "<tr> <td><b>StyleSheet</b></td> <td> <input size=20 name=StyleSheet type=text value='$lconf->{'StyleSheet'}'> </td> <td> ";
	print &hblink($text{'help_help'}, "help.cgi?param=StyleSheet")." </td> </tr>\n";
#	print "<tr> <td><b>color_Background</b></td> <td> <input size=10 name=color_Background type=text value='$lconf->{'color_Background'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_Background")." </td> </tr>\n";
#	print "<tr> <td><b>color_TableBGTitle</b></td> <td> <input size=10 name=color_TableBGTitle type=text value='$lconf->{'color_TableBGTitle'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_TableBGTitle")." </td> </tr>\n";
#	print "<tr> <td><b>color_TableTitle</b></td> <td> <input size=10 name=color_TableTitle type=text value='$lconf->{'color_TableTitle'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_TableTitle")." </td> </tr>\n";
#	print "<tr> <td><b>color_TableBG</b></td> <td> <input size=10 name=color_TableBG type=text value='$lconf->{'color_TableBG'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_TableBG")." </td> </tr>\n";
#	print "<tr> <td><b>color_TableRowTitle</b></td> <td> <input size=10 name=color_TableRowTitle type=text value='$lconf->{'color_TableRowTitle'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_TableRowTitle")." </td> </tr>\n";
#	print "<tr> <td><b>color_TableBGRowTitle</b></td> <td> <input size=10 name=color_TableBGRowTitle type=text value='$lconf->{'color_TableBGRowTitle'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_TableBGRowTitle")." </td> </tr>\n";
#	print "<tr> <td><b>color_TableBorder</b></td> <td> <input size=10 name=color_TableBorder type=text value='$lconf->{'color_TableBorder'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_TableBorder")." </td> </tr>\n";
#	print "<tr> <td><b>color_text</b></td> <td> <input size=10 name=color_text type=text value='$lconf->{'color_text'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_text")." </td> </tr>\n";
#	print "<tr> <td><b>color_textpercent</b></td> <td> <input size=10 name=color_textpercent type=text value='$lconf->{'color_textpercent'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_textpercent")." </td> </tr>\n";
#	print "<tr> <td><b>color_titletext</b></td> <td> <input size=10 name=color_titletext type=text value='$lconf->{'color_titletext'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_titletext")." </td> </tr>\n";
#	print "<tr> <td><b>color_weekend</b></td> <td> <input size=10 name=color_weekend type=text value='$lconf->{'color_weekend'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_weekend")." </td> </tr>\n";
#	print "<tr> <td><b>color_link</b></td> <td> <input size=10 name=color_link type=text value='$lconf->{'color_link'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_link")." </td> </tr>\n";
#	print "<tr> <td><b>color_hover</b></td> <td> <input size=10 name=color_hover type=text value='$lconf->{'color_hover'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_hover")." </td> </tr>\n";
#	print "<tr> <td><b>color_u</b></td> <td> <input size=10 name=color_u type=text value='$lconf->{'color_u'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_u")." </td> </tr>\n";
#	print "<tr> <td><b>color_v</b></td> <td> <input size=10 name=color_v type=text value='$lconf->{'color_v'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_v")." </td> </tr>\n";
#	print "<tr> <td><b>color_p</b></td> <td> <input size=10 name=color_p type=text value='$lconf->{'color_p'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_p")." </td> </tr>\n";
#	print "<tr> <td><b>color_h</b></td> <td> <input size=10 name=color_h type=text value='$lconf->{'color_h'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_h")." </td> </tr>\n";
#	print "<tr> <td><b>color_k</b></td> <td> <input size=10 name=color_k type=text value='$lconf->{'color_k'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_k")." </td> </tr>\n";
#	print "<tr> <td><b>color_s</b></td> <td> <input size=10 name=color_s type=text value='$lconf->{'color_s'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_s")." </td> </tr>\n";
#	print "<tr> <td><b>color_e</b></td> <td> <input size=10 name=color_e type=text value='$lconf->{'color_e'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_e")." </td> </tr>\n";
#	print "<tr> <td><b>color_x</b></td> <td> <input size=10 name=color_x type=text value='$lconf->{'color_x'}'> </td> <td> ";
#	print &hblink($text{'help_help'}, "help.cgi?param=color_x")." </td> </tr>\n";
	print "<tr> <td colspan=3 align=center><a href='edit_config.cgi?".($in{'new'}?"new=1&":"")."&file=$in{'file'}'>$text{'index_hideadvanced'}</a></td></tr>\n";
}
else {
	print "<tr> <td colspan=3 align=center><a href='edit_config.cgi?".($in{'new'}?"new=1&":"")."advanced=3&file=$in{'file'}'>$text{'index_advanced3'}</a></td></tr>\n";
}
print "<tr> <td colspan=3><br></td> </tr>\n";

print "<tr> <td colspan=3><br>PLUGINS SETUP SECTION (Not required but increase AWStats features)<br><hr></td> </tr>\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(<FILE>) {
		my $savline=$_;
		chomp $_; s/\r//;
		$conflinenb++;
		if ($_ =~ /^#?LoadPlugin/i) {
			# Extract param and value
			my ($load,$value)=split(/=/,$_,2);
			my $active=0;
			# Remove comments not at beginning of line
			if ($load !~ /#.*LoadPlugin/i) { $active=1; }
			$param =~ s/^\s+//; $param =~ s/\s+$//;
			$value =~ s/#.*$//; 
			$value =~ s/^[\s\'\"]+//g; $value =~ s/[\s\'\"]+$//g;
			($value1,$value2)=split(/\s/,$value,2);
			if (! $pluginlinefound{$value1}) {	# To avoid plugin to be shown twice
				$pluginlinefound{$value1}=1;
				push @pconfparam, $value1;
				push @pconfactive, $active;
				push @pconfvaluep, $value2;
			}
		}	
	}
	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(<FILE>) {
			my $savline=$_;
			chomp $_; s/\r//;
			$conflinenb++;
			if ($_ =~ /^#?LoadPlugin/i) {
				# Extract param and value
				my ($load,$value)=split(/=/,$_,2);
				my $active=0;
				# Remove comments not at beginning of line
				if ($load !~ /#.*LoadPlugin/i) { $active=1; }
				$param =~ s/^\s+//; $param =~ s/\s+$//;
				$value =~ s/#.*$//; 
				$value =~ s/^[\s\'\"]+//g; $value =~ s/[\s\'\"]+$//g;
				($value1,$value2)=split(/\s/,$value,2);
				if (! $pluginlinefound{$value1}) {	# To avoid plugin to be shown twice
					push @pconfparam, $value1;
					push @pconfactive, $active;
					push @pconfvaluep, $value2;
				}
			}	
		}
		close FILE;
	}

	print "<tr> <td>Loaded plugins</td> <td>Plugin's parameters</td> <td> &nbsp; </td> </tr>\n";
	foreach my $key (0..(@pconfparam-1)) {
		print "<tr> <td> <input size=10 name=plugin_$pconfparam[$key] type=checkbox ".($pconfactive[$key]?" checked":"")."><b>$pconfparam[$key]</b></td> <td> <input size=30 name=plugin_param_$pconfparam[$key] type=text value='$pconfvaluep[$key]'> </td> <td> ";
		print &hblink($text{'help_help'}, "help.cgi?param=plugin_$pconfparam[$key]")." </td> </tr>\n";
	}	
	print "<tr> <td colspan=3 align=center><a href='edit_config.cgi?".($in{'new'}?"new=1&":"")."&file=$in{'file'}'>$text{'index_hideadvanced'}</a> <input type=\"hidden\" name=\"advanced\" value=\"4\"></td></tr>\n";
} else {
	print "<tr> <td colspan=3 align=center><a href='edit_config.cgi?".($in{'new'}?"new=1&":"")."advanced=4&file=$in{'file'}'>$text{'index_advanced4'}</a></td></tr>\n";
}	
print "<tr> <td colspan=3><br></td> </tr>\n";


if ($advanced) {
	print "<tr> <td colspan=3><br><hr></td> </tr>\n";
	print "<tr> <td colspan=3 align=center><a href='edit_config.cgi?".($in{'new'}?"new=1&":"")."file=$in{'file'}'>$text{'index_hideadvanced'}</a></td></tr>\n";
	print "<tr> <td colspan=3><hr></td> </tr>\n";
	print "</table>\n";
}
else{
	print "</table>\n";
}

@b=();
if ($in{'new'}) {
	push(@b, "<input type=submit value='$text{'create'}' onClick=\"return Submit_onClick();\">");
	}
else {
	if ($access{'global'}) {
		push(@b, "<input type=submit value='$text{'save'}' onClick=\"return Submit_onClick();\">");
	}
	if ($access{'add'}) {
		push(@b, "<input type=submit name='delete' value='$text{'delete'}'>");
	}
}

&spaced_buttons(@b);


print "</form>\n";

print "<hr>\n";
&footer("", $text{'index_return'});

awstats/help.cgi0100555000175700010010000000304507733443150013435 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 "<hr>\n";

my $helpparam=$in{'param'};
my $isplugin=0;
if ($helpparam =~ s/^plugin_//) { $isplugin=1; }

if ($isplugin) { print &text('help_subtitleplugin',$helpparam)."<br><br>\n"; }
else { print &text('help_subtitle',$helpparam)."<br><br>\n"; }

open(CONF, $config{'alt_conf'}) || &error("Failed to open sample config file");
my $output="";
my $savoutput="";
my $found=0;
while(<CONF>) {
	chomp $_; s/\r//;

	my $line="$_";

	if ($line !~ /#LoadPlugin/i && $line =~ s/^#//) {
		if ($line =~ /-----------------/) { 
			if ($output) { $savoutput=$output; }
			$output="";
			next;
		}
		$line =~ s/</&lt;/g;
		$line =~ s/>/&gt;/g;
		$output.="$line<br>";
	}
	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/0040755000175700010010000000000007733600003013256 5ustar  LaurentAucunawstats/images/icon.gif0100444000175700010010000000264507730125072014704 0ustar  LaurentAucunGIF87a00JR{JRJZRR{RRRZ{RZRZRZRZRZZZsZZZcZcZcZcZcZcZkZkZkZkcZZccscc{ccccccckckckcskZZkckkkkkkkkksk{sss{s{{cR{kR{kc{s{{{{{{{{΄{ƄƄ֌{Όތޔ{{kΜΜޥkkέε{{εƵε޽{ֽֽ޽ƥƭƭs{΄ΌΔΔέέεεεք֌ֵֽ֥֔֜֜ޜޥޭޭ޵޵޽޽ƵƜΥ,00H*\ȰÇ#JHŋ3jȱǏtxg|P$ˁ%HxF?rS%@Z1zHqǍ2JF$I
@2OxӇTz<(4zi0`*nr7}~
,v060Ѭ!G0HL8@Lz&ƺ?2x
2o((Q`U[2@IgfPAHtʤ9Tt٤	a]xA0O
8sJašM3C`G?„5ԐhY7\P-Dyh%B
CDF8hNpa#h(ECȀl`-5BJXĘ@a
68p
*"
(TBAZ,E^FחKt`i9 s@f+(gDK*J.@B+ '@hz*0$04AreD
C^p[6tH}%=Q&`Rl#QUB
^
rvp	
D;@?0۠7-
"hqX"	|@Ǿe9XK.EWlgwLq@;awstats/images/smallicon.gif0100444000175700010010000000175707730125002015731 0ustar  LaurentAucunGIF89aJR{JRJZRR{RRRZ{RZRZRZRZRZZZsZZZcZcZcZcZcZcZkZkZkZkcZZccscc{ccccccckckckcskZZkckkkkkkkkksk{sss{s{{cR{kR{kc{s{{{{{{{{΄{ƄƄ֌{Όތޔ{{kΜΜޥkkέε{{εƵε޽{ֽֽ޽ƥƭƭs{΄ΌΔΔέέεεεք֌ֵֽ֥֔֜֜ޜޥޭޭ޵޵޽޽ƵƜΥ!,H*\ȰÇCI0<7exahP
>5
<f5
xaL(0N9`pQMR,j̔YPfZ8qR$BH Q#B-QD2Ax7
QJ.T@
Un pijF /@$T@3>&{qװc^;awstats/index.cgi0100555000175700010010000001323607733467760013634 0ustar  LaurentAucun#!/usr/bin/perl
# index.cgi
# Display available config files

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 "<hr>\n";
	print "<p>",&text('index_eawstats', "<tt>$config{'awstats'}</tt>","$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
	print "<hr>\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 "<p>",&text('index_eversion', "<tt>$config{'awstats'}</tt>", "5.7 or older", "5.8"),"<p>\n";
		print "<hr>\n";
		&footer("/", $text{'index'});
		exit;
	}

	print "<hr>\n";
	print "<p>",&text('index_egetversion', "<tt>$config{'awstats'}</tt>", "<pre>$out</pre>", "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
	print "<hr>\n";
	&footer("/", $text{'index'});
	exit;
}

&header($text{'index_title'}, "", undef, 1, 1, 0, undef, undef, undef, &text('index_version', "$1.$2 $3"));
print "<hr>\n";
if ($1 < 5 || ($1 == 5 && $2 < 8)) {
	print "<p>",&text('index_eversion', "<tt>$config{'awstats'}</tt>", "$1.$2", "5.8"),"<p>\n";
	print "<hr>\n";
	&footer("/", $text{'index'});
	exit;
	}

# Check if sample file exists
if (!-r $config{'alt_conf'}) {
        print "<p>",&text('index_econf', "<tt>$config{'alt_conf'}</tt>",
                  "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
        print "<hr>\n";
        &footer("/", $text{'index'});
        exit;
	}
if (!-r $config{'awstats_conf'}) {
	print "<p>",&text('index_econfdir', "<tt>$config{'awstats_conf'}</tt>",
		  "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
	print "<hr>\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");
	$conf = &apache::get_config();
	@dirs = ( &apache::find_all_directives($conf, "CustomLog"),
		  &apache::find_all_directives($conf, "TransferLog") );
	$root = &apache::find_directive_struct("ServerRoot", $conf);
	foreach $d (@dirs) {
		local $lf = $d->{'words'}->[0];
		next if ($lf =~ /^\|/);
		if ($lf !~ /^\//) {
			$lf = "$root->{'words'}->[0]/$lf";
			}
		open(FILE, $lf);
		local $line = <FILE>;
		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 });
			}
		}
	}

# Add custom configfiles
push(@config, map { $_->{'custom'} = 1; $_ } &scan_config_dir());

print "Your user is allowed to view/edit config files into (or that are links to) ".$access{'dir'}.".<br><br>";  
if (@config) {
	print "<a href='edit_config.cgi?new=1'>$text{'index_add'}</a>\n"
		if ($access{'add'});
	print "<table border width=100%>\n";
	print "<tr $tb> <td rowspan=2><b>$text{'index_path'}</b></td> ",
	      "<td rowspan=2 align=center><b>$text{'index_create'}</b></td> ",
 	      "<td colspan=2 align=center><b>$text{'index_update'}</b></td> ",
	      "<td rowspan=2 align=center><b>$text{'index_view'}</b></td> </tr>\n";
	print "<tr $tb><td align=center>$text{'index_scheduled'}</td><td align=center>$text{'index_now'}</td></tr>\n";

	# Loop on each config file
	foreach my $l (@config) {
		next if (!&can_edit_config($l));
		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; }

		print "<tr $cb>\n";

		local ($size, $latest);
#		foreach $f (@files) {
#			local @st = stat($f);
#			$size += $st[7];
#			$latest = $st[9] if ($st[9] > $latest);
#			}
#		$latest = $latest ? localtime($latest) : "<br>";

		print "<td>";
		print "$l";
		if ($access{'global'}) {	# Edit config
	        print "<br><a href='edit_config.cgi?file=$l'>$text{'index_edit'}</a>\n";
		}
		print "</td>";

		local @st=stat($l);
		my ($sec,$min,$hour,$day,$month,$year,$wday,$yday) = localtime($st[10]);
		$year+=1900; $month++;
		printf("<td align=center>%04s-%02s-%02s %02s:%02s:%02s</td>",$year,$month,$day,$hour,$min,$sec);
	
		
		if ($access{'update'}) {	# Update
	        print "<td align=center><a href='schedule_stats.cgi?file=$l'>?</a></td>";
	        print "<td align=center><a href='update_stats.cgi?file=$l'>$text{'index_update2'}</a></td>\n";
		}
		else {
	        print "<td align=center>NA</td>";
	        print "<td align=center>NA</td>";
		}

#		print "<td>",$size > 10*1024*1024 ? int($size/1024/1024)." MB" :
#			     $size > 10*1024 ? int($size/1024)." KB" :
#			     $size ? "$size B" : $text{'index_empty'},"</td>\n";
#		print "<td>$latest</td>\n";
#		print "<td>",$lconf->{'sched'} ? $text{'yes'}
#					       : $text{'no'},"</td>\n";
#		if ($lconf->{'dir'} && -r "$lconf->{'dir'}/index.html") {

		if ($access{'view'}) {
			if ($config{'awstats_cgi'}) {
				print "<td align=center><a href='$config{'awstats_cgi'}?".($conf?"config=$conf":"").($dir?"&configdir=$dir":"")."' target=awstats>$text{'index_view2'}</a></td>\n";
			}
			else {
				print "<td align=center>".&text('index_cgi', "$gconfig{'webprefix'}/config.cgi?$module_name")."</td>";	
			}
		}
		else {
	        print "<td align=center>NA</td>";
		}
		print "</tr>\n";
		}
	print "</table>\n";
}
else {
	print "<p><b>$text{'index_noconfig'}</b><p>\n";
}

print "<a href='edit_config.cgi?new=1'>$text{'index_add'}</a><br>\n" if ($access{'add'});


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

awstats/install_check.pl0100444000175700010010000000063307730743264015164 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 (-d $config{'awstats_conf'} && -r $config{'alt_conf'}) { return 2; }
}

return 1;
}

awstats/lang/0040755000175700010010000000000007733600003012732 5ustar  LaurentAucunawstats/lang/en0100444000175700010010000000731607733454020013267 0ustar  LaurentAucunindex_title=AWStats Logfile Analysis
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 <a href='$2'>module configuration</a> is incorrect.
index_econfdir=The AWStats configuration directory $1 was not found on your system. Maybe AWStats is not installed, or your <a href='$2'>module configuration</a> is incorrect.
index_econf=The AWStats sample configuration file $1 was not found on your system. Maybe AWStats is not installed, or your <a href='$2'>module configuration</a> is incorrect.
index_cgi=<a href='$1'>CGI path not configured</a>
index_add=Add a new config file for analysis.
index_path=Config file
index_type=Type
index_size=Size
index_create=Created/Modified
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_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.<br>May be your <a href='$3'>module configuration</a> 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_allowed=Your user is allowed to view/edit config files into (or that are links that point to) $1

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_user=Run AWStats as user
edit_ecannot=You are not allowed to edit this config file
edit_efilecannot=The config file 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=Config directory was not entered or does not exist
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

update_title=Update statistics
update_ecannot=You are not allowed to update statistics

scheduled_title=Schedule statistic's update
scheduled_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

help_title=Help page
help_subtitle=<b>Help for config file parameter $1</b>
help_subtitleplugin=<b>Help for plugin $1</b>
help_notfound=Parameter not found in your sample file $1.<br>May be your AWStats version does not support it, so no help is available.
help_help=Helpawstats/lang/fr0100444000175700010010000001062607733454070013277 0ustar  LaurentAucunindex_title=Analyseur de log AWStats
index_version=AWStats version $1
index_eawstats=La commande du log analyseur $1 n'a pas t trouve sur le systme. Peut-etre AWStats n'est-il pas install, ou la <a href='$2'>configuration du module</a> est incorrecte.
index_econfdir=Le rpertoire des fichiers de configuration AWStats $1 n'a pas t trouv sur le systme. Peut-etre AWStats n'est-il pas install, ou la <a href='$2'>configuration du module</a> est incorrecte.
index_econf=Le fichier de configuration modle $1 n'a pas t trouv sur le systme. Peut-etre AWStats n'est-il pas install, ou la <a href='$2'>configuration du module</a> est incorrecte.
index_cgi=<a href='$1'>CGI path non configur</a>
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.
index_edit=Edition/Suppression
index_del=Suppression config
index_scheduled=Programme
index_now=Immdiate
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 systme est en version $2, mais ce module ne gre que les version $3 ou suprieures.
index_egetversion=Echec de la rcupration de la varsion d'AWStats. La command $1 a retourn : $2.<br>Peut-etre la <a href='$3'>configuration du module</a> est incorrecte.
index_advanced1=Voir paramtres de la 'OPTIONAL SETUP SECTION'
index_advanced2=Voir paramtres de la 'OPTIONAL ACCURACY SETUP SECTION'
index_advanced3=Voir paramtres de la 'OPTIONAL APPEARANCE SETUP SECTION'
index_advanced4=Voir paramtres de la 'OPTIONAL PLUGINS SETUP SECTION'
index_advanced5=Voir paramtres de la 'OPTIONAL EXTRA SETUP SECTION'
index_hideadvanced=Cacher paramtres optionnels
index_allowed=Votre login est autoris  voir/editer les fichiers de config dans (ou pointant vers) $1

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 cration de nouveau fichier de configuration
edit_file=Contenu du fichier
edit_add=Nom du fichier de config  crer
edit_user=Lancer AWStats sous l'utilisateur
edit_ecannot=Vous n'tes pas autoriss  diter ce fichier de configuration
edit_efilecannot=Le fichier de configuration n'est pas dans un rpertoire 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 dj existant
save_edir=Rpertoire des fichiers de configuration non renseign ou inexistant
save_ecannot=Vous n'tes autoriss  voir ou gnrer des rapports que pour des fichiers de config dans $1
save_errLogFile=Erreur sur le paramtre LogFile. Le fichier de log $1 n'existe pas ou n'est pas lisible
save_errLogFormat=Erreur sur le paramtre LogFormat. Paramtre non dfini
save_errSiteDomain=Erreur sur le paramtre SiteDomain. Paramtre non dfini
save_errDirData=Erreur sur le paramtre DirData. Paramtre non dfini ou rpertoire inexistant

update_title=Mise  jour des statistiques
update_ecannot=Vous n'tes pas autoris  mettre  jour les statistiques

scheduled_title=Programmation de mise  jour
scheduled_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 les fichiersCan add and delete config files?
acl_update=Peut mettre  jour les stats pour les fichiers config existant?
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

help_title=Page d'aide
help_subtitle=<b>Aide sur le paramtre de configuration $1</b>
help_subtitleplugin=<b>Aide sur le plugin $1</b>
help_notfound=Paramtre non trouv dans votre fichier de configuration modle $1.<br>Peut-tre votre version d'AWStats ne le supporte pas, aussi aucune aide n'est disponible.
help_help=Aideawstats/log_parser.pl0100444000175700010010000000103507730652600014504 0ustar  LaurentAucun# log_parser.pl
# Functions for parsing this module's logs

do 'awstats-lib.pl';

# parse_webmin_log(user, script, action, type, object, &params)
# 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", "<tt>".&html_escape($object)."</tt>");
	}
elsif ($type eq "global") {
	return $object eq "-" ? $text{"log_global"} :
		&text("log_global2", "<tt>".&html_escape($object)."</tt>");
	}
}

awstats/module.info0100444000175700010010000000026707731631102014155 0ustar  LaurentAucuncategory=system
longdesc=Generate and analyze statistics from web, proxy, wap, ftp or mail server log files
desc=AWStats Logfile Analysis
name=AWStats
version=1.100
depends=cron 1.000awstats/postinstall.pl0100444000175700010010000000007407730742704014732 0ustar  LaurentAucun
require 'aawstats-lib.pl';

sub module_install
{



}

1;

awstats/save_config.cgi0100555000175700010010000000503607733465612015001 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'}); }

&can_edit_config($in{'file'}) || &error($text{'edit_efilecannot'}." ".$in{'file'});


if ($in{'view'}) {
	# Re-direct to the view page
	&redirect("view_config.cgi/".&urlize(&urlize($in{'file'}))."/index.html");
	}
elsif ($in{'delete'}) {
	# Delete this config file from the configuration
	local $cfile = $in{'file'};
	&lock_file($cfile);
	unlink($cfile);
	&unlock_file($cfile);
	&webmin_log("delete", "log", $in{'file'});

	# 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
	if (!$in{'new'} && !$in{'file'}) { &error($text{'save_efile'}); }
	if ($in{'new'} && -r $in{'$file'}) { &error($text{'save_fileexists'}); }
	my $dir=$in{'file'}; $dir =~ s/[\\\/][^\\\/]+$//;
	if (! $dir) { $dir=$config{'awstats_conf'}; }

	if (! -d $dir) { &error($text{'save_edir'}); }

	%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 to the configuration
		&system_logged("cp '$config{'alt_conf'}' '$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.cgi0100555000175700010010000000114407732674532015526 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 "<hr>\n";

print "Feature not yet available\n";
print "You must manually check if AWStats update process is";

print " in crontab";
print " or added into a logrotate preprocessor task";

0;

awstats/uninstall.pl0100444000175700010010000000016107730742230014356 0ustar  LaurentAucun# uninstall.pl
# Called when webmin is uninstalled

require 'awstats-lib.pl';

sub module_uninstall
{




}

1;

awstats/update_stats.cgi0100555000175700010010000000145707732672076015224 0ustar  LaurentAucun#!/usr/bin/perl
# update_stats.cgi
# run AWStats update process

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 "<hr>\n";

my $command=$config{'awstats'}." -update -config=$conf -configdir=$dir";
print "Run update process with command:\n<br>\n";
print "$command<br>\n";
print "\Please wait...<br>\n";
print "<br>\n";

&foreign_require("proc", "proc-lib.pl");
proc::safe_process_exec($command,$config{'user'},undef, STDOUT,undef, 1, 1);


#$retour=`$command 2>&1`;
#print "$retour\n";

print "<hr>\n";
print "Update process finished\n";

0;

Man Man