REM
REM Code by John Spikowski
REM Improved May 2010, PvE.
REM

PRINT "Content-type: text/html"
PRINT ""
PRINT "<HTML>"
PRINT "<HEAD>"
PRINT "<TITLE>Echo CGI</TITLE>"
PRINT "</HEAD>"
PRINT "<BODY>"
PRINT "<H1>View CGI Parameters</H1>"
PRINT "This page shows the CGI parameters by submitting to itself."
PRINT "<PRE>"
PRINT ""
PRINT "CGI system variables"
PRINT "--------------------"
PRINT ""
PRINT "ServerSoftware  = ", GETENVIRON$("SERVER_SOFTWARE")
PRINT "ServerName      = ", GETENVIRON$("SERVER_NAME")
PRINT "GatewayInterface= ", GETENVIRON$("GATEWAY_INTERFACE")
PRINT "ServerProtocol  = ", GETENVIRON$("SERVER_PROTOCOL")
PRINT "ServerPort      = ", GETENVIRON$("SERVER_PORT")
PRINT "RequestMethod   = ", GETENVIRON$("REQUEST_METHOD")
PRINT "PathInfo        = ", GETENVIRON$("PATH_INFO")
PRINT "PathTranslated  = ", GETENVIRON$("PATH_TRANSLATED")
PRINT "ScriptName      = ", GETENVIRON$("SCRIPT_NAME")
PRINT "GET QueryString = ", GETENVIRON$("QUERY_STRING")
INPUT POST$
PRINT "POST Form Data  = ", POST$
PRINT "RemoteHost      = ", GETENVIRON$("REMOTE_HOST")
PRINT "RemoteAddress   = ", GETENVIRON$("REMOTE_ADDR")
PRINT "AuthType        = ", GETENVIRON$("AUTH_TYPE")
PRINT "RemoteUser      = ", GETENVIRON$("REMOTE_USER")
PRINT "RemoteIdent     = ", GETENVIRON$("REMOTE_IDENT")
PRINT "ContentType     = ", GETENVIRON$("CONTENT_TYPE")
PRINT "ContentLength   = ", GETENVIRON$("CONTENT_LENGTH")
PRINT "UserAgent       = ", GETENVIRON$("HTTP_USER_AGENT")
PRINT "Cookie          = ", GETENVIRON$("HTTP_COOKIE")
PRINT "Referer         = ", GETENVIRON$("HTTP_REFERER")
PRINT "Password        = ", GETENVIRON$("HTTP_PASSWORD")
PRINT "</PRE>"
PRINT "<TABLE><TR><TD BORDER=0 BGCOLOR='EEEEEE'><PRE>"
PRINT "A simple form to POST parameters:<BR>"
PRINT "<FORM METHOD='POST' ACTION='/cgi-bin/cgi'>"
PRINT "<INPUT TYPE='TEXT' VALUE='DEFAULT TEXT' NAME='TEXT-FIELD'>"
PRINT "<INPUT TYPE='SUBMIT' NAME='SUBMIT-BUTTON' VALUE=' POST '>"
PRINT "</FORM></PRE></TD>"
PRINT "<TD BORDER=1 width='20'>&nbsp;</TD>"
PRINT "<TD BORDER=0 BGCOLOR='EEEEEE'><PRE>"
PRINT "A simple form to GET parameters:<BR>"
PRINT "<FORM METHOD='GET' ACTION='/cgi-bin/cgi'>"
PRINT "<INPUT TYPE='TEXT' VALUE='DEFAULT TEXT' NAME='TEXT-FIELD'>"
PRINT "<INPUT TYPE='SUBMIT' NAME='SUBMIT-BUTTON' VALUE=' GET '>"
PRINT "</FORM></PRE></TD></TR></TABLE>"
PRINT "</BODY></HTML>"