Diff for /loncom/interface/lonmsg.pm between versions 1.31 and 1.35

version 1.31, 2002/04/23 21:06:07 version 1.35, 2002/07/22 14:23:29
Line 49  use Apache::lonnet(); Line 49  use Apache::lonnet();
 use vars qw($msgcount);  use vars qw($msgcount);
 use HTML::TokeParser;  use HTML::TokeParser;
 use Apache::Constants qw(:common);  use Apache::Constants qw(:common);
   use Apache::loncommon;
   
 # ===================================================================== Package  # ===================================================================== Package
   
Line 314  sub discrit { Line 315  sub discrit {
         $content{'message'}=~s/\n/\<br\>/g;          $content{'message'}=~s/\n/\<br\>/g;
         $result.='<hr>From: <b>'.$content{'sendername'}.'@'.          $result.='<hr>From: <b>'.$content{'sendername'}.'@'.
             $content{'senderdomain'}.'</b> ('.$content{'time'}.              $content{'senderdomain'}.'</b> ('.$content{'time'}.
             ')<br><blockquote>'.$content{'message'}.'</blockquote>'.              ')<br>Subject: '.$content{'subject'}.
               '<br><blockquote>'.$content{'message'}.'</blockquote>'.
             '<input type=submit name="rec_'.$_.'" value="Confirm Receipt">'.              '<input type=submit name="rec_'.$_.'" value="Confirm Receipt">'.
             '<input type=submit name="reprec_'.$_.'" '.              '<input type=submit name="reprec_'.$_.'" '.
                   'value="Confirm Receipt and Reply">';                    'value="Confirm Receipt and Reply">';
Line 342  sub comprep { Line 344  sub comprep {
       my $subject='Re: '.$content{'subject'};        my $subject='Re: '.$content{'subject'};
       my $dispcrit='';        my $dispcrit='';
       if (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) {        if (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) {
    my $crithelp = Apache::loncommon::help_open_topic("Course_Critical_Message");
          $dispcrit=           $dispcrit=
  '<input type=checkbox name=critmsg> Send as critical message<br>'.   '<input type=checkbox name=critmsg> Send as critical message ' . $crithelp . 
  '<input type=checkbox name=sendbck> Send as critical message'.   '<br>'.
  ' and return receipt<p>';   '<input type=checkbox name=sendbck> Send as critical message ' .
    ' and return receipt' . $crithelp . '<p>';
       }        }
       $r->print(<<"ENDREPLY");        $r->print(<<"ENDREPLY");
 <form action="/adm/email" method=post>  <form action="/adm/email" method=post>
Line 396  ENDDISHEADER Line 400  ENDDISHEADER
                                         $ENV{'user.home'}))) {                                          $ENV{'user.home'}))) {
         my ($sendtime,$shortsubj,$fromname,$fromdomain,$status)=          my ($sendtime,$shortsubj,$fromname,$fromdomain,$status)=
     &Apache::lonmsg::unpackmsgid($_);      &Apache::lonmsg::unpackmsgid($_);
        unless ($status eq 'deleted') {         unless (($status eq 'deleted') || ($sendtime=~/error/)) {
         if ($status eq 'new') {          if ($status eq 'new') {
     $r->print('<tr bgcolor="#FFBB77">');      $r->print('<tr bgcolor="#FFBB77">');
         } elsif ($status eq 'read') {          } elsif ($status eq 'read') {
Line 431  sub compout { Line 435  sub compout {
     my $dismsg='';      my $dismsg='';
     my $func='Send New';      my $func='Send New';
       if (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) {        if (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) {
    my $crithelp = Apache::loncommon::help_open_topic("Course_Critical_Message");
          $dispcrit=           $dispcrit=
  '<input type=checkbox name=critmsg> Send as critical message<br>'.   '<input type=checkbox name=critmsg> Send as critical message ' . $crithelp . 
  '<input type=checkbox name=sendbck> Send as critical message'.   '<br>'.
  ' and return receipt<p>';   '<input type=checkbox name=sendbck> Send as critical message ' .
    ' and return receipt' . $crithelp . '<p>';
       }        }
     if ($forwarding) {      if ($forwarding) {
        $dispcrit.='<input type=hidden name=forwid value="'.         $dispcrit.='<input type=hidden name=forwid value="'.
Line 521  sub handler { Line 527  sub handler {
   return OK if $r->header_only;    return OK if $r->header_only;
   
 # --------------------------- Get query string for limited number of parameters  # --------------------------- Get query string for limited number of parameters
       &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
     foreach (split(/&/,$ENV{'QUERY_STRING'})) {          ['display','replyto','forward','markread','markdel','markunread',
        my ($name, $value) = split(/=/,$_);           'sendreply','compose','sendmail','critical']);
        $value =~ tr/+/ /;  
        $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;  
        if (($name eq 'display') || ($name eq 'replyto') ||   
            ($name eq 'forward') || ($name eq 'markread') ||  
            ($name eq 'markdel') || ($name eq 'markunread') ||  
            ($name eq 'sendreply') || ($name eq 'compose') ||  
            ($name eq 'sendmail') || ($name eq 'critical')) {  
            unless ($ENV{'form.'.$name}) {  
               $ENV{'form.'.$name}=$value;  
    }  
        }  
     }  
   
 # --------------------------------------------------------------- Render Output  # --------------------------------------------------------------- Render Output
       

Removed from v.1.31  
changed lines
  Added in v.1.35


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>