#!/usr/bin/perl # Script Name: Image Indexer # Scripted By: U-L-T-R-A@webtv.net # Copyright © Date: 12-10-02 # Get this script and more at:http://ult-tex.net/scripts/ # Leave in all copyright statements and these 5 lines. # Environment variables. $server = $ENV{'SERVER_NAME'}; $script = $ENV{'SCRIPT_NAME'}; # Enter thumbnail height in pixels. $thumbsize = '100'; # Read in the form input. use CGI qw(param); $file = param('file'); # Read in the files. $dir = `pwd`; @Files = `ls $dir`; print "Content-type: text/html\n\n"; if ($file) { &img_tile; } # Begin the index page. $dirname = `dirname $script`; chomp($dirname); print qq~
\n~;
if ($thumbsize) {
print " WELCOME TO SCRI8E.COM ";
}
print "
NO DIRECT LINKING
Images Always look $thumbsize % more beautiful when Transloaded to your own webspace!
Make something frosty. A name tag, a divider, a bar, a popsickle kid or pet. Animated or still. Split the frames if you are not an animation fan.
\n";
foreach (sort @Files) {
chomp;
&file_size;
if (m/(gif|jpg|jpeg|png|swf)$/i) {
use Image::Size;
($x, $y) = imgsize($_);
if ($thumbsize && $y > $thumbsize) { $ht = $thumbsize; }
else { $ht = $y; }
$x = $x . 'w';
$y = $y . 'h';
print qq~
\n~; }}
print qq~