Apache-UploadSvr

 view release on metacpan or  search on metacpan

lib/Apache/UploadSvr/Directory.pm  view on Meta::CPAN

package Apache::UploadSvr::Directory;

use Apache::Constants qw(OK DECLINED AUTH_REQUIRED SERVER_ERROR);
use Apache::UploadSvr;
use CGI;
use Data::Dumper;
use DirHandle;
use File::Basename qw(basename dirname);
use File::Path;
use Image::Magick;
use IO::File;
use strict;
use vars qw( $VERSION @ISA );

$VERSION = sprintf "%d.%03d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/;

@ISA = qw(Apache::UploadSvr); # secure_transaction, dict

sub new {
  my($class,%arg) = @_;

lib/Apache/UploadSvr/Directory.pm  view on Meta::CPAN

    next if "/$dirent/" =~ m| $stage |ox; # don't show the STAGE
    next unless -e "$directory/$dirent";
    # warn "dirent[$dirent]";
    $cache->{$dirent}{seen} = undef; # we check with exists only
    push @dirlisting, $dirent;
    my($display_as,$href,$size,$mtime,$localtime,$imgsize,$pic,$line);
#### STAT ####
    stat "$directory/$dirent";
    $mtime = (stat _)[9];
    $display_as = $dirent; # speak for yourself
    my $imq = Image::Magick->new;
    if (ref($cache) && $cache->{$dirent}{mtime} == $mtime) {
      $line = $cache->{$dirent}{line};
      # I believe, we do not need to check if the thumbnail's still there
    } else {
      if (-d _) {
	$href = "$dirent/...";
	$size = "-";
	$localtime = "-";
	$imgsize = qq{<A HREF="$href"><IMG BORDER=0 SRC="/icons/dir.gif"
 WIDTH=20 HEIGHT=22></A>};

perl-conf-1998/k07.html  view on Meta::CPAN

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title></title>
</head>
<body BGCOLOR=#ffffff>
<FONT SIZE="7">
<HR>
<A HREF="k06.html"><IMG SRC="leftarrow.png" ALIGN=RIGHT BORDER=0></A>
<H1>Directory Viewer</H1>
<UL>
<LI> Image::Magick for graphics
<li> Authentication via Files section in httpd.conf
    <pre>
 &lt;Files "..."&gt;
 PerlSetVar DirCache .dircache
 SetHandler perl-script
 PerlHandler Apache::UploadSvr::Directory
 AuthName stadtplandienst
 AuthType Basic
 PerlAuthenHandler Apache::AuthenDBI
 require valid-user



( run in 0.443 second using v1.01-cache-2.11-cpan-beeb90c9504 )