--- loncom/auth/lonlogin.pm 2003/08/26 19:47:33 1.44.2.1 +++ loncom/auth/lonlogin.pm 2003/09/16 18:15:43 1.50 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.44.2.1 2003/08/26 19:47:33 albertel Exp $ +# $Id: lonlogin.pm,v 1.50 2003/09/16 18:15:43 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -40,6 +40,8 @@ use Apache::Constants qw(:common); use Apache::File (); use Apache::lonnet(); use Apache::loncommon(); +use Apache::lonauth(); +use Apache::lonlocal; sub handler { my $r = shift; @@ -49,10 +51,20 @@ sub handler { return OK if $r->header_only; +# Are we re-routing? + if (-e '/home/httpd/html/lon-status/reroute.txt') { + &Apache::lonauth::reroute($r); + return OK; + } + &Apache::loncommon::get_unprocessed_cgi ($ENV{'QUERY_STRING'}.'&'.$ENV{'request.querystring'}, ['interface','username','domain','firsturl','localpath','localres']); +# -------------------------------------------------------------------- Language + + &Apache::lonlocal::get_language_handle(); + # ----------------------------------------------------------- Process Interface $ENV{'form.interface'}=~s/\W//g; @@ -109,9 +121,12 @@ sub handler { # ---------------------------------------- Are we access server and overloaded? if (($role eq 'access') && (($userloadpercent>100.0)||($loadpercent>100.0))) { - $otherserver=Apache::lonnet::spareserver($loadpercent,$userloadpercent); + my $unloaded=Apache::lonnet::spareserver($loadpercent,$userloadpercent); + if ($unloaded) { $otherserver=$unloaded; } } +# ----------------------------------------------------------- Get announcements + my $announcements=&Apache::lonnet::getannounce(); # -------------------------------------------------------- Set login parameters my @hexstr=('0','1','2','3','4','5','6','7', @@ -167,7 +182,7 @@ ENDTROUBLE # ----------------------------------------------- Apparently we are in business - my $domainlogo=&Apache::loncommon::domainlogo(); + my $domainlogo=&Apache::loncommon::domainlogo($domain); $servadm=~s/\,/\
/g; $sysadm=~s/\,/\
/g; @@ -311,7 +326,7 @@ ENDSERVERFORM - +
@@ -327,7 +342,7 @@ ENDSERVERFORM ENDTOP } else { - $r->print('

The LearningOnline Network with CAPA

Text-based Interface Login

'); + $r->print('

The LearningOnline Network with CAPA

Text-based Interface Login

'.$announcements); } $r->print('
'); unless ($fullgraph) { @@ -390,6 +405,9 @@ ENDLOGIN + +$announcements +