version 1.98, 2001/08/26 21:19:35
|
version 1.99, 2001/08/26 21:49:49
|
Line 998 RESULTS
|
Line 998 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++; |
} |
} |
Line 1028 RESULTS
|
Line 1029 RESULTS
|
popwin.document.writeln('<'+'/script>'); |
popwin.document.writeln('<'+'/script>'); |
popwin.document.writeln('<'+'/head>'+ |
popwin.document.writeln('<'+'/head>'+ |
'<'+'body bgcolor="#FFFFFF">'+ |
'<'+'body bgcolor="#FFFFFF">'+ |
'<'+'h3>Search Results Progress<'+'/h3>'+ |
|
'<'+'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>'+ |
|
'<'+'image align="right" src="/adm/lonIcons/'+ |
'<'+'image align="right" src="/adm/lonIcons/'+ |
'lonanim.gif" '+ |
'lonanim.gif" '+ |
'alt="animated logo" />'+ |
'alt="animated logo" />'+ |
'<'+'br /><i>PLEASE BE PATIENT</i>'+ |
'<'+'h3>Search Results Progress<'+'/h3>'+ |
|
'<'+'form name="popremain">'+ |
|
'<'+'tt>'+ |
|
'<'+'br clear="all"/><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 1068 RESULTS
|
Line 1065 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 1074 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>popwin.document.img'.$sn.'.'. |
$r->print('<script>popwin.document.popremain.space.value="'. |
'src="/adm/lonIcons/srvbad.gif";</script>'. |
$servernum.', '.$percent.'%, count='.$servercount. |
"\n"); |
'/'.$servernum.'";</script>'); |
$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 1093 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>popwin.document.img'.$sn.'.'. |
'value="'.$rkey.', transmitting";</script>'. |
'src="/adm/lonIcons/srvhalf.gif";</script>'. |
"\n"); |
"\n"); |
$r->rflush(); |
$r->rflush(); |
$r->print('<script>popwin.document.img'.$sn.'.'. |
$r->print('<script>popwin.hc["'.$rkey.'"]='. |
'src="/adm/lonIcons/srvempty.gif";</script>'. |
'"still transferring..."'.';</script>'. |
"\n"); |
"\n"); |
$r->rflush(); |
$r->rflush(); |
$tflag=0; |
$tflag=0; |
Line 1136 ENDPOP
|
Line 1127 ENDPOP
|
"\n"); |
"\n"); |
$r->rflush(); |
$r->rflush(); |
} |
} |
|
else { |
|
$r->print('<script>popwin.document.img'.$sn.'.'. |
|
'src="/adm/lonIcons/srvempty.gif";</script>'. |
|
"\n"); |
|
$r->rflush(); |
|
$r->print('<script>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.'. |
|
'value="'.$timeremain.'";</script>'."\n"); |
|
$r->rflush(); |
|
$r->print('<script>popwin.document.popremain.elapsetime.'. |
$r->print('<script>popwin.document.popremain.elapsetime.'. |
'value="'.$elapsetime.'";</script>'."\n"); |
'value="'.$elapsetime.'";</script>'."\n"); |
$r->rflush(); |
$r->rflush(); |
Line 1258 END
|
Line 1256 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"); |