version 1.134, 2002/07/03 19:11:09
|
version 1.136, 2002/07/05 18:56:52
|
Line 375 $hidden
|
Line 375 $hidden
|
<!-- end of view selection --> |
<!-- end of view selection --> |
</td></tr> |
</td></tr> |
ENDHEADER |
ENDHEADER |
$scrout.=&searchphrasefield('title','title', |
$scrout.=&searchphrasefield('title', 'title' ,$ENV{'form.title'}); |
$ENV{'form.title'}); |
$scrout.=&searchphrasefield('author', 'author' ,$ENV{'form.author'}); |
$scrout.=&searchphrasefield('author','author', |
$scrout.=&searchphrasefield('subject', 'subject' ,$ENV{'form.subject'}); |
$ENV{'form.author'}); |
$scrout.=&searchphrasefield('keywords','keywords',$ENV{'form.keywords'}); |
$scrout.=&searchphrasefield('subject','subject', |
$scrout.=&searchphrasefield('URL', 'url' ,$ENV{'form.url'}); |
$ENV{'form.subject'}); |
$scrout.=&searchphrasefield('notes', 'notes' ,$ENV{'form.notes'}); |
$scrout.=&searchphrasefield('keywords','keywords', |
$scrout.=&searchphrasefield('abstract','abstract',$ENV{'form.abstract'}); |
$ENV{'form.keywords'}); |
|
$scrout.=&searchphrasefield('URL','url', |
|
$ENV{'form.url'}); |
|
# $scrout.=&searchphrasefield('Limit by version','version', |
|
# $ENV{'form.version'}); |
|
$scrout.=&searchphrasefield('notes','notes', |
|
$ENV{'form.notes'}); |
|
$scrout.=&searchphrasefield('abstract','abstract', |
|
$ENV{'form.abstract'}); |
|
# Hack - an empty table row. |
# Hack - an empty table row. |
$scrout.="<tr><td> </td><td> </td></tr>\n"; |
$scrout.="<tr><td> </td><td> </td></tr>\n"; |
$scrout.=&searchphrasefield('file<br />extension','mime', |
$scrout.=&searchphrasefield('file<br />extension','mime', |
Line 438 ENDHEADER
|
Line 429 ENDHEADER
|
$scrout.="</select>\n"; |
$scrout.="</select>\n"; |
} |
} |
#---------------------------------------------------------------- |
#---------------------------------------------------------------- |
# |
|
# |
|
$scrout.=&selectbox('Limit by language','language', |
$scrout.=&selectbox('Limit by language','language', |
$ENV{'form.language'},'any','Any Language', |
$ENV{'form.language'},'any','Any Language', |
\&{Apache::loncommon::languagedescription}, |
\&{Apache::loncommon::languagedescription}, |
Line 803 sub parse_advanced_search {
|
Line 792 sub parse_advanced_search {
|
push @queries,&build_SQL_query($field,$ENV{'form.'.$field}); |
push @queries,&build_SQL_query($field,$ENV{'form.'.$field}); |
} |
} |
} |
} |
|
# I dislike the hack below. |
|
if ($ENV{'form.category'}) { |
|
$ENV{'form.mime'}=''; |
|
} |
# Evaluate option lists |
# Evaluate option lists |
if ($ENV{'form.language'} and $ENV{'form.language'} ne 'any') { |
if ($ENV{'form.language'} and $ENV{'form.language'} ne 'any') { |
push @queries,"(language like \"$ENV{'form.language'}\")"; |
push @queries,"(language like \"$ENV{'form.language'}\")"; |
Line 1114 sub output_results {
|
Line 1107 sub output_results {
|
my $elapsetime=0; |
my $elapsetime=0; |
my $resultflag=0; |
my $resultflag=0; |
my $tflag=1; |
my $tflag=1; |
my $viewselect=$ENV{'form.viewselect'}; |
## |
|
## Set viewing function |
|
## |
|
my $viewfunction = undef; |
|
if ($ENV{'form.viewselect'} eq 'Detailed Citation View') { |
|
$viewfunction = \&detailed_citation_view; |
|
} elsif ($ENV{'form.viewselect'} eq 'Summary View') { |
|
$viewfunction = \&summary_view; |
|
} elsif ($ENV{'form.viewselect'} eq 'Fielded Format') { |
|
$viewfunction = \&fielded_format_view; |
|
} elsif ($ENV{'form.viewselect'} eq 'XML/SGML') { |
|
$viewfunction = \&xml_sgml_view; |
|
} |
|
if (!defined($viewfunction)) { |
|
$r->print("Internal Error - Bad view selected.\n"); |
|
$r->rflush(); |
|
return; |
|
} |
# |
# |
# make query information persistent to allow for subsequent revision |
# make query information persistent to allow for subsequent revision |
my $persistent=&make_persistent(\%ENV); |
my $persistent=&make_persistent(\%ENV); |
# spit out the results header |
# |
|
# Begin producing output |
$r->print(&search_results_header($mode)); |
$r->print(&search_results_header($mode)); |
$r->rflush(); |
$r->rflush(); |
|
# |
# begin showing the cataloged results |
# begin showing the cataloged results |
my $action = "/adm/searchcat"; |
my $action = "/adm/searchcat"; |
if ($mode eq 'Basic') { |
if ($mode eq 'Basic') { |
Line 1141 $persistent
|
Line 1153 $persistent
|
CATALOGCONTROLS |
CATALOGCONTROLS |
# |
# |
# make the pop-up window for status |
# make the pop-up window for status |
# |
|
$r->print(&make_popwin(%rhash)); |
$r->print(&make_popwin(%rhash)); |
$r->rflush(); |
$r->rflush(); |
## |
## |
Line 1218 CATALOGCONTROLS
|
Line 1229 CATALOGCONTROLS
|
} # end of if ($reply eq 'con_lost') else statement |
} # end of if ($reply eq 'con_lost') else statement |
my %Fields = undef; # Holds the data to be sent to the various |
my %Fields = undef; # Holds the data to be sent to the various |
# *_view routines. |
# *_view routines. |
my ($extrashow,$customfields,$customhash) = &handle_custom_fields(\@results); |
my ($extrashow,$customfields,$customhash) = |
|
&handle_custom_fields(\@results); |
my @customfields = @$customfields; |
my @customfields = @$customfields; |
my %customhash = %$customhash; |
my %customhash = %$customhash; |
untie %hash if (keys %hash); |
untie %hash if (keys %hash); |
Line 1269 END
|
Line 1281 END
|
# <input type="hidden" name="url$fnum" value="$url" /> |
# <input type="hidden" name="url$fnum" value="$url" /> |
$fnum++; |
$fnum++; |
} |
} |
if ($viewselect eq 'Detailed Citation View') { |
# Render the result into html |
$compiledresult.=&detailed_citation_view |
$compiledresult.= &$viewfunction(%Fields, hostname => $rkey ); |
(%Fields, hostname => $rkey ); |
|
} |
|
elsif ($viewselect eq 'Summary View') { |
|
$compiledresult.=&summary_view |
|
(%Fields, hostname => $rkey ); |
|
} |
|
elsif ($viewselect eq 'Fielded Format') { |
|
$compiledresult.=&fielded_format_view |
|
(%Fields, hostname => $rkey ); |
|
} |
|
elsif ($viewselect eq 'XML/SGML') { |
|
$compiledresult.=&xml_sgml_view |
|
(%Fields, hostname => $rkey ); |
|
} |
|
if ($compiledresult or $servercount!=$servernum) { |
if ($compiledresult or $servercount!=$servernum) { |
$compiledresult.="<hr align='left' width='200' noshade />"; |
$compiledresult.="<hr align='left' width='200' noshade />"; |
} |
} |
Line 1295 END
|
Line 1293 END
|
$resultflag=1; |
$resultflag=1; |
$r->print($compiledresult); |
$r->print($compiledresult); |
} |
} |
my $percent=sprintf('%3.0f',($servercount/$servernum*100)); |
|
} # End of foreach loop over servers remaining |
} # End of foreach loop over servers remaining |
} # End of big loop - while($serversleft && $timeremain) |
} # End of big loop - while($serversleft && $timeremain) |
unless ($resultflag) { |
unless ($resultflag) { |
$r->print("\nThere were no results that matched your query\n"); |
$r->print("\nThere were no results that matched your query\n"); |
} |
} |
# $r->print('<script type="text/javascript">'.'popwin.close()</script>'."\n"); $r->rflush(); |
$r->print('<script type="text/javascript">'.'popwin.close()</script>'. |
|
"\n"); |
$r->print("</body>\n</html>\n"); |
$r->print("</body>\n</html>\n"); |
|
$r->rflush(); |
return; |
return; |
} |
} |
|
|
Line 1600 sub make_popwin {
|
Line 1599 sub make_popwin {
|
# rows of 10 each. No longer used to index images. |
# rows of 10 each. No longer used to index images. |
my $sn=1; |
my $sn=1; |
foreach my $sk (sort keys %rhash) { |
foreach my $sk (sort keys %rhash) { |
# '<a href=" |
|
$grid.="'<a href=\""; |
$grid.="'<a href=\""; |
# javascript:displayinfo('+ |
|
$grid.="javascript:opener.displayinfo('+"; |
$grid.="javascript:opener.displayinfo('+"; |
# "'"+'key |
|
$grid.="\"'\"+'"; |
$grid.="\"'\"+'"; |
$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 "; |
} |
} |
else { |
else { |
$hc="'+\"'\"+\"+hc['$sk']+\"+\"'\"+'"; |
$hc="'+\"'\"+\"+hc['$sk']+\"+\"'\"+'"; |