#!/bin/sh

PORTAL_DIR=/home/portal/html

cat ${PORTAL_DIR}/header.html

#
# If there is a UI defined text message, use it, otherwise display the
# default.
#
if [ -f /var/welcomescreen.html ]; then
    cat /var/welcomescreen.html
else
    cat ${PORTAL_DIR}/default.html
fi

cat ${PORTAL_DIR}/warning.html

#
# Pass the requested URL to the accept script
#
if [ "x${QUERY_STRING}" = "x" ]; then
	echo '<input type="hidden" name="URL"'
	echo 'value="http://'${HTTP_HOST}${SCRIPT_NAME}'">' ;
else
	echo '<input type="hidden" name="URL"'
	echo 'value="http://'${HTTP_HOST}${SCRIPT_NAME}?${QUERY_STRING}'">' ;
fi

cat ${PORTAL_DIR}/footer.html
