#!/usr/local/bin/perl
# editkphoto.cgi
#
# This file makes a nice HTML interface to edit the splashpage and
# captions for kphoto.cgi. Symlink or copy it to the same directory
# kphoto.cgi and the images are in, and make sure it can write to "kphoto.info"
# file in the same directory
print "Content-type: text/html\n\n";
chugCGI(*input);
opendir(READ,".");
while($nextfile=readdir(READ)){
if($nextfile =~ /\.(jpg|jpeg|gif)$/i) {
push @pixname, $nextfile;
}
}
closedir READ;
@sortpix = sort @pixname;
readInfo();
if($input{"task"} eq "update"){
foreach $thispix (@sortpix) {
updateInfo("caption:".$thispix);
}
updateInfo("splashpage");
updateInfo("title");
writeInfo();
}
print <<__EOQ__;