Annotation of loncom/interface/loncommunicate.pm, revision 1.2
1.1 www 1: # The LearningOnline Network
2: # Communicate
3: #
4: # (Internal Server Error Handler
5: #
6: # (Login Screen
7: # 5/21/99,5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14,
8: # 1/14/00,5/29,5/30,6/1,6/29,7/1,11/9 Gerd Kortemeyer)
9: #
10: # 3/1/1 Gerd Kortemeyer)
11: #
1.2 ! www 12: # 3/1,2/6 Gerd Kortemeyer
1.1 www 13: #
14: package Apache::loncommunicate;
15:
16: use strict;
17: use Apache::Constants qw(:common);
1.2 ! www 18: use Apache::lonmsg();
1.1 www 19:
20: sub handler {
21: my $r = shift;
22: $r->content_type('text/html');
23: $r->send_http_header;
24: return OK if $r->header_only;
1.2 ! www 25: #
! 26: # Start document
! 27: #
1.1 www 28: $r->print(<<ENDDOCUMENT);
29: <html>
30: <head>
31: <title>The LearningOnline Network with CAPA</title>
32: </head>
33: <body bgcolor="#FFFFFF">
1.2 ! www 34: <img align=right src=/adm/lonIcons/lonlogos.gif>
1.1 www 35: <h1>Communicate</h1>
1.2 ! www 36: <h3>New Messages</h3>
! 37: <table border=2><tr><th> </th>
! 38: <th>Date</th><th>Username</th><th>Domain</th><th>Subject</th></tr>
1.1 www 39: ENDDOCUMENT
1.2 ! www 40: map {
! 41: my ($sendtime,$shortsubj,$fromname,$fromdomain,$status)=
! 42: &Apache::lonmsg::unpackmsgid($_);
! 43: if ($status eq 'new') {
! 44: $r->print(
! 45: '<tr bgcolor="#FFBB77"><td><a href="/adm/email?display='.$_.
! 46: '">Open</a></td><td>'.localtime($sendtime).'</td><td>'.
! 47: $fromname.'</td><td>'.$fromdomain.'</td><td>'.
! 48: &Apache::lonnet::unescape($shortsubj).'</td></tr>');
! 49: }
! 50: } sort split(/\&/,&Apache::lonnet::reply('keys:'.
! 51: $ENV{'user.domain'}.':'.
! 52: $ENV{'user.name'}.':nohist_email',
! 53: $ENV{'user.home'}));
! 54: $r->print(
! 55: '</table><p><a href="/adm/email/">All Messages</a></body></html>');
1.1 www 56: return OK;
1.2 ! www 57: }
1.1 www 58:
59: 1;
60: __END__
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>