Exemplo n.º 1
0
    print 'Location: %s' % url
    print
    print '<!DOCTYPE html>'
    print '<html>'
    print '<body>'
    if clone_id > 0:
        print 'Cloned substage %s' % fclname
    else:
        print 'Substage not cloned.'
    print '<br><br>'
    print 'If page does not automatically reload click this <a href=%s>link</a>' % url
    print '</body>'
    print '</html>'


# End of definitions.  Executable code starts here.

if __name__ == "__main__":

    # Parse arguments.

    argdict = dbargs.get()
    qdict = dbargs.extract_qdict(argdict)
    id = 0
    if 'id' in argdict:
        id = int(argdict['id'])

    # Call main procedure.

    main(id, qdict)
Exemplo n.º 2
0
print 'Trying to import pycurl<br>'
try:
    import pycurl
    print 'Import successful.<br>'
except:
    print 'Import failed.<br>'

#
#  Show passed cgi arguments.
#

print '<P>'
print '<FONT SIZE="+3"><B>CGI Arguments</B></FONT>'
print '<P>'

args = dbargs.get()
for k in args:
    print '%s = %s<BR>' % (k, args[k])

#
#  Show passed form data.
#

#print '<P>'
#print '<FONT SIZE="+3"><B>Form Data</B></FONT><BR>'
#print '<P>'

#buf = sys.stdin.readline()
#if '' == buf:
#	print '[None]<BR>'
#else: