/usr/pkg/bin/bash

PATH=$PATH:/udd/t/torquiz/bin

. funcs
. ci-funcs
#. cgi-funcs

typeheader()
{
    echo -e "Content-type: text/html\n"
}

dtd()
{
    echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'
}

style()
{
    echo "  <meta http-equiv = \"Content-Style-Type\" content = \"text/css\">"

    if [ "$cssfile" ]
    then
	echo "  <link href = \"$cssfile\" rel = \"stylesheet\" type = \"text/css\">"
    fi

    if [ "$style" ]
    then
	echo -e "  <style>\n   <!--"
	echo -e "$style"
	echo -e "   -->\n  </style>"
    fi
}

meta()
{
    if [ "$metastuff" ]
    then
	echo "$metastuff"
    fi
}

head()
{
    dtd
    echo "<html>"
    echo -e " <head>"
    meta
    if [ "$title" ]
    then
	echo "  <title>$title</title>"
    fi
    style
    echo " </head>"
}

cgihead()
{
    typeheader
    head
}

top()
{
    if [ "$bodyclass" ]
    then
	echo " <body class=\"$bodyclass\" >"
    else
	echo " <body>"
    fi
    echo -e  "  <a name=\"top\"></a>\n    <center>"
    echo "    <table cellpadding=6><tr><td bgcolor=\"maroon\">
    <table cellpadding=18><tr><td bgcolor=lightyellow>
    <img src=\"ci.GIF\" alt=\"\" width=\"66\" height=\"66\" align=\"left\">
    <h2>$title</h2>
"

}

footer()
{
	echo " </table></table></table>
Updated `date`
</body></html>"

}

TZ="EST5EDT"
export TZ 

title="Style sheets" 
cssfile="ci.css"
usedate=""

cgihead
#top
echo "<BODY>

<h2>Style sheets</h2>
<p>
Here is a week's schedule as rendered by your browser
(you are using 
${HTTP_USER_AGENT}
</p>"

cat stylesheets.html



