'spouse':spouse, \ 'apt':apt, \ 'phone':phone, \ 'move_date':move, \ 'caregivers':cares, \ 'children':child, \ 'concerns':cern, \ 'reg_date':today, \ 'paid':False, \ 'expire':expire, \ 'keygive':False, \ 'keyret':False, \ 'agree':agree, \ 'liability':liability} db.append(entry) lib.Param2File(db,lib.playdb) sender = '"Jason Walther" <*****@*****.**>' proxy = '"Westgate PRC" <*****@*****.**>' to = '"%(name)s" <%(email)s>' % {'name':name,'email':email} to = ', '.join([to]+addemail) bcc = proxy subject = 'Westgate Playroom Application' text = 'This is an automated message confirming that you '+ \ 'have successfully completed and submitted the '+ \ 'Westgate Playroom application. \n There are three more steps to complete the process. \n'+ \ 'Step 1. Pay $10 fee on adMIT One through (https://mit.universitytickets.com/w/event.aspx?id=858&p=1) under \'Westgate Playroom Annual Fee\'\n' + \ 'Step 2. Select a date to clean the playroom (https://docs.google.com/spreadsheets/d/1WQS2DQ6uVaqHk9a_hUtPNNgy38UJqUfvwxCXL--Jf34/edit#gid=0)\n' + \ 'Step 3. Send email to Westgate Parent Coordinators ([email protected]) that steps have been completed.\n' + \ 'At completion of steps within 3-5 business days; all MIT ID cards associated with your apt# will be activated for use of playroom. A confirmation email will be sent to you. \n' + \ 'Thank you, \n WEC \n'
<link rel="stylesheet" href="%(css)s" type="text/css"> </head> <body> <div id="main"> <h3> <p class="left"> User Error · <a href="%(form)s">Playroom Application</a> · <a href="%(main)s">Westgate Home</a> </p> <p class="right"><a href="%(table)s">Admin</a></p> <div class="clear"></div> </h3> <hr> Your form submission generated the following errors and warnings. Please go back and try again. %(errors)s <hr> <div class="footer"> Questions or comments? Bugs? Contact the Parents' Resource Coordinators at <a href="mailto:[email protected]">[email protected]</a>. </div> </div> </body> </html> """ % {'css':lib.css,'errors':errors,'main':lib.main,'form':lib.form, \ 'table':lib.table} else: lib.Param2File(dbnew,lib.playdb) lib.Redirect(lib.table)
""" % {'cost':p['cost'],'money_collect_room':lib.money_collect_room,'money_collect_name':lib.money_collect_name}).replace('\n',' ').replace('\r','') sender = lib.emailsender proxy = '"%(admin_name)s" <%(admin_email)s>' % {'admin_email':lib.admin_email,'admin_name':lib.admin_name} to = '"%(name)s" <%(email)s>' % {'name':name,'email':p['email']} bcc = '"%(admin_name)s" <%(admin_email)s>' % {'admin_email':lib.admin_email,'admin_name':lib.admin_name} subject = '%(area)s Reservation Confirmation' % {'area':p['area']} text = \ """The event "%(etitle)s" has been successfully registered. %(paydir)s %(private)s""" % {'etitle':p['etitle'],'paydir':paydir,'private':private} lib.SendMail(sender=sender,proxy=proxy,to=to,bcc=bcc,subject=subject,text=text) if p['free'] and not p['wec']: freedb = lib.File2Param(lib.freedb,'d') uid = lib.GetAttributes('uid') office = lib.Uid2Office(uid) freedb[office] = max(freedb[office]-p['cost']/lib.costperblk,0) lib.Param2File(freedb,lib.freedb) print 'Content-type: text/html' print print \ """ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Registration Successful</title> <link rel="stylesheet" href="%(css)s" type="text/css"> </head> <body> <div id="main"> <h3> Registration Successful · <a href="%(form)s">Reservation Application</a>
#!/usr/bin/python import cgitb;cgitb.enable() import lib,cgi if not lib.IsSecure(): lib.SecureRedirect() else: if not lib.SuperAuth(): print 'Content-type: text/html' print print lib.noauth else: form = cgi.FieldStorage() Get = lambda x:lib.Get(x,form,default='False') credit = lib.File2Param(lib.freedb,'d').copy() for office in lib.officers.keys(): w = Get(office) try: w = int(w) credit[office] = w except: pass lib.Param2File(credit,lib.freedb) lib.Redirect(lib.admin)