2008-12-29 15:34:08 +01:00
|
|
|
## @file
|
|
|
|
# Status process mechanism
|
|
|
|
|
2017-02-11 08:47:22 +01:00
|
|
|
package Lemonldap::NG::Handler::Lib::Status;
|
2008-05-09 17:51:21 +02:00
|
|
|
|
|
|
|
use strict;
|
2012-07-10 15:36:10 +02:00
|
|
|
use POSIX qw(setuid setgid);
|
2017-02-18 15:25:51 +01:00
|
|
|
use JSON qw(to_json);
|
2018-06-12 06:49:04 +02:00
|
|
|
use IO::Select;
|
2018-06-12 21:00:10 +02:00
|
|
|
use IO::Socket::INET;
|
2010-01-25 11:55:07 +01:00
|
|
|
|
2019-09-17 20:17:57 +02:00
|
|
|
use Lemonldap::NG::Handler::Lib::StatusConstants qw(portalConsts);
|
|
|
|
|
2020-06-06 23:27:37 +02:00
|
|
|
our $VERSION = '2.0.9';
|
2008-12-25 09:04:33 +01:00
|
|
|
|
2008-05-11 11:17:26 +02:00
|
|
|
our $status = {};
|
|
|
|
our $activity = [];
|
|
|
|
our $start = int( time / 60 );
|
2008-05-19 11:18:00 +02:00
|
|
|
use constant MN_COUNT => 5;
|
2008-05-09 17:51:21 +02:00
|
|
|
|
2010-01-25 11:55:07 +01:00
|
|
|
our $page_title = 'Lemonldap::NG statistics';
|
|
|
|
|
2008-05-12 06:02:55 +02:00
|
|
|
eval {
|
2012-07-10 15:36:10 +02:00
|
|
|
setgid( ( getgrnam( $ENV{APACHE_RUN_GROUP} ) )[2] );
|
|
|
|
setuid( ( getpwnam( $ENV{APACHE_RUN_USER} ) )[2] );
|
2008-05-12 06:02:55 +02:00
|
|
|
};
|
|
|
|
|
2014-07-23 14:20:21 +02:00
|
|
|
## @rfn void run()
|
2008-12-29 15:34:08 +01:00
|
|
|
# Main.
|
|
|
|
# Reads requests from STDIN to :
|
|
|
|
# - update counts
|
|
|
|
# - display results
|
2008-05-09 17:51:21 +02:00
|
|
|
sub run {
|
2018-06-12 06:49:04 +02:00
|
|
|
my ( $lastMn, $mn, $count, $cache, @ready );
|
|
|
|
my $sel = IO::Select->new;
|
|
|
|
$sel->add( \*STDIN );
|
2018-06-12 21:00:10 +02:00
|
|
|
while ( my $opt = shift @ARGV ) {
|
|
|
|
if ( $opt eq '--udp' ) {
|
|
|
|
my $hp = shift @ARGV;
|
2019-07-02 20:03:40 +02:00
|
|
|
my $s = IO::Socket::INET->new( Proto => 'udp', LocalAddr => $hp );
|
2018-06-12 21:00:10 +02:00
|
|
|
$sel->add($s);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
die "Unknown option $opt";
|
|
|
|
}
|
|
|
|
}
|
2018-06-12 06:49:04 +02:00
|
|
|
while ( @ready = $sel->can_read ) {
|
|
|
|
foreach my $fh (@ready) {
|
2018-06-12 12:17:17 +02:00
|
|
|
if ( $fh == \*STDIN and $fh->eof ) {
|
2018-06-12 06:49:04 +02:00
|
|
|
exit;
|
2008-05-11 11:17:26 +02:00
|
|
|
}
|
2019-07-02 20:03:40 +02:00
|
|
|
$_ = $fh->getline or next;
|
2018-06-12 06:49:04 +02:00
|
|
|
$mn = int( time / 60 ) - $start + 1;
|
|
|
|
|
|
|
|
# Cleaning activity array
|
|
|
|
if ( $mn > $lastMn ) {
|
|
|
|
for ( my $i = 0 ; $i < $mn - $lastMn ; $i++ ) {
|
|
|
|
unshift @$activity, {};
|
|
|
|
delete $activity->[ MN_COUNT + 1 ];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$lastMn = $mn;
|
2008-05-11 11:17:26 +02:00
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
# Activity collect
|
|
|
|
if (
|
2022-02-05 11:40:10 +01:00
|
|
|
/^(\S+)\s+=>\s+(\S+)\s+(OK|REJECT|REDIRECT|LOGOUT|UNPROTECT|SKIP|EXPIRED|\-?\d+)$/
|
2018-06-12 06:49:04 +02:00
|
|
|
)
|
|
|
|
{
|
|
|
|
my ( $user, $uri, $code ) = ( $1, $2, $3 );
|
2008-05-11 11:17:26 +02:00
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
# Portal error translation
|
2020-02-20 23:34:02 +01:00
|
|
|
$code = portalConsts->{$code} || $code
|
|
|
|
if ( $code =~ /^\-?\d+$/ );
|
2008-05-11 21:21:39 +02:00
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
# Per user activity
|
|
|
|
$status->{user}->{$user}->{$code}++;
|
2008-05-11 11:17:26 +02:00
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
# Per uri activity
|
|
|
|
$uri =~ s/^(.*?)\?.*$/$1/;
|
|
|
|
$status->{uri}->{$uri}->{$code}++;
|
|
|
|
$count->{uri}->{$uri}++;
|
2008-05-13 18:50:33 +02:00
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
# Per vhost activity
|
|
|
|
my ($vhost) = ( $uri =~ /^([^\/]+)/ );
|
|
|
|
$status->{vhost}->{$vhost}->{$code}++;
|
|
|
|
$count->{vhost}->{$vhost}++;
|
2008-05-11 11:17:26 +02:00
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
# Last 5 minutes activity
|
|
|
|
$activity->[0]->{$code}++;
|
2014-06-27 12:33:09 +02:00
|
|
|
}
|
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
elsif (/^RELOADCACHE(?:\s+(\S+?),(.+))?$/) {
|
|
|
|
if ( my ( $cacheModule, $cacheOptions ) = ( $1, $2 ) ) {
|
|
|
|
eval "use $cacheModule;"
|
|
|
|
. "\$cache = new $cacheModule($cacheOptions);";
|
|
|
|
print STDERR "$@\n" if ($@); # TODO: use logger instead
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$cache = undef;
|
2008-05-09 22:50:27 +02:00
|
|
|
}
|
2008-05-11 11:17:26 +02:00
|
|
|
}
|
2010-01-25 11:55:07 +01:00
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
# Status requests
|
|
|
|
|
|
|
|
# $args contains parameters passed to url status page (a=1 for example
|
|
|
|
# if request is http://test.example.com/status?a=1). To be used
|
|
|
|
# later...
|
2018-06-12 21:00:10 +02:00
|
|
|
elsif (/^STATUS\s*(.+)?$/) {
|
2018-06-12 12:17:17 +02:00
|
|
|
my $tmp = $1;
|
|
|
|
my $out;
|
|
|
|
if ( $fh == \*STDIN ) {
|
|
|
|
$out = \*STDOUT;
|
|
|
|
}
|
2018-06-12 21:00:10 +02:00
|
|
|
elsif ( $tmp =~ s/\s*host=(\S+)$// ) {
|
2018-06-12 12:17:17 +02:00
|
|
|
$out =
|
|
|
|
IO::Socket::INET->new( Proto => "udp", PeerAddr => $1 );
|
|
|
|
unless ($out) {
|
|
|
|
print STDERR "Unable to open UDP connection\n";
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
print STDERR "No host given, skipping\n";
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
$out->autoflush(1);
|
2018-06-12 06:49:04 +02:00
|
|
|
my $args = {};
|
|
|
|
%$args = split( /[=&]/, $tmp ) if ($tmp);
|
2018-06-12 12:17:17 +02:00
|
|
|
&head($out) unless ( $args->{json} );
|
2018-06-12 06:49:04 +02:00
|
|
|
|
|
|
|
my ( $c, $m, $u );
|
|
|
|
foreach my $user ( keys %{ $status->{user} } ) {
|
|
|
|
my $v = $status->{user}->{$user};
|
|
|
|
$u++ unless ( $user =~ /^\d+\.\d+\.\d+\.\d+$/ );
|
|
|
|
|
|
|
|
# Total requests
|
|
|
|
foreach ( keys %$v ) {
|
|
|
|
$c->{$_} += $v->{$_};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for ( my $i = 1 ; $i < @$activity ; $i++ ) {
|
|
|
|
$m->{$_} += $activity->[$i]->{$_}
|
|
|
|
foreach ( keys %{ $activity->[$i] } );
|
|
|
|
}
|
|
|
|
foreach ( keys %$m ) {
|
|
|
|
$m->{$_} = sprintf( "%.2f", $m->{$_} / MN_COUNT );
|
|
|
|
$m->{$_} = int( $m->{$_} ) if ( $m->{$_} > 99 );
|
|
|
|
}
|
2017-02-18 15:25:51 +01:00
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
# JSON values
|
|
|
|
if ( $args->{json} ) {
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print(
|
|
|
|
to_json( { average => $m, total => $c } ) . "\nEND\n" );
|
2018-06-12 06:49:04 +02:00
|
|
|
}
|
2008-05-11 11:17:26 +02:00
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
# Raw values (Dump)
|
|
|
|
elsif ( $args->{'dump'} ) {
|
|
|
|
require Data::Dumper;
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print("<div id=\"dump\"><pre>\n");
|
|
|
|
$out->print(
|
|
|
|
Data::Dumper::Dumper( $status, $activity, $count ) );
|
|
|
|
$out->print("</pre></div>\n");
|
|
|
|
&end($out);
|
2014-06-26 17:12:31 +02:00
|
|
|
}
|
2018-06-12 06:49:04 +02:00
|
|
|
else {
|
2008-05-13 18:50:33 +02:00
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
# Total requests
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print("<h2>Total</h2>\n<div id=\"total\"><pre>\n");
|
|
|
|
$out->print(
|
|
|
|
sprintf(
|
|
|
|
"%-30s : \%6d (%.02f / mn)\n",
|
|
|
|
$_, $c->{$_}, $c->{$_} / $mn
|
|
|
|
)
|
|
|
|
) foreach ( sort keys %$c );
|
|
|
|
$out->print("\n</pre></div>\n");
|
2010-01-25 11:55:07 +01:00
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
# Average
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print( "<h2>Average for last "
|
|
|
|
. MN_COUNT
|
|
|
|
. " minutes</h2>\n<div id=\"average\"><pre>\n" );
|
|
|
|
$out->print( sprintf( "%-30s : %6s / mn\n", $_, $m->{$_} ) )
|
2018-06-12 06:49:04 +02:00
|
|
|
foreach ( sort keys %$m );
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print("\n</pre></div>\n");
|
2008-05-13 18:50:33 +02:00
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
# Users connected
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print(
|
|
|
|
"<div id=\"users\"><p>\nTotal users : $u\n</p></div>\n"
|
|
|
|
);
|
2010-03-01 21:32:28 +01:00
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
# Local cache
|
|
|
|
if ($cache) {
|
|
|
|
my @t = $cache->get_keys( $_[1]->{namespace} );
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print( "<div id=\"cache\"><p>\nLocal Cache : "
|
|
|
|
. @t
|
|
|
|
. " objects\n</p></div>\n" );
|
2010-03-01 21:32:28 +01:00
|
|
|
}
|
2008-05-13 18:50:33 +02:00
|
|
|
|
2018-06-12 06:49:04 +02:00
|
|
|
# Uptime
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print( "<div id=\"up\"><p>\nServer up for : "
|
|
|
|
. &timeUp( $out, $mn )
|
|
|
|
. "\n</p></div>\n" );
|
2018-06-12 06:49:04 +02:00
|
|
|
|
|
|
|
# Top uri
|
|
|
|
if ( $args->{top} ) {
|
|
|
|
$args->{categories} ||=
|
|
|
|
'REJECT,PORTAL_FIRSTACCESS,LOGOUT,OK';
|
|
|
|
|
|
|
|
# Vhost activity
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print(
|
|
|
|
"<hr/>\n<h2>Virtual Host activity</h2>\n<div id=\"vhost\"><pre>\n"
|
|
|
|
);
|
2018-06-12 06:49:04 +02:00
|
|
|
foreach (
|
|
|
|
sort {
|
|
|
|
$count->{vhost}->{$b} <=> $count->{vhost}->{$a}
|
|
|
|
}
|
|
|
|
keys %{ $count->{vhost} }
|
|
|
|
)
|
|
|
|
{
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print(
|
|
|
|
sprintf( "%-40s : %6d\n",
|
|
|
|
$_, $count->{vhost}->{$_} )
|
|
|
|
);
|
2018-06-12 06:49:04 +02:00
|
|
|
}
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print("\n</pre></div>\n");
|
2018-06-12 06:49:04 +02:00
|
|
|
|
|
|
|
# General
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print(
|
|
|
|
"<h2>Top used URI</h2>\n<div id=\"uri\"><pre>\n");
|
2018-06-12 06:49:04 +02:00
|
|
|
my $i = 0;
|
|
|
|
foreach (
|
|
|
|
sort { $count->{uri}->{$b} <=> $count->{uri}->{$a} }
|
|
|
|
keys %{ $count->{uri} }
|
|
|
|
)
|
|
|
|
{
|
|
|
|
last if ( $i == $args->{top} );
|
|
|
|
last unless ( $count->{uri}->{$_} );
|
|
|
|
$i++;
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print(
|
|
|
|
sprintf( "%-80s : %6d\n",
|
|
|
|
$_, $count->{uri}->{$_} )
|
|
|
|
);
|
2018-06-12 06:49:04 +02:00
|
|
|
}
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print("\n</pre></div>\n");
|
2018-06-12 06:49:04 +02:00
|
|
|
|
|
|
|
# Top by category
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print(
|
|
|
|
"<table class=\"topByCat\"><tr><th style=\"width:20%\">Code</th><th>Top</th></tr>\n"
|
|
|
|
);
|
2018-06-12 06:49:04 +02:00
|
|
|
foreach my $cat ( split /,/, $args->{categories} ) {
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print(
|
|
|
|
"<tr><td>$cat</td><td nowrap>\n<div id=\"$cat\">\n"
|
|
|
|
);
|
|
|
|
topByCat( $out, $cat, $args->{top} );
|
|
|
|
$out->print("</div>\n</td></tr>");
|
2018-06-12 06:49:04 +02:00
|
|
|
}
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print("</table>\n");
|
2010-03-01 21:32:28 +01:00
|
|
|
}
|
2010-01-25 11:55:07 +01:00
|
|
|
|
2018-06-12 12:17:17 +02:00
|
|
|
&end($out);
|
2018-06-12 06:49:04 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
2020-06-06 23:27:37 +02:00
|
|
|
print STDERR "Status: Unknown command line -> $_";
|
2010-03-01 21:32:28 +01:00
|
|
|
}
|
2016-03-17 23:19:44 +01:00
|
|
|
}
|
2008-05-09 17:51:21 +02:00
|
|
|
}
|
|
|
|
}
|
2008-05-11 14:55:20 +02:00
|
|
|
|
2008-12-30 10:37:56 +01:00
|
|
|
## @rfn private string timeUp(int d)
|
2008-12-29 15:34:08 +01:00
|
|
|
# Return the time since the status process was launched (last Apache reload).
|
|
|
|
# @param $d Number of minutes since start
|
|
|
|
# @return Date in format "day hour minute"
|
2008-05-13 11:07:30 +02:00
|
|
|
sub timeUp {
|
2018-06-12 12:17:17 +02:00
|
|
|
my ( $out, $d ) = @_;
|
2008-05-13 11:07:30 +02:00
|
|
|
my $mn = $d % 60;
|
|
|
|
$d = ( $d - $mn ) / 60;
|
|
|
|
my $h = $d % 24;
|
2008-05-13 13:32:59 +02:00
|
|
|
$d = ( $d - $h ) / 24;
|
2010-10-28 20:34:10 +02:00
|
|
|
return "${d}d ${h}h ${mn}mn";
|
2008-05-13 11:07:30 +02:00
|
|
|
}
|
|
|
|
|
2008-12-30 10:37:56 +01:00
|
|
|
## @rfn private void topByCat(string cat,int max)
|
2008-12-31 11:39:39 +01:00
|
|
|
# Display the "top 10" for a category (OK, REDIRECT,...).
|
2008-12-29 15:34:08 +01:00
|
|
|
# @param $cat Category to display
|
|
|
|
# @param $max Number of lines to display
|
2008-05-12 12:30:09 +02:00
|
|
|
sub topByCat {
|
2018-06-12 12:17:17 +02:00
|
|
|
my ( $out, $cat, $max ) = @_;
|
2008-05-13 11:07:30 +02:00
|
|
|
my $i = 0;
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print("<pre>\n");
|
2008-05-13 11:07:30 +02:00
|
|
|
foreach (
|
|
|
|
sort { $status->{uri}->{$b}->{$cat} <=> $status->{uri}->{$a}->{$cat} }
|
2008-05-19 11:18:00 +02:00
|
|
|
keys %{ $status->{uri} }
|
|
|
|
)
|
2008-05-13 11:07:30 +02:00
|
|
|
{
|
|
|
|
last if ( $i == $max );
|
|
|
|
last unless ( $status->{uri}->{$_}->{$cat} );
|
2008-05-12 12:30:09 +02:00
|
|
|
$i++;
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print(
|
|
|
|
sprintf( "%-80s : %6d\n", $_, $status->{uri}->{$_}->{$cat} ) );
|
2008-05-12 12:30:09 +02:00
|
|
|
}
|
2018-06-12 12:17:17 +02:00
|
|
|
$out->print("</pre>\n");
|
2008-05-12 12:30:09 +02:00
|
|
|
}
|
|
|
|
|
2008-12-30 10:37:56 +01:00
|
|
|
## @rfn private void head()
|
2008-12-29 15:34:08 +01:00
|
|
|
# Display head of HTML status responses.
|
2008-05-11 14:55:20 +02:00
|
|
|
sub head {
|
2018-06-12 12:17:17 +02:00
|
|
|
my $out = shift;
|
|
|
|
$out->print( <<"EOF");
|
2008-05-11 14:55:20 +02:00
|
|
|
<!DOCTYPE html
|
|
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
|
|
|
|
<head>
|
2010-01-25 11:55:07 +01:00
|
|
|
<title>$page_title</title>
|
|
|
|
<style type="text/css">
|
|
|
|
<!--
|
|
|
|
body{
|
|
|
|
background: #000;
|
|
|
|
color:#fff;
|
|
|
|
padding:10px 50px;
|
|
|
|
font-family:sans-serif;
|
|
|
|
}
|
|
|
|
h1 {
|
|
|
|
margin:5px 20px;
|
|
|
|
}
|
|
|
|
h2 {
|
|
|
|
margin:30px 0 0 0;
|
|
|
|
padding:0 10px;
|
|
|
|
border-left:20px solid orange;
|
|
|
|
line-height:20px;
|
|
|
|
}
|
|
|
|
hr {
|
|
|
|
height:1px;
|
|
|
|
background-color:orange;
|
|
|
|
margin:10px 0;
|
|
|
|
border:0;
|
|
|
|
}
|
|
|
|
a {
|
|
|
|
color:orange;
|
|
|
|
text-decoration:none;
|
|
|
|
font-weight:bold;
|
|
|
|
}
|
|
|
|
#footer {
|
|
|
|
text-align:center;
|
|
|
|
}
|
|
|
|
#footer a {
|
|
|
|
margin-left:10px;
|
|
|
|
padding:5px;
|
|
|
|
border-bottom:1px solid #fff;
|
|
|
|
}
|
|
|
|
#footer a:hover {
|
|
|
|
border-color:orange;
|
|
|
|
}
|
|
|
|
table.topByCat {
|
|
|
|
table-layout:fixed;
|
|
|
|
border-collapse:collapse;
|
|
|
|
border:1px solid #fff;
|
|
|
|
width:100%;
|
|
|
|
}
|
|
|
|
table.topByCat td, table.topByCat th {
|
|
|
|
padding:5px;
|
|
|
|
border:1px solid #fff;
|
|
|
|
}
|
|
|
|
table.topByCat th {
|
|
|
|
color:orange;
|
|
|
|
text-align:center;
|
|
|
|
}
|
|
|
|
-->
|
|
|
|
</style>
|
2013-10-17 21:21:45 +02:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
2008-05-11 14:55:20 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
2010-01-25 11:55:07 +01:00
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td style="width:30px;height:30px;background:orange;"> </td>
|
|
|
|
<td> </td>
|
|
|
|
<td rowspan=2><h1>$page_title</h1></td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
<td> </td>
|
|
|
|
<td style="width:30px;height:30px;background:orange;"> </td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2008-05-11 14:55:20 +02:00
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
2009-02-03 18:49:10 +01:00
|
|
|
## @rfn private void end()
|
|
|
|
# Display end of HTML status responses.
|
2008-05-11 14:55:20 +02:00
|
|
|
sub end {
|
2018-06-12 12:17:17 +02:00
|
|
|
my $out = shift;
|
|
|
|
$out->print( <<"EOF");
|
2008-05-12 12:30:09 +02:00
|
|
|
<hr/>
|
2010-01-25 11:55:07 +01:00
|
|
|
<div id="footer">
|
2008-05-12 12:30:09 +02:00
|
|
|
<script type="text/javascript" language="Javascript">
|
|
|
|
//<!--
|
|
|
|
var a = document.location.href;
|
|
|
|
a=a.replace(/\\?.*\$/,'');
|
2010-01-25 11:55:07 +01:00
|
|
|
document.write('<a href="'+a+'">Standard view</a>');
|
2008-05-12 12:30:09 +02:00
|
|
|
document.write('<a href="'+a+'?top=10&categories=REJECT,PORTAL_FIRSTACCESS,LOGOUT,OK">Top 10</a>');
|
2010-01-25 11:55:07 +01:00
|
|
|
document.write('<a href="'+a+'?dump=1">Raw results</a>');
|
2008-05-12 12:30:09 +02:00
|
|
|
//-->
|
|
|
|
</script>
|
2010-01-25 11:55:07 +01:00
|
|
|
</div>
|
2008-05-11 14:55:20 +02:00
|
|
|
</body>
|
|
|
|
</html>
|
2008-05-12 12:30:09 +02:00
|
|
|
END
|
2008-05-11 14:55:20 +02:00
|
|
|
EOF
|
|
|
|
}
|
2010-01-25 11:55:07 +01:00
|
|
|
|
2008-05-09 17:51:21 +02:00
|
|
|
1;
|