示例#1
0
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.')
示例#2
0
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'))
示例#3
0
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'))
示例#4
0
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)