#!/bin/sh

echo Content-type: text/html
echo

echo '<HTML>'

cat htmlhead.txt

echo '<BODY BGCOLOR="#FFFFFF" BACKGROUND="http://www.imagerie.com/clips/wirebind.gif">'
echo '<DL><DT><DD><DL><DT><DD>'

echo '<CENTER><H1>Previously On The Pad... im'$1'.gif</H1></CENTER>'

# insert dateline here

# generate sketch tag here with 'date' command
echo '<IMG SRC=im'$1'.gif ALT="Sketch '$1'" ALIGN=LEFT>'

# caption here beside the sketch
cat cp$1.txt

cat ~apthmpsn/public_html/sitemap.txt

echo '<CENTER><H2>Other Recent Sketches</H2></CENTER>'

# we'll keep the thumbnail history so visitor doesn't have to
# jump back to the main sketch each time

ls -1r imag* | cut -c5-8 > ~apthmpsn/public_html/scratch/dates
date +%m%d | xargs awk -f before ~apthmpsn/public_html/scratch/dates | xargs sh history
rm ~apthmpsn/public_html/scratch/dates


# previous months' links here
echo '<HR>'
cat archive.txt

# we'll arrange the credits here
# can't simply 'cat' them in
# need to generate current date
sh ~apthmpsn/public_html/credit

echo '</DL></DL>'
echo '</BODY>'
echo '</HTML>'
