version 1.14, 2007/08/25 00:52:47
|
version 1.16, 2007/09/08 02:43:33
|
Line 62 sub init_env {
|
Line 62 sub init_env {
|
sub do_redirect { |
sub do_redirect { |
my ($r,$url,$only_body,$extra_text) = @_; |
my ($r,$url,$only_body,$extra_text) = @_; |
$r->send_http_header; |
$r->send_http_header; |
my $switch='<meta HTTP-EQUIV="Refresh" CONTENT="0; url='.$url.'">'; |
|
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Switching Server ...', $switch, |
&Apache::loncommon::start_page('Switching Server ...',undef, |
{'no_inline_link' => 1, |
{'redirect' => [0.5,$url], |
|
'no_inline_link' => 1, |
'only_body' => $only_body,}); |
'only_body' => $only_body,}); |
my $end_page = &Apache::loncommon::end_page(); |
my $end_page = &Apache::loncommon::end_page(); |
$r->print($start_page.$extra_text.$end_page); |
$r->print($start_page.$extra_text.$end_page); |
Line 138 sub handler {
|
Line 138 sub handler {
|
my $token = &Apache::lonnet::tmpput(\%info,$env{'form.otherserver'}); |
my $token = &Apache::lonnet::tmpput(\%info,$env{'form.otherserver'}); |
my $url ='http://'.$switch_to.'/adm/login?'. |
my $url ='http://'.$switch_to.'/adm/login?'. |
'domain='.$env{'user.domain'}. |
'domain='.$env{'user.domain'}. |
'&username='.$env{'user.name'}. |
'&username='.$env{'user.name'}. |
'&token='.$token; |
'&token='.$token; |
# --------------------------------------------------------------- Screen Output |
# --------------------------------------------------------------- Screen Output |
&Apache::lonnet::flushcourselogs(); |
&Apache::lonnet::flushcourselogs(); |
return &do_redirect($r,$url,0,$windowinfo); |
return &do_redirect($r,$url,0,$windowinfo); |