Diff for /loncom/interface/lonindexer.pm between versions 1.12 and 1.13

version 1.12, 2001/06/26 21:11:18 version 1.13, 2001/07/08 18:31:10
Line 13 Line 13
 # 06/02/2001 Scott Harrison  # 06/02/2001 Scott Harrison
 # 06/15/2001 Scott Harrison  # 06/15/2001 Scott Harrison
 # 06/26/2001 H. K. Ng  # 06/26/2001 H. K. Ng
   # 07/08/2001 H. K. Ng
   
 package Apache::lonindexer;  package Apache::lonindexer;
   
Line 213  ENDHEADER Line 214  ENDHEADER
 <td><input type=checkbox name=attr4 value="1" $attrchk[4]> Keywords</td>  <td><input type=checkbox name=attr4 value="1" $attrchk[4]> Keywords</td>
 <td><input type=checkbox name=attr5 value="1" $attrchk[5]> Language</td>  <td><input type=checkbox name=attr5 value="1" $attrchk[5]> Language</td>
 </tr></table>  </tr></table>
   <input type=hidden name=dirPointer value="on">
 <input type="submit" name="attrs" value="Review">&nbsp;  <input type="submit" name="attrs" value="Review">&nbsp;
 <input type="submit" name="attrs" value="Refresh">  <input type="submit" name="attrs" value="Refresh">
 $hidden  $hidden
Line 259  END Line 261  END
   
  my $bredir = $ENV{'form.dirPointer'};   my $bredir = $ENV{'form.dirPointer'};
  my $toplevel;   my $toplevel;
    my $indent = 0;
  $uri = $uri.'/' if $uri !~ /.*\/$/;   $uri = $uri.'/' if $uri !~ /.*\/$/;
  if ($uri eq "/res/" or $bredir ne "on") {   if ($bredir ne "on") {
     $hash{'top.level'} = $uri;      $hash{'top.level'} = $uri;
     $toplevel = $uri;      $toplevel = $uri;
  } elsif ($bredir eq "on") {  
     if ($hash{'top.level'} eq "/res/") {   } else {
  $toplevel = "/res/";      $toplevel = $hash{'top.level'};
     } else {   }
  $toplevel = $uri;   if ($toplevel ne "/res/"){
     }      my (@uri_com) = split(/\//,$uri);
       pop @uri_com;
       my $upone = join('/',@uri_com);
       my @list = qw (0);
       &display_line ($r,'opened',$upone.'&viewOneUp',0,$upone,@list);
       $indent = 1;
  }   }
  my $indent = 0;  
  &scanDir ($r,$toplevel,$indent);   &scanDir ($r,$toplevel,$indent);
   
  $r->print("<form name='fnum'>");   $r->print("<form name='fnum'>");
Line 403  sub display_line{ Line 410  sub display_line{
  $tabtag=join('',$tabtag,"<td bgcolor=",$fileclr,">&nbsp;</td>") if $hash{'display_attrs_'.$i} == 1;   $tabtag=join('',$tabtag,"<td bgcolor=",$fileclr,">&nbsp;</td>") if $hash{'display_attrs_'.$i} == 1;
  $i++;   $i++;
     }      }
       if ($filecom[1] eq "viewOneUp") {
    $r->print("<tr>$extrafield");
    $r->print("<td bgcolor=$fileclr valign=bottom>\n");
    $r->print ('<form method="post" name="dirpath" action="'.$startdir.
      '" enctype="application/x-www-form-urlencoded">'."\n");
    $r->print ($hidden.'<input type=hidden name=openuri value="'.$startdir.'">'."\n");
    $r->print ('<input src="'.$iconpath.'arrow_up.gif"');
    $r->print (' name="'.$msg.'" height="22" type="image" border="0">'."\n");
    $r->print("Up $tabtag</tr></form>\n");
    return OK;
       }
     if ($filecom[1] eq "domain") {      if ($filecom[1] eq "domain") {
    $r->print ('<input type=hidden name=dirPointer value="on">'."\n") if ($ENV{'form.dirPointer'} eq "on");
  $r->print("<tr>$extrafield");   $r->print("<tr>$extrafield");
  $r->print("<td bgcolor=$fileclr valign=bottom>");   $r->print("<td bgcolor=$fileclr valign=bottom>");
  &begin_form ($r,$filecom[0].'/');   &begin_form ($r,$filecom[0].'/');
  my $anchor = $filecom[0].'/';   my $anchor = $filecom[0].'/';
  $anchor =~ s/\///g;   $anchor =~ s/\///g;
  $r->print ('<a name="'.$anchor.'"><input src="'.$iconpath.'server.gif"');   $r->print ('<a name="'.$anchor.'">');
    $r->print ('<input src="'.$iconpath.'folder_pointer_'.$diropen.'.gif"'); 
  $r->print (' name="'.$msg.'" height="22" type="image" border="0">'."\n");   $r->print (' name="'.$msg.'" height="22" type="image" border="0">'."\n");
    $r->print ('<a href="'.$filecom[0].'"><img src="'.$iconpath.'server.gif"');
    $r->print (' border="0"></a>'."\n");
  $r->print("Domain - $listname $tabtag</tr></form>\n");   $r->print("Domain - $listname $tabtag</tr></form>\n");
  return OK;   return OK;
     }      }
     if ($filecom[1] eq "user") {      if ($filecom[1] eq "user") {
  $r->print("<tr>$extrafield");   $r->print("<tr>$extrafield");
  $r->print("<td bgcolor=$fileclr valign=bottom>\n");   $r->print("<td bgcolor=$fileclr valign=bottom nowrap>\n");
  my $curdir = $startdir.$filecom[0].'/';   my $curdir = $startdir.$filecom[0].'/';
  &begin_form ($r,$curdir);  
  my $anchor = $curdir;   my $anchor = $curdir;
  $anchor =~ s/\///g;   $anchor =~ s/\///g;
    &begin_form ($r,$curdir);
  $r->print ('<a name="'.$anchor.'"><img src="'.$iconpath.'whitespace1.gif" border=0>'."\n");   $r->print ('<a name="'.$anchor.'"><img src="'.$iconpath.'whitespace1.gif" border=0>'."\n");
  $r->print ('<input src="'.$iconpath.'folder_pointer_'.$diropen.'.gif"');    $r->print ('<input src="'.$iconpath.'folder_pointer_'.$diropen.'.gif"'); 
  $r->print (' name="'.$msg.'" height="22" type="image" border="0">'."\n");   $r->print (' name="'.$msg.'" height="22" type="image" border="0">'."\n");
  $r->print ('<img src='.$iconpath.'quill.gif border=0>'.$listname.$tabtag.'</tr></form>'."\n");   $r->print ('<a href="'.$curdir.'"><img src='.$iconpath.'quill.gif border=0 name="'.$msg.'" height="22"></a>');
    $r->print ($listname.$tabtag.'</tr></form>'."\n");
  return OK;   return OK;
     }      }
 # display file  # display file
Line 521  sub display_line{ Line 544  sub display_line{
     my $rem = $indentm1%10.0;      my $rem = $indentm1%10.0;
     my $count = 0;      my $count = 0;
     while ($count < $ten) {      while ($count < $ten) {
  $r->print("<img src=",$iconpath,"whitespace10.gif border=0>\n");   $r->print ("<img src=",$iconpath,"whitespace10.gif border=0>\n");
  $count++;   $count++;
     }      }
     $r->print("<img src=",$iconpath,"whitespace",$rem,".gif border=0>\n") if $rem > 0;      $r->print ("<img src=",$iconpath,"whitespace",$rem,".gif border=0>\n") if $rem > 0;
  }   }
  $r->print ('<a name="'.$anchor.'"><input src="'.$iconpath.'folder_pointer_'.$diropen.'.gif"');   $r->print ('<a name="'.$anchor.'"><input src="'.$iconpath.'folder_pointer_'.$diropen.'.gif"');
  $r->print (' name="'.$msg.'" height="22" type="image" border="0">'."\n");   $r->print (' name="'.$msg.'" height="22" type="image" border="0">'."\n");
  $r->print("<img src=",$iconpath,"folder_$diropen.gif border=0>\n");   $r->print ('<a href="'.$curdir.'"><img src="'.$iconpath.'folder_'.$diropen.'.gif" border=0></a>'."\n");
  $r->print("$listname $tabtag</tr></form>\n");   $r->print ("$listname$tabtag</tr></form>\n");
     }      }
   
 }  }
Line 539  sub begin_form { Line 562  sub begin_form {
     my ($r,$uri) = @_;      my ($r,$uri) = @_;
     my $anchor = $uri;      my $anchor = $uri;
     $anchor =~ s/\///g;      $anchor =~ s/\///g;
     $r->print ('<form method="post" name="dirpath" action="'.$uri.'#'.$anchor.'" enctype="application/x-www-form-urlencoded">'."\n");      $r->print ('<form method="post" name="dirpath" action="'.$uri.'#'.$anchor.
          '" enctype="application/x-www-form-urlencoded">'."\n");
     $r->print ($hidden.'<input type=hidden name=openuri value="'.$uri.'">'."\n");      $r->print ($hidden.'<input type=hidden name=openuri value="'.$uri.'">'."\n");
     $r->print ('<input type=hidden name=dirPointer value="on">'."\n");      $r->print ('<input type=hidden name=dirPointer value="on">'."\n");
   
 }  }
   
 1;  1;
 __END__  __END__
   
   
   

Removed from v.1.12  
changed lines
  Added in v.1.13


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