#python

files_dir = consts.FILES_DIR

lib.prn("files_dir", files_dir)

site = params
lib.prn("site", site)

DATA = consts.DATA
file = DATA + "/sites/" + site + "/submission_types"
types = lib.get_types(file, site)
lib.prn("types", types)

list = []
for type in types:
	list.append(type[1])
lib.set_files(list)

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

<h4>Your Submission</h4>

<form action="ming.cgi" method=post>

<h4>Your Name</h4>

Enter your name here.

<p><input type="text" maxlength="128" name="name" size="48" value="">

<h4>Your Email</h4>

We use this to contact you if we wish to read the rest of your work.

<p><input type="text" maxlength="128" name="email" size="48" value="">

<h4>Your Work\'s Title</h4>

If we don\'t choose your work, your title and today\'s date will
be listed in the site\'s "Not Chosen" page.

<p><input type="text" maxlength="128" name="title" size="48" value="">

<h4>Submission Type</h4>

Choose the type of submission you are making.

<p><select name="file">
''')
for type in types:
	write("<option value=\"%s\">%s" % (type[1], type[0]))

write('''

</select>

<h4>Your Submission</h4>

Paste in the beginning of your work; length limited to about three
manuscript pages.  Paste in only text.

<p><textarea cols="80" name="text" rows="90" wrap="soft">

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

When you are finished, and you are sure that the above form is filled out correctly,
<input type="hidden" name="incoming" value="token">
<input type="hidden" name="params" value="%s">
<input type="hidden" name="page" value="private/submissions/thanks/thanks">
<input type="submit" name="submit" value="submit.">
</form>

</td></tr></table>
''' % site)

