def GET(self): if not isAdmin(session.user): raise web.seeother('/admin_login') data = web.input() if 'page' in data and 'title' in data and 'code' in data: process_edit_page(data) raise web.seeother('/course_control') edit_page = edit_page_form(data['page']) return render.edit_page(edit_page, data['page'])
def GET(self): if not isAdmin(session.user): raise web.seeother('/admin') data = web.input() if 'page' in data and 'title' in data and 'code' in data: make_new_page(data) raise web.seeother('/course_control') new_page = new_page_form() return render.new_page(new_page, data['page'])
def GET(self): data = web.input() if 'session' in data: session_id = data['session'] session_file = join('..', 'login', 'SSL', 'sessions', session_id) if exists(session_file): f = open(session_file, 'r') text = f.read().split('\n') username = text[0] t = int(text[1]) print "trying to make session with username: "******" time: ", t print "current time: ", int(time() * 1000) if abs(time() * 1000 - t + (60 * 1000)) < 600000: session.user = username raise web.seeother('/magic?page=/summary')
def GET(self): data = web.input() print "%s is trying to access %s" % (session.user, data['page']) return render.magic(data['page'])