version 1.114, 2002/01/06 01:29:53
|
version 1.116, 2002/03/07 20:12:36
|
Line 29
|
Line 29
|
# 3/8, 3/12, 3/13, 3/14, 3/15, 3/19 Scott Harrison |
# 3/8, 3/12, 3/13, 3/14, 3/15, 3/19 Scott Harrison |
# 3/20, 3/21, 3/22, 3/26, 3/27, 4/2, 8/15, 8/24, 8/25 Scott Harrison |
# 3/20, 3/21, 3/22, 3/26, 3/27, 4/2, 8/15, 8/24, 8/25 Scott Harrison |
# 10/12,10/14,10/15,10/16,11/28,11/29,12/10,12/12,12/16 Scott Harrison |
# 10/12,10/14,10/15,10/16,11/28,11/29,12/10,12/12,12/16 Scott Harrison |
|
# YEAR=2002 |
|
# 1/17 Scott Harrison |
# |
# |
### |
### |
|
|
Line 116 my $domain = "";
|
Line 118 my $domain = "";
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
untie %hash; |
untie %hash; |
&get_unprocessed_cgi(); |
|
|
|
$r->content_type('text/html'); |
$r->content_type('text/html'); |
$r->send_http_header; |
$r->send_http_header; |
return OK if $r->header_only; |
return OK if $r->header_only; |
|
|
$domain = $r->dir_config('lonDefDomain'); |
$domain = $r->dir_config('lonDefDomain'); |
|
|
$diropendb= "/home/httpd/perl/tmp/$domain\_$ENV{'user.name'}_searchcat.db"; |
$diropendb= "/home/httpd/perl/tmp/$domain\_$ENV{'user.name'}_searchcat.db"; |
|
|
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
|
['catalogmode','launch','acts']); |
|
|
if ($ENV{'form.launch'} eq '1') { |
if ($ENV{'form.launch'} eq '1') { |
if (tie(%hash,'GDBM_File',$diropendb,&GDBM_WRCREAT,0640)) { |
if (tie(%hash,'GDBM_File',$diropendb,&GDBM_WRCREAT,0640)) { |
&start_fresh_session(); |
&start_fresh_session(); |
Line 303 $scrout.=' <i>initial users of this syst
|
Line 306 $scrout.=' <i>initial users of this syst
|
<script type="text/javascript"> |
<script type="text/javascript"> |
function openhelp(val) { |
function openhelp(val) { |
openhelpwin=open('/adm/help/searchcat.html','helpscreen', |
openhelpwin=open('/adm/help/searchcat.html','helpscreen', |
'scrollbars=1,width=400,height=300'); |
'scrollbars=1,width=600,height=300'); |
openhelpwin.focus(); |
openhelpwin.focus(); |
} |
} |
</script> |
</script> |
Line 353 ENDDOCUMENT
|
Line 356 ENDDOCUMENT
|
return OK; |
return OK; |
} |
} |
|
|
# ----------- grab unprocessed CGI variables that may have been appended to URL |
|
sub get_unprocessed_cgi { |
|
foreach (split(/&/,$ENV{'QUERY_STRING'})) { |
|
my ($name, $value) = split(/=/,$_); |
|
$value =~ tr/+/ /; |
|
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; |
|
if ($name eq 'catalogmode' or $name eq 'launch' or $name eq 'acts') { |
|
$ENV{'form.'.$name}=$value; |
|
} |
|
} |
|
} |
|
|
|
# ------------------------------------------------------------- make persistent |
# ------------------------------------------------------------- make persistent |
sub make_persistent { |
sub make_persistent { |
my $persistent=''; |
my $persistent=''; |
Line 973 RESULTS
|
Line 964 RESULTS
|
$grid.=$sk; |
$grid.=$sk; |
my $hc; |
my $hc; |
if ($rhash{$sk} eq 'con_lost') { |
if ($rhash{$sk} eq 'con_lost') { |
$hc="!!!BAD CONNECTION, CONTACT SYSTEM ADMINISTRATOR!!!"; |
$hc="BAD CONNECTION, CONTACT SYSTEM ADMINISTRATOR "; |
} |
} |
else { |
else { |
$hc="'+\"'\"+\"+hc['$sk']+\"+\"'\"+'"; |
$hc="'+\"'\"+\"+hc['$sk']+\"+\"'\"+'"; |
Line 992 RESULTS
|
Line 983 RESULTS
|
} |
} |
$r->print(<<ENDPOP); |
$r->print(<<ENDPOP); |
<script type="text/javascript"> |
<script type="text/javascript"> |
popwin=open('','popwin','scrollbars=1,width=400,height=200'); |
popwin=open('','popwin','scrollbars=1,width=400,height=220'); |
popwin.focus(); |
popwin.focus(); |
popwin.document.writeln('<'+'html>'); |
popwin.document.writeln('<'+'html>'); |
popwin.document.writeln('<'+'head>'); |
popwin.document.writeln('<'+'head>'); |
Line 1020 RESULTS
|
Line 1011 RESULTS
|
$grid |
$grid |
'<'+'br />'+ |
'<'+'br />'+ |
'Server details '+ |
'Server details '+ |
'<'+'input type="text" size="25" name="sdetails"'+ |
'<'+'input type="text" size="35" name="sdetails"'+ |
' value="" />'+ |
' value="" />'+ |
'<'+'br />'+ |
'<'+'br />'+ |
' <'+'input type="button" name="button"'+ |
' <'+'input type="button" name="button"'+ |
Line 1228 END
|
Line 1219 END
|
$compiledresult.=<<END; |
$compiledresult.=<<END; |
<p> |
<p> |
END |
END |
$compiledresult.=<<END if $ENV{'form.catalogmode'} eq 'interactive'; |
if ($ENV{'form.catalogmode'} eq 'interactive') { |
|
my $titleesc=$title; |
|
$titleesc=~s/\'/\\'/; # ' |
|
|
|
$compiledresult.=<<END if ($ENV{'form.catalogmode'} eq 'interactive'); |
<font size='-1'><INPUT TYPE="button" NAME="returnvalues" VALUE="SELECT" |
<font size='-1'><INPUT TYPE="button" NAME="returnvalues" VALUE="SELECT" |
onClick="javascript:select_data('$title','$url')"> |
onClick="javascript:select_data('$titleesc','$url')"> |
</font> |
</font> |
<br /> |
<br /> |
END |
END |
|
} |
if ($ENV{'form.catalogmode'} eq 'groupsearch') { |
if ($ENV{'form.catalogmode'} eq 'groupsearch') { |
$fnum+=0; |
$fnum+=0; |
$hash{"pre_${fnum}_link"}=$url; |
$hash{"pre_${fnum}_link"}=$url; |