#!/usr/bin/env python import os import cgi, string, sys, fcntl import MySQLdb from time import * from random import * # send an email to self/others when enrolments received: import smtplib import mimetypes # send out a confirmation email/with pdf attachment: from email.Utils import formatdate from email.Encoders import encode_base64 from email.MIMEBase import MIMEBase from email.MIMEImage import MIMEImage from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText #from settings import * #view cgi errors through browser in develment stage: import cgitb; cgitb.enable() #or send errors to file #import cgitb; cgitb.enable(display=0,logdir="./tmp") #start printing to screen (form) print "Content-Type: text/html\n\n" #this is the code for the Whitianga conference, Nov 08 def generate_form(timestamp): now=timestamp; print "\n" print "
\n" print "\t