version 1.8, 2003/03/17 17:53:09
|
version 1.14, 2005/04/07 06:56:21
|
Line 25
|
Line 25
|
# |
# |
# http://www.lon-capa.org/ |
# http://www.lon-capa.org/ |
# |
# |
# (Cookie Based Access Handler |
|
# 5/21/99,5/22,5/29,5/31,6/15,16/11,22/11, |
|
# 01/06,01/13 Gerd Kortemeyer) |
|
# 05/31,11/29,12/29 Gerd Kortemeyer |
|
|
|
package Apache::lonlogout; |
package Apache::lonlogout; |
|
|
Line 38 use Apache::File;
|
Line 34 use Apache::File;
|
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::lonmenu; |
use Apache::lonmenu; |
use CGI::Cookie(); |
use CGI::Cookie(); |
|
use Apache::lonlocal; |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
Line 70 sub handler {
|
Line 67 sub handler {
|
$sessionhash{'user.name'}, |
$sessionhash{'user.name'}, |
$sessionhash{'user.home'}, |
$sessionhash{'user.home'}, |
"Logout $ENV{'REMOTE_ADDR'}"); |
"Logout $ENV{'REMOTE_ADDR'}"); |
$r->content_type('text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
return OK if $r->header_only; |
return OK if $r->header_only; |
# -------------------------------------------------------- Menu script and info |
# -------------------------------------------------------- Menu script and info |
|
|
my $windowinfo=&Apache::lonmenu::close(); |
my $windowinfo=&Apache::lonmenu::close(); |
|
$windowinfo.=&Apache::lonnavmaps::close(); |
# ---------------------------------------------------------------- Get handover |
# ---------------------------------------------------------------- Get handover |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['handover']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['handover']); |
my $switch=''; |
my $switch=''; |
my $bodytag=''; |
my $bodytag=''; |
my $relogmessage=''; |
my $relogmessage=''; |
if ($ENV{'form.handover'}) { |
if ($env{'form.handover'}) { |
$switch='<meta HTTP-EQUIV="Refresh" CONTENT="0.5; url='. |
$switch='<meta HTTP-EQUIV="Refresh" CONTENT="0.5; url='. |
$ENV{'form.handover'}.'">'; |
$env{'form.handover'}.'">'; |
$bodytag=&Apache::loncommon::bodytag('Switching Server ...'); |
$bodytag=&Apache::loncommon::bodytag('Switching Server ...'); |
} else { |
} else { |
$bodytag=&Apache::loncommon::bodytag('Logged Out'); |
$bodytag=&Apache::loncommon::bodytag('Logged Out'); |
|
my %lt=&Apache::lonlocal::texthash('gb' => 'Goodbye', |
|
'cw' => 'close this window', |
|
'li' => 'log in again', |
|
'pe' => 'Please either', |
|
'or' => 'or'); |
$relogmessage=(<<ENDRELOG); |
$relogmessage=(<<ENDRELOG); |
<h1>Goodbye!</h1> |
<h1>$lt{'gb'}!</h1> |
Please either <a href="javascript:self.close();">close this window</a> or |
$lt{'pe'} <a href="javascript:self.close();">$lt{'cw'}</a> $lt{'or'} |
<a href="/adm/login">log in again</a>. |
<a href="/adm/login">$lt{'li'}</a>. |
ENDRELOG |
ENDRELOG |
} |
} |
# --------------------------------------------------------------- Screen Output |
# --------------------------------------------------------------- Screen Output |