Diff for /loncom/interface/lonsearchcat.pm between versions 1.126 and 1.127

version 1.126, 2002/06/24 15:09:52 version 1.127, 2002/06/24 15:26:28
Line 101  use Apache::loncommon(); Line 101  use Apache::loncommon();
   
 =over 4  =over 4
   
 =item %hostdomains  
   
 matches host name to host domain  
   
 =item %hostips  
   
 matches host name to host ip  
   
 =item %hitcount  
   
 stores number of hits per host  
   
 =item $closebutton  =item $closebutton
   
 button that closes the search window  button that closes the search window
Line 137  used in &handler() and is also used in & Line 125  used in &handler() and is also used in &
 ######################################################################  ######################################################################
 ######################################################################  ######################################################################
   
 # -- information holders  
 my %hostdomains; # matches host name to host domain  
 my %hostips;     # matches host name to host ip  
 my %hitcount;    # stores number of hits per host  
   
 # -- dynamically rendered interface components  # -- dynamically rendered interface components
 my $closebutton;  # button that closes the search window  my $closebutton;  # button that closes the search window
 my $importbutton; # button to take the selected results and go to group sorting  my $importbutton; # button to take the selected results and go to group sorting
   
 # -- miscellaneous variables  # -- miscellaneous variables
 my $yourself; # allows for quickly limiting to oneself  
 my %hash;     # database hash  my %hash;     # database hash
   my $diropendb = "";    # db file
 # ------------------------------------------ choices for different output views  
 # Detailed Citation View ---> sub detailed_citation_view  
 # Summary View ---> sub summary_view  
 # Fielded Format ---> sub fielded_format_view  
 # XML/SGML ---> sub xml_sgml_view  
   
 #------------------------------------------------------------- global variables  
 my $diropendb = "";  
 my $domain = "";  
   
 # ----------------------------------------------------------------------- BEGIN  
   
 =pod  
   
 =item BEGIN block  
   
 Load %hostdomains and %hostips with data from lonnet.pm.  Only library  
 servers are considered.  
   
 =cut  
   
 BEGIN {  
     foreach (keys (%Apache::lonnet::libserv)) {  
         $hostdomains{$_}=$Apache::lonnet::hostdom{$_};  
         $hostips{$_}=$Apache::lonnet::hostip{$_};  
     }  
 }  
   
 ######################################################################  ######################################################################
 ######################################################################  ######################################################################
Line 1143  CATALOGCONTROLS Line 1098  CATALOGCONTROLS
                             return OK;                              return OK;
                         }                          }
                         @results=<$fh> if $fh;                          @results=<$fh> if $fh;
                         $hitcount{$rkey}=@results+0;                          my $hits =@results;
                         &popwin_js($r,'popwin.hc["'.$rkey.'"]='.                          &popwin_js($r,'popwin.hc["'.$rkey.'"]='.
                                    $hitcount{$rkey}.';');                                     $hits.';');
                         $hitcountsum+=$hitcount{$rkey};                          $hitcountsum+=$hits;
                         &popwin_js($r,'popwin.document.forms.popremain.'.                          &popwin_js($r,'popwin.document.forms.popremain.'.
                                    'numhits.value='.$hitcountsum.';');                                     'numhits.value='.$hitcountsum.';');
                     } else {                      } else {
Line 1547  sub make_popwin { Line 1502  sub make_popwin {
     $hcinit.="hc[\"$sk\"]=\"not yet connected...\";";      $hcinit.="hc[\"$sk\"]=\"not yet connected...\";";
  }   }
  $grid.=" hitcount=".$hc;   $grid.=" hitcount=".$hc;
  $grid.=" domain=".$hostdomains{$sk};   $grid.=" domain=".$Apache::lonnet::hostdom{$sk};
  $grid.=" IP=".$hostips{$sk};   $grid.=" IP=".$Apache::lonnet::hostip{$sk};
  # '+"'"+'">'+   # '+"'"+'">'+
  $grid.="'+\"'\"+')\">'+";   $grid.="'+\"'\"+')\">'+";
  $grid.="\n";   $grid.="\n";
  $grid.="'<img border=\"0\" name=\"img_".$hostdomains{$sk}.'_'.$sk."\"".   $grid.="'<img border=\"0\" name=\"img_".$Apache::lonnet::hostdom{$sk}.
     " src=\"/adm/lonIcons/srvnull.gif\" alt=\"".$sk."\" /></a>'+\n";              '_'.$sk."\" src=\"/adm/lonIcons/srvnull.gif\" alt=\"".$sk.
                   "\" /></a>'+\n";
  $grid.="'<br />'+\n" unless $sn%10;   $grid.="'<br />'+\n" unless $sn%10;
         $sn++;          $sn++;
     }      }
Line 1943  input $r, loncapa server id, and an icon Line 1899  input $r, loncapa server id, and an icon
 ######################################################################  ######################################################################
 sub popwin_imgupdate {  sub popwin_imgupdate {
     my ($r,$server,$icon) = @_;      my ($r,$server,$icon) = @_;
     &popwin_js($r,'popwin.document.img_'.$hostdomains{$server}.'_'.$server.'.'.      &popwin_js($r,'popwin.document.img_'.$Apache::lonnet::hostdom{$server}.
        'src="/adm/lonIcons/'.$icon.'";');                 '_'.$server.'.'.'src="/adm/lonIcons/'.$icon.'";');
 }      }    
   
 1;  1;

Removed from v.1.126  
changed lines
  Added in v.1.127


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>