#python

import os, sys

# note that thr33 debug does not carry into pypage execution
debug = 0

def cgi_init():
	"""
	assumes 'data' and 'cgi-bin' are peer directories
	"""
	global l, c, files_dir, SCRIPT
	current = sys.path[0]
	consts = current.split(os.sep)
	consts = os.sep.join(consts[:consts.index("data")])+os.sep+"cgi-bin"+os.sep+"TheMingServer"
	sys.path.append(consts)

	import Lib3
	l = Lib3.Lib3(debug)
	import Constants
	c = Constants.Constants()
	files_dir = c.FILES_DIR
	SCRIPT = c.CGI_NAME
	return

cgi_init()
l.prn("FILES_DIR",files_dir)

l.set_files(["gq.response"])

print '''
<center>
<table width="75%%"><tr><td>

<h4>Speak Up</h4>

Suggestions taken.  Questions answered.  Criticism welcomed.

<form action="%s" method=post>

<h4>Your Name</h4>
<input type="text" maxlength="128" name="author" size="48" value="">

<h4>Your Comment</h4>
Title: <input type="text" maxlength="128" name="title" size="48" value="">
<p>(Length limited to about one manuscript page.)</p>
<p><textarea cols="80" name="comment_text" rows="20" wrap="soft">

</textarea>
<hr>
<h4>Submit</h4>

When you are finished, submit your comment
<input type="hidden" name="incoming" value="token">
<input type="hidden" name="file" value="gq.response">
<input type="hidden" name="page" value="sites/ming-cgi/server/open/response/result">
<input type="submit" name="submit" value="here.">
</form>

</td></tr></table>

''' % SCRIPT
