Diff for /loncom/interface/loncommon.pm between versions 1.81 and 1.83

version 1.81, 2003/02/13 23:02:42 version 1.83, 2003/02/24 23:32:32
Line 81  use GDBM_File; Line 81  use GDBM_File;
 use POSIX qw(strftime mktime);  use POSIX qw(strftime mktime);
 use Apache::Constants qw(:common);  use Apache::Constants qw(:common);
 use Apache::lonmsg();  use Apache::lonmsg();
   use Apache::lonmenu();
 my $readit;  my $readit;
   
 =pod   =pod 
Line 1481  sub domainlogo { Line 1482  sub domainlogo {
     my $domain = &determinedomain(shift);          my $domain = &determinedomain(shift);    
      # See if there is a logo       # See if there is a logo
     if (-e '/home/httpd/html/adm/lonDomLogos/'.$domain.'.gif') {      if (-e '/home/httpd/html/adm/lonDomLogos/'.$domain.'.gif') {
         return '<img src="http://'.$ENV{'HTTP_HOST'}.':8080/adm/lonDomLogos/'.   my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'};
                $domain.'.gif" />';   if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; }
           return '<img src="http://'.$ENV{'HTTP_HOST'}.':'.$lonhttpdPort.
       '/adm/lonDomLogos/'.$domain.'.gif" />';
     } elsif(exists($Apache::lonnet::domaindescription{$domain})) {      } elsif(exists($Apache::lonnet::domaindescription{$domain})) {
         return $Apache::lonnet::domaindescription{$domain};          return $Apache::lonnet::domaindescription{$domain};
     } else {      } else {
Line 1575  sub bodytag { Line 1578  sub bodytag {
 # Set messages  # Set messages
     my $messages=&domainlogo($domain);      my $messages=&domainlogo($domain);
 # Output  # Output
       my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'};
       if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; }
     my $bodytag = <<END;      my $bodytag = <<END;
 <body bgcolor="$pgbg" text="$font" alink="$alink" vlink="$vlink" link="$link"  <body bgcolor="$pgbg" text="$font" alink="$alink" vlink="$vlink" link="$link"
 $addentries>  $addentries>
Line 1582  END Line 1587  END
     if ($bodyonly) {      if ($bodyonly) {
         return $bodytag;          return $bodytag;
     } elsif ($ENV{'browser.interface'} eq 'textual') {      } elsif ($ENV{'browser.interface'} eq 'textual') {
         return $bodytag.'<h1>LON-CAPA: '.$title.          return $bodytag.&Apache::lonmenu::menubuttons(undef,'web').
          '</h1><a href="/adm/menu">Main Menu</a><hr />';                 '<h1>LON-CAPA: '.$title.'</h1>';
     } else {      } else {
         return(<<ENDBODY);          return(<<ENDBODY);
 $bodytag  $bodytag
 <table width="100%" cellspacing="0" border="0" cellpadding="0">  <table width="100%" cellspacing="0" border="0" cellpadding="0">
 <tr><td bgcolor="$font">  <tr><td bgcolor="$font">
 <img src="http://$ENV{'HTTP_HOST'}:8080/$img" /></td>  <img src="http://$ENV{'HTTP_HOST'}:$lonhttpdPort$img" /></td>
 <td bgcolor="$font"><font color='$sidebg'>$messages</font></td>  <td bgcolor="$font"><font color='$sidebg'>$messages</font></td>
 </tr>  </tr>
 <tr>  <tr>

Removed from v.1.81  
changed lines
  Added in v.1.83


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