#!/usr/bin/perl
#
# usage photo.cgi?gallery=GALLERY&photo=PHOTO
#    or photo.cgi?gallery=GALLERY
#
# This now only used by random calls somewhere in the sinister pages
# - not called in the galleries themselves now on ftp.nodata.org
#
# <honey@missprint.org>

require("cgi.pl");
require("sinister.pl");

# Get parameters
&ReadParse;

# Find which msg we're after; do some magic guesswork for spaces
$GALLERY = $in{'gallery'};
$QUERY = $GALLERY;
$PHOTO = $in{'photo'};
if ( $PHOTO ne "") {
  $QUERY .= "/" . $PHOTO . ".html";
}

# Output HTML header
#&HTML_Header;

#print <<EOT

#<script language="JavaScript">
#<!--
#if (top.location != location) {
#    top.location.href = location.href;
#}
#//-->
#</script>

#EOT
#;

# Generate frame - break OUT of frames and then create one
# This now only used by random calls somewhere in the sinister pages
# - not called in the galleries themselves now on ftp.nodata.org
#<frameset rows="100%,*" frameborder=yes border=3 bordercolor="#993399">
#<frame name="home" src="http://wwwp.ph.ed.ac.uk/~mitchell/feelingsinister/$QUERY" noresize>
#</frameset>
#<BODY>
#Shh.. I'm redirecting you to the new home of the Sinister galleries at <A
#HREF="http://www.nodata.org">www.nodata.org</A>...
#</BODY>
print "Content-type: text/html\n\n";
print <<EOT
<HTML>
<HEAD>
<META http-equiv="refresh" content="0; url=/sinister/$QUERY">
</HEAD>
</HTML>

EOT
;

#</html>

#&Sinister_Footer(STDOUT,fromurl);

