#!/usr/bin/perl # The URL to the script $cgi_url='http://www.ladysheryll.com/showwedding'; # The URL to the images $image_url='http://www.ladysheryll.com/showwedding/images'; # The path to the images $image_path='./images'; #---------------------------------------------- # DON'T CHANGE ANYTHING BELLOW THIS LINE!!! #---------------------------------------------- require "showhtml.pl"; &parse_query; opendir (DATA, "$image_path"); @filenames = grep (!/^\.\.?$/, readdir (DATA)); closedir (DATA); $image_name = $filenames[$query{'nr'}]; $nextnr = $query{'nr'} + 1; $prevnr = $query{'nr'} - 1; $nextnr = 0 if($nextnr > @filenames-1); $prevnr = @filenames-1 if($prevnr < 0); &html_main; sub parse_query { @pairs = split(/&/, $ENV{'QUERY_STRING'}); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $query{$name} = $value; } }