(file) Return to awstats-1.5.wbm CVS log (file) (dir) Up to [RizwankCVS] / geekymedia_web / awstats-6.3 / tools / webmin

   1 rizwank 1.1 awstats/0040777000175700010010000000000010176535011012016 5ustar  LaurentAucunawstats/acl_security.pl0100555000175700010010000000463210014464036015037 0ustar  LaurentAucun
   2             do 'awstats-lib.pl';
   3             
   4             # acl_security_form(&options)
   5             # Output HTML for editing security options for the awstats module
   6             sub acl_security_form
   7             {
   8             print "<tr> <td colspan=2><b>$text{'acl_view'}</b></td>\n";
   9             printf "<td colspan=2 nowrap><input type=radio name=view value=1 %s> %s\n",
  10             	$_[0]->{'view'} ? "checked" : "", $text{'yes'};
  11             printf "<input type=radio name=view value=0 %s> %s</td> </tr>\n",
  12             	$_[0]->{'view'} ? "" : "checked", $text{'no'};
  13             
  14             print "<tr> <td colspan=2><b>$text{'acl_global'}</b></td>\n";
  15             printf "<td colspan=2 nowrap><input type=radio name=global value=1 %s> %s\n",
  16             	$_[0]->{'global'} ? "checked" : "", $text{'yes'};
  17             printf "<input type=radio name=global value=0 %s> %s</td> </tr>\n",
  18             	$_[0]->{'global'} ? "" : "checked", $text{'no'};
  19             
  20             print "<tr> <td colspan=2><b>$text{'acl_add'}</b></td>\n";
  21             printf "<td colspan=2 nowrap><input type=radio name=add value=1 %s> %s\n",
  22 rizwank 1.1 	$_[0]->{'add'} ? "checked" : "", $text{'yes'};
  23             printf "<input type=radio name=add value=0 %s> %s</td> </tr>\n",
  24             	$_[0]->{'add'} ? "" : "checked", $text{'no'};
  25             
  26             print "<tr> <td colspan=2><b>$text{'acl_update'}</b></td>\n";
  27             printf "<td colspan=2 nowrap><input type=radio name=update value=1 %s> %s\n",
  28                     $_[0]->{'update'} ? "checked" : "", $text{'yes'};
  29             printf "<input type=radio name=update value=0 %s> %s</td> </tr>\n",
  30                     $_[0]->{'update'} ? "" : "checked", $text{'no'};
  31             
  32             print "<tr> <td colspan=2><b>$text{'acl_user'}</b></td>\n";
  33             printf "<td colspan=2><input type=radio name=user_def value=1 %s> %s\n",
  34             	$_[0]->{'user'} eq "" ? "checked" : "", $text{'acl_this'};
  35             printf "<input type=radio name=user_def value=2 %s> %s\n",
  36             	$_[0]->{'user'} eq "*" ? "checked" : "", $text{'acl_any'};
  37             printf "<input type=radio name=user_def value=0 %s>\n",
  38             	$_[0]->{'user'} eq "*" || $_[0]->{'user'} eq "" ? "" : "checked";
  39             printf "<input name=user size=8 value='%s'> %s</td> </tr>\n",
  40             	$_[0]->{'user'} eq "*" ? "" : $_[0]->{'user'},
  41             	&user_chooser_button("user");
  42             
  43 rizwank 1.1 print "<tr> <td colspan=2><b>$text{'acl_dir'}</b></td>\n";
  44             print "<td colspan=2><input name=dir size=50 value='$_[0]->{'dir'}'></td> </tr>\n";
  45             }
  46             
  47             # acl_security_save(&options)
  48             # Parse the form for security options for the shell module
  49             sub acl_security_save
  50             {
  51             $_[0]->{'view'} = $in{'view'};
  52             $_[0]->{'global'} = $in{'global'};
  53             $_[0]->{'add'} = $in{'add'};
  54             $_[0]->{'update'} = $in{'update'};
  55             $_[0]->{'dir'} = $in{'dir'};
  56             $_[0]->{'user'} = $in{'user_def'} == 2 ? "*" : $in{'user_def'} == 1 ? "" : $in{'user'};
  57             }
  58             
  59             awstats/awstats-lib.pl0100777000175700010010000003467510161324231014616 0ustar  LaurentAucun# awstats-lib.pl
  60             # Common functions for editing the awstats config file
  61             
  62             do '../web-lib.pl';
  63             require '../javascript-lib.pl';
  64 rizwank 1.1 &init_config();
  65             
  66             #$config{'awstats'}||='/usr/local/awstats/wwwroot/cgi-bin/awstats.pl';
  67             $config{'awstats_conf'}||='/etc/awstats';
  68             $config{'alt_conf'}||='/etc/awstats/awstats.model.conf';
  69             
  70             $ENV{'AWSTATS_DEL_GATEWAY_INTERFACE'}=1;
  71             
  72             $cron_cmd = "$module_config_directory/awstats.pl";
  73             %access = &get_module_acl();
  74             
  75             
  76             #------------------------------------------------------------------------------
  77             # Function:     Show help tooltip
  78             # Parameters:   message urltotooltip
  79             # Input:        None
  80             # Output:       None
  81             # Return:		None
  82             #------------------------------------------------------------------------------
  83             sub hblink
  84             {
  85 rizwank 1.1     my $t=shift;
  86                 my $url=shift;
  87                 print "<a href=\"javascript:neww('$url');\">$t</a>";
  88             }
  89             
  90             
  91             #------------------------------------------------------------------------------
  92             # Function:     Update the awstats config file
  93             # Parameters:   configfile conf
  94             # Input:        None
  95             # Output:       None
  96             # Return:		None
  97             #------------------------------------------------------------------------------
  98             sub update_config
  99             {
 100                 my ($file,$conf)=@_;
 101                 if (! $file) { error("Call to update_config with wrong parameter"); }
 102             
 103                 open(FILE, $file) || error("Failed to open $file for update");
 104                 open(FILETMP, ">$file.tmp") || error("Failed to open $file.tmp for writing");
 105             
 106 rizwank 1.1     # $%conf contains param and values
 107                 my %confchanged=();
 108                 my $conflinenb = 0;
 109             
 110                 # First, change values that are already present in old config file
 111                 while(<FILE>) {
 112                     my $savline=$_;
 113             
 114                     chomp $_; s/\r//;
 115                     $conflinenb++;
 116             
 117                     # Remove comments not at beginning of line
 118                     $_ =~ s/\s#.*$//;
 119             
 120                     # Extract param and value
 121                     my ($param,$value)=split(/=/,$_,2);
 122                     $param =~ s/^\s+//; $param =~ s/\s+$//;
 123                     $value =~ s/#.*$//;
 124                     $value =~ s/^[\s\'\"]+//; $value =~ s/[\s\'\"]+$//;
 125             
 126                     if ($param) {
 127 rizwank 1.1             # cleanparam is param without begining #
 128                         my $cleanparam=$param; my $wascleaned=0;
 129                         if ($cleanparam =~ s/^#//) { $wascleaned=1; }
 130                         if ($cleanparam !~ /LoadPlugin/i && defined($conf->{$cleanparam})) {
 131                             # Value was provided from submit form in %conf hash array so we change line with this new value
 132                             $savline = "$cleanparam=\"".($conf->{$cleanparam})."\"\n";
 133                             $confchanged{$cleanparam}=1;
 134                         }
 135                         if ($cleanparam =~ /^LoadPlugin/i && $conf->{"advanced"} == 4) {
 136                             # It's a plugin load directive
 137                             my ($pluginname,$pluginparam)=split(/\s/,$value,2);
 138                             if ($conf->{"plugin_$pluginname"}) {	# Plugin loaded is asked
 139                                 $savline = "$cleanparam=\"$pluginname".($conf->{"plugin_param_$pluginname"}?" ".$conf->{"plugin_param_$pluginname"}:"")."\"\n";
 140                             } else {								# Plugin loaded is not asked
 141                                 $savline = "#$cleanparam=\"$pluginname".($conf->{"plugin_param_$pluginname"}?" ".$conf->{"plugin_param_$pluginname"}:"")."\"\n";
 142                             }
 143                             $confchanged{"plugin_$pluginname"}=1;
 144                         }
 145                     }
 146                     # Write line
 147                     print FILETMP "$savline";
 148 rizwank 1.1     }
 149             
 150                 # Now add values for directives that were not present in old config file
 151                 foreach my $key (keys %$conf) {
 152                     if ($key eq 'advanced') { next; }	# param to know if plugin setup section was opened
 153                     if ($key =~ /^plugin_/) { next; }	# field from plugin section, not an awstats directive
 154                     if ($confchanged{$key}) { next; }	# awstats directive already changed
 155                     print FILETMP "\n";
 156                     print FILETMP "# Param $key added by AWStats Webmin module\n";
 157                     print FILETMP "$key=\"$conf->{$key}\"\n";
 158                 }
 159             
 160                 # Now add plugin load that were not already present in old config file
 161                 foreach my $key (keys %$conf) {
 162                     my $pluginname = $key;
 163                     if ($pluginname !~ s/^plugin_//) { next; }			# not a plugin load row
 164                     if ($pluginname =~ /^param_/) { next; }				# not a plugin load row
 165                     if ($confchanged{"plugin_$pluginname"}) { next; }	# awstats directive or load plugin already changed
 166                     print FILETMP "\n";
 167                     print FILETMP "# Plugin load for plugin $pluginname added by AWStats Webmin module\n";
 168                     print FILETMP "LoadPlugin=\"$pluginname".($conf->{"plugin_param_$pluginname"}?" ".$conf->{"plugin_param_$pluginname"}:"")."\"\n";
 169 rizwank 1.1     }
 170             
 171                 close(FILE);
 172                 close(FILETMP);
 173             
 174                 # Move file to file.sav
 175                 if (rename("$file","$file.old")==0) {
 176                     error("Failed to make backup of current config file to $file.old");
 177                 }
 178             
 179                 # Move tmp file into config file
 180                 if (rename("$file.tmp","$file")==0) {
 181                     error("Failed to move tmp config file $file.tmp to $file");
 182                 }
 183             
 184             
 185                 return 0;
 186             }
 187             
 188             
 189             #------------------------------------------------------------------------------
 190 rizwank 1.1 # Function:     Read config file to return value of dirdata parameter
 191             # Parameters:   configfile
 192             # Input:        None
 193             # Output:       None
 194             # Return:		string  dirdata
 195             #------------------------------------------------------------------------------
 196             sub get_dirdata
 197             {
 198                 my $dirdata="notfound";
 199                 
 200                 my ($file)=@_;
 201                 if (! $file) { error("Call to get_dirdata with wrong parameter"); }
 202             
 203                 open(FILE, "<$file") || error("Failed to open $file for read");
 204             
 205                 # First, search value of DirData parameter
 206                 while(<FILE>) {
 207                     my $savline=$_;
 208             
 209                     chomp $_; s/\r//;
 210             
 211 rizwank 1.1         # Remove comments not at beginning of line
 212                     $_ =~ s/\s#.*$//;
 213             
 214                     # Extract param and value
 215                     my ($param,$value)=split(/=/,$_,2);
 216                     $param =~ s/^\s+//; $param =~ s/\s+$//;
 217                     $value =~ s/#.*$//;
 218                     $value =~ s/^[\s\'\"]+//; $value =~ s/[\s\'\"]+$//;
 219             
 220                     if ($param) {
 221                         # cleanparam is param without begining #
 222                         my $cleanparam=$param; my $wascleaned=0;
 223                         if ($cleanparam =~ s/^#//) { $wascleaned=1; }
 224                         if ($cleanparam =~ /^DirData/) {
 225                             $dirdata=$value;
 226                             last;
 227                         }
 228                     }
 229                 }
 230                 close(FILE);
 231             
 232 rizwank 1.1     return $dirdata;
 233             }
 234             
 235             
 236             use vars qw/ $regclean1 $regclean2 /;
 237             $regclean1=qr/<(recnb|\/td)>/i;
 238             $regclean2=qr/<\/?[^<>]+>/i;
 239             
 240             #------------------------------------------------------------------------------
 241             # Function:     Clean tags in a string
 242             # Parameters:   stringtodecode
 243             # Input:        None
 244             # Output:       None
 245             # Return:		decodedstring
 246             #------------------------------------------------------------------------------
 247             sub CleanFromTags {
 248             	my $stringtoclean=shift;
 249             	$stringtoclean =~ s/$regclean1/ /g;	# Replace <recnb> or </td> with space
 250             	$stringtoclean =~ s/$regclean2//g;	# Remove <xxx>
 251             	return $stringtoclean;
 252             }
 253 rizwank 1.1 
 254             
 255             #------------------------------------------------------------------------------
 256             # Function:		Format value in bytes in a string (Bytes, Kb, Mb, Gb)
 257             # Parameters:   bytes (integer value or "0.00")
 258             # Input:        None
 259             # Output:       None
 260             # Return:       "x.yz MB" or "x.yy KB" or "x Bytes" or "0"
 261             #------------------------------------------------------------------------------
 262             sub Format_Bytes {
 263             	my $bytes = shift||0;
 264             	my $fudge = 1;
 265             	# Do not use exp/log function to calculate 1024power, function make segfault on some unix/perl versions
 266             	if ($bytes >= ($fudge << 30)) { return sprintf("%.2f", $bytes/1073741824)." $text{'all_gb'}"; }
 267             	if ($bytes >= ($fudge << 20)) { return sprintf("%.2f", $bytes/1048576)."  $text{'all_mb'}"; }
 268             	if ($bytes >= ($fudge << 10)) { return sprintf("%.2f", $bytes/1024)."  $text{'all_kb'}"; }
 269             	if ($bytes < 0) { $bytes="?"; }
 270             	return int($bytes).(int($bytes)?" $text{'all_b'}":"");
 271             }
 272             
 273             
 274 rizwank 1.1 #------------------------------------------------------------------------------
 275             # Function:		Format a number
 276             # Parameters:   number
 277             # Input:        None
 278             # Output:       None
 279             # Return:       "999 999 999 999"
 280             #------------------------------------------------------------------------------
 281             sub Format_Number {
 282             	my $number = shift||0;
 283             	$number=~s/(\d)(\d\d\d)$/$1 $2/;
 284             	$number=~s/(\d)(\d\d\d\s\d\d\d)$/$1 $2/;
 285             	$number=~s/(\d)(\d\d\d\s\d\d\d\s\d\d\d)$/$1 $2/;
 286             	return $number;
 287             }
 288             
 289             
 290             #------------------------------------------------------------------------------
 291             # Function:		save_directive(&config, name, [value]*)
 292             # Parameters:   &config name [value]*
 293             # Input:        None
 294             # Output:       None
 295 rizwank 1.1 # Return:       None
 296             #------------------------------------------------------------------------------
 297             sub save_directive
 298             {
 299                 local ($conf, $name, @values) = @_;
 300                 local @old = &find($name, $conf);
 301                 local $lref = &read_file_lines($conf->[0]->{'file'});
 302                 local $i;
 303                 for($i=0; $i<@old || $i<@values; $i++) {
 304                     if ($i < @old && $i < @values) {
 305                         # Just replacing a line
 306                         $lref->[$old[$i]->{'line'}] = "$name $values[$i]";
 307                     }
 308                     elsif ($i < @old) {
 309                         # Deleting a line
 310                         splice(@$lref, $old[$i]->{'line'}, 1);
 311                         &renumber($conf, $old[$i]->{'line'}, -1);
 312                     }
 313                     elsif ($i < @values) {
 314                         # Adding a line
 315                         if (@old) {
 316 rizwank 1.1                 # after the last one of the same type
 317                             splice(@$lref, $old[$#old]->{'line'}+1, 0,
 318                             "$name $values[$i]");
 319                             &renumber($conf, $old[$#old]->{'line'}+1, 1);
 320                         }
 321                         else {
 322                             # at end of file
 323                             push(@$lref, "$name $values[$i]");
 324                         }
 325                     }
 326                 }
 327             }
 328             
 329             
 330             #------------------------------------------------------------------------------
 331             # Function:		renumber
 332             # Parameters:   &config line offset
 333             # Input:        None
 334             # Output:       None
 335             # Return:       None
 336             #------------------------------------------------------------------------------
 337 rizwank 1.1 sub renumber
 338             {
 339                 foreach $c (@{$_[0]}) {
 340                     $c->{'line'} += $_[2] if ($c->{'line'} >= $_[1]);
 341                 }
 342             }
 343             
 344             #------------------------------------------------------------------------------
 345             # Function:		temp_file_name
 346             # Parameters:   file
 347             # Input:        None
 348             # Output:       None
 349             # Return:       temp_file
 350             #------------------------------------------------------------------------------
 351             sub temp_file_name
 352             {
 353                 local $p = $_[0];
 354                 $p =~ s/^\///;
 355                 $p =~ s/\//_/g;
 356                 return "$module_config_directory/$p.tmp";
 357             }
 358 rizwank 1.1 
 359             
 360             #------------------------------------------------------------------------------
 361             # Function:		find
 362             # Parameters:   name &config
 363             #------------------------------------------------------------------------------
 364             sub find
 365             {
 366                 local @rv;
 367                 foreach $c (@{$_[1]}) {
 368                     push(@rv, $c) if (lc($c->{'name'}) eq lc($_[0]));
 369                 }
 370                 return wantarray ? @rv : $rv[0];
 371             }
 372             
 373             
 374             #------------------------------------------------------------------------------
 375             # Function:		find_value
 376             # Parameters:   name &config
 377             #------------------------------------------------------------------------------
 378             sub find_value
 379 rizwank 1.1 {
 380                 local @rv = map { $_->{'value'} } &find(@_);
 381                 return wantarray ? @rv : $rv[0];
 382             }
 383             
 384             
 385             #------------------------------------------------------------------------------
 386             # Function:		all_config_files
 387             # Parameters:   file
 388             #------------------------------------------------------------------------------
 389             sub all_config_files
 390             {
 391                 $_[0] =~ /^(.*)\/([^\/]+)$/;
 392                 local $dir = $1;
 393                 local $base = $2;
 394                 local ($f, @rv);
 395                 opendir(DIR, $dir);
 396                 foreach $f (readdir(DIR)) {
 397                     if ($f =~ /^\Q$base\E/ && -f "$dir/$f") {
 398                         push(@rv, "$dir/$f");
 399                     }
 400 rizwank 1.1     }
 401                 closedir(DIR);
 402                 return @rv;
 403             }
 404             
 405             
 406             #------------------------------------------------------------------------------
 407             # Function:		Get the configuration for some log file
 408             # Parameters:   path
 409             #------------------------------------------------------------------------------
 410             sub get_config
 411             {
 412                 local %rv;
 413                 &read_file($_[0], \%rv) || return undef;
 414                 return \%rv;
 415             }
 416             
 417             
 418             #------------------------------------------------------------------------------
 419             # Function:		generate_report_as_pdf
 420             # Parameters:   file, handle, escape
 421 rizwank 1.1 #------------------------------------------------------------------------------
 422             sub generate_report_as_pdf
 423             {
 424                 local $h = $_[1];
 425                 local $lconf = &get_config($_[0]);
 426                 local @all = &all_config_files($_[0]);
 427                 if (!@all) {
 428                     print $h "Log file $_[0] does not exist\n";
 429                     return;
 430                 }
 431                 local ($a, %mtime);
 432                 foreach $a (@all) {
 433                     local @st = stat($a);
 434                     $mtime{$a} = $st[9];
 435                 }
 436                 local $type = $lconf->{'type'} == 1 ? "" :
 437                 $lconf->{'type'} == 2 ? "-F squid" :
 438                 $lconf->{'type'} == 3 ? "-F ftp" : "";
 439                 local $cfile = &temp_file_name($_[0]);
 440                 local $conf = -r $cfile ? "-c $cfile" : "";
 441                 if ($lconf->{'over'}) {
 442 rizwank 1.1         unlink("$lconf->{'dir'}/awstats.current");
 443                     unlink("$lconf->{'dir'}/awstats.hist");
 444                 }
 445                 local $user = $lconf->{'user'} || "root";
 446                 if ($user ne "root" && -r $cfile) {
 447                     chmod(0644, $cfile);
 448                 }
 449                 foreach $a (sort { $mtime{$a} <=> $mtime{$b} } @all) {
 450                     local $cmd = "$config{'awstats'} $conf -o '$lconf->{'dir'}' $type -p '$a'";
 451                     if ($user ne "root") {
 452                         $cmd = "su \"$user\" -c \"$cmd\"";
 453                     }
 454                     open(OUT, "$cmd 2>&1 |");
 455                     while(<OUT>) {
 456                         print $h $_[2] ? &html_escape($_) : $_;
 457                     }
 458                     close(OUT);
 459                     return 0 if ($?);
 460                     &additional_config("exec", undef, $cmd);
 461                 }
 462                 return 1;
 463 rizwank 1.1 }
 464             
 465             
 466             #------------------------------------------------------------------------------
 467             # Function:		spaced_buttons
 468             #------------------------------------------------------------------------------
 469             sub spaced_buttons
 470             {
 471                 local $pc = int(100 / scalar(@_));
 472                 print "<table width=100%><tr>\n";
 473                 foreach $b (@_) {
 474                     local $al = $b eq $_[0] && scalar(@_) != 1 ? "align=left" : $b eq $_[@_-1] && scalar(@_) != 1 ? "align=right" : "align=center";
 475                     print "<td width=$pc% $al>$b</td>\n";
 476                 }
 477                 print "</tr>\n";
 478                 print "</table>\n";
 479             }
 480             
 481             
 482             #------------------------------------------------------------------------------
 483             # Function:		Scan directory $dir for config file. Return an array with full path
 484 rizwank 1.1 #------------------------------------------------------------------------------
 485             sub scan_config_dir
 486             {
 487                 my $dir=shift;
 488                 opendir(DIR, $dir) || return;
 489                 local @rv = grep { /^awstats\.(.*)conf$/ } sort readdir(DIR);
 490                 closedir(DIR);
 491                 foreach my $file (0..@rv-1) {
 492                     if ($rv[$file] eq 'awstats.model.conf') { next; }
 493                     $rv[$file]="$dir/".$rv[$file];
 494                     #print "$rv[0]\n<br>";
 495                 }
 496                 return @rv;
 497             }
 498             
 499             
 500             #------------------------------------------------------------------------------
 501             # Function:		can_edit_config
 502             #------------------------------------------------------------------------------
 503             sub can_edit_config
 504             {
 505 rizwank 1.1     foreach $d (split(/\s+/, $access{'dir'})) {
 506                     local $ok = &is_under_directory($d, $_[0]);
 507                     return 1 if ($ok);
 508                 }
 509                 return 0;
 510             }
 511             
 512             
 513             
 514             1;
 515             
 516             awstats/awstats-webmin_changelog.txt0100777000175700010010000000434610172230465017543 0ustar  LaurentAucunAWStats-Webmin module Changelog
 517             -------------------------------
 518             $Revision: 1.17 $ - $Author: eldy $ - $Date: 2005/01/15 15:05:25 $ 
 519             
 520             1.400
 521             
 522             New features/improvements:
 523             - Some change to add scheduler management for update process.
 524             - Creating new config files can be done by copying an old one.
 525             - Add a page for a summary of all config files on same pages.
 526 rizwank 1.1 - Added a row number on each row of index page.
 527             - Translation more complete.
 528             - Report GeoIP country, regions, city, isp and organizations versions.
 529             
 530             
 531             1.300
 532             
 533             New features/improvements:
 534             - Added a warning to explain to add '/private/etc' to webmin ACL for
 535               MacOS users.
 536             - A first screen for the schedule update feature.
 537             - Better description for ACL page.
 538             
 539             Fixes:
 540             - Translation was in french for some texts, whatever was choosed language.
 541             
 542             
 543             
 544             1.210
 545             
 546             New features/improvements:
 547 rizwank 1.1 - Added following parameters parameter in edit config area:
 548               BuildHistoryFormat
 549               BuildReportFormat
 550               LevelForFileTypesDetection
 551               LevelForWormsDetection
 552               URLWithQueryWithOnlyFollowingParameters
 553               ShowWormsStats
 554             - Removed LinkToIPWhoIs and LinkToWhoIs obsolete parameters.
 555             - Module setup parameter awstats_conf has been removed since now
 556               directories into wich you can scan/edit AWStats configuration files
 557               are defined in ACL users. Defined to /etc/awstats by default.
 558               Also added a link the the ACL page to edit this directory listing.
 559             - Added a streaming server log file type.
 560             
 561             Fixes:
 562             - Better error messages
 563             - Fixed ACL management on directory that contains config files.
 564             
 565             Other/Documentation:
 566             - Added german translation.
 567             
 568 rizwank 1.1 
 569             
 570             1.100
 571             
 572             New features/improvements:
 573             - All AWStats config parameters can be edited.
 574             - Added management of plugins
 575             - Added a file/dir selector for parameters that are files or directories.
 576             - Added javascript test in edit config pages.
 577             - Added a check that LogFile used with maillogconvert.pl has a 'Mail' type.
 578             
 579             Fixes:
 580             - Modify of old config files add the new parameters if not found.
 581             - Fixed wrong value saved for LogSeparator parameter.
 582             - Better check of old versions incompatibility.
 583             - Fix help page for parameters not found in model config file.
 584             - Fixed check of logfile for piped values.
 585             - Minor bug fixes.
 586             
 587             Other/Documentation:
 588             - Added French translation.
 589 rizwank 1.1 - Removed unused files.
 590             
 591             
 592             
 593             1.000
 594             
 595             - First release version.
 596             awstats/config0100555000175700010010000000021607754050072013206 0ustar  LaurentAucunawstats=/usr/local/awstats/wwwroot/cgi-bin/awstats.pl
 597             awstats_cgi=http://127.0.0.1/awstats/awstats.pl
 598             alt_conf=/etc/awstats/awstats.model.confawstats/config.info0100777000175700010010000000174110155335215014144 0ustar  LaurentAucunawstats=Absolute filesystem path to AWStats (CLI),0
 599             awstats_cgi=Absolute or relative URL path to AWStats (CGI),0
 600             alt_conf=Sample AWStats configuration file,3,/etc/awstats/awstats.model.conf
 601             plugin_1_geoip=Path for GeoIP country database file <small>(if AWStats geoip plugin is enabled)</small>,3,/usr/local/share/GeoIP/GeoIP.dat
 602             plugin_2_geoip_region_maxmind=Path for GeoIP region database file <small>(if AWStats geoip_region_maxmind plugin is enabled)</small>,3,/usr/local/share/GeoIP/GeoIPRegion.dat
 603             plugin_3_geoip_city_maxmind=Path for GeoIP city database file <small>(if AWStats geoip_city_maxmind plugin is enabled)</small>,3,/usr/local/share/GeoIP/GeoIPCity.dat
 604             plugin_4_geoip_isp_maxmind=Path for GeoIP isp database file <small>(if AWStats geoip_isp_maxmind plugin is enabled)</small>,3,/usr/local/share/GeoIP/GeoIPISP.dat
 605             plugin_5_geoip_org_maxmind=Path for GeoIP org database file <small>(if AWStats geoip_org_maxmind plugin is enabled)</small>,3,/usr/local/share/GeoIP/GeoIPOrg.dat
 606             awstats/defaultacl0100555000175700010010000000011407754032770014047 0ustar  LaurentAucunnoconfig=0
 607             view=1
 608             update=1
 609             dir=/etc/awstats ~/awstats
 610 rizwank 1.1 user=*
 611             global=1
 612             add=1
 613             awstats/edit_config.cgi0100777000175700010010000014114710156402203014756 0ustar  LaurentAucun#!/usr/bin/perl
 614             # edit_config.cgi
 615             # Display a form for adding a new config or editing an existing one.
 616             
 617             require './awstats-lib.pl';
 618             &ReadParse();
 619             
 620             if (! $access{'global'}) { &error($text{'edit_ecannot'}); }
 621             
 622             my $filecontent="";
 623             my $filetoopen="";
 624             if ($in{'new'}) {
 625                     $filetoopen=$config{'alt_conf'};
 626             }
 627             else {
 628                     $filetoopen=$in{'file'};
 629             }
 630             
 631 rizwank 1.1 if ($in{'new'}) {
 632             	$access{'add'} || &error($text{'edit_ecannot'});
 633             	&header($text{'edit_title1'}, "");
 634             	}
 635             else {
 636             	&can_edit_config($in{'file'}) || &error($text{'edit_ecannot'});
 637             	&header($text{'edit_title2'}, "");
 638             	}
 639             # Get parameters
 640             $lconf = &get_config($filetoopen);
 641             foreach my $key (keys %$lconf) {
 642             	$lconf->{$key}=~s/^\s*//g;
 643             	$lconf->{$key}=~s/^*[\"\']//;
 644             	$lconf->{$key}=~s/#.*$//;
 645             	$lconf->{$key}=~s/\s*$//g;
 646             	$lconf->{$key}=~s/[\"\']\s*$//;
 647             }
 648             
 649             # Put in @conflist, list of all existing config
 650             my @conflist=();
 651             foreach my $dir (split(/\s+/, $access{'dir'})) {
 652 rizwank 1.1 	push(@conflist, map { $_->{'custom'} = 1; $_ } &scan_config_dir($dir));
 653             }
 654             
 655             
 656             print "<hr>\n";
 657             
 658             print <<EOF;
 659             <SCRIPT LANGUAGE="JavaScript">
 660             function Submit_onClick() {
 661             EOF
 662             # If create
 663             if ($in{'new'} && scalar @conflist) {
 664             print <<EOF;
 665                 if (document.editconfig.create_mode[0].checked) {
 666                 	if (document.editconfig.file_to_copy.value=='') {
 667                 		alert('You must choose a config to copy for creating a new one by copy');
 668                 		document.editconfig.file_to_copy.focus();
 669                 		return false;
 670                 	}
 671                 } else {
 672             EOF
 673 rizwank 1.1 }
 674             # End If create
 675             print <<EOF;
 676                 	if (document.editconfig.LogFormat.value=='') {
 677                 		alert('$text{save_errLogFormat}');
 678                 		document.editconfig.LogFormat.focus();
 679                 		return false;
 680                 	}
 681                 	if (document.editconfig.LogFile.value.match(/maillogconvert.pl/)!=null && document.editconfig.LogType.value != 'M') {
 682                 		alert('Your log file is preprocessed by maillogconvert.pl but is not defined as a "Mail" log type.\\nChange LogFile or LogType parameter.');
 683                 		document.editconfig.LogType.focus();
 684                 		return false;
 685                 	}
 686                 	if (document.editconfig.SiteDomain.value=='') {
 687                 		alert('$text{save_errSiteDomain}');
 688                 		document.editconfig.SiteDomain.focus();
 689                 		return false;
 690                 	}
 691                 	if (document.editconfig.DirData.value=='') {
 692                 		alert('$text{save_errDirData}');
 693                 		document.editconfig.DirData.focus();
 694 rizwank 1.1     		return false;
 695                 	}
 696             EOF
 697             # If create
 698             if ($in{'new'} && scalar @conflist) {
 699             print <<EOF;
 700                 }
 701             EOF
 702             }
 703             # End If create
 704             print <<EOF;
 705             	return true;
 706             }
 707             
 708             function neww(id) {
 709             	var argv = neww.arguments;
 710             	var argc = neww.arguments.length;
 711             	tmp=id;
 712             	var l = (argc > 1) ? argv[1] : 640;
 713             	var h = (argc > 2) ? argv[2] : 450;
 714             	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");
 715 rizwank 1.1 	fen=window.open(tmp,'window',wfeatures);
 716             }
 717             </SCRIPT>
 718             EOF
 719             
 720             if (-d "/private/etc" && ! &can_edit_config("/private/etc")) { # For MacOS users
 721             	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:<br>\n";
 722             	print &text('index_changeallowed',"<a href=\"/acl/\">Webmin - Webmin Users</a>", $text{'index_title'})."<br>\n";
 723             }
 724             
 725             
 726             print "<form name='editconfig' action='save_config.cgi'>\n";
 727             
 728             print "<table border width=\"100%\">\n";
 729             print "<tr $tb> <td><b>";
 730             if ($in{'new'}) {
 731             	print &text('edit_headernew');
 732             }
 733             else {
 734             	print &text('edit_header',$in{'file'});
 735             }
 736 rizwank 1.1 print "</b></td> </tr>\n";
 737             print "<tr $cb> <td><table width=100%>\n";
 738             
 739             
 740             
 741             my $filenametosave="";
 742             if ($in{'new'}) {
 743             	print "<tr> <td><b>$text{'edit_add'}</b></td> <td>\n";
 744             	my $newfile="/etc/awstats/awstats.newconfig.conf";
 745             	print "<input type=text name=new size=50 value='$newfile'>";
 746             	print "</td> <td> </td> </tr>\n";
 747                 print "</table></td></tr></table>\n";
 748                 
 749                 if (scalar @conflist) {
 750                     print "<br><input name=\"create_mode\" type=\"radio\" value=\"by_copy\"> ".$text{'edit_create_by_copy'};
 751                     print "<table border width=\"100%\"><tr $cb><td>\n";
 752                     print "<table width=\"100%\">\n";
 753                 	print "<tr> <td><b>$text{'edit_config_to_copy'}</b></td> <td>\n";
 754                     print "<select name=\"file_to_copy\"><option value='' selected>&nbsp;</option>\n";
 755                    	foreach my $file (@conflist) {	
 756                    		next if (!&can_edit_config($file));
 757 rizwank 1.1        		print "<option value=\"$file\">$file</option>\n";
 758                    	}
 759                     print "</select>";
 760                 	print "</td> <td> </td> </tr>\n";
 761                     print "</table></td></tr></table>\n";
 762                 }
 763                 
 764                 print "<br><input name=\"create_mode\" type=\"radio\" value=\"from_scratch\" checked=true> ".$text{'edit_create_from_scratch'};
 765                 print "<table border width=\"100%\"><tr $cb><td>\n";
 766                 print "<table width=\"100%\">\n";
 767             } else {
 768             	print "<input type=hidden name=file value='$in{'file'}'>\n";
 769             }
 770             print "<input type=hidden name=oldfile value='$in{'file'}'>\n";
 771             
 772             print "<tr> <td colspan=3>MAIN SETUP SECTION (Required to make AWStats work)<br><hr></td> </tr>\n";
 773             
 774             print "<tr> <td><b>LogFile*</b></td> <td> <input type=text name=LogFile size=50 value='$lconf->{'LogFile'}'> ".&file_chooser_button("LogFile",0,0)." </td> <td> ";
 775             print &hblink($text{'help_help'}, "help.cgi?param=LogFile")." </td> </tr>\n";
 776             print "<tr> <td><b>LogType*</b></td> <td> ";
 777             print "<select name=LogType>";
 778 rizwank 1.1 print "<option value='W'".($lconf->{'LogType'} eq 'W'?" selected":"").">W (Web server log file)</option>\n";
 779             print "<option value='S'".($lconf->{'LogType'} eq 'S'?" selected":"").">S (Streaming server log file)</option>\n";
 780             print "<option value='M'".($lconf->{'LogType'} eq 'M'?" selected":"").">M (Mail server log file)</option>\n";
 781             print "<option value='F'".($lconf->{'LogType'} eq 'F'?" selected":"").">F (Ftp server log file)</option>\n";
 782             print "</select>\n";
 783             print "</td> <td> ";
 784             print &hblink($text{'help_help'}, "help.cgi?param=LogType")." </td> </tr>\n";
 785             print "<tr> <td><b>LogFormat*</b></td> <td> <input name=LogFormat type=text size=40 value='$lconf->{'LogFormat'}'> </td> <td> ";
 786             print &hblink($text{'help_help'}, "help.cgi?param=LogFormat")," </td> </tr>\n";
 787             print "<tr> <td><b>LogSeparator</b></td> <td> <input size=10 name=LogSeparator type=text value='$lconf->{'LogSeparator'}'> </td> <td> ";
 788             print &hblink($text{'help_help'}, "help.cgi?param=LogSeparator")." </td> </tr>\n";
 789             print "<tr> <td><b>SiteDomain*</b></td> <td> <input name=SiteDomain type=text value='$lconf->{'SiteDomain'}'> </td> <td> ";
 790             print &hblink($text{'help_help'}, "help.cgi?param=SiteDomain")." </td> </tr>\n";
 791             print "<tr> <td><b>HostAliases</b></td> <td> <input size=50 name=HostAliases type=text value='$lconf->{'HostAliases'}'> </td> <td> ";
 792             print &hblink($text{'help_help'}, "help.cgi?param=HostAliases")." </td> </tr>\n";
 793             print "<tr> <td><b>DNSLookup</b></td> <td> <input size=10 name=DNSLookup type=text value='$lconf->{'DNSLookup'}'> </td> <td> ";
 794             print &hblink($text{'help_help'}, "help.cgi?param=DNSLookup")." </td> </tr>\n";
 795             print "<tr> <td><b>DirData</b></td> <td> <input size=40 name=DirData type=text value='$lconf->{'DirData'}'> </td> <td> ";
 796             print &hblink($text{'help_help'}, "help.cgi?param=DirData")." </td> </tr>\n";
 797             print "<tr> <td><b>DirCgi</b></td> <td> <input size=30 name=DirCgi type=text value='$lconf->{'DirCgi'}'> </td> <td> ";
 798             print &hblink($text{'help_help'}, "help.cgi?param=DirCgi")." </td> </tr>\n";
 799 rizwank 1.1 print "<tr> <td><b>DirIcons</b></td> <td> <input size=30 name=DirIcons type=text value='$lconf->{'DirIcons'}'> </td> <td> ";
 800             print &hblink($text{'help_help'}, "help.cgi?param=DirIcons")." </td> </tr>\n";
 801             print "<tr> <td><b>AllowToUpdateStatsFromBrowser</b></td> <td> <input size=10 name=AllowToUpdateStatsFromBrowser type=text value='$lconf->{'AllowToUpdateStatsFromBrowser'}'> </td> <td> ";
 802             print &hblink($text{'help_help'}, "help.cgi?param=AllowToUpdateStatsFromBrowser")." </td> </tr>\n";
 803             print "<tr> <td><b>AllowFullYearView</b></td> <td> <input size=10 name=AllowFullYearView type=text value='$lconf->{'AllowFullYearView'}'> </td> <td> ";
 804             print &hblink($text{'help_help'}, "help.cgi?param=AllowFullYearView")." </td> </tr>\n";
 805             print "<tr> <td colspan=2><b>*</b> ".$text{'help_starrequired'}."</td> <td> ";
 806             
 807             
 808             print "<tr> <td colspan=3><br>OPTIONAL SETUP SECTION (Not required but increase AWStats features)<br><hr></td> </tr>\n";
 809             if ($in{'advanced'} == 1) {
 810             	print "<tr> <td><b>EnableLockForUpdate</b></td> <td> <input size=10 name=EnableLockForUpdate type=text value='$lconf->{'EnableLockForUpdate'}'> </td> <td> ";
 811             	print &hblink($text{'help_help'}, "help.cgi?param=EnableLockForUpdate")." </td> </tr>\n";
 812             	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> ";
 813             	print &hblink($text{'help_help'}, "help.cgi?param=DNSStaticCacheFile")." </td> </tr>\n";
 814             	print "<tr> <td><b>DNSLastUpdateCacheFile</b></td> <td> <input size=30 name=DNSLastUpdateCacheFile type=text value='$lconf->{'DNSLastUpdateCacheFile'}'> </td> <td> ";
 815             	print &hblink($text{'help_help'}, "help.cgi?param=DNSLastUpdateCacheFile")." </td> </tr>\n";
 816             	print "<tr> <td><b>SkipDNSLookupFor</b></td> <td> <input size=30 name=SkipDNSLookupFor type=text value='$lconf->{'SkipDNSLookupFor'}'> </td> <td> ";
 817             	print &hblink($text{'help_help'}, "help.cgi?param=SkipDNSLookupFor")." </td> </tr>\n";
 818             	print "<tr> <td><b>AllowAccessFromWebToAuthenticatedUsersOnly</b></td> <td> <input size=10 name=AllowAccessFromWebToAuthenticatedUsersOnly type=text value='$lconf->{'AllowAccessFromWebToAuthenticatedUsersOnly'}'> </td> <td> ";
 819             	print &hblink($text{'help_help'}, "help.cgi?param=AllowAccessFromWebToAuthenticatedUsersOnly")." </td> </tr>\n";
 820 rizwank 1.1 	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> ";
 821             	print &hblink($text{'help_help'}, "help.cgi?param=AllowAccessFromWebToFollowingAuthenticatedUsers")." </td> </tr>\n";
 822             	print "<tr> <td><b>AllowAccessFromWebToFollowingIPAddresses</b></td> <td> <input size=30 name=AllowAccessFromWebToFollowingIPAddresses type=text value='$lconf->{'AllowAccessFromWebToFollowingIPAddresses'}'> </td> <td> ";
 823             	print &hblink($text{'help_help'}, "help.cgi?param=AllowAccessFromWebToFollowingIPAddresses")." </td> </tr>\n";
 824             	print "<tr> <td><b>CreateDirDataIfNotExists</b></td> <td> <input size=10 name=CreateDirDataIfNotExists type=text value='$lconf->{'CreateDirDataIfNotExists'}'> </td> <td> ";
 825             	print &hblink($text{'help_help'}, "help.cgi?param=CreateDirDataIfNotExists")." </td> </tr>\n";
 826             	print "<tr> <td><b>BuildHistoryFormat</b></td> <td> <input size=10 name=BuildHistoryFormat type=text value='$lconf->{'BuildHistoryFormat'}'> </td> <td> ";
 827             	print &hblink($text{'help_help'}, "help.cgi?param=BuildHistoryFormat")." </td> </tr>\n";
 828             	print "<tr> <td><b>BuildReportFormat</b></td> <td> <input size=10 name=BuildReportFormat type=text value='$lconf->{'BuildReportFormat'}'> </td> <td> ";
 829             	print &hblink($text{'help_help'}, "help.cgi?param=BuildReportFormat")." </td> </tr>\n";
 830             	print "<tr> <td><b>SaveDatabaseFilesWithPermissionsForEveryone</b></td> <td> <input size=10 name=SaveDatabaseFilesWithPermissionsForEveryone type=text value='$lconf->{'SaveDatabaseFilesWithPermissionsForEveryone'}'> </td> <td> ";
 831             	print &hblink($text{'help_help'}, "help.cgi?param=SaveDatabaseFilesWithPermissionsForEveryone")." </td> </tr>\n";
 832             	print "<tr> <td><b>PurgeLogFile</b></td> <td> <input size=10 name=PurgeLogFile type=text value='$lconf->{'PurgeLogFile'}'> </td> <td> ";
 833             	print &hblink($text{'help_help'}, "help.cgi?param=PurgeLogFile")." </td> </tr>\n";
 834             	print "<tr> <td><b>ArchiveLogRecords</b></td> <td> <input size=10 name=ArchiveLogRecords type=text value='$lconf->{'ArchiveLogRecords'}'> </td> <td> ";
 835             	print &hblink($text{'help_help'}, "help.cgi?param=ArchiveLogRecords")." </td> </tr>\n";
 836             	print "<tr> <td><b>KeepBackupOfHistoricFiles</b></td> <td> <input size=10 name=KeepBackupOfHistoricFiles type=text value='$lconf->{'KeepBackupOfHistoricFiles'}'> </td> <td> ";
 837             	print &hblink($text{'help_help'}, "help.cgi?param=KeepBackupOfHistoricFiles")." </td> </tr>\n";
 838             	print "<tr> <td><b>DefaultFile</b></td> <td> <input size=20 name=DefaultFile type=text value='$lconf->{'DefaultFile'}'> </td> <td> ";
 839             	print &hblink($text{'help_help'}, "help.cgi?param=DefaultFile")." </td> </tr>\n";
 840             	print "<tr> <td><b>SkipHosts</b></td> <td> <input size=30 name=SkipHosts type=text value='$lconf->{'SkipHosts'}'> </td> <td> ";
 841 rizwank 1.1 	print &hblink($text{'help_help'}, "help.cgi?param=SkipHosts")." </td> </tr>\n";
 842             	print "<tr> <td><b>SkipUserAgents</b></td> <td> <input size=30 name=SkipUserAgents type=text value='$lconf->{'SkipUserAgents'}'> </td> <td> ";
 843             	print &hblink($text{'help_help'}, "help.cgi?param=SkipUserAgents")." </td> </tr>\n";
 844             	print "<tr> <td><b>SkipFiles</b></td> <td> <input size=30 name=SkipFiles type=text value='$lconf->{'SkipFiles'}'> </td> <td> ";
 845             	print &hblink($text{'help_help'}, "help.cgi?param=SkipFiles")." </td> </tr>\n";
 846             	print "<tr> <td><b>OnlyHosts</b></td> <td> <input size=30 name=OnlyHosts type=text value='$lconf->{'OnlyHosts'}'> </td> <td> ";
 847             	print &hblink($text{'help_help'}, "help.cgi?param=OnlyHosts")." </td> </tr>\n";
 848             	print "<tr> <td><b>OnlyUserAgents</b></td> <td> <input size=30 name=OnlyUserAgents type=text value='$lconf->{'OnlyUserAgents'}'> </td> <td> ";
 849             	print &hblink($text{'help_help'}, "help.cgi?param=OnlyUserAgents")." </td> </tr>\n";
 850             	print "<tr> <td><b>OnlyFiles</b></td> <td> <input size=30 name=OnlyFiles type=text value='$lconf->{'OnlyFiles'}'> </td> <td> ";
 851             	print &hblink($text{'help_help'}, "help.cgi?param=OnlyFiles")." </td> </tr>\n";
 852             	print "<tr> <td><b>NotPageList</b></td> <td> <input size=30 name=NotPageList type=text value='$lconf->{'NotPageList'}'> </td> <td> ";
 853             	print &hblink($text{'help_help'}, "help.cgi?param=NotPageList")." </td> </tr>\n";
 854             	print "<tr> <td><b>ValidHTTPCodes</b></td> <td> <input size=20 name=ValidHTTPCodes type=text value='$lconf->{'ValidHTTPCodes'}'> </td> <td> ";
 855             	print &hblink($text{'help_help'}, "help.cgi?param=ValidHTTPCodes")." </td> </tr>\n";
 856             	print "<tr> <td><b>ValidSMTPCodes</b></td> <td> <input size=20 name=ValidSMTPCodes type=text value='$lconf->{'ValidSMTPCodes'}'> </td> <td> ";
 857             	print &hblink($text{'help_help'}, "help.cgi?param=ValidSMTPCodes")." </td> </tr>\n";
 858             	print "<tr> <td><b>AuthenticatedUsersNotCaseSensitive</b></td> <td> <input size=10 name=AuthenticatedUsersNotCaseSensitive type=text value='$lconf->{'AuthenticatedUsersNotCaseSensitive'}'> </td> <td> ";
 859             	print &hblink($text{'help_help'}, "help.cgi?param=AuthenticatedUsersNotCaseSensitive")." </td> </tr>\n";
 860             	print "<tr> <td><b>URLNotCaseSensitive</b></td> <td> <input size=10 name=URLNotCaseSensitive type=text value='$lconf->{'URLNotCaseSensitive'}'> </td> <td> ";
 861             	print &hblink($text{'help_help'}, "help.cgi?param=URLNotCaseSensitive")." </td> </tr>\n";
 862 rizwank 1.1 	print "<tr> <td><b>URLWithAnchor</b></td> <td> <input size=10 name=URLWithAnchor type=text value='$lconf->{'URLWithAnchor'}'> </td> <td> ";
 863             	print &hblink($text{'help_help'}, "help.cgi?param=URLWithAnchor")." </td> </tr>\n";
 864             	print "<tr> <td><b>URLQuerySeparators</b></td> <td> <input size=10 name=URLQuerySeparators type=text value='$lconf->{'URLQuerySeparators'}'> </td> <td> ";
 865             	print &hblink($text{'help_help'}, "help.cgi?param=URLQuerySeparators")." </td> </tr>\n";
 866             	print "<tr> <td><b>URLWithQuery</b></td> <td> <input size=10 name=URLWithQuery type=text value='$lconf->{'URLWithQuery'}'> </td> <td> ";
 867             	print &hblink($text{'help_help'}, "help.cgi?param=URLWithQuery")." </td> </tr>\n";
 868             	print "<tr> <td><b>URLWithQueryWithOnlyFollowingParameters</b></td> <td> <input size=30 name=URLWithQueryWithOnlyFollowingParameters type=text value='$lconf->{'URLWithQueryWithOnlyFollowingParameters'}'> </td> <td> ";
 869             	print &hblink($text{'help_help'}, "help.cgi?param=URLWithQueryWithOnlyFollowingParameters")." </td> </tr>\n";
 870             	print "<tr> <td><b>URLWithQueryWithoutFollowingParameters</b></td> <td> <input size=30 name=URLWithQueryWithoutFollowingParameters type=text value='$lconf->{'URLWithQueryWithoutFollowingParameters'}'> </td> <td> ";
 871             	print &hblink($text{'help_help'}, "help.cgi?param=URLWithQueryWithoutFollowingParameters")." </td> </tr>\n";
 872             	print "<tr> <td><b>URLReferrerWithQuery</b></td> <td> <input size=10 name=URLReferrerWithQuery type=text value='$lconf->{'URLReferrerWithQuery'}'> </td> <td> ";
 873             	print &hblink($text{'help_help'}, "help.cgi?param=URLReferrerWithQuery")." </td> </tr>\n";
 874             	print "<tr> <td><b>WarningMessages</b></td> <td> <input size=10 name=WarningMessages type=text value='$lconf->{'WarningMessages'}'> </td> <td> ";
 875             	print &hblink($text{'help_help'}, "help.cgi?param=WarningMessages")." </td> </tr>\n";
 876             	print "<tr> <td><b>ErrorMessages</b></td> <td> <input size=40 name=ErrorMessages type=text value='$lconf->{'ErrorMessages'}'> </td> <td> ";
 877             	print &hblink($text{'help_help'}, "help.cgi?param=ErrorMessages")." </td> </tr>\n";
 878             	print "<tr> <td><b>DebugMessages</b></td> <td> <input size=10 name=DebugMessages type=text value='$lconf->{'DebugMessages'}'> </td> <td> ";
 879             	print &hblink($text{'help_help'}, "help.cgi?param=DebugMessages")." </td> </tr>\n";
 880             	print "<tr> <td><b>NbOfLinesForCorruptedLog</b></td> <td> <input size=10 name=NbOfLinesForCorruptedLog type=text value='$lconf->{'NbOfLinesForCorruptedLog'}'> </td> <td> ";
 881             	print &hblink($text{'help_help'}, "help.cgi?param=NbOfLinesForCorruptedLog")." </td> </tr>\n";
 882             	print "<tr> <td><b>WrapperScript</b></td> <td> <input size=20 name=WrapperScript type=text value='$lconf->{'WrapperScript'}'> </td> <td> ";
 883 rizwank 1.1 	print &hblink($text{'help_help'}, "help.cgi?param=WrapperScript")." </td> </tr>\n";
 884             	print "<tr> <td><b>DecodeUA</b></td> <td> <input size=10 name=DecodeUA type=text value='$lconf->{'DecodeUA'}'> </td> <td> ";
 885             	print &hblink($text{'help_help'}, "help.cgi?param=DecodeUA")." </td> </tr>\n";
 886             	print "<tr> <td><b>MiscTrackerUrl</b></td> <td> <input size=30 name=MiscTrackerUrl type=text value='$lconf->{'MiscTrackerUrl'}'> </td> <td> ";
 887             	print &hblink($text{'help_help'}, "help.cgi?param=MiscTrackerUrl")." </td> </tr>\n";
 888             	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";
 889             }
 890             else {
 891             	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";
 892             }
 893             print "<tr> <td colspan=3><br></td> </tr>\n";
 894             
 895             print "<tr> <td colspan=3><br>OPTIONAL ACCURACY SETUP SECTION (Not required but increase AWStats features)<br><hr></td> </tr>\n";
 896             if ($in{'advanced'} == 2) {
 897             	print "<tr> <td><b>LevelForBrowsersDetection</b></td> <td> <input size=10 type=text name=LevelForBrowsersDetection value='$lconf->{'LevelForBrowsersDetection'}'> </td> <td> ";
 898             	print &hblink($text{'help_help'}, "help.cgi?param=LevelForBrowsersDetection")." </td> </tr>\n";
 899             	print "<tr> <td><b>LevelForOSDetection</b></td> <td> <input size=10 type=text name=LevelForOSDetection value='$lconf->{'LevelForOSDetection'}'> </td> <td> ";
 900             	print &hblink($text{'help_help'}, "help.cgi?param=LevelForOSDetection")." </td> </tr>\n";
 901             	print "<tr> <td><b>LevelForRefererAnalyze</b></td> <td> <input size=10 type=text name=LevelForRefererAnalyze value='$lconf->{'LevelForRefererAnalyze'}'> </td> <td> ";
 902             	print &hblink($text{'help_help'}, "help.cgi?param=LevelForRefererAnalyze")." </td> </tr>\n";
 903             	print "<tr> <td><b>LevelForRobotsDetection</b></td> <td> <input size=10 type=text name=LevelForRobotsDetection value='$lconf->{'LevelForRobotsDetection'}'> </td> <td> ";
 904 rizwank 1.1 	print &hblink($text{'help_help'}, "help.cgi?param=LevelForRobotsDetection")." </td> </tr>\n";
 905             	print "<tr> <td><b>LevelForSearchEnginesDetection</b></td> <td> <input size=10 type=text name=LevelForSearchEnginesDetection value='$lconf->{'LevelForSearchEnginesDetection'}'> </td> <td> ";
 906             	print &hblink($text{'help_help'}, "help.cgi?param=LevelForSearchEnginesDetection")." </td> </tr>\n";
 907             	print "<tr> <td><b>LevelForKeywordsDetection</b></td> <td> <input size=10 type=text name=LevelForKeywordsDetection value='$lconf->{'LevelForKeywordsDetection'}'> </td> <td> ";
 908             	print &hblink($text{'help_help'}, "help.cgi?param=LevelForKeywordsDetection")." </td> </tr>\n";
 909             	print "<tr> <td><b>LevelForFileTypesDetection</b></td> <td> <input size=10 type=text name=LevelForFileTypesDetection value='$lconf->{'LevelForFileTypesDetection'}'> </td> <td> ";
 910             	print &hblink($text{'help_help'}, "help.cgi?param=LevelForFileTypesDetection")." </td> </tr>\n";
 911             	print "<tr> <td><b>LevelForWormsDetection</b></td> <td> <input size=10 type=text name=LevelForWormsDetection value='$lconf->{'LevelForWormsDetection'}'> </td> <td> ";
 912             	print &hblink($text{'help_help'}, "help.cgi?param=LevelForWormsDetection")." </td> </tr>\n";
 913             	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";
 914             } else {
 915             	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";
 916             }	
 917             print "<tr> <td colspan=3><br></td> </tr>\n";
 918             
 919             print "<tr> <td colspan=3><br>OPTIONAL APPEARANCE SETUP SECTION (Not required but increase AWStats features)<br><hr></td> </tr>\n";
 920             if ($in{'advanced'} == 3) {
 921             	print "<tr> <td><b>UseFramesWhenCGI</b></td> <td> <input size=10 name=UseFramesWhenCGI type=text value='$lconf->{'UseFramesWhenCGI'}'> </td> <td> ";
 922             	print &hblink($text{'help_help'}, "help.cgi?param=UseFramesWhenCGI")." </td> </tr>\n";
 923             	print "<tr> <td><b>DetailedReportsOnNewWindows</b></td> <td> <input size=10 name=DetailedReportsOnNewWindows type=text value='$lconf->{'DetailedReportsOnNewWindows'}'> </td> <td> ";
 924             	print &hblink($text{'help_help'}, "help.cgi?param=DetailedReportsOnNewWindows")." </td> </tr>\n";
 925 rizwank 1.1 	print "<tr> <td><b>Expires</b></td> <td> <input size=10 name=Expires type=text value='$lconf->{'Expires'}'> </td> <td> ";
 926             	print &hblink($text{'help_help'}, "help.cgi?param=Expires")." </td> </tr>\n";
 927             	print "<tr> <td><b>MaxRowsInHTMLOutput</b></td> <td> <input size=10 name=MaxRowsInHTMLOutput type=text value='$lconf->{'MaxRowsInHTMLOutput'}'> </td> <td> ";
 928             	print &hblink($text{'help_help'}, "help.cgi?param=MaxRowsInHTMLOutput")." </td> </tr>\n";
 929             	print "<tr> <td><b>Lang</b></td> <td> <input size=10 name=Lang type=text value='$lconf->{'Lang'}'> </td> <td> ";
 930             	print &hblink($text{'help_help'}, "help.cgi?param=Lang")." </td> </tr>\n";
 931             	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> ";
 932             	print &hblink($text{'help_help'}, "help.cgi?param=DirLang")." </td> </tr>\n";
 933             	print "<tr> <td><b>ShowMenu</b></td> <td> <input size=10 name=ShowMenu type=text value='$lconf->{'ShowMenu'}'> </td> <td> ";
 934             	print &hblink($text{'help_help'}, "help.cgi?param=ShowMenu")." </td> </tr>\n";
 935             	print "<tr> <td><b>ShowMonthStats</b></td> <td> <input size=10 name=ShowMonthStats type=text value='$lconf->{'ShowMonthStats'}'> </td> <td> ";
 936             	print &hblink($text{'help_help'}, "help.cgi?param=ShowMonthStats")." </td> </tr>\n";
 937             	print "<tr> <td><b>ShowDaysOfMonthStats</b></td> <td> <input size=10 name=ShowDaysOfMonthStats type=text value='$lconf->{'ShowDaysOfMonthStats'}'> </td> <td> ";
 938             	print &hblink($text{'help_help'}, "help.cgi?param=ShowDaysOfMonthStats")." </td> </tr>\n";
 939             	print "<tr> <td><b>ShowDaysOfWeekStats</b></td> <td> <input size=10 name=ShowDaysOfWeekStats type=text value='$lconf->{'ShowDaysOfWeekStats'}'> </td> <td> ";
 940             	print &hblink($text{'help_help'}, "help.cgi?param=ShowDaysOfWeekStats")." </td> </tr>\n";
 941             	print "<tr> <td><b>ShowHoursStats</b></td> <td> <input size=10 name=ShowHoursStats type=text value='$lconf->{'ShowHoursStats'}'> </td> <td> ";
 942             	print &hblink($text{'help_help'}, "help.cgi?param=ShowHoursStats")." </td> </tr>\n";
 943             	print "<tr> <td><b>ShowDomainsStats</b></td> <td> <input size=10 name=ShowDomainsStats type=text value='$lconf->{'ShowDomainsStats'}'> </td> <td> ";
 944             	print &hblink($text{'help_help'}, "help.cgi?param=ShowDomainsStats")." </td> </tr>\n";
 945             	print "<tr> <td><b>ShowHostsStats</b></td> <td> <input size=10 name=ShowHostsStats type=text value='$lconf->{'ShowHostsStats'}'> </td> <td> ";
 946 rizwank 1.1 	print &hblink($text{'help_help'}, "help.cgi?param=ShowHostsStats")." </td> </tr>\n";
 947             	print "<tr> <td><b>ShowAuthenticatedUsers</b></td> <td> <input size=10 name=ShowAuthenticatedUsers type=text value='$lconf->{'ShowAuthenticatedUsers'}'> </td> <td> ";
 948             	print &hblink($text{'help_help'}, "help.cgi?param=ShowAuthenticatedUsers")." </td> </tr>\n";
 949             	print "<tr> <td><b>ShowRobotsStats</b></td> <td> <input size=10 name=ShowRobotsStats type=text value='$lconf->{'ShowRobotsStats'}'> </td> <td> ";
 950             	print &hblink($text{'help_help'}, "help.cgi?param=ShowRobotsStats")." </td> </tr>\n";
 951             	print "<tr> <td><b>ShowWormsStats</b></td> <td> <input size=10 name=ShowWormsStats type=text value='$lconf->{'ShowWormsStats'}'> </td> <td> ";
 952             	print &hblink($text{'help_help'}, "help.cgi?param=ShowWormsStats")." </td> </tr>\n";
 953             	print "<tr> <td><b>ShowEMailSenders</b></td> <td> <input size=10 name=ShowEMailSenders type=text value='$lconf->{'ShowEMailSenders'}'> </td> <td> ";
 954             	print &hblink($text{'help_help'}, "help.cgi?param=ShowEMailSenders")." </td> </tr>\n";
 955             	print "<tr> <td><b>ShowEMailReceivers</b></td> <td> <input size=10 name=ShowEMailReceivers type=text value='$lconf->{'ShowEMailReceivers'}'> </td> <td> ";
 956             	print &hblink($text{'help_help'}, "help.cgi?param=ShowEMailReceivers")." </td> </tr>\n";
 957             	print "<tr> <td><b>ShowSessionsStats</b></td> <td> <input size=10 name=ShowSessionsStats type=text value='$lconf->{'ShowSessionsStats'}'> </td> <td> ";
 958             	print &hblink($text{'help_help'}, "help.cgi?param=ShowSessionsStats")." </td> </tr>\n";
 959             	print "<tr> <td><b>ShowPagesStats</b></td> <td> <input size=10 name=ShowPagesStats type=text value='$lconf->{'ShowPagesStats'}'> </td> <td> ";
 960             	print &hblink($text{'help_help'}, "help.cgi?param=ShowPagesStats")." </td> </tr>\n";
 961             	print "<tr> <td><b>ShowFileTypesStats</b></td> <td> <input size=10 name=ShowFileTypesStats type=text value='$lconf->{'ShowFileTypesStats'}'> </td> <td> ";
 962             	print &hblink($text{'help_help'}, "help.cgi?param=ShowFileTypesStats")." </td> </tr>\n";
 963             	print "<tr> <td><b>ShowFileSizesStats</b></td> <td> <input size=10 name=ShowFileSizesStats type=text value='$lconf->{'ShowFileSizesStats'}'> </td> <td> ";
 964             	print &hblink($text{'help_help'}, "help.cgi?param=ShowFileSizesStats")." </td> </tr>\n";
 965             	print "<tr> <td><b>ShowOSStats</b></td> <td> <input size=10 name=ShowOSStats type=text value='$lconf->{'ShowOSStats'}'> </td> <td> ";
 966             	print &hblink($text{'help_help'}, "help.cgi?param=ShowOSStats")." </td> </tr>\n";
 967 rizwank 1.1 	print "<tr> <td><b>ShowBrowsersStats</b></td> <td> <input size=10 name=ShowBrowsersStats type=text value='$lconf->{'ShowBrowsersStats'}'> </td> <td> ";
 968             	print &hblink($text{'help_help'}, "help.cgi?param=ShowBrowsersStats")." </td> </tr>\n";
 969             	print "<tr> <td><b>ShowScreenSizeStats</b></td> <td> <input size=10 name=ShowScreenSizeStats type=text value='$lconf->{'ShowScreenSizeStats'}'> </td> <td> ";
 970             	print &hblink($text{'help_help'}, "help.cgi?param=ShowScreenSizeStats")." </td> </tr>\n";
 971             	print "<tr> <td><b>ShowOriginStats</b></td> <td> <input size=10 name=ShowOriginStats type=text value='$lconf->{'ShowOriginStats'}'> </td> <td> ";
 972             	print &hblink($text{'help_help'}, "help.cgi?param=ShowOriginStats")." </td> </tr>\n";
 973             	print "<tr> <td><b>ShowKeyphrasesStats</b></td> <td> <input size=10 name=ShowKeyphrasesStats type=text value='$lconf->{'ShowKeyphrasesStats'}'> </td> <td> ";
 974             	print &hblink($text{'help_help'}, "help.cgi?param=ShowKeyphrasesStats")." </td> </tr>\n";
 975             	print "<tr> <td><b>ShowKeywordsStats</b></td> <td> <input size=10 name=ShowKeywordsStats type=text value='$lconf->{'ShowKeywordsStats'}'> </td> <td> ";
 976             	print &hblink($text{'help_help'}, "help.cgi?param=ShowKeywordsStats")." </td> </tr>\n";
 977             	print "<tr> <td><b>ShowMiscStats</b></td> <td> <input size=10 name=ShowMiscStats type=text value='$lconf->{'ShowMiscStats'}'> </td> <td> ";
 978             	print &hblink($text{'help_help'}, "help.cgi?param=ShowMiscStats")." </td> </tr>\n";
 979             	print "<tr> <td><b>ShowHTTPErrorsStats</b></td> <td> <input size=10 name=ShowHTTPErrorsStats type=text value='$lconf->{'ShowHTTPErrorsStats'}'> </td> <td> ";
 980             	print &hblink($text{'help_help'}, "help.cgi?param=ShowHTTPErrorsStats")." </td> </tr>\n";
 981             	print "<tr> <td><b>ShowSMTPErrorsStats</b></td> <td> <input size=10 name=ShowSMTPErrorsStats type=text value='$lconf->{'ShowSMTPErrorsStats'}'> </td> <td> ";
 982             	print &hblink($text{'help_help'}, "help.cgi?param=ShowSMTPErrorsStats")." </td> </tr>\n";
 983             	print "<tr> <td><b>ShowClusterStats</b></td> <td> <input size=10 name=ShowClusterStats type=text value='$lconf->{'ShowClusterStats'}'> </td> <td> ";
 984             	print &hblink($text{'help_help'}, "help.cgi?param=ShowClusterStats")." </td> </tr>\n";
 985             	print "<tr> <td><b>AddDataArrayMonthStats</b></td> <td> <input size=10 name=AddDataArrayMonthStats type=text value='$lconf->{'AddDataArrayMonthStats'}'> </td> <td> ";
 986             	print &hblink($text{'help_help'}, "help.cgi?param=AddDataArrayMonthStats")." </td> </tr>\n";
 987             	print "<tr> <td><b>AddDataArraySHowDaysOfMonthStats</b></td> <td> <input size=10 name=AddDataArraySHowDaysOfMonthStats type=text value='$lconf->{'AddDataArrayShowDaysOfMonthStats'}'> </td> <td> ";
 988 rizwank 1.1 	print &hblink($text{'help_help'}, "help.cgi?param=AddDataArraySHowDaysOfMonthStats")." </td> </tr>\n";
 989             	print "<tr> <td><b>AddDataArrayShowDaysOfWeekStats</b></td> <td> <input size=10 name=AddDataArrayShowDaysOfWeekStats type=text value='$lconf->{'AddDataArrayShowDaysOfWeekStats'}'> </td> <td> ";
 990             	print &hblink($text{'help_help'}, "help.cgi?param=AddDataArrayShowDaysOfWeekStats")." </td> </tr>\n";
 991             	print "<tr> <td><b>AddDataArrayShowHoursStats</b></td> <td> <input size=10 name=AddDataArrayShowHoursStats type=text value='$lconf->{'AddDataArrayShowHoursStats'}'> </td> <td> ";
 992             	print &hblink($text{'help_help'}, "help.cgi?param=AddDataArrayShowHoursStats")." </td> </tr>\n";
 993             	print "<tr> <td><b>IncludeInternalLinksInOriginSection</b></td> <td> <input size=10 name=IncludeInternalLinksInOriginSection type=text value='$lconf->{'IncludeInternalLinksInOriginSection'}'> </td> <td> ";
 994             	print &hblink($text{'help_help'}, "help.cgi?param=IncludeInternalLinksInOriginSection")." </td> </tr>\n";
 995             	print "<tr> <td><b>MaxNbOfDomain </b></td> <td> <input size=10 name=MaxNbOfDomain type=text value='$lconf->{'MaxNbOfDomain '}'> </td> <td> ";
 996             	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfDomain ")." </td> </tr>\n";
 997             	print "<tr> <td><b>MinHitDomain  </b></td> <td> <input size=10 name=MinHitDomain type=text value='$lconf->{'MinHitDomain  '}'> </td> <td> ";
 998             	print &hblink($text{'help_help'}, "help.cgi?param=MinHitDomain  ")." </td> </tr>\n";
 999             	print "<tr> <td><b>MaxNbOfHostsShown </b></td> <td> <input size=10 name=MaxNbOfHostsShown  type=text value='$lconf->{'MaxNbOfHostsShown '}'> </td> <td> ";
1000             	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfHostsShown ")." </td> </tr>\n";
1001             	print "<tr> <td><b>MinHitHost    </b></td> <td> <input size=10 name=MinHitHost     type=text value='$lconf->{'MinHitHost    '}'> </td> <td> ";
1002             	print &hblink($text{'help_help'}, "help.cgi?param=MinHitHost    ")." </td> </tr>\n";
1003             	print "<tr> <td><b>MaxNbOfLoginShown </b></td> <td> <input size=10 name=MaxNbOfLoginShown  type=text value='$lconf->{'MaxNbOfLoginShown '}'> </td> <td> ";
1004             	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfLoginShown ")." </td> </tr>\n";
1005             	print "<tr> <td><b>MinHitLogin   </b></td> <td> <input size=10 name=MinHitLogin    type=text value='$lconf->{'MinHitLogin   '}'> </td> <td> ";
1006             	print &hblink($text{'help_help'}, "help.cgi?param=MinHitLogin   ")." </td> </tr>\n";
1007             	print "<tr> <td><b>MaxNbOfRobotShown </b></td> <td> <input size=10 name=MaxNbOfRobotShown  type=text value='$lconf->{'MaxNbOfRobotShown '}'> </td> <td> ";
1008             	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfRobotShown ")." </td> </tr>\n";
1009 rizwank 1.1 	print "<tr> <td><b>MinHitRobot   </b></td> <td> <input size=10 name=MinHitRobot    type=text value='$lconf->{'MinHitRobot   '}'> </td> <td> ";
1010             	print &hblink($text{'help_help'}, "help.cgi?param=MinHitRobot   ")." </td> </tr>\n";
1011             	print "<tr> <td><b>MaxNbOfPageShown </b></td> <td> <input size=10 name=MaxNbOfPageShown  type=text value='$lconf->{'MaxNbOfPageShown '}'> </td> <td> ";
1012             	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfPageShown ")." </td> </tr>\n";
1013             	print "<tr> <td><b>MinHitFile    </b></td> <td> <input size=10 name=MinHitFile     type=text value='$lconf->{'MinHitFile    '}'> </td> <td> ";
1014             	print &hblink($text{'help_help'}, "help.cgi?param=MinHitFile    ")." </td> </tr>\n";
1015             	print "<tr> <td><b>MaxNbOfOsShown </b></td> <td> <input size=10 name=MaxNbOfOsShown  type=text value='$lconf->{'MaxNbOfOsShown '}'> </td> <td> ";
1016             	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfOsShown ")." </td> </tr>\n";
1017             	print "<tr> <td><b>MinHitOs      </b></td> <td> <input size=10 name=MinHitOs       type=text value='$lconf->{'MinHitOs      '}'> </td> <td> ";
1018             	print &hblink($text{'help_help'}, "help.cgi?param=MinHitOs      ")." </td> </tr>\n";
1019             	print "<tr> <td><b>MaxNbOfBrowsersShown </b></td> <td> <input size=10 name=MaxNbOfBrowsersShown  type=text value='$lconf->{'MaxNbOfBrowsersShown '}'> </td> <td> ";
1020             	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfBrowsersShown ")." </td> </tr>\n";
1021             	print "<tr> <td><b>MinHitBrowser </b></td> <td> <input size=10 name=MinHitBrowser  type=text value='$lconf->{'MinHitBrowser '}'> </td> <td> ";
1022             	print &hblink($text{'help_help'}, "help.cgi?param=MinHitBrowser ")." </td> </tr>\n";
1023             	print "<tr> <td><b>MaxNbOfScreenSizesShown </b></td> <td> <input size=10 name=MaxNbOfScreenSizesShown  type=text value='$lconf->{'MaxNbOfScreenSizesShown '}'> </td> <td> ";
1024             	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfScreenSizesShown ")." </td> </tr>\n";
1025             	print "<tr> <td><b>MinHitScreenSize </b></td> <td> <input size=10 name=MinHitScreenSize  type=text value='$lconf->{'MinHitScreenSize '}'> </td> <td> ";
1026             	print &hblink($text{'help_help'}, "help.cgi?param=MinHitScreenSize ")." </td> </tr>\n";
1027             	print "<tr> <td><b>MaxNbOfRefererShown </b></td> <td> <input size=10 name=MaxNbOfRefererShown  type=text value='$lconf->{'MaxNbOfRefererShown '}'> </td> <td> ";
1028             	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfRefererShown ")." </td> </tr>\n";
1029             	print "<tr> <td><b>MinHitRefer   </b></td> <td> <input size=10 name=MinHitRefer    type=text value='$lconf->{'MinHitRefer   '}'> </td> <td> ";
1030 rizwank 1.1 	print &hblink($text{'help_help'}, "help.cgi?param=MinHitRefer   ")." </td> </tr>\n";
1031             	print "<tr> <td><b>MaxNbOfKeyphrasesShown </b></td> <td> <input size=10 name=MaxNbOfKeyphrasesShown  type=text value='$lconf->{'MaxNbOfKeyphrasesShown '}'> </td> <td> ";
1032             	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfKeyphrasesShown ")." </td> </tr>\n";
1033             	print "<tr> <td><b>MinHitKeyphrase </b></td> <td> <input size=10 name=MinHitKeyphrase  type=text value='$lconf->{'MinHitKeyphrase '}'> </td> <td> ";
1034             	print &hblink($text{'help_help'}, "help.cgi?param=MinHitKeyphrase ")." </td> </tr>\n";
1035             	print "<tr> <td><b>MaxNbOfKeywordsShown </b></td> <td> <input size=10 name=MaxNbOfKeywordsShown  type=text value='$lconf->{'MaxNbOfKeywordsShown '}'> </td> <td> ";
1036             	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfKeywordsShown ")." </td> </tr>\n";
1037             	print "<tr> <td><b>MinHitKeyword </b></td> <td> <input size=10 name=MinHitKeyword  type=text value='$lconf->{'MinHitKeyword '}'> </td> <td> ";
1038             	print &hblink($text{'help_help'}, "help.cgi?param=MinHitKeyword ")." </td> </tr>\n";
1039             	print "<tr> <td><b>MaxNbOfEMailsShown </b></td> <td> <input size=10 name=MaxNbOfEMailsShown  type=text value='$lconf->{'MaxNbOfEMailsShown '}'> </td> <td> ";
1040             	print &hblink($text{'help_help'}, "help.cgi?param=MaxNbOfEMailsShown ")." </td> </tr>\n";
1041             	print "<tr> <td><b>MinHitEMail   </b></td> <td> <input size=10 name=MinHitEMail    type=text value='$lconf->{'MinHitEMail   '}'> </td> <td> ";
1042             	print &hblink($text{'help_help'}, "help.cgi?param=MinHitEMail   ")." </td> </tr>\n";
1043             	print "<tr> <td><b>FirstDayOfWeek</b></td> <td> <input size=10 name=FirstDayOfWeek type=text value='$lconf->{'FirstDayOfWeek'}'> </td> <td> ";
1044             	print &hblink($text{'help_help'}, "help.cgi?param=FirstDayOfWeek")." </td> </tr>\n";
1045             	print "<tr> <td><b>ShowFlagLinks</b></td> <td> <input size=30 name=ShowFlagLinks type=text value='$lconf->{'ShowFlagLinks'}'> </td> <td> ";
1046             	print &hblink($text{'help_help'}, "help.cgi?param=ShowFlagLinks")." </td> </tr>\n";
1047             	print "<tr> <td><b>ShowLinksOnUrl</b></td> <td> <input size=10 name=ShowLinksOnUrl type=text value='$lconf->{'ShowLinksOnUrl'}'> </td> <td> ";
1048             	print &hblink($text{'help_help'}, "help.cgi?param=ShowLinksOnUrl")." </td> </tr>\n";
1049             	print "<tr> <td><b>UseHTTPSLinkForUrl</b></td> <td> <input size=10 name=UseHTTPSLinkForUrl type=text value='$lconf->{'UseHTTPSLinkForUrl'}'> </td> <td> ";
1050             	print &hblink($text{'help_help'}, "help.cgi?param=UseHTTPSLinkForUrl")." </td> </tr>\n";
1051 rizwank 1.1 	print "<tr> <td><b>MaxLengthOfShownURL</b></td> <td> <input size=10 name=MaxLengthOfShownURL type=text value='$lconf->{'MaxLengthOfShownURL'}'> </td> <td> ";
1052             	print &hblink($text{'help_help'}, "help.cgi?param=MaxLengthOfShownURL")." </td> </tr>\n";
1053             #	print "<tr> <td><b>LinksToWhoIs</b></td> <td> <input size=40 name=LinksToWhoIs type=text value='$lconf->{'LinksToWhoIs'}'> </td> <td> ";
1054             #	print &hblink($text{'help_help'}, "help.cgi?param=LinksToWhoIs")." </td> </tr>\n";
1055             #	print "<tr> <td><b>LinksToIPWhoIs</b></td> <td> <input size=40 name=LinksToIPWhoIs type=text value='$lconf->{'LinksToIPWhoIs'}'> </td> <td> ";
1056             #	print &hblink($text{'help_help'}, "help.cgi?param=LinksToIPWhoIs")." </td> </tr>\n";
1057             	print "<tr> <td><b>HTMLHeadSection</b></td> <td> <input size=30 name=HTMLHeadSection type=text value='$lconf->{'HTMLHeadSection'}'> </td> <td> ";
1058             	print &hblink($text{'help_help'}, "help.cgi?param=HTMLHeadSection")." </td> </tr>\n";
1059             	print "<tr> <td><b>HTMLEndSection</b></td> <td> <input size=40 name=HTMLEndSection type=text value='$lconf->{'HTMLEndSection'}'> </td> <td> ";
1060             	print &hblink($text{'help_help'}, "help.cgi?param=HTMLEndSection")." </td> </tr>\n";
1061             	print "<tr> <td><b>Logo</b></td> <td> <input size=30 name=Logo type=text value='$lconf->{'Logo'}'> </td> <td> ";
1062             	print &hblink($text{'help_help'}, "help.cgi?param=Logo")." </td> </tr>\n";
1063             	print "<tr> <td><b>LogoLink</b></td> <td> <input size=30 name=LogoLink type=text value='$lconf->{'LogoLink'}'> </td> <td> ";
1064             	print &hblink($text{'help_help'}, "help.cgi?param=LogoLink")." </td> </tr>\n";
1065             	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> ";
1066             	print &hblink($text{'help_help'}, "help.cgi?param=BarWidth   ")." </td> </tr>\n";
1067             	print "<tr> <td><b>StyleSheet</b></td> <td> <input size=20 name=StyleSheet type=text value='$lconf->{'StyleSheet'}'> </td> <td> ";
1068             	print &hblink($text{'help_help'}, "help.cgi?param=StyleSheet")." </td> </tr>\n";
1069             #	print "<tr> <td><b>color_Background</b></td> <td> <input size=10 name=color_Background type=text value='$lconf->{'color_Background'}'> </td> <td> ";
1070             #	print &hblink($text{'help_help'}, "help.cgi?param=color_Background")." </td> </tr>\n";
1071             #	print "<tr> <td><b>color_TableBGTitle</b></td> <td> <input size=10 name=color_TableBGTitle type=text value='$lconf->{'color_TableBGTitle'}'> </td> <td> ";
1072 rizwank 1.1 #	print &hblink($text{'help_help'}, "help.cgi?param=color_TableBGTitle")." </td> </tr>\n";
1073             #	print "<tr> <td><b>color_TableTitle</b></td> <td> <input size=10 name=color_TableTitle type=text value='$lconf->{'color_TableTitle'}'> </td> <td> ";
1074             #	print &hblink($text{'help_help'}, "help.cgi?param=color_TableTitle")." </td> </tr>\n";
1075             #	print "<tr> <td><b>color_TableBG</b></td> <td> <input size=10 name=color_TableBG type=text value='$lconf->{'color_TableBG'}'> </td> <td> ";
1076             #	print &hblink($text{'help_help'}, "help.cgi?param=color_TableBG")." </td> </tr>\n";
1077             #	print "<tr> <td><b>color_TableRowTitle</b></td> <td> <input size=10 name=color_TableRowTitle type=text value='$lconf->{'color_TableRowTitle'}'> </td> <td> ";
1078             #	print &hblink($text{'help_help'}, "help.cgi?param=color_TableRowTitle")." </td> </tr>\n";
1079             #	print "<tr> <td><b>color_TableBGRowTitle</b></td> <td> <input size=10 name=color_TableBGRowTitle type=text value='$lconf->{'color_TableBGRowTitle'}'> </td> <td> ";
1080             #	print &hblink($text{'help_help'}, "help.cgi?param=color_TableBGRowTitle")." </td> </tr>\n";
1081             #	print "<tr> <td><b>color_TableBorder</b></td> <td> <input size=10 name=color_TableBorder type=text value='$lconf->{'color_TableBorder'}'> </td> <td> ";
1082             #	print &hblink($text{'help_help'}, "help.cgi?param=color_TableBorder")." </td> </tr>\n";
1083             #	print "<tr> <td><b>color_text</b></td> <td> <input size=10 name=color_text type=text value='$lconf->{'color_text'}'> </td> <td> ";
1084             #	print &hblink($text{'help_help'}, "help.cgi?param=color_text")." </td> </tr>\n";
1085             #	print "<tr> <td><b>color_textpercent</b></td> <td> <input size=10 name=color_textpercent type=text value='$lconf->{'color_textpercent'}'> </td> <td> ";
1086             #	print &hblink($text{'help_help'}, "help.cgi?param=color_textpercent")." </td> </tr>\n";
1087             #	print "<tr> <td><b>color_titletext</b></td> <td> <input size=10 name=color_titletext type=text value='$lconf->{'color_titletext'}'> </td> <td> ";
1088             #	print &hblink($text{'help_help'}, "help.cgi?param=color_titletext")." </td> </tr>\n";
1089             #	print "<tr> <td><b>color_weekend</b></td> <td> <input size=10 name=color_weekend type=text value='$lconf->{'color_weekend'}'> </td> <td> ";
1090             #	print &hblink($text{'help_help'}, "help.cgi?param=color_weekend")." </td> </tr>\n";
1091             #	print "<tr> <td><b>color_link</b></td> <td> <input size=10 name=color_link type=text value='$lconf->{'color_link'}'> </td> <td> ";
1092             #	print &hblink($text{'help_help'}, "help.cgi?param=color_link")." </td> </tr>\n";
1093 rizwank 1.1 #	print "<tr> <td><b>color_hover</b></td> <td> <input size=10 name=color_hover type=text value='$lconf->{'color_hover'}'> </td> <td> ";
1094             #	print &hblink($text{'help_help'}, "help.cgi?param=color_hover")." </td> </tr>\n";
1095             #	print "<tr> <td><b>color_u</b></td> <td> <input size=10 name=color_u type=text value='$lconf->{'color_u'}'> </td> <td> ";
1096             #	print &hblink($text{'help_help'}, "help.cgi?param=color_u")." </td> </tr>\n";
1097             #	print "<tr> <td><b>color_v</b></td> <td> <input size=10 name=color_v type=text value='$lconf->{'color_v'}'> </td> <td> ";
1098             #	print &hblink($text{'help_help'}, "help.cgi?param=color_v")." </td> </tr>\n";
1099             #	print "<tr> <td><b>color_p</b></td> <td> <input size=10 name=color_p type=text value='$lconf->{'color_p'}'> </td> <td> ";
1100             #	print &hblink($text{'help_help'}, "help.cgi?param=color_p")." </td> </tr>\n";
1101             #	print "<tr> <td><b>color_h</b></td> <td> <input size=10 name=color_h type=text value='$lconf->{'color_h'}'> </td> <td> ";
1102             #	print &hblink($text{'help_help'}, "help.cgi?param=color_h")." </td> </tr>\n";
1103             #	print "<tr> <td><b>color_k</b></td> <td> <input size=10 name=color_k type=text value='$lconf->{'color_k'}'> </td> <td> ";
1104             #	print &hblink($text{'help_help'}, "help.cgi?param=color_k")." </td> </tr>\n";
1105             #	print "<tr> <td><b>color_s</b></td> <td> <input size=10 name=color_s type=text value='$lconf->{'color_s'}'> </td> <td> ";
1106             #	print &hblink($text{'help_help'}, "help.cgi?param=color_s")." </td> </tr>\n";
1107             #	print "<tr> <td><b>color_e</b></td> <td> <input size=10 name=color_e type=text value='$lconf->{'color_e'}'> </td> <td> ";
1108             #	print &hblink($text{'help_help'}, "help.cgi?param=color_e")." </td> </tr>\n";
1109             #	print "<tr> <td><b>color_x</b></td> <td> <input size=10 name=color_x type=text value='$lconf->{'color_x'}'> </td> <td> ";
1110             #	print &hblink($text{'help_help'}, "help.cgi?param=color_x")." </td> </tr>\n";
1111             	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";
1112             }
1113             else {
1114 rizwank 1.1 	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";
1115             }
1116             print "<tr> <td colspan=3><br></td> </tr>\n";
1117             
1118             print "<tr> <td colspan=3><br>PLUGINS SETUP SECTION (Not required but increase AWStats features)<br><hr></td> </tr>\n";
1119             if ($in{'advanced'} == 4) {
1120             	my $conflinenb = 0;
1121             	my @pconfparam=();
1122             	my @pconfvalue=();
1123             	my @pconfvaluep=();
1124             	my %pluginlinefound=();
1125             	# Search the loadable plugins in edited config file
1126             	open(FILE, $filetoopen) || error("Failed to open $filetoopen for reading plugins' config");
1127             	while(<FILE>) {
1128             		my $savline=$_;
1129             		chomp $_; s/\r//;
1130             		$conflinenb++;
1131             		if ($_ =~ /^#?LoadPlugin/i) {
1132             			# Extract param and value
1133             			my ($load,$value)=split(/=/,$_,2);
1134             			# Remove comments not at beginning of line
1135 rizwank 1.1 			$param =~ s/^\s+//; $param =~ s/\s+$//;
1136             			$value =~ s/#.*$//; 
1137             			$value =~ s/^[\s\'\"]+//g; $value =~ s/[\s\'\"]+$//g;
1138             			($value1,$value2)=split(/\s/,$value,2);
1139             			if ($value1 =~ /^graph3d$/i) { next; }
1140             			if (! $pluginlinefound{$value1}) {	# To avoid plugin to be shown twice
1141             				$pluginlinefound{$value1}=1;
1142             				push @pconfparam, $value1;
1143             				push @pconfvaluep, $value2;
1144                 			my $active=0;
1145                 			if ($load !~ /#.*LoadPlugin/i) { $active=1; }
1146             				push @pconfactive, $active;
1147             			}
1148             		}	
1149             	}
1150             	close FILE;
1151             	# Search the loadable plugins in sample config file (if not new)
1152             	if (! $in{'new'}) {
1153             		open(FILE, $config{'alt_conf'}) || error("Failed to open $config{'alt_conf'} for reading available plugins");
1154             		while(<FILE>) {
1155             			my $savline=$_;
1156 rizwank 1.1 			chomp $_; s/\r//;
1157             			$conflinenb++;
1158             			if ($_ =~ /^#?LoadPlugin/i) {
1159             				# Extract param and value
1160             				my ($load,$value)=split(/=/,$_,2);
1161             				# Remove comments not at beginning of line
1162             				$param =~ s/^\s+//; $param =~ s/\s+$//;
1163             				$value =~ s/#.*$//; 
1164             				$value =~ s/^[\s\'\"]+//g; $value =~ s/[\s\'\"]+$//g;
1165             				($value1,$value2)=split(/\s/,$value,2);
1166             				if ($value1 =~ /^graph3d$/i) { next; }
1167             				if (! $pluginlinefound{$value1}) {	# To avoid plugin to be shown twice
1168             					push @pconfparam, $value1;
1169             					push @pconfvaluep, $value2;
1170                                 # Plugin in sample but not in config file is by default not enabled.
1171                     			my $active=0;
1172             					push @pconfactive, $active;
1173             				}
1174             			}	
1175             		}
1176             		close FILE;
1177 rizwank 1.1 	}
1178             
1179             	print "<tr> <td>Loaded plugins</td> <td>Plugin's parameters</td> <td> &nbsp; </td> </tr>\n";
1180             	foreach my $key (0..(@pconfparam-1)) {
1181             		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]'> ";
1182                     my ($type,$p,$geoipdatafile)=();
1183                     if ($pconfparam[$key] =~ /^geoip$/) { $type="geoip_country"; $p="GeoIP Country"; $geoipdatafile=$config{'plugin_1_geoip'}||"/usr/local/share/GeoIP/GeoIP.dat"; }
1184                     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"; }
1185                     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"; }
1186                     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"; }
1187                     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"; }
1188                     if ($p) {
1189                         # If a geoip plugin
1190                         my $datafile=$geoipdatafile;
1191                         if ($pconfvaluep[$key] =~ /^\w+\s+(.+)$/) { $datafile=$1; }
1192                         print "<a href=\"geoip_info.cgi?file=$datafile&type=$type\">$p database version</a>";
1193                     }
1194             		print " </td> <td> ";
1195             		print &hblink($text{'help_help'}, "help.cgi?param=plugin_$pconfparam[$key]")." </td> </tr>\n";
1196             	}	
1197             	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";
1198 rizwank 1.1 } else {
1199             	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";
1200             }	
1201             print "<tr> <td colspan=3><br></td> </tr>\n";
1202             
1203             
1204             if ($advanced) {
1205             	print "<tr> <td colspan=3><br><hr></td> </tr>\n";
1206             	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";
1207             	print "<tr> <td colspan=3><hr></td> </tr>\n";
1208             }
1209             print "</table>\n";
1210             print "</td></tr></table>\n";
1211             
1212             @b=();
1213             if ($in{'new'}) {
1214             	push(@b, "<input type=submit value='$text{'create'}' onClick=\"return Submit_onClick();\">");
1215             	}
1216             else {
1217             	if ($access{'global'}) {
1218             		push(@b, "<input type=submit value='$text{'save'}' onClick=\"return Submit_onClick();\">");
1219 rizwank 1.1 	}
1220             	if ($access{'add'}) {
1221             		push(@b, "<input type=submit name='delete' value='$text{'delete'}'>");
1222             	}
1223             }
1224             
1225             &spaced_buttons(@b);
1226             
1227             
1228             print "</form>\n";
1229             
1230             # Back to config list
1231             print "<hr>\n";
1232             &footer("", $text{'index_return'});
1233             
1234             awstats/geoip_info.cgi0100777000175700010010000000353110165615542014630 0ustar  LaurentAucun#!/usr/bin/perl
1235             # geoip_info.cgi
1236             # Report geoip informations
1237             
1238             require './awstats-lib.pl';
1239             &ReadParse();
1240 rizwank 1.1 
1241             if (! $access{'update'}) { &error($text{'geoip_cannot'}); }
1242             
1243             my $conf=""; my $dir="";
1244             if ($in{'file'} =~ /awstats\.(.*)\.conf$/) { $conf=$1; }
1245             if ($in{'file'} =~ /^(.*)[\\\/][^\\\/]+$/) { $dir=$1; }
1246             
1247             
1248             # Display file contents
1249             &header($title || $text{'geoip_title'}, "");
1250             
1251             print "<hr>\n";
1252             
1253             my $type=$in{'type'};
1254             my $size=-1;
1255             
1256             print "GeoIP information for file <b>".$in{'file'}."</b><br><br>\n";
1257             
1258             
1259             # Try to get the GeoIP data file version at end of file
1260             if (-f "$in{'file'}") {
1261 rizwank 1.1     my @st=stat($in{'file'});
1262                 my $size = $st[7];
1263                 my ($sec,$min,$hour,$day,$month,$year,$wday,$yday) = localtime($st[9]);
1264                 $year+=1900; $month++;
1265             
1266                 print "Geoip data file type: <b>$type</b><br>\n";
1267                 print "Geoip data file size: <b>$size</b> bytes<br>\n";
1268                 printf("Geoip data file date: <b>%04s-%02s-%02s %02s:%02s:%02s</b><br>\n",$year,$month,$day,$hour,$min,$sec);
1269             
1270                 my $version='unknown';
1271             
1272                 # Try to get version from API
1273             
1274             
1275             
1276                 # Try to get version from file
1277                 if (! $version || $version eq 'unknown') {
1278                    if (open(GEOIPFILE,"<$in{'file'}")) {
1279                         my $seekpos=($size-100);
1280                         if ($seekpos < 0) { $seekpos=0; }
1281                         binmode GEOIPFILE;
1282 rizwank 1.1             seek(GEOIPFILE,$seekpos,0);
1283                         my $nbread=0;
1284                         while (($nbread < 100) && ($line=<GEOIPFILE>)) {
1285                             $nbread++;
1286                             if ($line =~ /(Geo-.*)Copyright/i) { 
1287                                 $version=$1;
1288                                 last;
1289                             }
1290                         }
1291                         close (GEOIPFILE);
1292                     }
1293                 }
1294                 
1295                 print "Geoip data file version: <b>$version</b><br>\n";
1296             
1297             } else {
1298                 print "GeoIP datafile <b>$in{'file'}</b> does not exist or can not be read.<br>\n";
1299             }
1300             
1301             
1302             print "<br>\n";
1303 rizwank 1.1 
1304             # Back to config list
1305             print "<hr>\n";
1306             &footer("", $text{'index_return'});
1307             
1308             0;
1309             
1310             awstats/help.cgi0100555000175700010010000000304507733452170013437 0ustar  LaurentAucun#!/usr/bin/perl
1311             # help.cgi
1312             # Show help for a config parameter
1313             
1314             require './awstats-lib.pl';
1315             &ReadParse();
1316             
1317             # Display file contents
1318             &header($title || $text{'help_title'}, "", undef, 0, 1, 1);
1319             print "<hr>\n";
1320             
1321             my $helpparam=$in{'param'};
1322             my $isplugin=0;
1323             if ($helpparam =~ s/^plugin_//) { $isplugin=1; }
1324 rizwank 1.1 
1325             if ($isplugin) { print &text('help_subtitleplugin',$helpparam)."<br><br>\n"; }
1326             else { print &text('help_subtitle',$helpparam)."<br><br>\n"; }
1327             
1328             open(CONF, $config{'alt_conf'}) || &error("Failed to open sample config file");
1329             my $output="";
1330             my $savoutput="";
1331             my $found=0;
1332             while(<CONF>) {
1333             	chomp $_; s/\r//;
1334             
1335             	my $line="$_";
1336             
1337             	if ($line !~ /#LoadPlugin/i && $line =~ s/^#//) {
1338             		if ($line =~ /-----------------/) { 
1339             			if ($output) { $savoutput=$output; }
1340             			$output="";
1341             			next;
1342             		}
1343             		$line =~ s/</&lt;/g;
1344             		$line =~ s/>/&gt;/g;
1345 rizwank 1.1 		$output.="$line<br>";
1346             	}
1347             	else {
1348             		# Remove comments
1349             		$_ =~ s/\s#.*$//;
1350             		# Extract param and value
1351             		my ($param,$value)=split(/=/,$_,2);
1352             		$param =~ s/^\s+//; $param =~ s/\s+$//;
1353             		
1354             		if (defined($param) && defined($value)) {
1355             			if ((! $isplugin && $param =~ /$helpparam/i) ||
1356             			     ($isplugin && $value =~ /$helpparam/i)) {
1357             				$found=1; last;
1358             			}
1359             			else {
1360             				if ($output) { $savoutput=$output; }
1361             				$output="";
1362             			}
1363             		}
1364             	}
1365             }
1366 rizwank 1.1 close(CONF);
1367             
1368             if ($found) {
1369             	if ($output) { print "$output\n"; }
1370             	else { print "$savoutput"; }
1371             }
1372             else {
1373             	print &text('help_notfound',$config{'alt_conf'});
1374             #	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.";
1375             }
1376             	
1377             0;
1378             awstats/images/0040777000175700010010000000000010176535011013263 5ustar  LaurentAucunawstats/images/hh.png0100777000175700010010000000041207611526030014366 0ustar  LaurentAucun‰PNG
1379             
1380             
IHDR%±„/tEXtCreation Timejeu. 16 janv. 2003 13:50:24 +0100þ°O$tIMEÓ2#s
1381             fi	pHYs
1382             ð
1383             ðB¬4˜gAMA±üa*PLTE””ÆÎ!ÎÖBçï{ÿÿ­÷ÿœ÷ÿ„çïsÞçcÖÞRÆÎ1µ½¥­­­#W–4(IDATxÚc¸ÉÀÈpžaÆ
õ	!Á^ö
1384             "ü_hð*CÞIEND®B`‚awstats/images/hk.png0100777000175700010010000000040607611526030014374 0ustar  LaurentAucun‰PNG
1385             
1386             
IHDR%±„/tEXtCreation Timejeu. 16 janv. 2003 13:51:50 +0100ïø	tIMEÓ39—s®R	pHYs
1387 rizwank 1.1 ð
1388             ðB¬4˜gAMA±üa'PLTEN2€QˆV q%µœR²±?«¢.¤••
1389             Ž}ˆmxLfA5QÍ'IDATxÚc8ÀÀÀp€aÆ	
	@èÀ`À À ÎÀy…ø&ƒ‘-IEND®B`‚awstats/images/hp.png0100777000175700010010000000041507611526030014401 0ustar  LaurentAucun‰PNG
1390             
1391             
IHDR%±„/tEXtCreation Timejeu. 16 janv. 2003 13:54:20 +0100ËMtIMEÓ6?dó	pHYs
1392             ð
1393             ðB¬4˜gAMA±üa-PLTEB”JÎ!cÖB„ï{­ÿ­Æÿ­½ÿœ½ÿ„¥ïs”çcŒÞR{Î)Z½9­R­i;¾(IDATxÚcxÀÀÀpáÆ
1394             će˜ƒkIEND®B`‚awstats/images/hu.png0100777000175700010010000000025610172225712014410 0ustar  LaurentAucun‰PNG
1395             
1396             
IHDR
絓¥bKGDÿÿÿ ½§“	pHYs
1397             ð
1398             ð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
1399             
1400             
IHDR
šùÁ'PLTEÖÎRÞÆcïÞ{÷çœ÷ï­ïç¥çÞœÞÖŒÖ΄νk½µJ­œJ½­Z쟃bKGDˆH	pHYs
1401             ð
1402             ð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¢
1403             ³Ð@©”2OÊxéÓ‡ÍTz¬<¤(4z†i0`€*n¹rÅœ7}~
1404             ,Ùv0š60Ѭ!ŒÐGÝ0œHѤL¢8‰àÀ¼@ÍL‚zª&ƺÒÁ?ê2xÄ
1405             —2oâ(Š¢(Q`˜ˆ¾U[2Ï@IgfP€AHª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´Ÿ
1406             68p€
*"âÇ
1407             (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‚ƒà
1408 rizwank 1.1 ^€
1409             ®rvp	”…‰àù
1410             D;¤±’›@?0Û 7Í-
1411             °Ž¤‚º¾"ð­hqº¾–X"	|@Ǿe¡‚À€9XKð.EüðÄWlñÅg¬ñÆwLq@;awstats/images/info.png0100777000175700010010000000120110035256462014722 0ustar  LaurentAucun‰PNG
1412             
1413             
IHDR(-SgAMA±üaAPLTE>k>m>nDm@l
EqCq'\~,p—'hŽV„Fl
1414             0WCn*a:§;€¨ÿÿÿHgT€
1415             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<k_”@†¯&Rk+l’[†Jy6[,S6_V„4y¥"Lg'eŒ^ˆHw3[*R7`Cj#h˜<€§H`Z€U‚?k0V+L*S
1416             Ky!f’ûûû>`?l,R%K*NM}OQ~Pz9c2V&G8c:k)J%F.P-T,Q'O)JÙÉ[½tRNS@æØfbKGDˆH	pHYsÒÝ~ütIMEÑ
1417             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ä
1418             œ>5
1419             <ÔfÆ5
xa¥Lœ(‰0N´9‘ÐÀ¡`pQÅMœR,jÌ”YPf˜Z8q£ÉR©$BÆÀHº ªQ#B-Q–D2AxäÀ7î
1420             QJ.TÀ@
Un´½ pŒi’ÀjÀF /¬¹À@$T@±3>”&{qµë×°cË^;awstats/index.cgi0100777000175700010010000002225210161332231013605 0ustar  LaurentAucun#!/usr/bin/perl
1421             # index.cgi
1422             # Display available config files
1423             # $Revision: 1.17 $ - $Author: eldy $ - $Date: 2004/12/19 17:04:25 $
1424             
1425             require './awstats-lib.pl';
1426             
1427             
1428             # Check if awstats is actually installed
1429 rizwank 1.1 if (!&has_command($config{'awstats'})) {
1430             	&header($text{'index_title'}, "", undef, 1, 1, 0, undef);
1431             	print "<hr>\n";
1432             	print "<p>",&text('index_eawstats', "<tt>$config{'awstats'}</tt>","$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
1433             	print "<hr>\n";
1434             	&footer("/", $text{'index'});
1435             	exit;
1436             }
1437             
1438             # Check AWStats URL
1439             # TODO
1440             
1441             
1442             # Get the version number
1443             $out = `$config{'awstats'} 2>&1`;
1444             if ($out !~ /^----- awstats (\S+)\.(\S+)\s(\S+\s\S+)/) {
1445             	&header($text{'index_title'}, "", undef, 1, 1, 0, undef);
1446             
1447             	if ($out =~ /^content-type/i) {
1448             		# To old version. Does not support CLI launch from CGI_GATEWAY interface
1449             		print "<p>",&text('index_eversion', "<tt>$config{'awstats'}</tt>", "5.7 or older", "5.8"),"<p>\n";
1450 rizwank 1.1 		print "<hr>\n";
1451             		&footer("/", $text{'index'});
1452             		exit;
1453             	}
1454             
1455             	print "<hr>\n";
1456             	print "<p>",&text('index_egetversion', "<tt>$config{'awstats'}</tt>", "<pre>$out</pre>", "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
1457             	print "<hr>\n";
1458             	&footer("/", $text{'index'});
1459             	exit;
1460             }
1461             
1462             &header($text{'index_title'}, "", undef, 1, 1, 0, undef, undef, undef, &text('index_version', "$1.$2 $3"));
1463             
1464             my $widthtooltip=560;
1465             print <<EOF;
1466             <style type="text/css">
1467             <!--
1468             div { font: 12px 'Arial','Verdana','Helvetica', sans-serif; text-align: justify; }
1469             .CTooltip { position:absolute; top: 0px; left: 0px; z-index: 2; width: ${widthtooltip}px; visibility:hidden; font: 8pt 'MS Comic Sans','Arial',sans-serif; background-color: #FFFFE6; padding: 8px; border: 1px solid black; }
1470             //-->
1471 rizwank 1.1 </style>
1472             
1473             <script language="javascript" type="text/javascript">
1474             function ShowTip(fArg)
1475             {
1476             	var tooltipOBJ = (document.getElementById) ? document.getElementById('tt' + fArg) : eval("document.all['tt" + fArg + "']");
1477             	if (tooltipOBJ != null) {
1478             		var tooltipLft = (document.body.offsetWidth?document.body.offsetWidth:document.body.style.pixelWidth) - (tooltipOBJ.offsetWidth?tooltipOBJ.offsetWidth:(tooltipOBJ.style.pixelWidth?tooltipOBJ.style.pixelWidth:$widthtooltip)) - 30;
1479             		var tooltipTop = 10;
1480             		if (navigator.appName == 'Netscape') {
1481             			tooltipTop = (document.body.scrollTop>=0?document.body.scrollTop+10:event.clientY+10);
1482              			tooltipOBJ.style.top = tooltipTop+"px";
1483             			tooltipOBJ.style.left = tooltipLft+"px";
1484             		}
1485             		else {
1486             			tooltipTop = (document.body.scrollTop>=0?document.body.scrollTop+10:event.clientY+10);
1487             			tooltipTop = (document.body.scrollTop>=0?document.body.scrollTop+10:event.clientY+10);
1488             			if ((event.clientX > tooltipLft) && (event.clientY < (tooltipOBJ.scrollHeight?tooltipOBJ.scrollHeight:tooltipOBJ.style.pixelHeight) + 10)) {
1489             				tooltipTop = (document.body.scrollTop?document.body.scrollTop:document.body.offsetTop) + event.clientY + 20;
1490             			}
1491             			tooltipOBJ.style.left = tooltipLft;
1492 rizwank 1.1 			tooltipOBJ.style.top = tooltipTop;
1493             		}
1494             		tooltipOBJ.style.visibility = "visible";
1495             	}
1496             }
1497             function HideTip(fArg)
1498             {
1499             	var tooltipOBJ = (document.getElementById) ? document.getElementById('tt' + fArg) : eval("document.all['tt" + fArg + "']");
1500             	if (tooltipOBJ != null) {
1501             		tooltipOBJ.style.visibility = "hidden";
1502             	}
1503             }
1504             </script>
1505             EOF
1506             
1507             
1508             print "<hr>\n";
1509             if ($1 < 5 || ($1 == 5 && $2 < 8)) {
1510             	print "<p>",&text('index_eversion', "<tt>$config{'awstats'}</tt>", "$1.$2", "5.8"),"<p>\n";
1511             	print "<hr>\n";
1512             	&footer("/", $text{'index'});
1513 rizwank 1.1 	exit;
1514             	}
1515             
1516             # Check if sample file exists
1517             if (!-r $config{'alt_conf'}) {
1518                     print "<p>",&text('index_econf', "<tt>$config{'alt_conf'}</tt>",
1519                               "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
1520                     print "<hr>\n";
1521                     &footer("/", $text{'index'});
1522                     exit;
1523             	}
1524             my @configdirtoscan=split(/\s+/, $access{'dir'});
1525             	
1526             if (! @configdirtoscan) {
1527             	print &text('index_nodirallowed',"<b>$remote_user</b>")."<br>\n";
1528             	print &text('index_changeallowed',"<a href=\"/acl/\">Webmin - Utilisateurs Webmin</a>", $text{'index_title'})."<br>\n";
1529             	print "<br>\n";
1530             #	print "<p>",&text('index_econfdir', "<tt>$config{'awstats_conf'}</tt>",
1531             #		  "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
1532             	print "<hr>\n";
1533             	&footer("/", $text{'index'});
1534 rizwank 1.1 	exit;
1535             }
1536             
1537             # Query apache and squid for their logfiles
1538             %auto = map { $_, 1 } split(/,/, $config{'auto'});
1539             if (&foreign_check("apache") && $auto{'apache'}) {
1540             	&foreign_require("apache", "apache-lib.pl");
1541             	$confapache = &apache::get_config();
1542             	@dirs = ( &apache::find_all_directives($confapache, "CustomLog"),
1543             		  &apache::find_all_directives($confapache, "TransferLog") );
1544             	$root = &apache::find_directive_struct("ServerRoot", $confapache);
1545             	foreach $d (@dirs) {
1546             		local $lf = $d->{'words'}->[0];
1547             		next if ($lf =~ /^\|/);
1548             		if ($lf !~ /^\//) {
1549             			$lf = "$root->{'words'}->[0]/$lf";
1550             			}
1551             		open(FILE, $lf);
1552             		local $line = <FILE>;
1553             		close(FILE);
1554             		if (!$line || $line =~ /^([a-zA-Z0-9\.\-]+)\s+\S+\s+\S+\s+\[\d+\/[a-zA-z]+\/\d+:\d+:\d+:\d+\s+[0-9\+\-]+\]/) {
1555 rizwank 1.1 			push(@config, { 'file' => $lf,
1556             				      'type' => 1 });
1557             			}
1558             		}
1559             	}
1560             
1561             # Build list of config files from allowed directories
1562             foreach my $dir (split(/\s+/, $access{'dir'})) {
1563             	my @conflist=();
1564             	push(@conflist, map { $_->{'custom'} = 1; $_ } &scan_config_dir($dir));
1565             	foreach my $file (@conflist) {	
1566             		next if (!&can_edit_config($file));
1567             		push @config, $file;
1568             	}
1569             }
1570             
1571             # Write message for allowed directories
1572             print &text('index_allowed',"<b>$remote_user</b>");
1573             print ":<br>\n";
1574             foreach my $dir (split(/\s/,$access{'dir'})) {
1575             	print "$dir<br>"; 
1576 rizwank 1.1 }
1577             print "<br>\n";
1578             print &text('index_changeallowed',"<a href=\"/acl/\">Webmin - Webmin Users</a>", $text{'index_title'})."<br>\n";
1579             print "<br>";
1580             
1581             my $nbofallowedconffound=0;
1582             if (scalar @config) {
1583             
1584             	# Loop on each config file
1585             	foreach my $l (@config) {
1586             		next if (!&can_edit_config($l));
1587             		$nbofallowedconffound++;
1588             
1589             
1590             		# Head of config file's table list
1591             		if ($nbofallowedconffound == 1) {
1592             
1593                     	print "<a href='edit_config.cgi?new=1'>$text{'index_add'}</a><br><br>\n" if ($access{'add'});
1594             
1595                         if (scalar @config >= 2 && $access{'view'}) {
1596                     	    print "<a href='view_all.cgi?new=1'>$text{'index_viewall'}</a><br><br>\n";
1597 rizwank 1.1             }
1598                         
1599             			print "<table border width=\"100%\">\n";
1600             			print "<tr $tb>";
1601             			print "<td rowspan=2 colspan=3><b>$text{'index_path'}</b></td>";
1602             			print "<td rowspan=2 align=center><b>$text{'index_create'}</b></td>";
1603             		 	print "<td colspan=2 align=center><b>$text{'index_update'}</b></td>";
1604             			print "<td rowspan=2 align=center><b>$text{'index_view'}</b></td>";
1605             			print "</tr>\n";
1606             			print "<tr $tb><td align=center>$text{'index_scheduled'}</td><td align=center>$text{'index_now'}</td></tr>\n";
1607             		}
1608             
1609             		# Config file line
1610             		#local @files = &all_config_files($l);
1611             		#next if (!@files);
1612             		local $lconf = &get_config($l);
1613             		my $conf=""; my $dir="";
1614             		if ($l =~ /awstats([^\\\/]*)\.conf$/) { $conf=$1; }
1615             		if ($l =~ /^(.*)[\\\/][^\\\/]+$/) { $dir=$1; }
1616                     my $confwithoutdot=$conf; $confwithoutdot =~ s/^\.+//;
1617             
1618 rizwank 1.1 		local ($size, $latest);
1619             		local @st=stat($l);
1620             		my ($sec,$min,$hour,$day,$month,$year,$wday,$yday) = localtime($st[9]);
1621             		$year+=1900; $month++;
1622             
1623                     print '<div class="CTooltip" id="tt'.$nbofallowedconffound.'">';
1624                     printf("Configuration file: <b>%s</b><br>\n",$l);
1625             		printf("Created/Changed: <b>%04s-%02s-%02s %02s:%02s:%02s</b><br>\n",$year,$month,$day,$hour,$min,$sec);
1626                     print '</div>';
1627             
1628             		print "<tr $cb>\n";
1629             
1630                 	print "<td width=\"40\" align=\"center\">$nbofallowedconffound</td>";
1631                     print "<td align=\"center\" width=\"20\" onmouseover=\"ShowTip($nbofallowedconffound);\" onmouseout=\"HideTip($nbofallowedconffound);\"><img src=\"images/info.png\"></td>";
1632             		print "<td>";
1633             		print "$confwithoutdot";
1634             		if ($access{'global'}) {	# Edit config
1635             	        print "<br><a href='edit_config.cgi?file=$l'>$text{'index_edit'}</a>\n";
1636             		}
1637             		print "</td>";
1638             
1639 rizwank 1.1 		printf("<td align=center>%04s-%02s-%02s %02s:%02s:%02s</td>",$year,$month,$day,$hour,$min,$sec);
1640             	
1641             		# Database size
1642             		#print "<td>NA</td>";
1643             		
1644             		if ($access{'update'}) {	# Update
1645             	        print "<td align=center><a href='schedule_stats.cgi?file=$l'>$text{'index_sched2'}</a></td>";
1646             	        print "<td align=center><a href='update_stats.cgi?file=$l'>$text{'index_update2'}</a></td>\n";
1647             		}
1648             		else {
1649             	        print "<td align=center>NA</td>";
1650             	        print "<td align=center>NA</td>";
1651             		}
1652             
1653             #		print "<td>",$size > 10*1024*1024 ? int($size/1024/1024)." MB" :
1654             #			     $size > 10*1024 ? int($size/1024)." KB" :
1655             #			     $size ? "$size B" : $text{'index_empty'},"</td>\n";
1656             #		print "<td>$latest</td>\n";
1657             #		print "<td>",$lconf->{'sched'} ? $text{'yes'}
1658             #					       : $text{'no'},"</td>\n";
1659             #		if ($lconf->{'dir'} && -r "$lconf->{'dir'}/index.html") {
1660 rizwank 1.1 
1661             		if ($access{'view'}) {
1662             			if ($config{'awstats_cgi'}) {
1663             				print "<td align=center><a href='$config{'awstats_cgi'}?".($confwithoutdot?"config=$confwithoutdot":"").($dir?"&configdir=$dir":"")."' target=awstats>$text{'index_view2'}</a></td>\n";
1664             			}
1665             			else {
1666             				print "<td align=center>".&text('index_cgi', "$gconfig{'webprefix'}/config.cgi?$module_name")."</td>";	
1667             			}
1668             		}
1669             		else {
1670             	        print "<td align=center>NA</td>";
1671             		}
1672             		print "</tr>\n";
1673             	}
1674             	
1675             	if ($nbofallowedconffound > 0) { print "</table><br>\n"; }
1676             }
1677             
1678             if (! $nbofallowedconffound) {
1679             	print "<br><p><b>$text{'index_noconfig'}</b></p><br>\n";
1680             }
1681 rizwank 1.1 
1682             
1683             print "<hr>\n";
1684             &footer("/", $text{'index'});
1685             
1686             awstats/install_check.pl0100555000175700010010000000057507754036402015167 0ustar  LaurentAucun# install_check.pl
1687             
1688             do 'awstats-lib.pl';
1689             
1690             # is_installed(mode)
1691             # For mode 1, returns 2 if AWStats is installed and configured for use by
1692             # Webmin, 1 if installed but not configured, or 0 otherwise.
1693             # For mode 0, returns 1 if installed, 0 if not
1694             sub is_installed
1695             {
1696             if (! -r $config{'awstats'}) { return 0; }
1697             
1698             if ($_[0]) { 
1699             	if (-r $config{'alt_conf'}) { return 2; }
1700             }
1701             
1702 rizwank 1.1 return 1;
1703             }
1704             
1705             awstats/lang/0040777000175700010010000000000010176535011012737 5ustar  LaurentAucunawstats/lang/de0100555000175700010010000001143210014474204013242 0ustar  LaurentAucunindex_title=AWStats Logfile Analyse
1706             index_version=AWStats Version $1
1707             index_eawstats=Das Logfile Analyse Programm $1 wurde nicht auf Ihrem System gefunden. Vieleicht ist es nicht installiert, oder Ihre <a href='$2'>module configuration</a> ist fehlerhaft.
1708             index_econfdir=Das AWStats Konfigurations Verzeichniss $1 wurde nicht auf Ihrem System gefunden. Vieleicht ist es nicht installiert, oder Ihre <a href='$2'>module configuration</a> ist fehlerhaft.
1709             index_econf=Die AWStats Beispiel-Konfigurations Datei $1 wurde nicht auf ihrem System gefunden. Vieleicht ist es nicht installiert, oder Ihre <a href='$2'>module configuration</a> ist fehlerhaft.
1710             index_cgi=<a href='$1'>CGI path not configured</a>
1711             index_add=Hinzufügen einer neuen Analyse-Konfiguration.
1712             index_path=Konfigurations Datei
1713             index_type=Typ
1714             index_size=Größe
1715             index_create=Erstellt/Geändert
1716             index_noconfig=Es wurden keine Analyse-Konfigurations Dateien gefunden bzw. hinzugefügt.
1717             index_edit=Konfiguration Bearbeiten/Löschen
1718             index_del=Konfiguration Löschen
1719             index_scheduled=Eingeplant
1720             index_now=Jetzt
1721             index_update=Statistik aktualisieren
1722             index_update2=Aktualisieren
1723 rizwank 1.1 index_view=Statistik anzeigen
1724             index_view2=Anzeigen
1725             index_return=Konfigurations Dateien
1726             index_eversion=Das AWStats Programm auf Ihrem System hat die Version $2, aber dieses Modul unterstüzt nur Versionen $3 und aufwärts.
1727             index_egetversion=Die Versions Nr. Ihrer AWStats Installation konnte nicht ermittelt werden. Die Abfrage ergab : $2.<br>May be your <a href='$3'>module configuration</a> fehlerhaft.
1728             index_advanced1=Direktiven für den OPTIONALEN EINSTELLUNGS BEREICH anzeigen
1729             index_advanced2=Direktiven für die OPTIONALEN DETAIL-EINSTELLUNGEN anzeigen
1730             index_advanced3=Direktiven für das OPTIONALE ERSCHEINUNGSBILD anzeigen
1731             index_advanced4=Direktiven für die OPTIONALEN PLUGINS anzeigen
1732             index_advanced5=Direktiven für die OPTIONALEN EXTRA EINSTGELLUNGEN anzeigen
1733             index_hideadvanced=Optionale Direktiven verbergen
1734             index_nodirallowed=Der Benutzer $1 hat kein berechtigtes Verzeichniss zum lesen/speichern von AWStats Konfigurationen
1735             index_allowed=Ihr Benutzer-Konto $1 ist berechtigt, um Dateien anzusehen/bearbeiten in
1736             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)
1737             
1738             edit_title1=Konfiguration hinzufügen
1739             edit_title2=Konfiguration bearbeiten
1740             edit_header=Bearbeitungs Assisitent für die Konfiguration $1
1741             edit_headernew=Assistent zum Erstellen von Konfigurationen
1742             edit_file=Datei Inhalt
1743             edit_add=Dateiname der zu erstellenden Konfigurationsdatei
1744 rizwank 1.1 edit_user=AWStats unter folgendem Benutzer ausführen
1745             edit_ecannot=Sie sind nicht berechtigt, diese Konfiguration zu bearbeiten
1746             edit_efilecannot=Die Konfigurationsdatei '$1' liegt nicht in einem berechtigten Verzeichniss.
1747             save_err=Fehler beim Erzeugen der Konfigurationsdatei
1748             save_efile=Dateiname für die Konfigurationsdatei wurde nicht angegeben
1749             save_fileexists=Konfigurationsdatei existiert bereits
1750             
1751             save_edir=Für das gewählte Verzeichniss '$1' zum speichern der Konfigurationen existieren keine Webmin Rechte.
1752             save_ecannot=Sie haben keinen Berechtigung zum erzeugen/ansehen von Auswertugen unter $1
1753             save_errLogFile=Fehler im LogFile Parameter. Das Logfile $1 existiert nicht, oder nicht lesbar
1754             save_errLogFormat=Fehler im LogFormat Parameter. Der parameter ist nicht definiert
1755             save_errSiteDomain=Fehler im SiteDomain Parameter. Der Parameter ist nicht definiert
1756             save_errDirData=Fehler im DirData Parameter. Der Parameter ist nicht definiert oder das verzeichniss existiert nicht
1757             save_dirnotexists=Verzeichniss existiert nicht
1758             
1759             update_title=Statistik aktualisieren
1760             update_ecannot=Sie sind nicht berechtigt die Statistik zu aktualisieren
1761             scheduled_title=Statistik Aktualisierung einplanen
1762             scheduled_ecannot=Sie sind nicht berechtigt, die Statistik zu aktualisieren oder einzuplanen
1763             
1764             log_create_log=Erstellte Awstats Konfigurationsdatei $1
1765 rizwank 1.1 log_modify_log=AWStats Konfigurationsdatei geändert $1
1766             log_delete_log=Gelöschte AWStats Konfigurationsdatei $1
1767             log_generate_log=Aktualisiere folgende AWStats Konfigurationsdatei $1
1768             
1769             acl_view=Darf Auswertungen für Bestehende Konfigurationen anzeigen ?
1770             acl_global=Darf AWStats Konfigurationen bearbeiten ?
1771             acl_add=Darf Konfigurationen bearbeiten und löschen ?
1772             acl_update=Darf Auswertungen für Bestehende Konfigurationen anzeigen ?
1773             
1774             acl_user=AWStats unter folgendem Unix benutzer ausführen
1775             acl_this=Aktueller Webmin Benutzer
1776             acl_any=Jeder Benutzer
1777             acl_dir=Berechtigung zum Ansehen und Berabeiten von Konfigurationen unter
1778             
1779             help_title=Hilfe Seite
1780             help_subtitle=<b>Help for config file parameter $1</b>
1781             help_subtitleplugin=<b>Help for plugin $1</b>
1782             help_notfound=Parameter wurde nicht in Ihrer Beispiel Datei $1 gefunden.<br>May be your AWStats version does not support it, so no help is available. 
1783             help_help=Hilfeawstats/lang/en0100777000175700010010000001224710161324035013266 0ustar  LaurentAucunall_gb=GB
1784             all_mb=MB
1785             all_kb=KB
1786 rizwank 1.1 all_b=Bytes
1787             
1788             index_title=AWStats Logfile Analyzer
1789             index_version=AWStats version $1
1790             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.
1791             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.
1792             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.
1793             index_cgi=<a href='$1'>CGI path not configured</a>
1794             index_add=Add a new config file for analysis.
1795             index_path=Config file
1796             index_type=Type
1797             index_size=Size
1798             index_create=Created/Modified
1799             index_databasesize=Database size
1800             index_noconfig=No config files were found or have been added for analysis.
1801             index_edit=Edit/Delete config
1802             index_del=Delete config
1803             index_scheduled=Scheduled
1804             index_sched2=Scheduler
1805             index_now=Now
1806             index_update=Update stats 
1807 rizwank 1.1 index_update2=Update
1808             index_view=View stats
1809             index_view2=View
1810             index_return=Config files list
1811             index_eversion=The AWStats command $1 on your system is version $2, but this module only supports versions $3 and above.
1812             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.
1813             index_advanced1=View directives for OPTIONAL SETUP SECTION
1814             index_advanced2=View directives for OPTIONAL ACCURACY SETUP SECTION
1815             index_advanced3=View directives for OPTIONAL APPEARANCE SETUP SECTION
1816             index_advanced4=View directives for OPTIONAL PLUGINS SETUP SECTION
1817             index_advanced5=View directives for OPTIONAL EXTRA SETUP SECTION
1818             index_hideadvanced=Hide optional directives
1819             index_nodirallowed=Your user $1 has no allowed directory to read/store AWStats configuration files.
1820             index_allowed=Your account $1 is allowed to view/edit config files into (or that are links to)
1821             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)
1822             index_viewall=Show a summary of all available configurations
1823             
1824             edit_title1=Add config File
1825             edit_title2=Edit config File
1826             edit_header=Editor Assistant for config file $1
1827             edit_headernew=Config file Builder Assistant
1828 rizwank 1.1 edit_file=File content
1829             edit_add=Config file name to create
1830             edit_create_by_copy=Create a new config file by copying an existing one
1831             edit_create_from_scratch=Create a new config file with folowing parameters
1832             edit_config_to_copy=Config file name to copy
1833             edit_user=Run AWStats as user
1834             edit_ecannot=You are not allowed to edit this config file
1835             edit_efilecannot=The config file '$1' is not in an allowed directory
1836             
1837             save_err=Error in config file build
1838             save_efile=Config file name was not entered
1839             save_fileexists=Config file already exists
1840             save_edir=Directory '$1' choosed to write your config file into is not allowed by Webmin permissions.
1841             save_ecannot=You are only allowed to view or generate reports for config under $1
1842             save_errLogFile=Error in LogFile parameter. Log file $1 does not exists or is not readable
1843             save_errLogFormat=Error in LogFormat parameter. Parameter is nto defined
1844             save_errSiteDomain=Error in SiteDomain parameter. Parameter is not defined
1845             save_errDirData=Error in DirData parameter. Parameter is not defined or directory does not exists
1846             save_dirnotexists=Directory does not exists
1847             
1848             update_title=Update statistics
1849 rizwank 1.1 update_ecannot=You are not allowed to update statistics
1850             update_run=Run update process with command
1851             update_finished=Update process finished
1852             update_wait=Please wait
1853             
1854             schedule_title=Schedule statistic's update
1855             schedule_ecannot=You are not allowed to update or schedule update process
1856             
1857             log_create_log=Created AWStats config file $1
1858             log_modify_log=Modified AWStats config file $1
1859             log_delete_log=Deleted AWStats config file $1
1860             log_generate_log=Update AWStats statistics for $1
1861             
1862             acl_view=Can view reports for existing config files?
1863             acl_global=Can edit awstats config files?
1864             acl_add=Can add and delete config files?
1865             acl_update=Can update stats for existing config files?
1866             acl_user=Run AWStats as Unix user
1867             acl_this=Current webmin user
1868             acl_any=Any user
1869             acl_dir=Only allow viewing reports and editing config for config files under (hard directory paths, no links)
1870 rizwank 1.1 
1871             help_title=Help page
1872             help_subtitle=<b>Help for config file parameter $1</b>
1873             help_subtitleplugin=<b>Help for plugin $1</b>
1874             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.
1875             help_help=Help
1876             help_starrequired=required parameters with no default value. They can't be empty.
1877             
1878             viewall_title=Summary for all configurations files
1879             viewall_notallowed=You don't have rights to see statisitics
1880             viewall_allowed=This page presents a summary of all configurations files found in directories allowed to user $1
1881             viewall_period=Period
1882             viewall_u=Unique visitors
1883             viewall_v=Visits
1884             viewall_p=Pages
1885             viewall_h=Hits
1886             viewall_k=Bandwith
1887             
1888             month01=January
1889             month02=February
1890             month03=Mars
1891 rizwank 1.1 month04=April
1892             month05=May
1893             month06=June
1894             month07=July
1895             month08=August
1896             month09=September
1897             month10=October
1898             month11=November
1899             month12=Decemberawstats/lang/fr0100777000175700010010000001402210161324046013266 0ustar  LaurentAucunall_gb=Go
1900             all_mb=Mo
1901             all_kb=Ko
1902             all_b=Octets
1903             
1904             index_title=Analyseur de Logs AWStats
1905             index_version=AWStats version $1
1906             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 <a href='$2'>configuration du module</a> est incorrecte.
1907             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 <a href='$2'>configuration du module</a> est incorrecte.
1908             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 <a href='$2'>configuration du module</a> est incorrecte.
1909             index_cgi=<a href='$1'>CGI path non configuré</a>
1910             index_add=Ajout d'un nouveau fichier de configuration d'analyse
1911             index_path=Fichier configuration
1912 rizwank 1.1 index_type=Type
1913             index_size=Taille
1914             index_create=Créé/Modifié
1915             index_noconfig=Aucun fichier de configuration n'a été trouvé ou ajouté pour analyse, dans le ou les répertoires autorisés.
1916             index_edit=Edition/Suppression
1917             index_del=Suppression config
1918             index_scheduled=Programmée
1919             index_now=Immédiate
1920             index_sched2=Programme
1921             index_update=Mise à jour stats 
1922             index_update2=Mettre à jour
1923             index_view=Voir les stats
1924             index_view2=Voir
1925             index_return=Liste des fichiers de configuration
1926             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.
1927             index_egetversion=Echec de la récupération de la varsion d'AWStats. La command $1 a retourné : $2.<br>Peut-etre la <a href='$3'>configuration du module</a> est incorrecte.
1928             index_advanced1=Voir paramètres de la 'OPTIONAL SETUP SECTION'
1929             index_advanced2=Voir paramètres de la 'OPTIONAL ACCURACY SETUP SECTION'
1930             index_advanced3=Voir paramètres de la 'OPTIONAL APPEARANCE SETUP SECTION'
1931             index_advanced4=Voir paramètres de la 'OPTIONAL PLUGINS SETUP SECTION'
1932             index_advanced5=Voir paramètres de la 'OPTIONAL EXTRA SETUP SECTION'
1933 rizwank 1.1 index_hideadvanced=Cacher paramètres optionnels
1934             index_allowed=Votre login $1 est autorisé à voir/editer les fichiers de config dans (ou pointant vers)
1935             index_nodirallowed=Votre compte $1 n'a aucun répertoire autorisé en lecture/écriture de fichier de configuration AWStats.
1936             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)
1937             index_viewall=Voir un résumé pour toutes les configurations disponibles
1938             
1939             edit_title1=Ajout d'un fichier de config
1940             edit_title2=Edition d'un fichier de config
1941             edit_header=Assistant d'édition du fichier de configuration $1
1942             edit_headernew=Assistant de création de nouveau fichier de configuration
1943             edit_file=Contenu du fichier
1944             edit_add=Nom du fichier de config à créer
1945             edit_create_by_copy=Créer une nouvelle configuration par recopie d'une existante
1946             edit_create_from_scratch=Créer une nouvelle configuration avec les paramètres suivants
1947             edit_config_to_copy=Nom de la configuration à recopier
1948             edit_user=Lancer AWStats sous l'utilisateur
1949             edit_ecannot=Vous n'êtes pas autorisés à éditer ce fichier de configuration
1950             edit_efilecannot=Le fichier de configuration '$1' n'est pas dans un répertoire autorisé
1951             
1952             save_err=Erreur dans la construction du fichier de configuration
1953             save_efile=Le nom du fichier de configuration n'a pas été entré
1954 rizwank 1.1 save_fileexists=Fichier de configuration déjà existant
1955             save_edir=Le répertoire '$1', choisi pour le fichier de configuration n'est pas autorisé par les permissions Webmin.
1956             save_ecannot=Vous n'êtes autorisés à voir ou générer des rapports que pour des fichiers de config dans $1
1957             save_errLogFile=Erreur sur le paramètre LogFile. Le fichier de log $1 n'existe pas ou n'est pas lisible
1958             save_errLogFormat=Erreur sur le paramètre LogFormat. Paramètre non défini
1959             save_errSiteDomain=Erreur sur le paramètre SiteDomain. Paramètre non défini
1960             save_errDirData=Erreur sur le paramètre DirData. Paramètre non défini ou répertoire inexistant
1961             save_dirnotexists=Répertoire inexistant
1962             
1963             update_title=Mise à jour des statistiques
1964             update_ecannot=Vous n'êtes pas autorisé à mettre à jour les statistiques
1965             update_run=Lancement de la mise à jour par la commande
1966             update_finished=Mise a jour terminée
1967             update_wait=Merci de patienter
1968             
1969             schedule_title=Programmation de mise à jour
1970             schedule_ecannot=Vous n'êtes pas autorisé à mettre à jour ou programmer une mise à jour des statistiques
1971             
1972             log_create_log=Fichier de config AWStats $1 créé
1973             log_modify_log=Fichier de config AWStats $1 modifié
1974             log_delete_log=Fichier de config AWStats $1 effacé
1975 rizwank 1.1 log_generate_log=Mise à jour statistiques AWStats pour $1
1976             
1977             acl_view=Peut voir les stats pour les fichiers config existant?
1978             acl_global=Peut editer les fichiers config AWStats?
1979             acl_add=Peut ajouter/supprimer des fichiers config?
1980             acl_update=Peut mettre à jour les stats pour les fichiers config existants?
1981             acl_user=Lancer AWStats sour l'utilisateur Unix
1982             acl_this=Utilisateur webmin actuel
1983             acl_any=Tout utilisateur
1984             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)
1985             
1986             help_title=Page d'aide
1987             help_subtitle=<b>Aide sur le paramètre de configuration $1</b>
1988             help_subtitleplugin=<b>Aide sur le plugin $1</b>
1989             help_notfound=Paramètre non trouvé dans votre fichier de configuration modèle $1.<br>Peut-être votre version d'AWStats ne le supporte pas, aussi aucune aide n'est disponible.
1990             help_help=Aide
1991             help_starrequired=paramètres obligatoires sans valeurs par défaut. Ils ne peuvent etre vide.
1992             
1993             viewall_title=Résumé pour tout fichier de configuration
1994             viewall_notallowed=Vous n'avez pas les droits pour voir les stats
1995             viewall_allowed=Cette page présente un résumé de toutes les configurations trouvés dans les répertoires autorisés à l'utilisateur $1
1996 rizwank 1.1 viewall_period=Période
1997             viewall_u=Visiteurs uniques
1998             viewall_v=Visites
1999             viewall_p=Pages
2000             viewall_h=Hits
2001             viewall_k=Bande passante
2002             
2003             month01=Janvier
2004             month02=Février
2005             month03=Mars
2006             month04=Avril
2007             month05=Mai
2008             month06=Juin
2009             month07=Juillet
2010             month08=Aout
2011             month09=Septembre
2012             month10=Octobre
2013             month11=Novembre
2014             month12=Décembreawstats/log_parser.pl0100555000175700010010000000103507730661620014511 0ustar  LaurentAucun# log_parser.pl
2015             # Functions for parsing this module's logs
2016             
2017 rizwank 1.1 do 'awstats-lib.pl';
2018             
2019             # parse_webmin_log(user, script, action, type, object, &params)
2020             # Converts logged information from this module into human-readable form
2021             sub parse_webmin_log
2022             {
2023             local ($user, $script, $action, $type, $object, $p) = @_;
2024             if ($type eq "log") {
2025             	return &text("log_${action}_log", "<tt>".&html_escape($object)."</tt>");
2026             	}
2027             elsif ($type eq "global") {
2028             	return $object eq "-" ? $text{"log_global"} :
2029             		&text("log_global2", "<tt>".&html_escape($object)."</tt>");
2030             	}
2031             }
2032             
2033             awstats/module.info0100555000175700010010000000057310014500540014145 0ustar  LaurentAucuncategory=system
2034             desc=AWStats Logfile Analyzer
2035             longdesc=Generate and analyze graphicaly statistics from web, proxy, wap, ftp or mail server log files
2036             name=AWStats
2037             version=1.300
2038 rizwank 1.1 depends=webmin 1.030
2039             depends=cron 1.000
2040             depends=logrotate 1.131
2041             desc_fr=Analyseur de Logs AWStats
2042             long_desc_fr=Génération et analyse graphique de statistiques à partir des logs de server web, ftp ou mailawstats/postinstall.pl0100555000175700010010000000007310037567656014741 0ustar  LaurentAucun
2043             require 'awstats-lib.pl';
2044             
2045             sub module_install
2046             {
2047             
2048             
2049             
2050             }
2051             
2052             1;
2053             
2054             awstats/save_config.cgi0100555000175700010010000000725010065340231014756 0ustar  LaurentAucun#!/usr/bin/perl
2055             # save_config.cgi
2056             # Save, create or delete options for a config file
2057             
2058             require './awstats-lib.pl';
2059 rizwank 1.1 &foreign_require("cron", "cron-lib.pl");
2060             &ReadParse();
2061             
2062             &error_setup($text{'save_err'});
2063             
2064             if (! $in{'file'}) { $in{'file'}=$in{'new'}; }
2065             if ($in{'new'} && ! $access{'add'}) { &error($text{'edit_ecannot'}); }
2066             if (! $in{'new'} && $access{'edit'}) { &error($text{'edit_ecannot'}); }
2067             
2068             
2069             if ($in{'view'}) {
2070             	my $dir=$in{'file'}; $dir =~ s/[\\\/][^\\\/]+$//;
2071             	if (! $dir) { $dir="/etc/awstats"; }
2072             	&can_edit_config($in{'file'}) || &error($text{'edit_efilecannot'}." ".$in{'file'});
2073             
2074             	# Re-direct to the view page
2075             	&redirect("view_config.cgi/".&urlize(&urlize($in{'file'}))."/index.html");
2076             	}
2077             elsif ($in{'delete'}) {
2078             	my $dir=$in{'file'}; $dir =~ s/[\\\/][^\\\/]+$//;
2079             	if (! $dir) { $dir="/etc/awstats"; }
2080 rizwank 1.1 	&can_edit_config($in{'file'}) || &error($text{'edit_efilecannot'}." ".$in{'file'});
2081             
2082             	# Delete this config file from the configuration
2083             	local $cfile = $in{'file'};
2084             	local $cfileold = $in{'file'}.".old";
2085             	&lock_file($cfile);	unlink($cfile);	&unlock_file($cfile);
2086             	&lock_file($cfileold);	unlink($cfileold);	&unlock_file($cfileold);
2087             	&webmin_log("delete", "log", $cfile);
2088             
2089             	# Create or delete the cron job
2090             #		&lock_file($job->{'file'});
2091             #		&foreign_call("cron", "delete_cron_job", $job);
2092             #		&unlock_file($job->{'file'});
2093             
2094             	}
2095             else {
2096             	# Validate and store inputs. $in{'new'} is new file to create or update.
2097             	if (!$in{'new'} && !$in{'file'}) { &error($text{'save_efile'}); }
2098             
2099             	my $dir=$in{'file'}; $dir =~ s/[\\\/][^\\\/]+$//;
2100             	if (! $dir) { $dir="/etc/awstats"; }
2101 rizwank 1.1 	if (! &can_edit_config($dir)) {
2102             		&error(&text('save_edir',"$dir")."<br>\n".&text('index_changeallowed',"Menu <a href=\"/acl/\">Webmin - Utilisateurs Webmin</a> puis clic sur $text{'index_title'}")."<br>\n");
2103             	}
2104             
2105             	if ($in{'new'} && -r $in{'$file'}) { &error($text{'save_fileexists'}); }
2106             	if (! -d $dir) { &error($text{'save_dirnotexists'}); }
2107             
2108                 my $modelconf=$config{'alt_conf'};
2109             
2110                 # If create by copy
2111                 if ($in{'new'} && $in{'create_mode'} eq 'by_copy') {
2112                     $modelconf=$in{'file_to_copy'};
2113                     $in{'new'} =~ s/([^\\\/]+)$//;
2114                     my $to=$1;
2115                     if (! $modelconf || ! -r $modelconf) { &error('You must choose a config to copy'); }
2116             		# Add a new config file
2117             		&system_logged("cp '$modelconf' '$dir/$to'");
2118                 }
2119                 else {
2120                 	%conf=();
2121                 	foreach my $key (keys %in) {
2122 rizwank 1.1     		if ($key eq 'file') { next; }
2123                                 if ($key eq 'new') { next; }
2124                                 if ($key eq 'submit') { next; }
2125                 		if ($key eq 'oldfile') { next; }
2126                 		$conf{$key} = $in{$key};
2127                 		if ($conf{key} ne ' ') {
2128                 			$conf{$key} =~ s/^\s+//;
2129                 			$conf{$key} =~ s/\s+$//;
2130                 		}
2131                 	}
2132                 	if ($conf{'LogSeparator'} eq '') { $conf{'LogSeparator'}=' '; }
2133                 
2134                 	# Check data
2135                 	my $logfile='';
2136                 	if ($conf{'LogFile'} !~ /|\s*$/) {	# LogFile is not a piped valued
2137                 		$logfile=$conf{'LogFile'};
2138                 	}
2139                 	else {								# LogFile is piped
2140                 		# It can be
2141                 		# '/xxx/maillogconvert.pl standard /aaa/mail.log |'
2142                 		# '/xxx/logresolvermerge.pl *'
2143 rizwank 1.1     
2144                 		# TODO test something here ?
2145                 	}
2146                 	if ($logfile && ! -r $logfile)	{ &error(&text(save_errLogFile,$logfile)); }
2147                 	if (! $conf{'SiteDomain'}) 		{ &error(&text(save_errSiteDomain,$conf{'SiteDomain'})); }
2148                 	if (! -d $conf{'DirData'}) 		{ &error(&text(save_errDirData,$conf{'DirData'})); }
2149                 
2150                 	if ($in{'new'}) {
2151                 		# Add a new config file
2152                 		&system_logged("cp '$modelconf' '$in{'new'}'");
2153                 	}
2154                 	
2155                 	# Update the config file's options
2156                 	local $cfile = $in{'file'};
2157                 	&lock_file($cfile);
2158                 	&update_config($cfile, \%conf);
2159                 	&unlock_file($cfile);
2160                 }
2161             
2162             	&webmin_log($in{'new'} ? "create" : "modify", "log", $in{'file'});
2163             }
2164 rizwank 1.1 
2165             &redirect("");
2166             
2167             awstats/schedule_stats.cgi0100777000175700010010000000641710136731443015527 0ustar  LaurentAucun#!/usr/bin/perl
2168             # schedule_stats.cgi
2169             # schedule AWStats update process from cron or logrotate
2170             
2171             require './awstats-lib.pl';
2172             &ReadParse();
2173             
2174             if (! $access{'update'}) { &error($text{'schedule_cannot'}); }
2175             
2176             my $conf=""; my $dir="";
2177             if ($in{'file'} =~ /awstats\.(.*)\.conf$/) { $conf=$1; }
2178             if ($in{'file'} =~ /^(.*)[\\\/][^\\\/]+$/) { $dir=$1; }
2179             
2180             
2181             # Display file contents
2182             &header($title || $text{'schedule_title'}, "");
2183             
2184             print "<hr>\n";
2185 rizwank 1.1 
2186             print "AWStats scheduled update processes detected for config file <b>".$in{'file'}."</b><br>\n";
2187             print "<br>\n";
2188             print "<br>\n";
2189             
2190             # Load other modules lib
2191             &foreign_require("cron", "cron-lib.pl");
2192             &foreign_require("logrotate", "logrotate-lib.pl");
2193             
2194             # For global update
2195             print "<u>List of update processes scheduled by a <b>cron</b> task :</u><br><br>";
2196             print "<table border width=100%>\n";
2197             print "<tr $tb><td align=left>User</td>";
2198             print "<td>Task</td><td align=center>Active</td><td>Note on task</td><td>Action</td></tr>\n";
2199             
2200             my $globalupdate=0;
2201             my $confupdate=0;
2202             if ( foreign_installed('cron', 0) ) {
2203                 # Show cron found
2204                 my $regupdateall="awstats_updateall\.pl";
2205                 my $regupdate="awstats\.pl";
2206 rizwank 1.1     foreach my $j (grep { $_->{'command'} =~ /$regupdate/ || $_->{'command'} =~ /$regupdateall/ } &foreign_call("cron","list_cron_jobs")) {
2207                     my $global=0;
2208                     if ($j->{'command'} =~ /$regupdateall/) { $globalupdate++; $global=1; }
2209                     my $confparam="";
2210                     if ($j->{'command'} =~ /$regupdate/) {
2211                         $j->{'command'} =~ /config=(\S+)/;
2212                         $confparam=$1;
2213                         if ($confparam ne $conf) { next; }
2214                     }
2215                     print "<tr>";
2216                     print "<td><b>".$j->{'user'}."</b></td>";
2217                     print "<td>".$j->{'command'}."</td>";
2218                     print "<td align=center>".($j->{'active'}?'yes':'no')."</td>";
2219                     if ($global) { print "<td>Update all config files</td>"; }
2220                     else { print  "<td>Update this config file only</td>"; }
2221                     print "<td><a href=\"/cron/edit_cron.cgi?idx=".$j->{'index'}."\">Jump to cron task</a></td>";
2222                     print "</tr>";
2223                 }
2224             }
2225             else {
2226                 print "<tr><td colspan=4>Webmin cron module is not installed. It is required to setup cron scheduled tasks</td></tr>";
2227 rizwank 1.1 }
2228             print "</table>";
2229             print "<br>\n";
2230             print "<a href=\"/cron/edit_cron.cgi?new=1\">Add an AWStats cron task to update all AWStats config files</a><br>";
2231             print "(You must add the command \"/usr/local/awstats/tools/awstats_updateall.pl now >/dev/null\")<br>\n";
2232             print "<br>\n";
2233             print "<a href=\"/cron/edit_cron.cgi?new=1\">Add an AWStats cron task to update config file $conf</a><br>\n";
2234             print "(You must add the command \"$config{'awstats'} -update -config=$conf >/dev/null\")<br>\n";
2235             print "<br>\n";
2236             
2237             
2238             print "<br>\n";
2239             print "<br>\n";
2240             
2241             
2242             # For logrotate scheduling
2243             print "<u>List of update processes scheduled by a <b>logrotate</b> task :</u><br><br>";
2244             print "<table border width=100%>\n";
2245             print "<tr $tb><td>Logrotate file</td>";
2246             print "<td>Task</td><td>Note on task</td><td>Action</td></tr>\n";
2247             
2248 rizwank 1.1 if ( foreign_installed('logrotate', 0) ) {
2249                 print "<tr><td colspan=4>This feature is not yet available</td></tr>";
2250             }
2251             else {
2252                 print "<tr><td colspan=4>Webmin logrotate module is not installed. It is required to setup logrotate scheduled tasks</td></tr>";
2253             }
2254             print "</table>";
2255             
2256             print "<br><br>\n";
2257             
2258             
2259             # Back to config list
2260             print "<hr>\n";
2261             &footer("", $text{'index_return'});
2262             
2263             0;
2264             
2265             awstats/uninstall.pl0100555000175700010010000000016107730751250014363 0ustar  LaurentAucun# uninstall.pl
2266             # Called when webmin is uninstalled
2267             
2268             require 'awstats-lib.pl';
2269 rizwank 1.1 
2270             sub module_uninstall
2271             {
2272             
2273             
2274             
2275             
2276             }
2277             
2278             1;
2279             
2280             awstats/update_stats.cgi0100644000175700010010000000171610136731545015206 0ustar  LaurentAucun#!/usr/bin/perl
2281             # update_stats.cgi
2282             # Run AWStats update process
2283             # $Revision: 1.5 $ - $Author: eldy $ - $Date: 2004/10/24 13:51:33 $
2284             
2285             require './awstats-lib.pl';
2286             &ReadParse();
2287             
2288             if (! $access{'update'}) { &error($text{'update_ecannot'}); }
2289             
2290 rizwank 1.1 my $conf=""; my $dir="";
2291             if ($in{'file'} =~ /awstats\.(.*)\.conf$/) { $conf=$1; }
2292             if ($in{'file'} =~ /^(.*)[\\\/][^\\\/]+$/) { $dir=$1; }
2293             
2294             
2295             # Display file contents
2296             &header($title || $text{'update_title'}, "");
2297             print "<hr>\n";
2298             
2299             my $command=$config{'awstats'}." -update -config=$conf -configdir=$dir";
2300             print $text{'update_run'}.":\n<br>\n";
2301             print "$command<br>\n";
2302             print $text{'update_wait'}."...<br>\n";
2303             print "<br>\n";
2304             
2305             &foreign_require("proc", "proc-lib.pl");
2306             proc::safe_process_exec_logged($command,$config{'user'},undef, STDOUT,undef, 1, 1, 0);
2307             
2308             
2309             #$retour=`$command 2>&1`;
2310             #print "$retour\n";
2311 rizwank 1.1 
2312             print "<hr>\n";
2313             print $text{'update_finished'}.".<br>\n";
2314             print "<br>\n";
2315             
2316             
2317             # Back to config list
2318             &footer("", $text{'index_return'});
2319             
2320             0;
2321             awstats/view_all.cgi0100777000175700010010000004024410172230071014302 0ustar  LaurentAucun#!/usr/bin/perl
2322             # view_all.cgi
2323             # Display summary of all available config files
2324             # $Revision: 1.5 $ - $Author: eldy $ - $Date: 2005/01/15 15:01:13 $
2325             
2326             require './awstats-lib.pl';
2327             &ReadParse();
2328             
2329             
2330             my $BarWidth=120;
2331             my $BarHeight=3;
2332 rizwank 1.1 
2333             # Check if awstats is actually installed
2334             if (!&has_command($config{'awstats'})) {
2335             	&header($text{'index_title'}, "", undef, 1, 1, 0, undef);
2336             	print "<hr>\n";
2337             	print "<p>",&text('index_eawstats', "<tt>$config{'awstats'}</tt>","$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
2338             	print "<hr>\n";
2339             	&footer("/", $text{'index'});
2340             	exit;
2341             }
2342             
2343             
2344             &header($text{'viewall_title'}, "", undef, 1, 1, 0, undef, undef, undef, undef);
2345             
2346             my $widthtooltip=560;
2347             print <<EOF;
2348             <style type="text/css">
2349             <!--
2350             div { font: 12px 'Arial','Verdana','Helvetica', sans-serif; text-align: justify; }
2351             .CTooltip { position:absolute; top: 0px; left: 0px; z-index: 2; width: ${widthtooltip}px; visibility:hidden; font: 8pt 'MS Comic Sans','Arial',sans-serif; background-color: #FFFFE6; padding: 8px; border: 1px solid black; }
2352             //-->
2353 rizwank 1.1 </style>
2354             
2355             <script language="javascript" type="text/javascript">
2356             function ShowTip(fArg)
2357             {
2358             	var tooltipOBJ = (document.getElementById) ? document.getElementById('tt' + fArg) : eval("document.all['tt" + fArg + "']");
2359             	if (tooltipOBJ != null) {
2360             		var tooltipLft = (document.body.offsetWidth?document.body.offsetWidth:document.body.style.pixelWidth) - (tooltipOBJ.offsetWidth?tooltipOBJ.offsetWidth:(tooltipOBJ.style.pixelWidth?tooltipOBJ.style.pixelWidth:${widthtooltip})) - 30;
2361             		var tooltipTop = 10;
2362             		if (navigator.appName == 'Netscape') {
2363             			tooltipTop = (document.body.scrollTop>=0?document.body.scrollTop+10:event.clientY+10);
2364              			tooltipOBJ.style.top = tooltipTop+"px";
2365             			tooltipOBJ.style.left = tooltipLft+"px";
2366             		}
2367             		else {
2368             			tooltipTop = (document.body.scrollTop>=0?document.body.scrollTop+10:event.clientY+10);
2369             			tooltipTop = (document.body.scrollTop>=0?document.body.scrollTop+10:event.clientY+10);
2370             			if ((event.clientX > tooltipLft) && (event.clientY < (tooltipOBJ.scrollHeight?tooltipOBJ.scrollHeight:tooltipOBJ.style.pixelHeight) + 10)) {
2371             				tooltipTop = (document.body.scrollTop?document.body.scrollTop:document.body.offsetTop) + event.clientY + 20;
2372             			}
2373             			tooltipOBJ.style.left = tooltipLft;
2374 rizwank 1.1 			tooltipOBJ.style.top = tooltipTop;
2375             		}
2376             		tooltipOBJ.style.visibility = "visible";
2377             	}
2378             }
2379             function HideTip(fArg)
2380             {
2381             	var tooltipOBJ = (document.getElementById) ? document.getElementById('tt' + fArg) : eval("document.all['tt" + fArg + "']");
2382             	if (tooltipOBJ != null) {
2383             		tooltipOBJ.style.visibility = "hidden";
2384             	}
2385             }
2386             </script>
2387             EOF
2388             
2389             
2390             print "<hr>\n";
2391             
2392             if (! $access{'view'}) {
2393             	print &text('viewall_notallowed')."<br>\n";
2394             }
2395 rizwank 1.1 
2396             my @configdirtoscan=split(/\s+/, $access{'dir'});
2397             
2398             if (! @configdirtoscan) {
2399             	print &text('index_nodirallowed',"<b>$remote_user</b>")."<br>\n";
2400             	print &text('index_changeallowed',"<a href=\"/acl/\">Webmin - Utilisateurs Webmin</a>", $text{'index_title'})."<br>\n";
2401             	print "<br>\n";
2402             #	print "<p>",&text('index_econfdir', "<tt>$config{'awstats_conf'}</tt>",
2403             #		  "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
2404             	print "<hr>\n";
2405             	&footer("/", $text{'index'});
2406             	exit;
2407             }
2408             
2409             # Build list of config files from allowed directories
2410             foreach my $dir (split(/\s+/, $access{'dir'})) {
2411             	my @conflist=();
2412             	push(@conflist, map { $_->{'custom'} = 1; $_ } &scan_config_dir($dir));
2413             	foreach my $file (@conflist) {
2414             		next if (!&can_edit_config($file));
2415             		push @config, $file;
2416 rizwank 1.1 	}
2417             }
2418             
2419             # Write message for allowed directories
2420             print &text('viewall_allowed',"<b>$remote_user</b>");
2421             print ":<br>\n";
2422             foreach my $dir (split(/\s/,$access{'dir'})) {
2423             	print "$dir<br>";
2424             }
2425             print "<br>\n";
2426             print &text('index_changeallowed',"<a href=\"/acl/\">Webmin - Webmin Users</a>", $text{'index_title'})."<br>\n";
2427             print "<br>";
2428             
2429             
2430             $starttime=time();
2431             ($nowsec,$nowmin,$nowhour,$nowday,$nowmonth,$nowyear,$nowwday,$nowyday) = localtime($starttime);
2432             if ($nowyear < 100) { $nowyear+=2000; } else { $nowyear+=1900; }
2433             $nowmonth=sprintf("%02d",$nowmonth+1);
2434             
2435             my $YearRequired=$in{'year'}||$nowyear;
2436             my $MonthRequired=$in{'month'}||$nowmonth;
2437 rizwank 1.1 my %dirdata=();
2438             my %view_u=();
2439             my %view_v=();
2440             my %view_p=();
2441             my %view_h=();
2442             my %view_k=();
2443             my %notview_p=();
2444             my %notview_h=();
2445             my %notview_k=();
2446             my %version=();
2447             my %lastupdate=();
2448             my $max_u=0;
2449             my $max_v=0;
2450             my $max_p=0;
2451             my $max_h=0;
2452             my $max_k=0;
2453             my $nomax_p=0;
2454             my $nomax_h=0;
2455             my $nomax_k=0;
2456             my %ListOfYears=($nowyear=>1);
2457             # If required year not in list, we add it
2458 rizwank 1.1 $ListOfYears{$YearRequired}||=$MonthRequired;
2459             
2460             # Set dirdata for config file
2461             my $nbofallowedconffound=0;
2462             if (scalar @config) {
2463             
2464             	# Loop on each config file
2465             	foreach my $l (@config) {
2466             		next if (!&can_edit_config($l));
2467             		$nbofallowedconffound++;
2468             
2469                     # Read data files
2470                     $dirdata{$l}=get_dirdata($l);
2471                 }
2472             }
2473             
2474             
2475             # Show summary informations
2476             $nbofallowedconffound=0;
2477             if (scalar @config) {
2478             
2479 rizwank 1.1     my %foundendmap=();
2480                 my %error=();
2481             
2482             	# Loop on each config file to get info
2483             	#--------------------------------------
2484             	foreach my $l (@config) {
2485             		next if (!&can_edit_config($l));
2486                     
2487             		# Config file line
2488             		#local @files = &all_config_files($l);
2489             		#next if (!@files);
2490             		local $lconf = &get_config($l);
2491             		my $conf=""; my $dir="";
2492             		if ($l =~ /awstats([^\\\/]*)\.conf$/) { $conf=$1; }
2493             		if ($l =~ /^(.*)[\\\/][^\\\/]+$/) { $dir=$1; }
2494                     my $confwithoutdot=$conf; $confwithoutdot =~ s/^\.+//;
2495             
2496                     # Read data file for config $l
2497                     my $dirdata=$dirdata{$l};
2498                     if (! $dirdata) { $dirdata="."; }
2499                     my $filedata=$dirdata."/awstats${MonthRequired}${YearRequired}${conf}.txt";
2500 rizwank 1.1 
2501                     my $linenb=0;
2502                     my $posgeneral=0;
2503                     if (! -f "$filedata") {
2504                         $error{$l}="No data for this month";
2505                     }
2506                     elsif (open(FILE, "<$filedata")) {
2507                         $linenb=0;
2508                         while(<FILE>) {
2509                             if ($linenb++ > 100) { last; }
2510                             my $savline=$_;
2511                             chomp $_; s/\r//;
2512             
2513                             # Remove comments not at beginning of line
2514                             $_ =~ s/\s#.*$//;
2515             
2516                             # Extract param and value
2517                             my ($param,$value)=split(/=/,CleanFromTags($_),2);
2518                             $param =~ s/^\s+//; $param =~ s/\s+$//;
2519                             $value =~ s/#.*$//;
2520                             $value =~ s/^[\s\'\"]+//; $value =~ s/[\s\'\"]+$//;
2521 rizwank 1.1 
2522                             if ($param) {
2523                                 # cleanparam is param without begining #
2524                                 my $cleanparam=$param; my $wascleaned=0;
2525                                 if ($cleanparam =~ s/^#//) { $wascleaned=1; }
2526             
2527                                 if ($cleanparam =~ /^AWSTATS DATA FILE (.*)$/) {
2528                                     $version{$l}=$1;
2529                                     next;
2530                                 }
2531                                 if ($cleanparam =~ /^POS_GENERAL\s+(\d+)/) {
2532                                     $posgeneral=$1;
2533                                     next;
2534                                 }
2535                                 if ($cleanparam =~ /^POS_TIME\s+(\d+)/) {
2536                                     $postime=$1;
2537                                     next;
2538                                 }
2539                                 if ($cleanparam =~ /^END_MAP/) {
2540                                     $foundendmap{$l}=1;
2541                                     last;
2542 rizwank 1.1                     }
2543                             }
2544             
2545                         }
2546                         if ($foundendmap{$l}) {
2547             
2548                             # Map section was completely read, we can jump to data GENERAL
2549                             if ($posgeneral) {
2550                         		$linenb=0;
2551                                 my ($foundu,$foundv,$foundl)=(0,0,0);
2552                                 seek(FILE,$posgeneral,0);
2553                                 while (<FILE>) {
2554                                     if ($linenb++ > 50) { last; }  # To protect against full file scan
2555                                     $line=$_;
2556                              		chomp $line; $line =~ s/\r$//;
2557                                     $line=CleanFromTags($line);
2558                                     
2559                                     if ($line =~ /TotalUnique\s+(\d+)/) { $view_u{$l}=$1; if ($1 > $max_u) { $max_u=$1; } $foundu++; }
2560                                     elsif ($line =~ /TotalVisits\s+(\d+)/) { $view_v{$l}=$1; if ($1 > $max_v) { $max_v=$1; }  $foundv++; }
2561                                     elsif ($line =~ /LastUpdate\s+(\d+)/) { $lastupdate{$l}=$1; $foundl++; }
2562                                     
2563 rizwank 1.1                         if ($foundu && $foundv && $foundl) { last; }
2564                                 }
2565                             } else {
2566                                 $error{$l}.="Mapping for section GENERAL was wrong.";
2567                             }
2568             
2569                             # Map section was completely read, we can jump to data TIME
2570                             if ($postime) {
2571                                 seek(FILE,$postime,0);
2572                         		$linenb=0;
2573                                 while (<FILE>) {
2574                                     if ($linenb++ > 50) { last; }  # To protect against full file scan
2575                                     $line=$_;
2576                              		chomp $line; $line =~ s/\r$//;
2577                                     $line=CleanFromTags($line);
2578                                     
2579                                     if ($line =~ /^(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/) {
2580                                         $view_p{$l}+=$2;
2581                                         $view_h{$l}+=$3;
2582                                         $view_k{$l}+=$4;
2583                                         $noview_p{$l}+=$5;
2584 rizwank 1.1                             $noview_h{$l}+=$6;
2585                                         $noview_k{$l}+=$7;
2586                                     }
2587                                     
2588                                     if ($line =~ /^END_TIME/) { last; }
2589                                 }
2590                                 if ($view_p{$l} > $max_p) { $max_p=$view_p{$l}; } 
2591                                 if ($view_h{$l} > $max_h) { $max_h=$view_h{$l}; }
2592                                 if ($view_k{$l} > $max_k) { $max_k=$view_k{$l}; } 
2593                                 if ($noview_p{$l} > $nomax_p) { $nomax_p=$noview_p{$l}; }
2594                                 if ($noview_h{$l} > $nomax_h) { $nomax_h=$noview_h{$l}; }
2595                                 if ($noview_k{$l} > $nomax_k) { $nomax_k=$noview_k{$l}; }
2596                                } else {
2597                                 $error{$l}.="Mapping for section TIME was wrong.";
2598                             }
2599                             
2600                         }
2601                         close(FILE);
2602                     } else {
2603                         $error{$l}="Failed to open $filedata for read";
2604                     }
2605 rizwank 1.1     }
2606             
2607             	# Loop on each config file to show info
2608             	#--------------------------------------
2609             	foreach my $l (@config) {
2610             		next if (!&can_edit_config($l));
2611             		$nbofallowedconffound++;
2612                     
2613             		# Config file line
2614             		#local @files = &all_config_files($l);
2615             		#next if (!@files);
2616             		local $lconf = &get_config($l);
2617             		my $conf=""; my $dir="";
2618             		if ($l =~ /awstats([^\\\/]*)\.conf$/) { $conf=$1; }
2619             		if ($l =~ /^(.*)[\\\/][^\\\/]+$/) { $dir=$1; }
2620                     my $confwithoutdot=$conf; $confwithoutdot =~ s/^\.+//;
2621             
2622                     # Read data file for config $l
2623                     my $dirdata=$dirdata{$l};
2624                     if (! $dirdata) { $dirdata="."; }
2625                     my $filedata=$dirdata."/awstats${MonthRequired}${YearRequired}${conf}.txt";
2626 rizwank 1.1 
2627             		# Head of config file's table list
2628             		if ($nbofallowedconffound == 1) {
2629             			print "<table border width=100%>\n";
2630             			print "<form method=\"post\" action=\"view_all.cgi\">\n";
2631             			print "<tr><td valign=\"middle\"><b>".&text('viewall_period').":</b></td>";
2632             			print "<td valign=\"middle\">";
2633             			print "<select name=\"month\">\n";
2634             			foreach (1..12) { my $monthix=sprintf("%02s",$_); print "<option".($MonthRequired eq "$monthix"?" selected=\"true\"":"")." value=\"$monthix\">".&text("month$monthix")."</option>\n"; }
2635             			print "</select>\n";
2636             			print "<select name=\"year\">\n";
2637             			# Add YearRequired in list if not in ListOfYears
2638             			$ListOfYears{$YearRequired}||=$MonthRequired;
2639             			foreach (sort keys %ListOfYears) { print "<option".($YearRequired eq "$_"?" selected=\"true\"":"")." value=\"$_\">$_</option>\n"; }
2640             			print "</select>\n";
2641             			print "<input type=\"submit\" value=\" Go \" class=\"aws_button\" />";
2642             			print "</td></tr>\n";
2643                         print "</form>\n";
2644                         print "</table>\n";
2645             
2646             			print "<table border width=\"100%\">\n";
2647 rizwank 1.1 			print "<tr $tb>";
2648             			print "<td colspan=\"3\"><b>$text{'index_path'}</b></td>";
2649             			print "<td width=80 bgcolor=#FFB055 align=center><b>$text{'viewall_u'}</b></td>";
2650             			print "<td width=80 bgcolor=#F8E880 align=center><b>$text{'viewall_v'}</b></td>";
2651             			print "<td width=80 bgcolor=#4477DD align=center><b>$text{'viewall_p'}</b></td>";
2652             			print "<td width=80 bgcolor=#66F0FF align=center><b>$text{'viewall_h'}</b></td>";
2653             			print "<td width=80 bgcolor=#2EA495 align=center><b>$text{'viewall_k'}</b></td>";
2654             			print "<td width=\"".($BarWidth+5)."\">&nbsp;</td>";
2655             			print "<td align=center><b>$text{'index_view'}</b></td>";
2656             			print "</tr>\n";
2657             		}
2658             
2659             		my @st=stat($l);
2660             		my $size = $st[7];
2661             		my ($sec,$min,$hour,$day,$month,$year,$wday,$yday) = localtime($st[9]);
2662             		$year+=1900; $month++;
2663             
2664                     print '<div class="CTooltip" id="tt'.$nbofallowedconffound.'">';
2665                     printf("Configuration file: <b>%s</b><br>\n",$l);
2666             		printf("Created/Changed: <b>%04s-%02s-%02s %02s:%02s:%02s</b><br>\n",$year,$month,$day,$hour,$min,$sec);
2667                     print "<br>\n";
2668 rizwank 1.1 
2669             		my @st2=stat($filedata);
2670                     printf("Data file for period: <b>%s</b><br>\n",$filedata);
2671                     printf("Data file size for period: <b>%s</b>".($st2[7]?" bytes":"")."<br>\n",($st2[7]?$st2[7]:"unknown"));
2672                     printf("Data file version: <b>%s</b>",($version{$l}?" $version{$l}":"unknown")."<br>");
2673                     printf("Last update: <b>%s</b>",($lastupdate{$l}?" $lastupdate{$l}":"unknown"));
2674                     print '</div>';
2675             
2676             		print "<tr $cb>\n";
2677             
2678             		print "<td>$nbofallowedconffound</td>";
2679                     print "<td align=\"center\" width=\"20\" onmouseover=\"ShowTip($nbofallowedconffound);\" onmouseout=\"HideTip($nbofallowedconffound);\"><img src=\"images/info.png\"></td>";
2680             		print "<td>";
2681                     print "$confwithoutdot";
2682             		if ($access{'global'}) {	# Edit config
2683             	    	print "<br><a href=\"edit_config.cgi?file=$l\">$text{'index_edit'}</a>";
2684             		}
2685             		print "</td>";
2686             
2687             		if ($error{$l}) {
2688             		    print "<td colspan=\"6\" align=\"center\">";
2689 rizwank 1.1 		    print "$error{$l}";
2690             		    print "</td>";
2691             		}
2692             		elsif (! $foundendmap{$l}) {
2693             		    print "<td colspan=\"6\">";
2694             		    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}.";
2695             		    print "</td>";
2696             		}
2697                     else {
2698                 		print "<td align=\"right\">";
2699                 		print Format_Number($view_u{$l});
2700                 		print "</td>";
2701                 		print "<td align=\"right\">";
2702                 		print Format_Number($view_v{$l});
2703                 		print "</td>";
2704                 		print "<td align=\"right\">";
2705                 		print Format_Number($view_p{$l});
2706                 		print "</td>";
2707                 		print "<td align=\"right\">";
2708                 		print Format_Number($view_h{$l});
2709                 		print "</td>";
2710 rizwank 1.1     		print "<td align=\"right\">";
2711                 		print Format_Bytes($view_k{$l});
2712                 		print "</td>";
2713                         # Print bargraph
2714                         print '<td>';
2715             			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;
2716             			if ($max_u > 0) { $bredde_u=int($BarWidth*($view_u{$l}||0)/$max_u)+1; }
2717             			if ($max_v > 0) { $bredde_v=int($BarWidth*($view_v{$l}||0)/$max_v)+1; }
2718             			if ($max_p > 0) { $bredde_p=int($BarWidth*($view_p{$l}||0)/$max_p)+1; }
2719             			if ($max_h > 0) { $bredde_h=int($BarWidth*($view_h{$l}||0)/$max_h)+1; }
2720             			if ($max_k > 0) { $bredde_k=int($BarWidth*($view_k{$l}||0)/$max_k)+1; }
2721             			if ($nomax_p > 0) { $nobredde_p=int($BarWidth*($noview_p{$l}||0)/$nomax_p)+1; }
2722             			if ($nomax_h > 0) { $nobredde_h=int($BarWidth*($noview_h{$l}||0)/$nomax_h)+1; }
2723             			if ($nomax_k > 0) { $nobredde_k=int($BarWidth*($noview_k{$l}||0)/$nomax_k)+1; }
2724                			if (1) { print "<img src=\"images/hu.png\" width=\"$bredde_u\" height=\"$BarHeight\" /><br />"; }
2725                			if (1) { print "<img src=\"images/hv.png\" width=\"$bredde_v\" height=\"$BarHeight\" /><br />"; }
2726                			if (1) { print "<img src=\"images/hp.png\" width=\"$bredde_p\" height=\"$BarHeight\" /><br />"; }
2727                			if (1) { print "<img src=\"images/hh.png\" width=\"$bredde_h\" height=\"$BarHeight\" /><br />"; }
2728                			if (1) { print "<img src=\"images/hk.png\" width=\"$bredde_k\" height=\"$BarHeight\" /><br />"; }
2729                         print '</td>';
2730                     }
2731 rizwank 1.1 
2732             		if ($access{'view'}) {
2733             			if ($config{'awstats_cgi'}) {
2734             				print "<td align=center><a href='$config{'awstats_cgi'}?".($confwithoutdot?"config=$confwithoutdot":"").($dir?"&configdir=$dir":"")."' target=awstats>$text{'index_view2'}</a></td>\n";
2735             			}
2736             			else {
2737             				print "<td align=center>".&text('index_cgi', "$gconfig{'webprefix'}/config.cgi?$module_name")."</td>";	
2738             			}
2739             		}
2740             		else {
2741             	        print "<td align=center>NA</td>";
2742             		}
2743             
2744             		print "</tr>\n";
2745             	}
2746             
2747             	if ($nbofallowedconffound > 0) { print "</table><br>\n"; }
2748             }
2749             
2750             if (! $nbofallowedconffound) {
2751             	print "<br><p><b>$text{'index_noconfig'}</b></p><br>\n";
2752 rizwank 1.1 }
2753             
2754             # Back to config list
2755             print "<hr>\n";
2756             &footer("", $text{'index_return'});
2757             

Rizwan Kassim
Powered by
ViewCVS 0.9.2