#! /usr/local/bin/perl # modify above line for your system # frezfram.cgi - by David Efflandt - efflandt@xnet.com 9/11/95 [9/24/95] # # Displays series of images listed in separate file using form push buttons. # Call the script by link or URL. # # Usage: frezfram.cgi?img_list[[+heightt]+width] # Example: frezfram.cgi?foo+50+75 # # Prefix CGI filname with URL_path/ if necessary. # 'img_list' is the filename of the list of images to display (may be same list used for 'pushin.cgi') # 'height', 'width' in pixels [optional, but 'height' (0 for none) req'd for 'width'] # # img_list format per line: $file [$pause] # # img_list and $file: should be in $path defined below. # $pause: is optional and ignored (so server push list may be used). # # foo.gif 3 # displays foo.gif (pause ignored) ### # path/ or /full_path_from_root/ for img_list and images $path = 'img/'; # <--- change to point your image path ### You should not have to change anything below this line ### # Print out a content-type and title print "Content-type: text/html\n\n"; print "
";
$FORM{$name} = $value;
}
# Current image from form (hidden)
if ($FORM{'img'}) {
$x = $FORM{'img'}
} else {
$x = 0;
}
# Do button press
$x += 1 if ($FORM{'next'});
$x -= 1 if ($FORM{'prev'});
$x = 0 if (($x < 0) || $FORM{'first'});
open(IN, $filein) || warn "Can't open image list $filein: $!\n";
$y = 0;
while((($x >= $y) || ($FORM{'last'})) && ($item =
';
print "\n\n";