version 1.1, 2001/01/03 16:20:59
|
version 1.2, 2001/02/06 16:51:24
|
Line 9
|
Line 9
|
# |
# |
# 3/1/1 Gerd Kortemeyer) |
# 3/1/1 Gerd Kortemeyer) |
# |
# |
# 3/1 Gerd Kortemeyer |
# 3/1,2/6 Gerd Kortemeyer |
# |
# |
package Apache::loncommunicate; |
package Apache::loncommunicate; |
|
|
use strict; |
use strict; |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
|
use Apache::lonmsg(); |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
$r->content_type('text/html'); |
$r->content_type('text/html'); |
$r->send_http_header; |
$r->send_http_header; |
return OK if $r->header_only; |
return OK if $r->header_only; |
|
# |
# --------------------------------------------------- Print login screen header |
# Start document |
|
# |
$r->print(<<ENDDOCUMENT); |
$r->print(<<ENDDOCUMENT); |
<html> |
<html> |
<head> |
<head> |
<title>The LearningOnline Network with CAPA</title> |
<title>The LearningOnline Network with CAPA</title> |
</head> |
</head> |
<body bgcolor="#FFFFFF"> |
<body bgcolor="#FFFFFF"> |
|
<img align=right src=/adm/lonIcons/lonlogos.gif> |
<h1>Communicate</h1> |
<h1>Communicate</h1> |
<img src="/adm/lonKaputt/lonconstruct.gif"> |
<h3>New Messages</h3> |
</body> |
<table border=2><tr><th> </th> |
</html> |
<th>Date</th><th>Username</th><th>Domain</th><th>Subject</th></tr> |
ENDDOCUMENT |
ENDDOCUMENT |
|
map { |
|
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status)= |
|
&Apache::lonmsg::unpackmsgid($_); |
|
if ($status eq 'new') { |
|
$r->print( |
|
'<tr bgcolor="#FFBB77"><td><a href="/adm/email?display='.$_. |
|
'">Open</a></td><td>'.localtime($sendtime).'</td><td>'. |
|
$fromname.'</td><td>'.$fromdomain.'</td><td>'. |
|
&Apache::lonnet::unescape($shortsubj).'</td></tr>'); |
|
} |
|
} sort split(/\&/,&Apache::lonnet::reply('keys:'. |
|
$ENV{'user.domain'}.':'. |
|
$ENV{'user.name'}.':nohist_email', |
|
$ENV{'user.home'})); |
|
$r->print( |
|
'</table><p><a href="/adm/email/">All Messages</a></body></html>'); |
return OK; |
return OK; |
} |
} |
|
|
1; |
1; |
__END__ |
__END__ |