version 1.1, 2006/04/08 06:53:37
|
version 1.4, 2006/04/22 17:10:07
|
Line 116 recipients of the message/e-mail.
|
Line 116 recipients of the message/e-mail.
|
|
|
use strict; |
use strict; |
use Apache::lonnet; |
use Apache::lonnet; |
use vars qw($msgcount); |
|
use HTML::TokeParser(); |
use HTML::TokeParser(); |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
use Apache::loncommon(); |
use Apache::loncommon(); |
Line 173 sub scrollbuttons {
|
Line 172 sub scrollbuttons {
|
|
|
sub statuschange { |
sub statuschange { |
my ($msgid,$newstatus,$folder)=@_; |
my ($msgid,$newstatus,$folder)=@_; |
my $suffix=&foldersuffix($folder); |
my $suffix=&Apache::lonmsg::foldersuffix($folder); |
my %status=&Apache::lonnet::get('email_status'.$suffix,[$msgid]); |
my %status=&Apache::lonnet::get('email_status'.$suffix,[$msgid]); |
if ($status{$msgid}=~/^error\:/) { $status{$msgid}=''; } |
if ($status{$msgid}=~/^error\:/) { $status{$msgid}=''; } |
unless ($status{$msgid}) { $status{$msgid}='new'; } |
unless ($status{$msgid}) { $status{$msgid}='new'; } |
Line 205 sub makefolder {
|
Line 204 sub makefolder {
|
sub movemsg { |
sub movemsg { |
my ($msgid,$srcfolder,$trgfolder)=@_; |
my ($msgid,$srcfolder,$trgfolder)=@_; |
if ($srcfolder eq 'new') { $srcfolder=''; } |
if ($srcfolder eq 'new') { $srcfolder=''; } |
my $srcsuffix=&foldersuffix($srcfolder); |
my $srcsuffix=&Apache::lonmsg::foldersuffix($srcfolder); |
my $trgsuffix=&foldersuffix($trgfolder); |
my $trgsuffix=&Apache::lonmsg::foldersuffix($trgfolder); |
|
|
# Copy message |
# Copy message |
my %message=&Apache::lonnet::get('nohist_email'.$srcsuffix,[$msgid]); |
my %message=&Apache::lonnet::get('nohist_email'.$srcsuffix,[$msgid]); |
Line 491 sub disnew {
|
Line 490 sub disnew {
|
if ($#newmsgs >= 0) { |
if ($#newmsgs >= 0) { |
$r->print(<<TABLEHEAD); |
$r->print(<<TABLEHEAD); |
<h2>$lt{'nm'}</h2> |
<h2>$lt{'nm'}</h2> |
<table border=2><tr><th> </th> |
<table class="LC_mail_list"><tr><th> </th> |
<th>$lt{'da'}</th><th>$lt{'us'}</th><th>$lt{'do'}</th><th>$lt{'su'}</th><th>$lt{'co'}</th></tr> |
<th>$lt{'da'}</th><th>$lt{'us'}</th><th>$lt{'do'}</th><th>$lt{'su'}</th><th>$lt{'co'}</th></tr> |
TABLEHEAD |
TABLEHEAD |
foreach my $msg (@newmsgs) { |
foreach my $msg (@newmsgs) { |
$r->print(<<"ENDLINK"); |
$r->print(<<"ENDLINK"); |
<tr class="new" bgcolor="#FFBB77" onMouseOver="javascript:style.backgroundColor='#DD9955'" |
<tr class="LC_mail_new"> |
onMouseOut="javascript:style.backgroundColor='#FFBB77'"> |
|
<td><a href="/adm/email?dismode=new&display=$msg->{'msgid'}">$lt{'op'}</a></td> |
<td><a href="/adm/email?dismode=new&display=$msg->{'msgid'}">$lt{'op'}</a></td> |
ENDLINK |
ENDLINK |
foreach ('sendtime','from','fromdom','shortsub','course') { |
foreach ('sendtime','from','fromdom','shortsub','course') { |
Line 589 ENDDISHEADER
|
Line 587 ENDDISHEADER
|
if ($lastdis>$#temp) { $lastdis=$#temp; } |
if ($lastdis>$#temp) { $lastdis=$#temp; } |
$r->print(&scrollbuttons($startdis,$number,$firstdis,$lastdis,$totalnumber)); |
$r->print(&scrollbuttons($startdis,$number,$firstdis,$lastdis,$totalnumber)); |
$r->print('<form method="post" name="disall" action="/adm/email">'. |
$r->print('<form method="post" name="disall" action="/adm/email">'. |
'<table border=2><tr><th colspan="3"> </th><th>'); |
'<table class="LC_mail_list"><tr><th colspan="3"> </th><th>'); |
if ($env{'form.sortedby'} eq "revdate") { |
if ($env{'form.sortedby'} eq "revdate") { |
$r->print('<a href = "?sortedby=date'.$fsqs.'">'.&mt('Date').'</a></th>'); |
$r->print('<a href = "?sortedby=date'.$fsqs.'">'.&mt('Date').'</a></th>'); |
} else { |
} else { |
Line 630 ENDDISHEADER
|
Line 628 ENDDISHEADER
|
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID,$description)= @{$temp[$n]}; |
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID,$description)= @{$temp[$n]}; |
if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) { |
if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) { |
if ($status eq 'new') { |
if ($status eq 'new') { |
$r->print('<tr bgcolor="#FFBB77" onMouseOver="javascript:style.backgroundColor=\'#DD9955\'" onMouseOut="javascript:style.backgroundColor=\'#FFBB77\'">'); |
$r->print('<tr class="LC_mail_new">'); |
} elsif ($status eq 'read') { |
} elsif ($status eq 'read') { |
$r->print('<tr bgcolor="#BBBB77" onMouseOver="javascript:style.backgroundColor=\'#999944\'" onMouseOut="javascript:style.backgroundColor=\'#BBBB77\'">'); |
$r->print('<tr class="LC_mail_read">'); |
} elsif ($status eq 'replied') { |
} elsif ($status eq 'replied') { |
$r->print('<tr bgcolor="#AAAA88" onMouseOver="javascript:style.backgroundColor=\'#888855\'" onMouseOut="javascript:style.backgroundColor=\'#AAAA88\'">'); |
$r->print('<tr class="LC_mail_replied">'); |
} else { |
} else { |
$r->print('<tr bgcolor="#99BBBB" onMouseOver="javascript:style.backgroundColor=\'#669999\'" onMouseOut="javascript:style.backgroundColor=\'#99BBBB\'">'); |
$r->print('<tr class="LC_mail_other">'); |
} |
} |
$r->print('<td><input type="checkbox" name="delmark_'.$origID.'" /></td><td><a href="/adm/email?display='.$origID.$sqs. |
$r->print('<td><input type="checkbox" name="delmark_'.$origID.'" /></td><td><a href="/adm/email?display='.$origID.$sqs. |
'">'.&mt('Open').'</a></td><td>'. |
'">'.&mt('Open').'</a></td><td>'. |
Line 1955 sub handler {
|
Line 1953 sub handler {
|
} |
} |
# ================================================= Main program, reset counter |
# ================================================= Main program, reset counter |
|
|
BEGIN { |
|
$msgcount=0; |
|
} |
|
|
|
=pod |
=pod |
|
|
=back |
=back |