version 1.93, 2004/03/26 16:57:53
|
version 1.96, 2004/03/31 05:24:00
|
Line 101 use Apache::lontexconvert();
|
Line 101 use Apache::lontexconvert();
|
use HTML::Entities(); |
use HTML::Entities(); |
use Mail::Send; |
use Mail::Send; |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Apache::loncommunicate; |
|
|
# Querystring component with sorting type |
# Querystring component with sorting type |
my $sqs; |
my $sqs; |
Line 109 my $sqs;
|
Line 110 my $sqs;
|
|
|
sub packagemsg { |
sub packagemsg { |
my ($subject,$message,$citation,$baseurl,$attachmenturl)=@_; |
my ($subject,$message,$citation,$baseurl,$attachmenturl)=@_; |
$message =&HTML::Entities::encode($message); |
$message =&HTML::Entities::encode($message,'<>&"'); |
$citation=&HTML::Entities::encode($citation); |
$citation=&HTML::Entities::encode($citation,'<>&"'); |
$subject =&HTML::Entities::encode($subject); |
$subject =&HTML::Entities::encode($subject,'<>&"'); |
#remove machine specification |
#remove machine specification |
$baseurl =~ s|^http://[^/]+/|/|; |
$baseurl =~ s|^http://[^/]+/|/|; |
$baseurl =&HTML::Entities::encode($baseurl); |
$baseurl =&HTML::Entities::encode($baseurl,'<>&"'); |
#remove machine specification |
#remove machine specification |
$attachmenturl =~ s|^http://[^/]+/|/|; |
$attachmenturl =~ s|^http://[^/]+/|/|; |
$attachmenturl =&HTML::Entities::encode($attachmenturl); |
$attachmenturl =&HTML::Entities::encode($attachmenturl,'<>&"'); |
|
|
my $now=time; |
my $now=time; |
$msgcount++; |
$msgcount++; |
Line 756 ENDDISHEADER
|
Line 757 ENDDISHEADER
|
# ============================================================== Compose output |
# ============================================================== Compose output |
|
|
sub compout { |
sub compout { |
my ($r,$forwarding,$replying,$broadcast)=@_; |
my ($r,$forwarding,$replying,$broadcast,$replycrit)=@_; |
|
|
if ($broadcast eq 'individual') { |
if ($broadcast eq 'individual') { |
&printheader($r,'/adm/email?compose=individual', |
&printheader($r,'/adm/email?compose=individual', |
Line 776 sub compout {
|
Line 777 sub compout {
|
text=>"Display Message"}); |
text=>"Display Message"}); |
&printheader($r,'/adm/email?replyto='.&Apache::lonnet::escape($replying), |
&printheader($r,'/adm/email?replyto='.&Apache::lonnet::escape($replying), |
'Replying to a Message'); |
'Replying to a Message'); |
|
} elsif ($replycrit) { |
|
$r->print('<h3>'.&mt('Replying to a Critical Message').'</h3>'); |
|
$replying=$replycrit; |
} else { |
} else { |
&printheader($r,'/adm/email?compose=upload', |
&printheader($r,'/adm/email?compose=upload', |
'Distribute from Uploaded File'); |
'Distribute from Uploaded File'); |
Line 1151 sub handler {
|
Line 1155 sub handler {
|
my $msgid=$1; |
my $msgid=$1; |
$r->print('<b>'.&mt('Confirming Receipt').':</b> '. |
$r->print('<b>'.&mt('Confirming Receipt').':</b> '. |
&user_crit_received($msgid).'<br>'); |
&user_crit_received($msgid).'<br>'); |
&compout($r,'',$msgid); |
&compout($r,'','','',$msgid); |
} |
} |
} |
} |
&discrit($r); |
&discrit($r); |
Line 1246 sub handler {
|
Line 1250 sub handler {
|
$r->print($thismsg.'<br />'); |
$r->print($thismsg.'<br />'); |
$sendstatus.=' '.$thismsg; |
$sendstatus.=' '.$thismsg; |
} |
} |
|
} else { |
|
&printheader($r,'','No messages sent.'); |
} |
} |
if ($sendstatus=~/^(\s*(?:ok|con_delayed)\s*)*$/) { |
if ($sendstatus=~/^(\s*(?:ok|con_delayed)\s*)*$/) { |
$r->print('<br /><font color="green">'.&mt('Completed.').'</font>'); |
$r->print('<br /><font color="green">'.&mt('Completed.').'</font>'); |
if ($ENV{'form.displayedcrit'}) { |
if ($ENV{'form.displayedcrit'}) { |
&discrit($r); |
&discrit($r); |
} else { |
} else { |
&disall($r); |
&Apache::loncommunicate::menu($r); |
} |
} |
} else { |
} else { |
$r->print( |
$r->print( |