#!/bin/sh
echo "Content-type: text/html"
echo

UPLOAD_DIR="/www/upload/files"
URL_PATH="/upload/files"

echo "<html><body>"
echo "<p><a href=\"/index.html\"><img src=\"/gohome.png\" border=\"0\"></a></p>"
echo "<h1>File collection</h1>"
echo "</p>"

cd $UPLOAD_DIR
for f in *
do
echo "<a href=\"$URL_PATH/$f\"><img src=\"$URL_PATH/$f\" alt=\"$f\" width=\"100\" border=\"0\" style=\"margin:3em;\"/></a>"
done

echo "</p>"

echo "<p><a href=\"/index.html\"><img src=\"/gohome.png\" border=\"0\"></a></p>"
echo "</body></html>"
