Diff for /loncom/auth/lonlogin.pm between versions 1.30 and 1.31

version 1.30, 2003/02/04 15:11:44 version 1.31, 2003/02/04 16:03:25
Line 50  sub handler { Line 50  sub handler {
   
   
     &Apache::loncommon::get_unprocessed_cgi      &Apache::loncommon::get_unprocessed_cgi
      ($ENV{'QUERY_STRING'},['interface','username','domain']);       ($ENV{'QUERY_STRING'},['interface','username','domain','firsturl']);
   
     $ENV{'form.interface'}=~s/\W//g;      $ENV{'form.interface'}=~s/\W//g;
   
Line 83  sub handler { Line 83  sub handler {
   
 # ------------------------------------------------------- Do the load balancing  # ------------------------------------------------------- Do the load balancing
     my $otherserver='http://'.$ENV{'SERVER_NAME'};      my $otherserver='http://'.$ENV{'SERVER_NAME'};
     my $firsturl=$ENV{'request.firsturl'};      my $firsturl=
       ($ENV{'request.firsturl'}?$ENV{'request.firsturl'}:$ENV{'form.firsturl'});
 # ---------------------------------------- Are we access server and overloaded?  # ---------------------------------------- Are we access server and overloaded?
     if (($role eq 'access') && ($loadpercent>100.0)) {      if (($role eq 'access') && ($loadpercent>100.0)) {
         $otherserver=Apache::lonnet::spareserver($loadpercent);          $otherserver=Apache::lonnet::spareserver($loadpercent);
Line 109  sub handler { Line 110  sub handler {
     my $uextkey=hex($ukey);      my $uextkey=hex($ukey);
     if ($uextkey>2147483647) { $uextkey-=4294967296; }      if ($uextkey>2147483647) { $uextkey-=4294967296; }
   
   # -------------------------------------------------------- Store away log token
     my $logtoken=Apache::lonnet::reply(      my $logtoken=Apache::lonnet::reply(
        'tmpput:'.$ukey.$lkey.'&'.$firsturl,         'tmpput:'.$ukey.$lkey.'&'.$firsturl,
        $lonhost);         $lonhost);
   
   # ------------------- If we cannot talk to ourselves, we are in serious trouble
   
       if ($logtoken eq 'con_lost') {
           my $spares='';
           foreach (keys %Apache::lonnet::hostname) {
               if ($_ ne $lonhost) {
                  $spares.='<br /><a href="http://'.$Apache::lonnet::hostname{$_}.
    '/adm/login?domain='.$authdomain.'">'.
                    $Apache::lonnet::hostname{$_}.'</a>';
                  if ($Apache::lonnet::spareid{$_}) {
      $spares.=' (preferred)';
                  }
      }
           }
    $r->print(<<ENDTROUBLE);
   <html>
   <head><title>The LearningOnline Network with CAPA</title></head>
   <body bgcolor="#FFFFFF">
   <img src="/adm/lonKaputt/lonlogo_broken.gif" align="right" />
   <h3>This LON-CAPA server is temporarily not available for login</h3>
   <p>Please attempt to login to one of the following servers:</p>$spares
   <p>If the problem persists, please contact <tt>$servadm</tt>.</p>
   </body>
   </html>
   ENDTROUBLE
           return OK;
       }
   
   # ----------------------------------------------- Apparently we are in business
   
     my $domainlogo=&Apache::loncommon::domainlogo();      my $domainlogo=&Apache::loncommon::domainlogo();
 # --------------------------------------------------- Print login screen header  # --------------------------------------------------- Print login screen header
     $r->print(<<ENDHEADER);      $r->print(<<ENDHEADER);

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


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