def individuals(): """Renders the about page.""" cursor = connsql.initCursor() connsql.updateCoinsIndividual(cursor) return render_template('individuals.html', title='Individual', year=datetime.now().year, message='Your application description page.')
def joinEvents(eventid): cursor = connsql.initCursor() connsql.joinEvent(cursor, eventid, session['individual_id']) if (session['userStatus'] == 'I'): connsql.updateCoinsIndividual(cursor) else: connsql.updateCoinsBusiness(cursor) return redirect(url_for('events'))
def purchase(itemid): cursor = connsql.initCursor() if (session['userStatus'] == 'I'): connsql.purchaseIndiv(cursor, itemid, session['individual_id']) connsql.updateCoinsIndividual(cursor) else: connsql.purchaseBus(cursor, itemid, session['business_id']) connsql.updateCoinsBusiness(cursor) return redirect(url_for('marketplace'))
def events(): cursor = connsql.initCursor() if (session['userStatus'] == 'I'): connsql.updateCoinsIndividual(cursor) else: connsql.updateCoinsBusiness(cursor) cursor.execute("Select * from Events") return render_template('events.html', title='Events', year=datetime.now().year, events=cursor, intohtml=intohtml)