version 1.119, 2009/04/28 21:54:51
|
version 1.123, 2009/07/22 20:24:07
|
Line 46 sub handler {
|
Line 46 sub handler {
|
(join('&',$ENV{'QUERY_STRING'},$env{'request.querystring'}, |
(join('&',$ENV{'QUERY_STRING'},$env{'request.querystring'}, |
$ENV{'REDIRECT_QUERY_STRING'}), |
$ENV{'REDIRECT_QUERY_STRING'}), |
['interface','username','domain','firsturl','localpath','localres', |
['interface','username','domain','firsturl','localpath','localres', |
'token']); |
'token','role','symb']); |
if (!defined($env{'form.firsturl'})) { |
if (!defined($env{'form.firsturl'})) { |
&Apache::lonacc::get_posted_cgi($r,['firsturl']); |
&Apache::lonacc::get_posted_cgi($r,['firsturl']); |
} |
} |
Line 170 sub handler {
|
Line 170 sub handler {
|
if ($uextkey>2147483647) { $uextkey-=4294967296; } |
if ($uextkey>2147483647) { $uextkey-=4294967296; } |
|
|
# -------------------------------------------------------- Store away log token |
# -------------------------------------------------------- Store away log token |
|
my $tokenextras; |
|
if ($env{'form.role'}) { |
|
$tokenextras = '&role='.&escape($env{'form.role'}); |
|
} |
|
if ($env{'form.symb'}) { |
|
$tokenextras .= '&symb='.&escape($env{'form.symb'}); |
|
} |
my $logtoken=Apache::lonnet::reply( |
my $logtoken=Apache::lonnet::reply( |
'tmpput:'.$ukey.$lkey.'&'.$firsturl, |
'tmpput:'.$ukey.$lkey.'&'.$firsturl.$tokenextras, |
$lonhost); |
$lonhost); |
|
|
# ------------------- If we cannot talk to ourselves, we are in serious trouble |
# ------------------- If we cannot talk to ourselves, we are in serious trouble |
Line 264 my $now=time;
|
Line 271 my $now=time;
|
my $js = (<<ENDSCRIPT); |
my $js = (<<ENDSCRIPT); |
|
|
<script type="text/javascript" language="JavaScript"> |
<script type="text/javascript" language="JavaScript"> |
|
// <![CDATA[ |
function send() |
function send() |
{ |
{ |
this.document.server.elements.uname.value |
this.document.server.elements.uname.value |
Line 289 this.document.client.elements.upass$now.
|
Line 297 this.document.client.elements.upass$now.
|
this.document.server.submit(); |
this.document.server.submit(); |
return false; |
return false; |
} |
} |
|
// ]]> |
</script> |
</script> |
|
|
ENDSCRIPT |
ENDSCRIPT |
Line 339 $r->print(<$jsh>);
|
Line 348 $r->print(<$jsh>);
|
$r->print( |
$r->print( |
'<div class="LC_loginpage_container">'); |
'<div class="LC_loginpage_container">'); |
|
|
|
# |
|
# If the loadbalancing yielded just http:// because perhaps there's no loadbalancing? |
|
# then just us a relative link to authenticate: |
|
# |
|
|
$r->print(<<ENDSERVERFORM); |
$r->print(<<ENDSERVERFORM); |
<form name="server" action="$otherserver/adm/authenticate" method="post" target="_top"> |
<form name="server" action="$otherserver/adm/authenticate" method="post" target="_top"> |
<input type="hidden" name="logtoken" value="$logtoken" /> |
<input type="hidden" name="logtoken" value="$logtoken" /> |
Line 376 my $contactblock = &contactdisplay(\%lt,
|
Line 390 my $contactblock = &contactdisplay(\%lt,
|
$version,$authdomain,\$helpdeskscript); |
$version,$authdomain,\$helpdeskscript); |
|
|
my $loginform=(<<LFORM); |
my $loginform=(<<LFORM); |
<form name="client" onsubmit="return(send())"> |
<form name="client" action="" onsubmit="return(send())"> |
<input type="hidden" name="lextkey" value="$lextkey" /> |
<input type="hidden" name="lextkey" value="$lextkey" /> |
<input type="hidden" name="uextkey" value="$uextkey" /> |
<input type="hidden" name="uextkey" value="$uextkey" /> |
<b><label for="uname">$lt{'un'}</label>:</b><br /> |
<b><label for="uname">$lt{'un'}</label>:</b><br /> |
Line 472 $r->print(<<ENDDOCUMENT);
|
Line 486 $r->print(<<ENDDOCUMENT);
|
</div> |
</div> |
|
|
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
// the if prevents the script error if the browser can not handle this |
// the if prevents the script error if the browser can not handle this |
if ( document.client.uname ) { document.client.uname.focus(); } |
if ( document.client.uname ) { document.client.uname.focus(); } |
|
// ]]> |
</script> |
</script> |
$helpdeskscript |
$helpdeskscript |
|
|
Line 500 sub contactdisplay {
|
Line 516 sub contactdisplay {
|
my $thisurl = &escape('/adm/login'); |
my $thisurl = &escape('/adm/login'); |
$$helpdeskscript = <<"ENDSCRIPT"; |
$$helpdeskscript = <<"ENDSCRIPT"; |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
function helpdesk() { |
function helpdesk() { |
var codedom = document.client.udom.value; |
var codedom = document.client.udom.value; |
if (codedom == '') { |
if (codedom == '') { |
Line 509 function helpdesk() {
|
Line 526 function helpdesk() {
|
document.location.href = "/adm/helpdesk?"+querystr; |
document.location.href = "/adm/helpdesk?"+querystr; |
return; |
return; |
} |
} |
|
// ]]> |
</script> |
</script> |
ENDSCRIPT |
ENDSCRIPT |
} |
} |