version 1.19, 2009/01/09 07:06:27
|
version 1.20, 2010/03/23 12:01:49
|
Line 121 sub main {
|
Line 121 sub main {
|
|
|
unless ($oneline) { |
unless ($oneline) { |
my $now = time(); |
my $now = time(); |
print '<html><body bgcolor="#FFFFFF">'."\n". |
print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n". |
|
'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'."\n"."\n". |
|
'<head>'."\n". |
|
'<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n". |
|
'<title>LON-CAPA '.$lt{'usrs'}.'</title>'."\n". |
|
'</head>'."\n". |
|
'<body style="background-color:#FFFFFF">'."\n". |
"<h1>$lt{'usrs'} ".&Apache::lonlocal::locallocaltime($now).'</h1>'; |
"<h1>$lt{'usrs'} ".&Apache::lonlocal::locallocaltime($now).'</h1>'; |
} |
} |
|
|
Line 154 sub main {
|
Line 160 sub main {
|
} |
} |
if (!$justsummary) { |
if (!$justsummary) { |
$users{$userclass}{$filename} .= |
$users{$userclass}{$filename} .= |
'<font color="'.$color.'">'. |
'<div style="color:'.$color.'">'. |
'<h3>'.$userinfo{'environment.lastname'}.', '. |
'<h3>'.$userinfo{'environment.lastname'}.', '. |
$userinfo{'environment.firstname'}.' '. |
$userinfo{'environment.firstname'}.' '. |
$userinfo{'environment.middlename'}.' '. |
$userinfo{'environment.middlename'}.' '. |
$userinfo{'environment.generation'}." (". |
$userinfo{'environment.generation'}." (". |
$userinfo{'user.name'}."\@".$userinfo{'user.domain'}. |
$userinfo{'user.name'}.":".$userinfo{'user.domain'}. |
")</h3>\n". |
")</h3>\n". |
"<p><tt>$filename</tt></p>". |
"<p><tt>$filename</tt></p>". |
"<b>$lt{'login'}:</b> ". |
"<b>$lt{'login'}:</b> ". |
&Apache::lonlocal::locallocaltime($userinfo{'user.login.time'}). |
&Apache::lonlocal::locallocaltime($userinfo{'user.login.time'}). |
" <b>$lt{'Browser'}</b>: ".$userinfo{'browser.type'}. |
" <b>$lt{'Browser'}</b>: ".$userinfo{'browser.type'}. |
" $lt{'on'} ".$userinfo{'browser.os'}."<b>$lt{'Client'}:</b>". |
" $lt{'on'} ".$userinfo{'browser.os'}." <b>$lt{'Client'}:</b>". |
$userinfo{'request.host'}."<br />\n<b>$lt{'role'}: </b>". |
$userinfo{'request.host'}."<br />\n<b>$lt{'role'}: </b>". |
$userinfo{'request.role'}." "; |
$userinfo{'request.role'}." "; |
} |
} |
Line 191 sub main {
|
Line 197 sub main {
|
"<br /><b>$lt{'ltra'}:</b> ".&Apache::lonlocal::locallocaltime($mtime). |
"<br /><b>$lt{'ltra'}:</b> ".&Apache::lonlocal::locallocaltime($mtime). |
" (".$since." $lt{'secs'}) <br /><b>$lt{'lacc'}:</b> ". |
" (".$since." $lt{'secs'}) <br /><b>$lt{'lacc'}:</b> ". |
&Apache::lonlocal::locallocaltime($atime)." (".$sinceacc." $lt{'secs'})". |
&Apache::lonlocal::locallocaltime($atime)." (".$sinceacc." $lt{'secs'})". |
"</font>"; |
"</div>"; |
} |
} |
} |
} |
untie(%userinfo); |
untie(%userinfo); |
Line 219 sub main {
|
Line 225 sub main {
|
&show('OS',\%lt,%usercount); |
&show('OS',\%lt,%usercount); |
|
|
# print "\n</pre>"; |
# print "\n</pre>"; |
print "<b>$lt{'load'}:<b> ".$loadavg; |
print "<b>$lt{'load'}:</b> ".$loadavg; |
print "</body></html>"; |
print "</body></html>"; |
} else { |
} else { |
foreach my $l1 (sort keys %usercount) { |
foreach my $l1 (sort keys %usercount) { |
Line 259 sub showact {
|
Line 265 sub showact {
|
my ($cat,$ltref,%usercount)=@_; |
my ($cat,$ltref,%usercount)=@_; |
print("<h3>$ltref->{$cat}</h3>\n"); |
print("<h3>$ltref->{$cat}</h3>\n"); |
|
|
print("<table border='1'><tr><th></th><th>"); |
print("<table border='1'><tr><th> </th><th>"); |
print(join("</th><th>",('Any',@actl))); |
print(join("</th><th>",('Any',@actl))); |
print("</th></tr>"); |
print("</th></tr>"); |
foreach my $type (sort(keys(%{$usercount{$cat}}))) { |
foreach my $type (sort(keys(%{$usercount{$cat}}))) { |
Line 272 sub showact {
|
Line 278 sub showact {
|
} |
} |
print("<td>$count</td>"); |
print("<td>$count</td>"); |
print($temp); |
print($temp); |
|
print('</tr>'); |
} |
} |
print("</tr></table>\n"); |
print("</table>\n"); |
} |
} |
|
|