version 1.98, 2001/08/26 21:19:35
|
version 1.100, 2001/08/28 12:12:38
|
Line 335 LASTREVISIONDATEEND
|
Line 335 LASTREVISIONDATEEND
|
<font color="#800000" face="helvetica"><b>LIMIT BY SPECIAL METADATA FIELDS:</b> |
<font color="#800000" face="helvetica"><b>LIMIT BY SPECIAL METADATA FIELDS:</b> |
</font> |
</font> |
For resource-specific metadata, enter in an expression in the form of |
For resource-specific metadata, enter in an expression in the form of |
<i>key</i>=<i>value</i> separated by operators such as AND or OR.<br /> |
<i>key</i>=<i>value</i> separated by operators such as AND, OR or NOT.<br /> |
<b>Example:</b> grandmother=75 OR grandfather=85 |
<b>Example:</b> grandmother=75 OR grandfather=85 |
<br /> |
<br /> |
CUSTOMMETADATA |
CUSTOMMETADATA |
Line 358 $scrout.=' <i>initial users of this syst
|
Line 358 $scrout.=' <i>initial users of this syst
|
<html> |
<html> |
<head> |
<head> |
<title>The LearningOnline Network with CAPA</title> |
<title>The LearningOnline Network with CAPA</title> |
|
<script type="text/javascript"> |
|
function openhelp(val) { |
|
openhelpwin=open('/adm/help/searchcat.html','helpscreen', |
|
'scrollbars=1,width=400,height=300'); |
|
openhelpwin.focus(); |
|
} |
|
</script> |
</head> |
</head> |
<body bgcolor="#FFFFFF"> |
<body bgcolor="#FFFFFF"> |
<img align='right' src='/adm/lonIcons/lonlogos.gif' /> |
<img align='right' src='/adm/lonIcons/lonlogos.gif' /> |
Line 368 $hidden
|
Line 375 $hidden
|
<h3>Basic Search</h3> |
<h3>Basic Search</h3> |
<p> |
<p> |
Enter terms or phrases separated by search operators |
Enter terms or phrases separated by search operators |
such as AND or OR then press SEARCH below. Terms should be specific |
such as AND, OR, or NOT then press SEARCH below. Terms should be specific |
to the title, author, subject, notes, or abstract information associated |
to the title, author, subject, notes, or abstract information associated |
with a resource. |
with a resource. |
<br /> |
<br /> |
Line 385 ENDDOCUMENT
|
Line 392 ENDDOCUMENT
|
<input type="reset" name="reset" value='RESET' /> |
<input type="reset" name="reset" value='RESET' /> |
$closebutton |
$closebutton |
$basicviewselect |
$basicviewselect |
|
<input type="button" value="HELP" onClick="openhelp()" /> |
</p> |
</p> |
<hr /> |
<hr /> |
<h3>Advanced Search</h3> |
<h3>Advanced Search</h3> |
Line 394 $scrout
|
Line 402 $scrout
|
<input type="reset" name="reset" value='RESET' /> |
<input type="reset" name="reset" value='RESET' /> |
$closebutton |
$closebutton |
$advancedviewselect |
$advancedviewselect |
|
<input type="button" value="HELP" onClick="openhelp()" /> |
</p> |
</p> |
</form> |
</form> |
</body> |
</body> |
Line 451 sub searchphrasefield {
|
Line 460 sub searchphrasefield {
|
my ($title,$name,$value)=@_; |
my ($title,$name,$value)=@_; |
my $instruction=<<END; |
my $instruction=<<END; |
Enter terms or phrases separated by search operators such |
Enter terms or phrases separated by search operators such |
as AND or OR. |
as AND, OR, or NOT. |
END |
END |
my $uctitle=uc($title); |
my $uctitle=uc($title); |
return "\n<p><font color=\"#800000\" face=\"helvetica\"><b>$uctitle:</b>". |
return "\n<p><font color=\"#800000\" face=\"helvetica\"><b>$uctitle:</b>". |
Line 904 BEGINNING
|
Line 913 BEGINNING
|
# conditional output of script functions dependent on the mode in |
# conditional output of script functions dependent on the mode in |
# which the search was invoked |
# which the search was invoked |
$r->print(<<SCRIPT) if $ENV{'form.catalogmode'} eq 'interactive'; |
$r->print(<<SCRIPT) if $ENV{'form.catalogmode'} eq 'interactive'; |
<script> |
<script type="text/javascript"> |
function select_data(title,url) { |
function select_data(title,url) { |
changeTitle(title); |
changeTitle(title); |
changeURL(url); |
changeURL(url); |
Line 923 BEGINNING
|
Line 932 BEGINNING
|
</script> |
</script> |
SCRIPT |
SCRIPT |
$r->print(<<SCRIPT) if $ENV{'form.catalogmode'} eq 'groupsearch'; |
$r->print(<<SCRIPT) if $ENV{'form.catalogmode'} eq 'groupsearch'; |
<script> |
<script type="text/javascript"> |
function select_data(title,url) { |
function select_data(title,url) { |
alert('DEBUG: Should be storing '+title+' and '+url); |
alert('DEBUG: Should be storing '+title+' and '+url); |
} |
} |
Line 940 SCRIPT
|
Line 949 SCRIPT
|
} |
} |
</script> |
</script> |
SCRIPT |
SCRIPT |
$r->print(<<SCRIPT); ; |
$r->print(<<SCRIPT); |
<script> |
<script type="text/javascript"> |
function displayinfo(val) { |
function displayinfo(val) { |
popwin.document.forms.popremain.sdetails.value=val; |
popwin.document.forms.popremain.sdetails.value=val; |
} |
} |
|
function openhelp(val) { |
|
openhelpwin=open('/adm/help/searchcat.html','helpscreen', |
|
'scrollbars=1,width=400,height=300'); |
|
openhelpwin.focus(); |
|
} |
</script> |
</script> |
SCRIPT |
SCRIPT |
$r->rflush(); |
$r->rflush(); |
Line 998 RESULTS
|
Line 1012 RESULTS
|
$grid.="javascript:opener.displayinfo('+"; |
$grid.="javascript:opener.displayinfo('+"; |
# "'"+'key |
# "'"+'key |
$grid.="\"'\"+'"; |
$grid.="\"'\"+'"; |
$grid.=$sk." domain=".$hostdomains{$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']+\"+\"'\"+'"; |
$hcinit.="hc[\"$sk\"]=0;"; |
$hcinit.="hc[\"$sk\"]=\"not yet connected...\";"; |
} |
} |
$grid.=" hitcount=".$hc; |
$grid.=" hitcount=".$hc; |
|
$grid.=" domain=".$hostdomains{$sk}; |
$grid.=" IP=".$hostips{$sk}; |
$grid.=" IP=".$hostips{$sk}; |
# '+"'"+'">'+ |
# '+"'"+'">'+ |
$grid.="'+\"'\"+')\">'+"; |
$grid.="'+\"'\"+')\">'+"; |
$grid.="\n"; |
$grid.="\n"; |
$grid.="'<img border=\"0\" name=\"img".$sn."\"". |
$grid.="'<img border=\"0\" name=\"img".$sn."\"". |
" src=\"/adm/lonIcons/srvbad.gif\" alt=\"".$sk."\" /></a>'+\n"; |
" src=\"/adm/lonIcons/srvnull.gif\" alt=\"".$sk."\" /></a>'+\n"; |
$grid.="'<br />'+\n" unless $sn%10; |
$grid.="'<br />'+\n" unless $sn%10; |
$sn++; |
$sn++; |
} |
} |
$r->print(<<ENDPOP); |
$r->print(<<ENDPOP); |
<script> |
<script type="text/javascript"> |
popwin=open('','popwin','scrollbars=1,width=400,height=200'); |
popwin=open('','popwin','scrollbars=1,width=400,height=200'); |
popwin.focus(); |
popwin.focus(); |
popwin.document.writeln('<'+'html>'); |
popwin.document.writeln('<'+'html>'); |
Line 1028 RESULTS
|
Line 1043 RESULTS
|
popwin.document.writeln('<'+'/script>'); |
popwin.document.writeln('<'+'/script>'); |
popwin.document.writeln('<'+'/head>'+ |
popwin.document.writeln('<'+'/head>'+ |
'<'+'body bgcolor="#FFFFFF">'+ |
'<'+'body bgcolor="#FFFFFF">'+ |
|
'<'+'image name="whirly" align="right" src="/adm/lonIcons/'+ |
|
'lonanim.gif" '+ |
|
'alt="animated logo" />'+ |
'<'+'h3>Search Results Progress<'+'/h3>'+ |
'<'+'h3>Search Results Progress<'+'/h3>'+ |
'<'+'form name="popremain">'+ |
'<'+'form name="popremain">'+ |
'<'+'br />Server space <'+'input type=text size=25 name=space value="">'+ |
|
'<'+'br />Status <'+'input type=text size=25 name=status value="">'+ |
|
'<'+'br />Maximum remaining time <'+'input type=text size=25 name=timeout '+ |
|
'value="30">'+ |
|
'<'+'tt>'+ |
'<'+'tt>'+ |
'<'+'image align="right" src="/adm/lonIcons/'+ |
'<'+'br clear="all"/><i>PLEASE BE PATIENT</i>'+ |
'lonanim.gif" '+ |
|
'alt="animated logo" />'+ |
|
'<'+'br /><i>PLEASE BE PATIENT</i>'+ |
|
'<'+'br />SCANNING $servernum SERVERS'+ |
'<'+'br />SCANNING $servernum SERVERS'+ |
'<'+'br clear="all" />Number of record hits found '+ |
'<'+'br clear="all" />Number of record hits found '+ |
'<'+'input type="text" size="10" name="numhits"'+ |
'<'+'input type="text" size="10" name="numhits"'+ |
Line 1054 RESULTS
|
Line 1065 RESULTS
|
'<'+'input type="text" size="25" name="sdetails"'+ |
'<'+'input type="text" size="25" name="sdetails"'+ |
' value="" />'+ |
' value="" />'+ |
'<'+'br />'+ |
'<'+'br />'+ |
'<'+'input type="button" name="button"'+ |
|
' value="revise search" />'+ |
|
' <'+'input type="button" name="button"'+ |
' <'+'input type="button" name="button"'+ |
' value="view results" />'+ |
' value="abort search and view current results" '+ |
|
' />'+ |
' <'+'input type="button" name="button"'+ |
' <'+'input type="button" name="button"'+ |
' value="help" />'+ |
' value="help" onClick="javascript:opener.openhelp()" />'+ |
'<'+'/tt>'+ |
'<'+'/tt>'+ |
'<'+'/form>'+ |
'<'+'/form>'+ |
'<'+'/body><'+'/html>'); |
'<'+'/body><'+'/html>'); |
Line 1068 RESULTS
|
Line 1078 RESULTS
|
ENDPOP |
ENDPOP |
$r->rflush(); |
$r->rflush(); |
|
|
$r->print('<script>popwin.document.popremain.space.value="'. |
|
$servernum.', 0%, count=0/'.$servernum.'";</script>'); |
|
$r->rflush(); |
|
my $servercount=0; |
my $servercount=0; |
$sn=0; |
$sn=0; |
my $hitcountsum=0; |
my $hitcountsum=0; |
Line 1080 ENDPOP
|
Line 1087 ENDPOP
|
$tflag=1; |
$tflag=1; |
$compiledresult=''; |
$compiledresult=''; |
my $hostname=$rkey; |
my $hostname=$rkey; |
$r->print('<script>popwin.document.popremain.status.value="'. |
|
$rkey.', trying contact";</script>'."\n"); |
|
$r->rflush(); |
|
my $reply=$rhash{$rkey}; |
my $reply=$rhash{$rkey}; |
my @results; |
my @results; |
|
|
my $replyfile=''; |
my $replyfile=''; |
|
|
if ($reply eq 'con_lost') { |
if ($reply eq 'con_lost') { |
my $percent=sprintf('%3.0f',($servercount/$servernum*100)); |
$r->print('<script type="text/javascript">popwin.document.img'. |
$r->print('<script>popwin.document.popremain.space.value="'. |
$sn.'.'. |
$servernum.', '.$percent.'%, count='.$servercount. |
'src="/adm/lonIcons/srvbad.gif";</script>'. |
'/'.$servernum.'";</script>'); |
"\n"); |
|
$r->rflush(); |
} |
} |
else { |
else { |
$reply=~/^([\.\w]+)$/; # must do since 'use strict' checks for tainting |
$reply=~/^([\.\w]+)$/; # must do since 'use strict' checks for tainting |
Line 1102 ENDPOP
|
Line 1107 ENDPOP
|
my $temp=0; |
my $temp=0; |
WLOOP: while (1) { |
WLOOP: while (1) { |
if (-e $replyfile && $tflag) { |
if (-e $replyfile && $tflag) { |
$r->print('<script>popwin.document.popremain.status.'. |
$r->print('<script type="text/javascript">'. |
'value="'.$rkey.', transmitting";</script>'. |
'popwin.document.img'.$sn.'.'. |
|
'src="/adm/lonIcons/srvhalf.gif";</script>'. |
"\n"); |
"\n"); |
$r->rflush(); |
$r->rflush(); |
$r->print('<script>popwin.document.img'.$sn.'.'. |
$r->print('<script type="text/javascript">'. |
'src="/adm/lonIcons/srvempty.gif";</script>'. |
'popwin.hc["'.$rkey.'"]='. |
|
'"still transferring..."'.';</script>'. |
"\n"); |
"\n"); |
$r->rflush(); |
$r->rflush(); |
$tflag=0; |
$tflag=0; |
Line 1115 ENDPOP
|
Line 1122 ENDPOP
|
last WLOOP if $temp>5; |
last WLOOP if $temp>5; |
if (-e "$replyfile.end") { |
if (-e "$replyfile.end") { |
if (-s $replyfile) { |
if (-s $replyfile) { |
$r->print('<script>popwin.document.img'.$sn.'.'. |
$r->print('<script type="text/javascript">'. |
'src="/adm/lonIcons/srvgood.gif";</script>'. |
'popwin.document.img'.$sn.'.'. |
"\n"); |
'src="/adm/lonIcons/srvgood.gif";'. |
|
'</script>'."\n"); |
$r->rflush(); |
$r->rflush(); |
my $fh=Apache::File->new($replyfile) or |
my $fh=Apache::File->new($replyfile) or |
($r->print('ERROR: file '. |
($r->print('ERROR: file '. |
Line 1125 ENDPOP
|
Line 1133 ENDPOP
|
return OK); |
return OK); |
@results=<$fh> if $fh; |
@results=<$fh> if $fh; |
$hitcount{$rkey}=@results+0; |
$hitcount{$rkey}=@results+0; |
$r->print('<script>popwin.hc["'.$rkey.'"]='. |
$r->print('<script type="text/javascript">'. |
|
'popwin.hc["'.$rkey.'"]='. |
$hitcount{$rkey}.';</script>'. |
$hitcount{$rkey}.';</script>'. |
"\n"); |
"\n"); |
$r->rflush(); |
$r->rflush(); |
$hitcountsum+=$hitcount{$rkey}; |
$hitcountsum+=$hitcount{$rkey}; |
$r->print('<script>popwin.document.forms.popremain.'. |
$r->print('<script type="text/javascript">'. |
|
'popwin.document.forms.popremain.'. |
'numhits.value='.$hitcountsum. |
'numhits.value='.$hitcountsum. |
';</script>'. |
';</script>'. |
"\n"); |
"\n"); |
$r->rflush(); |
$r->rflush(); |
} |
} |
|
else { |
|
$r->print('<script type="text/javascript">'. |
|
'popwin.document.img'.$sn.'.'. |
|
'src="/adm/lonIcons/srvempty.gif";'. |
|
'</script>'. |
|
"\n"); |
|
$r->rflush(); |
|
$r->print('<script type="text/javascript">'. |
|
'popwin.hc["'.$rkey.'"]=0'. |
|
';</script>'. |
|
"\n"); |
|
$r->rflush(); |
|
} |
last WLOOP; |
last WLOOP; |
} |
} |
last WLOOP unless $timeremain; |
last WLOOP unless $timeremain; |
sleep 1; |
sleep 1; |
$timeremain--; |
$timeremain--; |
$elapsetime++; |
$elapsetime++; |
$r->print('<script>popwin.document.popremain.timeout.'. |
$r->print('<script type="text/javascript">'. |
'value="'.$timeremain.'";</script>'."\n"); |
'popwin.document.popremain.elapsetime.'. |
$r->rflush(); |
|
$r->print('<script>popwin.document.popremain.elapsetime.'. |
|
'value="'.$elapsetime.'";</script>'."\n"); |
'value="'.$elapsetime.'";</script>'."\n"); |
$r->rflush(); |
$r->rflush(); |
$temp++; |
$temp++; |
} |
} |
} |
} |
|
$r->print('<script type="text/javascript">'. |
|
'popwin.document.whirly.'. |
|
'src="'.'/adm/lonIcons/lonanimend.gif'. |
|
'";</script>'."\n"); |
|
$r->rflush(); |
} |
} |
my $customshow=''; |
my $customshow=''; |
my $extrashow=''; |
my $extrashow=''; |
Line 1258 END
|
Line 1284 END
|
$compiledresult |
$compiledresult |
RESULTS |
RESULTS |
my $percent=sprintf('%3.0f',($servercount/$servernum*100)); |
my $percent=sprintf('%3.0f',($servercount/$servernum*100)); |
$r->print('<script>popwin.document.popremain.space.value="'. |
|
$servernum.', '.$percent.'%, count='.$servercount. |
|
'/'.$servernum.'";</script>'."\n"); |
|
} |
} |
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>popwin.close()</script>'."\n"); $r->rflush(); |
# $r->print('<script type="text/javascript">'.'popwin.close()</script>'."\n"); $r->rflush(); |
$r->print(<<RESULTS); |
$r->print(<<RESULTS); |
</body> |
</body> |
</html> |
</html> |