Diff for /loncom/interface/lonsearchcat.pm between versions 1.115 and 1.116

version 1.115, 2002/01/17 13:53:45 version 1.116, 2002/03/07 20:12:36
Line 118  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 305  $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 355  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 975  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 994  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 1022  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 1232  END Line 1221  END
 END  END
                if ($ENV{'form.catalogmode'} eq 'interactive') {                 if ($ENV{'form.catalogmode'} eq 'interactive') {
    my $titleesc=$title;     my $titleesc=$title;
    $titleesc=~s/\'/\\'/;     $titleesc=~s/\'/\\'/; # '
   
                    $compiledresult.=<<END                     $compiledresult.=<<END if ($ENV{'form.catalogmode'} eq 'interactive');
                        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('$titleesc','$url')">  onClick="javascript:select_data('$titleesc','$url')">
 </font>  </font>

Removed from v.1.115  
changed lines
  Added in v.1.116


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