--- /dev/null
+# -*- perl -*-
+#
+
+$do_dirs = 0;
+$do_slide = 1;
+$do_detail = 0;
+$do_emoticons = 0;
+$details_linkto = 'slide';
+$default_columns = 4;
+$detailshrink = 1;
+$default_titletext = "";
+
+$framedateformat = "%F";
+$frametimeformat = "%R";
+$indexdateformat = "%F";
+$indextimeformat = "%R";
+$slidedateformat = "%F";
+$slidetimeformat = "%R";
+$detaildateformat = "%F";
+$detailtimeformat = "%R";
+$emptycell = "";
+undef $framelinktext;
+
+undef &page_footer;
+undef &page_header;
+
+sub tfheen_page_header {
+ my $this = shift(@_);
+ my $linkto = shift(@_);
+ my $numlink = 0;
+ my $verstring;
+
+ select(INDEX);
+ print qq[<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN
+ "http://www.w3.org/TR/html401/strict.dtd">
+ <HTML>
+ <HEAD>
+ ];
+ $verstring = &versionstring();
+ print qq[<META NAME="GENERATOR" CONTENT="imageindex $verstring">];
+
+ if (defined ($write_meta_tag{$titlemetatag})) {
+ print qq[<META NAME="$titlemetatag" CONTENT="$current_titletext">\n];
+ }
+ if (defined ($write_meta_tag{$columnsmetatag})) {
+ print qq[<META NAME="$columnsmetatag" CONTENT="$current_columns">\n];
+ }
+ if (defined ($write_meta_tag{$thumbxmetatag})) {
+ print qq[<META NAME="$thumbxmetatag" CONTENT="$current_thumbnail_x">\n];
+ }
+ if (defined ($write_meta_tag{$thumbymetatag})) {
+ print qq[<META NAME="$thumbymetatag" CONTENT="$current_thumbnail_y">\n];
+ }
+ if (defined ($write_meta_tag{$reversemetatag})) {
+ print qq[<META NAME="$reversemetatag" CONTENT="$current_reverse">\n];
+ }
+ if (defined($firstdate)) {
+ print qq[<META NAME="$begindatemetatag" CONTENT="$firstdate">\n];
+ }
+ if (defined($lastdate)) {
+ print qq[<META NAME="$enddatemetatag" CONTENT="$lastdate">\n];
+ }
+ if (!defined ($opt_includeall) && defined (@opt_exclude) && scalar (@opt_exclude)) {
+ my $tmp = join (',', @opt_exclude);
+ my $etmp;
+
+ # We need to "encode" this string in the HTML so that raw filenames
+ # (that people should not try to access) are not exposed to the
+ # outside world.
+ #
+ printf qq[<META NAME="$excludemetatag" CONTENT="%s">\n],
+ encodestring($tmp);
+ }
+ printf qq[<META NAME="$numimagesmetatag" CONTENT="%d">\n], $::image_counter;
+
+ if (defined (@opt_skipmont) && scalar (@opt_skipmont)) {
+ printf qq[<META NAME="$skipmetatag" CONTENT="%s">\n],
+ join(',', @opt_skipmont);
+ }
+ print qq[<TITLE>$current_titletext</TITLE>\n];
+ if (defined $existingstylefile) {
+ print qq[<LINK TYPE="text/css" REL="stylesheet"
+ HREF="$existingstylefile">\n];
+ } else {
+ print qq[<LINK TYPE="text/css" REL="stylesheet" HREF="$stylefile">\n];
+ }
+
+ print "</HEAD>\n";
+ print "<BODY>\n";
+
+ # Break out of frames
+ print qq[<SCRIPT TYPE="text/javascript">
+ if (parent.frames.length > 0) {
+ parent.location.href = self.document.location
+ }
+ </SCRIPT>\n];;
+
+ print qq[<H1 CLASS="title">$current_titletext</H1>\n];
+
+ print "<H3>";
+
+ # On all these links, check to see if the variable is also defined. If
+ # not (done in a .imageindexrc file perhaps) then skip the link
+ if ((-e "$destdir/../$indexfile") and
+ ($do_dirs == 1) and defined($updirtext)) {
+ print qq[<A HREF="../$indexfile">$updirtext</A>];
+ $numlink++;
+ }
+
+ if (($do_slide == 1) and ($slide_counter > 1) and
+ defined($framelinktext)) {
+ print " | " if ($numlink != 0);
+ print qq[<A HREF="$slide_dir/$framefile">$framelinktext</A>];
+ $numlink++;
+ }
+
+ if (($do_detail == 1) and ($this eq 'index') and
+ defined($detaillinktext)) {
+ print " | " if ($numlink != 0);
+ print qq[<A HREF="$detailfile">$detaillinktext</A>];
+ $numlink++;
+ }
+
+ if (($this eq 'detail') and defined($indexlinktext)) {
+ print " | " if ($numlink != 0);
+ print qq[<A HREF="$indexfile">$indexlinktext</A>];
+ $numlink++;
+ }
+
+ print "\n<BR>\n" if ($numlink != 0);
+
+ print "</H3>\n";
+
+ if (defined($firstdate) and defined($lastdate)) {
+
+ my $tmp1 = &format_date($firstdate, $this, 'dayonly');
+ my $tmp2 = &format_date($lastdate, $this, 'dayonly');
+
+ if ($tmp1 ne $tmp2) {
+ if ($current_reverse == 0) {
+ print qq[<H2 CLASS="daterange">$tmp1 - $tmp2</H2>\n];
+ } else {
+ print qq[<H2 CLASS="daterange">$tmp2 - $tmp1</H2>\n];
+ }
+ } else {
+ print qq[<H2 CLASS="daterange">$tmp1</H2>\n];
+ }
+ }
+
+ print qq[<TABLE WIDTH="100%" CLASS="index">\n];
+
+ select(STDOUT);
+
+}
+
+
+sub tfheen_page_footer {
+
+ my $time = localtime(time);
+
+ select(INDEX);
+
+ print "</TABLE>\n";
+ print "</BODY>\n</HTML>\n";
+
+ select(STDOUT);
+}
+*page_footer = \&tfheen_page_footer;
+*page_header = \&tfheen_page_header;
+
+1;