Annotation of loncom/auth/lonlogin.pm, revision 1.55

1.1       albertel    1: # The LearningOnline Network
                      2: # Login Screen
1.11      www         3: #
1.55    ! www         4: # $Id: lonlogin.pm,v 1.54 2003/09/21 20:06:36 www Exp $
1.11      www         5: #
                      6: # Copyright Michigan State University Board of Trustees
                      7: #
                      8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
                      9: #
                     10: # LON-CAPA is free software; you can redistribute it and/or modify
                     11: # it under the terms of the GNU General Public License as published by
                     12: # the Free Software Foundation; either version 2 of the License, or
                     13: # (at your option) any later version.
                     14: #
                     15: # LON-CAPA is distributed in the hope that it will be useful,
                     16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
                     17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     18: # GNU General Public License for more details.
                     19: #
                     20: # You should have received a copy of the GNU General Public License
                     21: # along with LON-CAPA; if not, write to the Free Software
                     22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
                     23: #
                     24: # /home/httpd/html/adm/gpl.txt
                     25: #
                     26: # http://www.lon-capa.org/
                     27: #
1.14      albertel   28: 
1.1       albertel   29: package Apache::lonlogin;
                     30: 
                     31: use strict;
                     32: use Apache::Constants qw(:common);
1.55    ! www        33: use CGI::Cookie();
1.1       albertel   34: use Apache::File ();
                     35: use Apache::lonnet();
1.12      albertel   36: use Apache::loncommon();
1.49      www        37: use Apache::lonauth();
1.50      www        38: use Apache::lonlocal;
1.1       albertel   39: 
                     40: sub handler {
                     41:     my $r = shift;
1.53      www        42:     &Apache::loncommon::no_cache($r);
                     43:     &Apache::lonlocal::get_language_handle($r);
1.54      www        44:     &Apache::loncommon::content_type($r,'text/html');
1.1       albertel   45:     $r->send_http_header;
                     46:     return OK if $r->header_only;
                     47: 
1.49      www        48: 
                     49: # Are we re-routing?
                     50:     if (-e '/home/httpd/html/lon-status/reroute.txt') {
                     51: 	&Apache::lonauth::reroute($r);
                     52: 	return OK;
                     53:     }
1.55    ! www        54: 
        !            55: # -------------------------------- Prevent users from attempting to login twice
        !            56:     my %cookies=CGI::Cookie->parse($r->header_in('Cookie'));
        !            57:     my $lonid=$cookies{'lonID'};
        !            58:     my $cookie;
        !            59:     if ($lonid) {
        !            60: 	my $handle=$lonid->value;
        !            61:         $handle=~s/\W//g;
        !            62:         my $lonidsdir=$r->dir_config('lonIDsDir');
        !            63:         if ((-e "$lonidsdir/$handle.id") && ($handle ne '')) {
        !            64: # Indeed, a valid token is found
        !            65: 	    my $bodytag=&Apache::loncommon::bodytag('Already logged in');
        !            66: 	    $r->print(<<ENDFAILED);
        !            67: <html>
        !            68: <head>
        !            69: <title>Already logged in</title>
        !            70: </head>
        !            71: <html>
        !            72: $bodytag
        !            73: <h1>You are already logged in</h1>
        !            74: <p>Please either <a href="/adm/roles">continue the current session</a> or
        !            75: <a href="/adm/logout">logout</a>.</p>
        !            76: <p>
        !            77: <a href="/adm/loginproblems.html">Problems?</a></p>
        !            78: </body>
        !            79: </html>
        !            80: ENDFAILED
        !            81:            return OK;
        !            82: 	}
        !            83:     }
        !            84: 
        !            85: # ---------------------------------------------------- No valid token, continue
1.16      www        86: 
                     87:     &Apache::loncommon::get_unprocessed_cgi
1.39      www        88:      ($ENV{'QUERY_STRING'}.'&'.$ENV{'request.querystring'},
1.43      www        89:       ['interface','username','domain','firsturl','localpath','localres']);
1.39      www        90:  
1.50      www        91: 
1.32      www        92: # ----------------------------------------------------------- Process Interface
1.18      www        93:     $ENV{'form.interface'}=~s/\W//g;
1.16      www        94: 
1.32      www        95:     my $textbrowsers=$r->dir_config('lonTextBrowsers');
                     96:     my $httpbrowser=$ENV{"HTTP_USER_AGENT"};
                     97:     
                     98:     foreach (split(/\:/,$textbrowsers)) {
                     99: 	if ($httpbrowser=~/$_/i) {
                    100: 	    $ENV{'form.interface'}='textual';
                    101:         }
                    102:     }
                    103: 
1.16      www       104:     my $fullgraph=($ENV{'form.interface'} ne 'textual');
1.40      albertel  105:     my $port_to_use=$r->dir_config('lonhttpdPort');
                    106:     if (!defined($port_to_use)) {
                    107: 	$port_to_use='8080';
                    108:     }
                    109:     my $iconpath= 'http://'.$ENV{'HTTP_HOST'}.':'.$port_to_use.
1.26      www       110:                   $r->dir_config('lonIconsURL');
1.1       albertel  111:     my $domain  = $r->dir_config('lonDefDomain');
1.46      www       112:     if (($ENV{'form.domain'}) && 
                    113: 	 ($Apache::lonnet::domaindescription{$ENV{'form.domain'}})) {
                    114: 	$domain=$ENV{'form.domain'};
                    115:     }
1.1       albertel  116:     my $role    = $r->dir_config('lonRole');
                    117:     my $loadlim = $r->dir_config('lonLoadLim');
                    118:     my $servadm = $r->dir_config('lonAdmEMail');
                    119:     my $sysadm  = $r->dir_config('lonSysEMail');
                    120:     my $lonhost = $r->dir_config('lonHostID');
                    121:     my $tabdir  = $r->dir_config('lonTabDir');
1.6       www       122:     my $include = $r->dir_config('lonIncludes');
1.37      www       123:     my $expire  = $r->dir_config('lonExpire');
1.44      www       124:     my $version = $r->dir_config('lonVersion');
1.1       albertel  125: 
1.30      www       126: # --------------------------------------------- Default values for login fields
                    127: 
                    128:     my $authusername=($ENV{'form.username'}?$ENV{'form.username'}:'');
                    129:     my $authdomain=($ENV{'form.domain'}?$ENV{'form.domain'}:$domain);
                    130: 
                    131: # ---------------------------------------------------------- Determine own load
1.1       albertel  132:     my $loadavg;
1.41      albertel  133:     {
                    134: 	my $loadfile=Apache::File->new('/proc/loadavg');
                    135: 	$loadavg=<$loadfile>;
                    136:     }
1.1       albertel  137:     $loadavg =~ s/\s.*//g;
                    138:     my $loadpercent=100*$loadavg/$loadlim;
1.41      albertel  139:     my $userloadpercent=&Apache::lonnet::userload();
1.1       albertel  140: 
1.30      www       141: # ------------------------------------------------------- Do the load balancing
1.10      www       142:     my $otherserver='http://'.$ENV{'SERVER_NAME'};
1.31      www       143:     my $firsturl=
                    144:     ($ENV{'request.firsturl'}?$ENV{'request.firsturl'}:$ENV{'form.firsturl'});
1.1       albertel  145: # ---------------------------------------- Are we access server and overloaded?
1.41      albertel  146:     if (($role eq 'access') &&
                    147: 	(($userloadpercent>100.0)||($loadpercent>100.0))) {
1.47      albertel  148:         my $unloaded=Apache::lonnet::spareserver($loadpercent,$userloadpercent);
                    149: 	if ($unloaded) { $otherserver=$unloaded; }
1.1       albertel  150:     }
1.6       www       151: 
1.45      www       152: # ----------------------------------------------------------- Get announcements
                    153:     my $announcements=&Apache::lonnet::getannounce();
1.6       www       154: # -------------------------------------------------------- Set login parameters
                    155: 
                    156:     my @hexstr=('0','1','2','3','4','5','6','7',
                    157:                 '8','9','a','b','c','d','e','f');
                    158:     my $lkey='';
                    159:     for (0..7) {
                    160:         $lkey.=$hexstr[rand(15)];
                    161:     }
                    162: 
                    163:     my $ukey='';
                    164:     for (0..7) {
                    165:         $ukey.=$hexstr[rand(15)];
                    166:     }
                    167: 
                    168:     my $lextkey=hex($lkey);
1.15      www       169:     if ($lextkey>2147483647) { $lextkey-=4294967296; }
                    170: 
1.6       www       171:     my $uextkey=hex($ukey);
1.15      www       172:     if ($uextkey>2147483647) { $uextkey-=4294967296; }
                    173: 
1.31      www       174: # -------------------------------------------------------- Store away log token
1.6       www       175:     my $logtoken=Apache::lonnet::reply(
1.7       www       176:        'tmpput:'.$ukey.$lkey.'&'.$firsturl,
1.6       www       177:        $lonhost);
1.31      www       178: 
                    179: # ------------------- If we cannot talk to ourselves, we are in serious trouble
                    180: 
                    181:     if ($logtoken eq 'con_lost') {
                    182:         my $spares='';
                    183:         foreach (keys %Apache::lonnet::hostname) {
                    184:             if ($_ ne $lonhost) {
                    185:                $spares.='<br /><a href="http://'.$Apache::lonnet::hostname{$_}.
                    186: 		 '/adm/login?domain='.$authdomain.'">'.
                    187:                  $Apache::lonnet::hostname{$_}.'</a>';
                    188:                if ($Apache::lonnet::spareid{$_}) {
                    189: 		   $spares.=' (preferred)';
                    190:                }
                    191: 	   }
                    192:         }
                    193: 	$r->print(<<ENDTROUBLE);
                    194: <html>
                    195: <head><title>The LearningOnline Network with CAPA</title></head>
                    196: <body bgcolor="#FFFFFF">
                    197: <img src="/adm/lonKaputt/lonlogo_broken.gif" align="right" />
                    198: <h3>This LON-CAPA server is temporarily not available for login</h3>
                    199: <p>Please attempt to login to one of the following servers:</p>$spares
                    200: <p>If the problem persists, please contact <tt>$servadm</tt>.</p>
                    201: </body>
                    202: </html>
                    203: ENDTROUBLE
                    204:         return OK;
                    205:     }
                    206: 
                    207: # ----------------------------------------------- Apparently we are in business
                    208: 
1.48      albertel  209:     my $domainlogo=&Apache::loncommon::domainlogo($domain);
1.38      www       210:     $servadm=~s/\,/\<br \/\>/g;
                    211:     $sysadm=~s/\,/\<br \/\>/g;
                    212: 
1.6       www       213: # --------------------------------------------------- Print login screen header
                    214:     $r->print(<<ENDHEADER);
1.1       albertel  215: <html>
                    216: <head>
1.37      www       217: <meta HTTP-EQUIV="Refresh" CONTENT="$expire; url=/adm/roles" />
1.2       www       218: <title>The LearningOnline Network with CAPA Login</title>
1.1       albertel  219: </head>
1.6       www       220: ENDHEADER
                    221: # ---------------------------------------------------- Serve out DES JavaScript
                    222:     {
                    223: 	my $jsh=Apache::File->new($include."/londes.js");
                    224:         $r->print(<$jsh>);
                    225:     }
1.21      www       226: 
                    227: # ----------------------------------------------------------- Front page design
1.35      www       228:     my $pgbg=
1.46      www       229:       ($fullgraph?&Apache::loncommon::designparm('login.pgbg',$domain):'#FFFFFF');
1.35      www       230:     my $font=
1.46      www       231:       ($fullgraph?&Apache::loncommon::designparm('login.font',$domain):'#000000');
1.35      www       232:     my $link=
1.46      www       233:       ($fullgraph?&Apache::loncommon::designparm('login.link',$domain):'#0000FF');
1.35      www       234:     my $vlink=
1.46      www       235:       ($fullgraph?&Apache::loncommon::designparm('login.vlink',$domain):'#0000FF');
                    236:     my $alink=&Apache::loncommon::designparm('login.alink',$domain);
1.35      www       237:     my $mainbg=
1.46      www       238:       ($fullgraph?&Apache::loncommon::designparm('login.mainbg',$domain):'#FFFFFF');
1.35      www       239:     my $sidebg=
1.46      www       240:       ($fullgraph?&Apache::loncommon::designparm('login.sidebg',$domain):'#FFFFFF');
                    241:     my $logo=&Apache::loncommon::designparm('login.logo',$domain);
                    242:     my $img=&Apache::loncommon::designparm('login.img',$domain);
1.21      www       243: 
1.51      www       244: # ----------------------------------------------------------------------- Texts
                    245: 
                    246: my %lt=&Apache::lonlocal::texthash(
                    247: 		  'un'  => 'Username',
                    248: 		  'pw'  => 'Password',
                    249: 		  'dom' => 'Domain',
                    250: 		  'perc' => 'percent',
1.52      www       251: 		  'load' => 'Load',
                    252:                   'userload' => 'User Load',
                    253:                   'about'  => 'aboutlon.gif',
                    254:                   'access' => 'accessbutton.gif',
                    255: 		  'auth' => 'userauthentication.gif',
1.51      www       256: 		  'log' => 'Log in',
                    257: 		  'help' => 'Help',
                    258: 		  'serv' => 'Server',
                    259:                   'servadm' => 'Server Administration',
                    260:                   'sysadm' => 'System Administration');
                    261: 
1.21      www       262: 
1.6       www       263: # ---------------------------------------------------------- Serve rest of page
1.16      www       264:     $r->print(<<ENDSCRIPT);
1.6       www       265: 
1.21      www       266: <body bgcolor="$pgbg" text="$font" link="$link" vlink="$vlink" alink="$alink"
1.27      albertel  267:   topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>
1.6       www       268: 
1.14      albertel  269:  <script language="JavaScript">
                    270:     function send()
                    271:     {
1.6       www       272: 	this.document.server.elements.uname.value
                    273:        =this.document.client.elements.uname.value;
                    274: 
                    275:         this.document.server.elements.udom.value
                    276:        =this.document.client.elements.udom.value;
                    277: 
1.33      www       278:         this.document.server.elements.imagesuppress.value
1.36      www       279:        =this.document.client.elements.imagesuppress.checked;
1.33      www       280: 
                    281:         this.document.server.elements.embedsuppress.value
1.36      www       282:        =this.document.client.elements.embedsuppress.checked;
1.33      www       283: 
1.34      www       284:         this.document.server.elements.appletsuppress.value
1.36      www       285:        =this.document.client.elements.appletsuppress.checked;
1.34      www       286: 
1.33      www       287:         this.document.server.elements.fontenhance.value
1.36      www       288:        =this.document.client.elements.fontenhance.checked;
1.33      www       289: 
                    290:         this.document.server.elements.blackwhite.value
1.36      www       291:        =this.document.client.elements.blackwhite.checked;
1.33      www       292: 
1.35      www       293:         this.document.server.elements.remember.value
1.36      www       294:        =this.document.client.elements.remember.checked;
1.35      www       295: 
1.6       www       296:         uextkey=this.document.client.elements.uextkey.value;
                    297:         lextkey=this.document.client.elements.lextkey.value;
                    298:         initkeys();
                    299: 
                    300:         this.document.server.elements.upass.value
                    301: 	    =crypted(this.document.client.elements.upass.value);
                    302: 
                    303:         this.document.server.submit();
1.19      bowersj2  304: 	return false;
1.6       www       305:     }
1.14      albertel  306:  </script>
1.16      www       307: ENDSCRIPT
1.6       www       308: 
1.16      www       309:     if ($fullgraph) {
                    310: 	$r->print(
                    311: 		  '<table width="100%" cellpadding=0 cellspacing=0 border=0>');
                    312:     }
1.6       www       313: 
1.16      www       314:     $r->print(<<ENDSERVERFORM);
1.14      albertel  315:   <form name="server" action="$otherserver/adm/authenticate" method="post" target="_top">
1.33      www       316:    <input type="hidden" name="logtoken" value="$logtoken" />
                    317:    <input type="hidden" name="serverid" value="$lonhost" />
                    318:    <input type="hidden" name="interface" value="$ENV{'form.interface'}" />
                    319:    <input type="hidden" name="uname" value="" />
                    320:    <input type="hidden" name="upass" value="" />
                    321:    <input type="hidden" name="udom" value="" />
                    322:    <input type="hidden" name="imagesuppress"  value="" />
1.34      www       323:    <input type="hidden" name="appletsuppress"  value="" />
1.33      www       324:    <input type="hidden" name="embedsuppress"  value="" />
                    325:    <input type="hidden" name="fontenhance"  value="" />
                    326:    <input type="hidden" name="blackwhite"  value="" />
1.35      www       327:    <input type="hidden" name="remember"  value="" />
1.43      www       328:    <input type="hidden" name="localpath" value="$ENV{'form.localpath'}" />
                    329:    <input type="hidden" name="localres" value="$ENV{'form.localres'}" />
1.14      albertel  330:   </form>
1.16      www       331: ENDSERVERFORM
                    332:     if ($fullgraph) { $r->print(<<ENDTOP);
1.14      albertel  333:   <!-- The LON-CAPA Header -->
                    334:   <tr>
                    335: 
                    336:    <!-- Row 1 Columns 2-4 -->
1.29      www       337:    <td width="100%" height=75 colspan=4 align="left" valign="top" bgcolor="$pgbg"><img src="$img" border=0 alt="The Learning Online Network with CAPA" /></td>
1.14      albertel  338:   </tr>
                    339: 
                    340:   <!-- The gray bar that starts the two table frames -->
                    341:   <tr>
                    342: 
                    343:    <!-- Row 2 Column 1 -->
1.21      www       344:    <td width=182 height=27 bgcolor="$sidebg">&nbsp;</td>
1.14      albertel  345: 
                    346:    <!-- Row 2 Column 2 -->
1.19      bowersj2  347:    <td width=27 height=27 align="left" background="$iconpath/filltop.gif"><img src="$iconpath/upperleft.gif" border=0 alt="" /></td>
1.14      albertel  348: 
                    349:    <!-- Row 2 Column 3 -->
1.19      bowersj2  350:    <td height=27 background="$iconpath/filltop.gif"><img src="$iconpath/filltop.gif" alt="" /></td>
1.14      albertel  351: 
                    352:    <!-- Row 2 Column 4 -->
1.19      bowersj2  353:    <td width=27 height=27 align="right" background="$iconpath/filltop.gif"><img src="$iconpath/upperright.gif" border=0 alt="" /></td>
1.14      albertel  354:   </tr>
                    355:   <tr>
                    356:    
                    357:    <!-- A cell that will hold the 'access' and 'about' buttons -->
                    358:    <!-- Row 3 Column 1 -->
1.21      www       359:    <td valign="top" height=60 align="center" bgcolor="$sidebg">
1.52      www       360:     <a href="/adm/login?interface=textual"><img src="$iconpath/$lt{'access'}" border=0 alt="Accessibility Options" /></a>
1.14      albertel  361:     <br />
1.52      www       362:     <a href="/adm/about.html"><img src="$iconpath/$lt{'about'}" border=0 alt="About LON-CAPA" /></a>
1.14      albertel  363:    </td>
                    364: 
                    365:    <!-- The shaded space between the two main columns -->
                    366:    <!-- Row 3 Column 2 -->
1.19      bowersj2  367:    <td width=27 height=60 background="$iconpath/fillleft.gif"><img src="$iconpath/fillleft.gif" alt="" /></td>
1.14      albertel  368: 
                    369:    <!-- The right main column holding the large LON-CAPA logo-->
                    370:    <!-- Rows 3-4 Column 3 -->
1.45      www       371:    <td align="center" valign="top" width="100%" height="100%" bgcolor="$mainbg">
1.14      albertel  372:     <center>
1.21      www       373:      <img src="$logo" alt="" />
1.14      albertel  374:     </center>
                    375:    </td>
                    376: 
                    377:    <!-- Row 3 Column 4 -->
1.19      bowersj2  378:    <td width=27 background="$iconpath/fillright.gif"><img src="$iconpath/fillright.gif" alt="" /></td>
1.14      albertel  379:   </tr>
                    380:   <tr>
                    381: 
                    382:    <!-- The entry form -->
                    383:    <!-- Row 4 Column 1 -->
1.21      www       384:    <td align="center" valign="middle" bgcolor="$sidebg">
1.16      www       385: ENDTOP
1.32      www       386: } else {
1.45      www       387:     $r->print('<h1>The Learning<i>Online</i> Network with CAPA</h1><h2>Text-based Interface Login</h2>'.$announcements);
1.33      www       388: }
                    389:     $r->print('<form name="client" onsubmit="return(send())">');
                    390:     unless ($fullgraph) {
                    391:         $r->print(<<ENDACCESSOPTIONS);
1.35      www       392: <h3>Select Accessibility Options</h3>
1.33      www       393: <input type="checkbox" name="imagesuppress" /> Suppress rendering of images<br />
1.34      www       394: <input type="checkbox" name="appletsuppress" /> Suppress Java applets<br />
1.33      www       395: <input type="checkbox" name="embedsuppress" /> Suppress rendering of embedded multimedia<br />
                    396: <input type="checkbox" name="fontenhance" /> Increase font size<br />
1.35      www       397: <input type="checkbox" name="blackwhite" /> Switch to black and white mode<br />
                    398: <p>If you have accessibility needs that are not addressed by this interface, 
                    399: please
                    400: contact the system administrator at <tt>$sysadm</tt>.</p><br />
                    401: <input type="checkbox" name="remember" /> Remember these settings for next login<hr />
1.33      www       402: ENDACCESSOPTIONS
                    403: } else {
                    404:     $r->print(<<ENDNOOPT);
                    405: <input type="hidden" name="imagesuppress"  value="" />
                    406: <input type="hidden" name="embedsuppress"  value="" />
1.34      www       407: <input type="hidden" name="appletsuppress"  value="" />
1.33      www       408: <input type="hidden" name="fontenhance"  value="" />
                    409: <input type="hidden" name="blackwhite"  value="" />
1.35      www       410: <input type="hidden" name="remember"  value="" />
1.33      www       411: ENDNOOPT
1.16      www       412: }
                    413:     $r->print(<<ENDLOGIN);
1.14      albertel  414:      <input type="hidden" name="lextkey" value="$lextkey">
                    415:      <input type="hidden" name="uextkey" value="$uextkey">
                    416: 
                    417:      <!-- Start the sub-table for text and input alignment -->
                    418:      <table border=0 cellspacing=0 cellpadding=0>
1.52      www       419:       <tr><td bgcolor="$sidebg" colspan=2><img src="$iconpath/$lt{'auth'}" alt="User Authentication" /></td></tr>
1.14      albertel  420:       <tr>
1.51      www       421:        <td bgcolor="$mainbg"><br /><font size=-1><b>&nbsp;&nbsp;&nbsp;$lt{'un'}:</b></font></td>
1.30      www       422:        <td bgcolor="$mainbg"><br /><input type="text" name="uname" size="10" value="$authusername" /></td>
1.14      albertel  423:       </tr>
                    424:       <tr>
1.51      www       425:        <td bgcolor="$mainbg"><font size=-1><b>&nbsp;&nbsp;&nbsp;$lt{'pw'}:</b></font></td>
1.21      www       426:        <td bgcolor="$mainbg"><input type="password" name="upass" size="10" /></td>
1.14      albertel  427:       </tr>
                    428:       <tr>
1.51      www       429:        <td bgcolor="$mainbg"><font size=-1><b>&nbsp;&nbsp;&nbsp;$lt{'dom'}:</b></font></td>
1.30      www       430:        <td bgcolor="$mainbg"><input type="text" name="udom" size="10" value="$authdomain" /></td>
1.14      albertel  431:       </tr>
                    432:       <tr>
1.51      www       433:        <td bgcolor="$mainbg">&nbsp;&nbsp;&nbsp;<a href="/adm/loginproblems.html">$lt{'help'}</a></td>
1.28      www       434:        <td bgcolor="$mainbg" valign="bottom" align="center">
1.14      albertel  435:         <br />
1.51      www       436:         <input type="submit" value="$lt{'log'}" />
1.14      albertel  437:        </td>
                    438:       </tr>
                    439:      </table>
                    440:      <!-- End sub-table -->
                    441:     </form>
1.16      www       442: ENDLOGIN
                    443:     if ($fullgraph) {
                    444: 	$r->print(<<ENDDOCUMENT);
1.14      albertel  445:    </td>
                    446: 
                    447:    <!-- Row 4 Column 2 -->
1.19      bowersj2  448:    <td width=27 background="$iconpath/fillleft.gif"><img src="$iconpath/fillleft.gif" alt="" /></td>
1.45      www       449: 
                    450:    <!-- Row 4 Column 3 -->
                    451: <td bgcolor="$mainbg">$announcements</td>
1.14      albertel  452: 
                    453:    <!-- Row 4 Column 4 -->
1.19      bowersj2  454:    <td width=27 background="$iconpath/fillright.gif"><img src="$iconpath/fillright.gif" alt="" /></td>
1.14      albertel  455:   </tr>
                    456:   <tr>
                    457: 
                    458:    <!-- Row 5 Column 1 -->
1.21      www       459:    <td bgcolor="$sidebg" valign="middle" align="left">
1.14      albertel  460:      <br />
                    461:      <table border=0 cellspacing=0 cellpadding=0>
                    462:       <tr>
1.21      www       463:        <td bgcolor="$sidebg" align="left" valign="top">
1.51      www       464:         <small><b>&nbsp;&nbsp;&nbsp;$lt{'dom'}:&nbsp;</b></small>
1.14      albertel  465:        </td>
1.21      www       466:        <td bgcolor="$sidebg" align="left" valign="top">
1.14      albertel  467:         <small><tt>&nbsp;$domain</tt></small>
                    468:        </td>
                    469:       </tr>
                    470:       <tr>
1.21      www       471:        <td bgcolor="$sidebg" align="left" valign="top">
1.51      www       472:         <small><b>&nbsp;&nbsp;&nbsp;$lt{'serv'}:&nbsp;</b></small>
1.14      albertel  473:        </td>
1.21      www       474:        <td bgcolor="$sidebg" align="left" valign="top">
1.14      albertel  475:         <small><tt>&nbsp;$lonhost ($role)</tt></small>
                    476:        </td>
                    477:       </tr>
                    478:       <tr>
1.21      www       479:        <td bgcolor="$sidebg" align="left" valign="top">
1.52      www       480:         <small><b>&nbsp;&nbsp;&nbsp;$lt{'load'}:&nbsp;</b></small>
1.14      albertel  481:        </td>
1.21      www       482:        <td bgcolor="$sidebg" align="left" valign="top">
1.51      www       483:         <small><tt>&nbsp;$loadpercent $lt{'perc'}</tt></small>
1.42      albertel  484:        </td>
                    485:       </tr>
                    486:       <tr>
                    487:        <td bgcolor="$sidebg" align="left" valign="top">
1.52      www       488:         <small><b>&nbsp;&nbsp;&nbsp;$lt{'userload'}:&nbsp;</b></small>
1.42      albertel  489:        </td>
                    490:        <td bgcolor="$sidebg" align="left" valign="top">
1.51      www       491:         <small><tt>&nbsp;$userloadpercent $lt{'perc'}</tt></small>
1.14      albertel  492:        </td>
                    493:       </tr>
                    494:      </table>
                    495:      <br />
                    496:     <small>
1.51      www       497:      <b>&nbsp;&nbsp;&nbsp;$lt{'sysadm'}:</b><br />
1.14      albertel  498:      <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$sysadm</tt><br />
1.51      www       499:      <b>&nbsp;&nbsp;&nbsp;$lt{'servadm'}:</b><br />
1.44      www       500:      <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$servadm</tt><br />&nbsp;<br />
                    501:      &nbsp;&nbsp;&nbsp;$version
1.14      albertel  502:     </small>
                    503:    </td>
                    504: 
                    505:    <!-- Row 5 Column 2 -->
1.19      bowersj2  506:    <td width=27 background="$iconpath/fillleft.gif"><img src="$iconpath/fillleft.gif" alt="" /></td>
1.14      albertel  507: 
                    508:    <!-- Row 5 Column 3 -->
1.21      www       509:    <td width="100%" valign="bottom" bgcolor="$mainbg">
1.20      www       510: $domainlogo
                    511: </td>
1.14      albertel  512: 
                    513:    <!-- Row 5 Column 4 -->
1.19      bowersj2  514:    <td width=27 background="$iconpath/fillright.gif"><img src="$iconpath/fillright.gif" alt="" /></td>
1.14      albertel  515:   </tr>
                    516:   <tr>
                    517: 
                    518:    <!-- Row 6 Column 1 -->
1.21      www       519:    <td bgcolor="$sidebg">&nbsp;</td>
1.14      albertel  520: 
                    521:    <!-- Row 6 Column 2 -->
1.19      bowersj2  522:    <td align="left" background="$iconpath/fillbottom.gif"><img src="$iconpath/lowerleft.gif" alt="" /></td>
1.14      albertel  523: 
                    524:    <!-- Row 6 Column 3 -->
1.19      bowersj2  525:    <td background="$iconpath/fillbottom.gif"><img src="$iconpath/fillbottom.gif" alt="" /></td>
1.14      albertel  526: 
                    527:    <!-- Row 6 Column 4 -->
1.19      bowersj2  528:    <td align="right" background="$iconpath/fillbottom.gif"><img src="$iconpath/lowerright.gif" alt="" /></td>
1.14      albertel  529:   </tr>
1.1       albertel  530:  </table>
1.25      bowersj2  531: 
                    532: <script>
                    533: // the if prevents the script error if the browser can't handle this
                    534: if ( document.client.uname ) { document.client.uname.focus(); }
                    535: </script>
1.14      albertel  536: 
1.1       albertel  537: ENDDOCUMENT
1.16      www       538: }
                    539:     $r->print('</body></html>');
1.1       albertel  540:     return OK;
                    541: } 
                    542: 
                    543: 1;
                    544: __END__

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