#!/usr/bin/perl
# --------------------------------- #
# SOPHIAKNOWS #
# --------------------------------- #
# PERL: SLIDESHOW #
# --------------------------------- #
# Created: 2001-12-02 #
# Issued: 2001-12-02 #
# Modified: 2004-12-15 #
# Copyright (c) 2004 #
# A.R. Pisarra, SophiaKnows #
# --------------------------------- #
# --------------------------------- #
# IMAGE SRC LIST
@ImageList = (
"images/img1.jpg",
"images/img2.jpg",
"images/img3.jpg",
"images/img4.jpg",
"images/img5.jpg",
"images/img6.jpg"
);
# LABEL LIST
@LabelList = (
"Label 1",
"Label 2",
"Label 3",
"Label 4",
"Label 5",
"Label 6"
);
# INCLUDE/INVOKE PARSEFORM
require "parseform.pl";
&ParseForm;
# INITIALIZE COUNTER
$indexno=(($formdata{'indexno'})?$formdata{'indexno'}:0);
# SET BACK INDEX
$backindex=(($indexno>0)?($indexno-1):($#ImageList-1);
# SET NEXT INDEX
$nextindex=(($indexno<($#ImageList-1))?($indexno+1):0);
# PRINT PAGE
print "Content-type: text/html\n\n";
print "<title>PHP Page</title>\n";
print "<body>\n";
print "<p align=center>\n";
print "<a href=?indexno=$backindex>< BACK</a>\n";
print " | \n";
print "<a href=?indexno=$nextindex>NEXT ></a>\n";
print "</p>\n";
print "<p align=center><img src=\"<".$ImageList[$indexno]."\" border=0></p>\n";
print "<p align=center>".$LabelList[$indexno]."</p>\n";
print "</body>\n";