version 1.46, 2002/06/18 15:04:05
|
version 1.48, 2002/06/18 21:14:23
|
Line 195 sub logthis {
|
Line 195 sub logthis {
|
sub courselog { |
sub courselog { |
my ($path,$command)=@_; |
my ($path,$command)=@_; |
my %filters=(); |
my %filters=(); |
foreach (split(/\=/,&unescape($command))) { |
foreach (split(/\:/,&unescape($command))) { |
my ($name,$value)=split(/\=/,$_); |
my ($name,$value)=split(/\=/,$_); |
$filters{$name}=$value; |
$filters{$name}=$value; |
} |
} |
Line 205 sub courselog {
|
Line 205 sub courselog {
|
chomp($line); |
chomp($line); |
my ($timestamp,$host,$log)=split(/\:/,$line); |
my ($timestamp,$host,$log)=split(/\:/,$line); |
foreach (split(/\&/,&unescape($log))) { |
foreach (split(/\&/,&unescape($log))) { |
my ($res,$uname,$udom,$action,$values)=split(/\:/,$_); |
my ($time,$res,$uname,$udom,$action,$values)=split(/\:/,$_); |
|
$res=&unescape($res); |
|
$values=&unescape($values); |
my $include=1; |
my $include=1; |
} |
if (($filters{'username'}) && ($uname ne $filters{'username'})) |
|
{ $include=0; } |
|
if (($filters{'domain'}) && ($udom ne $filters{'domain'})) |
|
{ $include=0; } |
|
if (($filters{'url'}) && ($res!~/$filters{'url'}/)) |
|
{ $include=0; } |
|
if (($filters{'start'}) && ($time<$filters{'start'})) |
|
{ $include=0; } |
|
if (($filters{'end'}) && ($time>$filters{'end'})) |
|
{ $include=0; } |
|
if (($filters{'action'} eq 'view') && ($action)) |
|
{ $include=0; } |
|
if (($filters{'action'} eq 'submit') && ($action ne 'POST')) |
|
{ $include=0; } |
|
if (($filters{'action'} eq 'grade') && ($action ne 'CSTORE')) |
|
{ $include=0; } |
|
if ($include) { |
|
push(@results,$time.':'.$res.':'.$uname.':'.$udom.':'. |
|
$action.':'.$values); |
|
} |
|
} |
} |
} |
close IN; |
close IN; |
return join('&',sort(@results)); |
return join('&',sort(@results)); |
Line 218 sub courselog {
|
Line 240 sub courselog {
|
sub userlog { |
sub userlog { |
my ($path,$command)=@_; |
my ($path,$command)=@_; |
my %filters=(); |
my %filters=(); |
foreach (split(/\=/,&unescape($command))) { |
foreach (split(/\:/,&unescape($command))) { |
my ($name,$value)=split(/\=/,$_); |
my ($name,$value)=split(/\=/,$_); |
$filters{$name}=$value; |
$filters{$name}=$value; |
} |
} |
Line 337 sub make_new_child {
|
Line 359 sub make_new_child {
|
$queryid .= $run; |
$queryid .= $run; |
print $client "$queryid\n"; |
print $client "$queryid\n"; |
|
|
&logthis("QUERY: $query"); |
&logthis("QUERY: $query - $arg1 - $arg2 - $arg3"); |
sleep 1; |
sleep 1; |
|
|
my $result=''; |
my $result=''; |