From: eldy <> Date: Mon, 9 Sep 2002 14:03:21 +0000 (+0000) Subject: Added all logins and last logins full list report. X-Git-Tag: AWSTATS_5_0_BETA~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=111ccce2392e6664e4d58219f75d95b794f429c7;p=thirdparty%2FAWStats.git Added all logins and last logins full list report. --- diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 41fa513b..4ef16ef7 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -1509,7 +1509,7 @@ sub Read_History_With_Update { $SectionsToLoad{"time"}=2; if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "allhosts" || $HTMLOutput eq "lasthosts" || $HTMLOutput eq "unknownip") { $SectionsToLoad{"visitor"}=3; } # before day, sider and session section if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "days") { $SectionsToLoad{"day"}=4; } - if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "logins") { $SectionsToLoad{"login"}=5; } + if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "alllogins" || $HTMLOutput eq "lastlogins") { $SectionsToLoad{"login"}=5; } if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "domains") { $SectionsToLoad{"domain"}=6; } if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "sessions") { $SectionsToLoad{"session"}=7; } if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "browserdetail") { $SectionsToLoad{"browser"}=8; } @@ -3510,8 +3510,10 @@ if ((! $ENV{"GATEWAY_INTERFACE"}) && (! $SiteConfig)) { print " -output to output main HTML report (no update made except with -update)\n"; print " -output=x to output other report pages where x is:\n"; print " allhosts to build page of all hosts\n"; - print " lasthosts to build page of last connections\n"; + print " lasthosts to build page of last connections for hosts\n"; print " unknownip to build page of all unresolved IP\n"; + print " alllogins to build page of all logins used\n"; + print " lastlogins to build page of last connections for logins\n"; print " urldetail to list most often viewed pages \n"; print " urldetail:filter to list most often viewed pages matching filter\n"; print " urlentry to list entry pages\n"; @@ -4047,7 +4049,6 @@ if ($UpdateStats && $FrameName ne "index" && $FrameName ne "mainleft") { # Updat } - # Split DD/Month/YYYY:HH:MM:SS or YYYY-MM-DD HH:MM:SS or MM/DD/YY\tHH:MM:SS $field[$pos_date] =~ tr/-\/ \t/::::/; # " \t" is used instead of "\s" not known with tr my @dateparts=split(/:/,$field[$pos_date]); # tr and split faster than @dateparts=split(/[\/\-:\s]/,$field[$pos_date]) @@ -4060,9 +4061,7 @@ if ($UpdateStats && $FrameName ne "index" && $FrameName ne "mainleft") { # Updat my ($nsec,$nmin,$nhour,$nmday,$nmon,$nyear,$nwday) = localtime(Time::Local::timelocal($dateparts[5], $dateparts[4], $dateparts[3], $dateparts[0], $dateparts[1]-1, $dateparts[2]-1900) + $Plugin_timezoneSeconds); @dateparts = split(/:/, sprintf("%02u:%02u:%04u:%02u:%02u:%02u", $nmday, $nmon+1, $nyear+1900, $nhour, $nmin, $nsec)); } -# my $yearmonthdayrecord="$dateparts[2]$dateparts[1]$dateparts[0]"; my $yearmonthdayrecord=sprintf("$dateparts[2]%02i%02i",$dateparts[1],$dateparts[0]); -# my $timerecord=int($yearmonthdayrecord.$dateparts[3].$dateparts[4].$dateparts[5]); my $timerecord=((int("$yearmonthdayrecord")*100+$dateparts[3])*100+$dateparts[4])*100+$dateparts[5]; my $yearrecord=int($dateparts[2]); my $monthrecord=int($dateparts[1]); @@ -4944,10 +4943,12 @@ EOF print ($frame?"\n":""); if ($ShowDomainsStats) { print ($frame?"":""); print "$Message[17]"; print ($frame?"\n":"   "); } if ($ShowHostsStats) { print ($frame?"":""); print "".ucfirst($Message[81]).""; print ($frame?"\n":"   "); } - if ($ShowHostsStats) { print ($frame?"   ":""); print "$Message[80]\n"; print ($frame?"\n":"   "); } + if ($ShowHostsStats) { print ($frame?"   ":""); print "$Message[80]\n"; print ($frame?"\n":"   "); } if ($ShowHostsStats) { print ($frame?"   ":""); print "$Message[9]\n"; print ($frame?"\n":"   "); } if ($ShowHostsStats) { print ($frame?"   ":""); print "$Message[45]\n"; print ($frame?"\n":"   "); } if ($ShowAuthenticatedUsers) { print ($frame?"":""); print "$Message[94]"; print ($frame?"\n":"   "); } + if ($ShowAuthenticatedUsers) { print ($frame?"   ":""); print "$Message[80]\n"; print ($frame?"\n":"   "); } + if ($ShowAuthenticatedUsers) { print ($frame?"   ":""); print "$Message[9]\n"; print ($frame?"\n":"   "); } if ($ShowRobotsStats) { print ($frame?"":""); print "$Message[53]"; print ($frame?"\n":"   "); } print ($frame?"":"\n"); # Navigation @@ -5185,6 +5186,70 @@ EOF &html_end; exit(0); } + if ($HTMLOutput eq "alllogins") { + print "$Center 
\n"; + &tab_head($Message[80],19); + if ($MonthRequired ne "year") { print "$Message[81] : $TotalHostsKnown $Message[82], $TotalHostsUnknown $Message[1] - $TotalUnique $Message[11]"; } + else { print "$Message[94] : ".(scalar keys %_login_h).""; } + print "$Message[56]$Message[57]$Message[75]$Message[9]\n"; + $total_p=$total_h=$total_k=0; + my $count=0; + &BuildKeyList($MaxRowsInHTMLOutput,$MinHitHost,\%_login_h,\%_login_p); + foreach my $key (@keylist) { + print "$key"; + print "$_login_p{$key}$_login_h{$key}".Format_Bytes($_login_k{$key}).""; + if ($_login_l{$key}) { print "".Format_Date($_login_l{$key},1).""; } + else { print "-"; } + print "\n"; + $total_p += $_login_p{$key}||0; + $total_h += $_login_h{$key}; + $total_k += $_login_k{$key}||0; + $count++; + } + if ($Debug) { debug("Total real / shown : $TotalPages / $total_p - $TotalHits / $total_h - $TotalBytes / $total_h",2); } + $rest_p=$TotalPages-$total_p; + $rest_h=$TotalHits-$total_h; + $rest_k=$TotalBytes-$total_k; + if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other logins and/or anonymous + print "$Message[125]"; + print "$rest_p$rest_h".Format_Bytes($rest_k)." \n"; + } + &tab_end; + &html_end; + exit(0); + } + if ($HTMLOutput eq "lastlogins") { + print "$Center 
\n"; + &tab_head($Message[9],19); + if ($MonthRequired ne "year") { print "$Message[81] : $TotalHostsKnown $Message[82], $TotalHostsUnknown $Message[1] - $TotalUnique $Message[11]"; } + else { print "$Message[94] : ".(scalar keys %_login_h).""; } + print "$Message[56]$Message[57]$Message[75]$Message[9]\n"; + $total_p=$total_h=$total_k=0; + my $count=0; + &BuildKeyList($MaxRowsInHTMLOutput,$MinHitHost,\%_login_h,\%_login_l); + foreach my $key (@keylist) { + print "$key"; + print "$_login_p{$key}$_login_h{$key}".Format_Bytes($_login_k{$key}).""; + if ($_login_l{$key}) { print "".Format_Date($_login_l{$key},1).""; } + else { print "-"; } + print "\n"; + $total_p += $_login_p{$key}||0; + $total_h += $_login_h{$key}; + $total_k += $_login_k{$key}||0; + $count++; + } + if ($Debug) { debug("Total real / shown : $TotalPages / $total_p - $TotalHits / $total_h - $TotalBytes / $total_h",2); } + $rest_p=$TotalPages-$total_p; + $rest_h=$TotalHits-$total_h; + $rest_k=$TotalBytes-$total_k; + if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other logins and/or anonymous + print "$Message[125]"; + print "$rest_p$rest_h".Format_Bytes($rest_k)." \n"; + } + &tab_end; + &html_end; + exit(0); + } if ($HTMLOutput eq "urldetail" || $HTMLOutput eq "urlentry" || $HTMLOutput eq "urlexit") { if ($Plugin_etf1) { AddOn_Filter(); } print "$Center 
\n"; @@ -5917,14 +5982,14 @@ EOF if ($ShowAuthenticatedUsers) { if ($Debug) { debug("ShowAuthenticatedUsers",2); } print "$Center 
\n"; - &tab_head($Message[94],19); - print "$Message[94]$Message[56]$Message[57]$Message[75]$Message[9]\n"; + &tab_head("$Message[94] ($Message[77] $MaxNbOfLoginShown)   -   $Message[80]   -   $Message[9]",19); + print "$Message[94] : ".(scalar keys %_login_h)."$Message[56]$Message[57]$Message[75]$Message[9]\n"; $total_p=$total_h=$total_k=0; $max_h=1; foreach my $key (values %_login_h) { if ($key > $max_h) { $max_h = $key; } } $max_k=1; foreach my $key (values %_login_k) { if ($key > $max_k) { $max_k = $key; } } my $count=0; - foreach my $key (sort { $_login_h{$b} <=> $_login_h{$a} } keys %_login_h) { - if ($count >= $MaxNbOfLoginShown) { last; } + &BuildKeyList($MaxNbOfLoginShown,$MinHitLogin,\%_login_p,\%_login_h); + foreach my $key (@keylist) { my $bredde_p=0;my $bredde_h=0;my $bredde_k=0; if ($max_h > 0) { $bredde_p=int($BarWidth*$_login_p{$key}/$max_h)+1; } # use max_h to enable to compare pages with hits if ($max_h > 0) { $bredde_h=int($BarWidth*$_login_h{$key}/$max_h)+1; } diff --git a/wwwroot/cgi-bin/lang/awstats-en.txt b/wwwroot/cgi-bin/lang/awstats-en.txt index e2872e20..d132f064 100644 --- a/wwwroot/cgi-bin/lang/awstats-en.txt +++ b/wwwroot/cgi-bin/lang/awstats-en.txt @@ -125,7 +125,7 @@ message121=Search Keywords message122=different refering search engines message123=different refering sites message124=Other phrases -message125=Anonymous users +message125=Other logins (and/or anonymous users) message126=Refering search engines message127=Refering sites message128=Summary diff --git a/wwwroot/cgi-bin/lang/awstats-fr.txt b/wwwroot/cgi-bin/lang/awstats-fr.txt index 4c835428..06fce16b 100644 --- a/wwwroot/cgi-bin/lang/awstats-fr.txt +++ b/wwwroot/cgi-bin/lang/awstats-fr.txt @@ -94,7 +94,7 @@ message90=Sam message91=Jours de la semaine message92=Qui message93=Quand -message94=Login utilises +message94=Logins utilises message95=Min message96=Moyenne message97=Max @@ -125,7 +125,7 @@ message121=Mots cl message122=moteurs de recherche différents message123=sites différents message124=Autres phrases -message125=Utilisateurs anonymes +message125=Autres logins (et/ou utilisateurs anonymes) message126=Moteurs de recherche message127=Sites référenceurs message128=Résumé