Diff for /loncom/interface/lonsupportreq.pm between versions 1.29 and 1.32

version 1.29, 2005/10/13 17:18:14 version 1.32, 2006/03/23 22:32:11
Line 63  sub handler { Line 63  sub handler {
 sub print_request_form {  sub print_request_form {
     my ($r,$origurl,$function) = @_;      my ($r,$origurl,$function) = @_;
     my ($os,$browser,$bversion,$uhost,$uname,$udom,$uhome,$urole,$usec,$email,$cid,$cdom,$cnum,$ctitle,$ccode,$sectionlist,$lastname,$firstname,$server,$formname);      my ($os,$browser,$bversion,$uhost,$uname,$udom,$uhome,$urole,$usec,$email,$cid,$cdom,$cnum,$ctitle,$ccode,$sectionlist,$lastname,$firstname,$server,$formname);
     my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0" onLoad="initialize_codes()"',1);  
     my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg');      my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg');
     if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) {      if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) {
         $tablecolor = '#EEEE99';          $tablecolor = '#EEEE99';
Line 98  function validmail(field) { Line 97  function validmail(field) {
     var str = field.value;      var str = field.value;
     if (window.RegExp) {      if (window.RegExp) {
         var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)";          var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)";
         var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$";          var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"; //"
         var reg1 = new RegExp(reg1str);          var reg1 = new RegExp(reg1str);
         var reg2 = new RegExp(reg2str);          var reg2 = new RegExp(reg2str);
         if (!reg1.test(str) && reg2.test(str)) {          if (!reg1.test(str) && reg2.test(str)) {
Line 115  function validmail(field) { Line 114  function validmail(field) {
     }      }
 }  }
 END  END
     #" stupid emacs  
     if ($cid =~ m/_/) {      if ($cid =~ m/_/) {
         ($cdom,$cnum) = split/_/,$cid;          ($cdom,$cnum) = split/_/,$cid;
     }      }
Line 195  function initialize_codes() { Line 194  function initialize_codes() {
             }              }
         }          }
     }      }
     my $html=&Apache::lonxml::xmlbegin();  
     $r->print(<<ENDHEAD);      my $js = '<script type"text/javascript">'."\n$scripttag\n$jscript\n".
 $html   '</script>';
 <head>      my $add_entries =
  <title>LON-CAPA support request</title>   'topmargin="0" marginheight="0" onLoad="initialize_codes()"',
 <script type"text/javascript">      my $start_page =
 $scripttag   &Apache::loncommon::start_page('Support Request',$js,
 $jscript         { 'function'    => $function,
 </script>   'add_entries' => $add_entries,
 </head>   'only_body'   => 1,});
 $bodytag      $r->print($start_page);
 ENDHEAD  
     if ($r->uri eq '/adm/helpdesk') {      if ($r->uri eq '/adm/helpdesk') {
         &print_header($r,$origurl);          &print_header($r,$origurl);
     }      }
Line 595  END Line 594  END
            </tr>             </tr>
 END  END
     }      }
   
     $r->print(<<END);      $r->print(<<END);
            <tr>             <tr>
             <td width="140" bgcolor="$tablecolor">              <td width="140" bgcolor="$tablecolor">
Line 631  END Line 631  END
   </tr>    </tr>
  </table>   </table>
 </form>  </form>
 </body>  
 </html>  
 END  END
       $r->print(&Apache::loncommon::end_page());
     return;      return;
 }  }
   
Line 644  sub print_request_receipt { Line 643  sub print_request_receipt {
     my @loncvars = ('user.name','user.domain','request.course.sec','request.course.id');      my @loncvars = ('user.name','user.domain','request.course.sec','request.course.id');
     my @cookievars = ('lonID');      my @cookievars = ('lonID');
   
     my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0"',1);  
     my $admin = $Apache::lonnet::perlvar{'lonAdminMail'};      my $admin = $Apache::lonnet::perlvar{'lonAdminMail'};
     my $to =  $Apache::lonnet::perlvar{'lonSupportEMail'};      my $to =  $Apache::lonnet::perlvar{'lonSupportEMail'};
     my $from = $admin;      my $from = $admin;
Line 695  Date/Time: $reporttime Line 693  Date/Time: $reporttime
 <font color="$fontcolor">URL: </font><font color="$vlinkcolor">$env{'form.sourceurl'}</font><br />  <font color="$fontcolor">URL: </font><font color="$vlinkcolor">$env{'form.sourceurl'}</font><br />
 <font color="$fontcolor">Date/Time: </font><font color="$vlinkcolor">$reporttime</font><br />  <font color="$fontcolor">Date/Time: </font><font color="$vlinkcolor">$reporttime</font><br />
     |;      |;
     my $html=&Apache::lonxml::xmlbegin();  
       my $start_page = 
    &Apache::loncommon::start_page('Support request recorded',undef,
          {'function'   => $function,
    'addentries' => 
       'topmargin="0" marginheight="0"',
    'only_body' => 1,});
   
     $r->print(<<"END");      $r->print(<<"END");
 $html  $start_page
 <head>  
  <title>LON-CAPA support request recorded</title>  
 </head>  
 $bodytag  
 <form name="logproblem">  <form name="logproblem">
 <input type="hidden" name="action" value="result" />  <input type="hidden" name="action" value="result" />
 </form>  </form>
Line 891  END Line 892  END
    </td>     </td>
   </tr>    </tr>
  </table>   </table>
 </body>  
 </html>  
     ");      ");
       $r->print(&Apache::loncommon::end_page());
 }  }
   
 sub print_header {  sub print_header {

Removed from v.1.29  
changed lines
  Added in v.1.32


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