Ejemplo n.º 1
0
 def GET(self):
     web.header('Content-Type', 'text/json; charset=utf-8', unique=True)
     user = session.user
     if user == "None": raise web.seeother('/')
     if user:
         playnum = str(checkusername(user))
         if playnum.isdigit():
             playnum = int(playnum)
             reviseuser(user)
             return luckrandom(user, playnum)
         else:
             return playnum
     else:
         return checkusername(user)
Ejemplo n.º 2
0
 def GET(self):
     web.header('Content-Type', 'text/json; charset=utf-8', unique=True)
     data = web.input()
     user = data.get('user')
     user = str(user)
     #if user == 'None': return '\n\n  User is None!\n\n  Please input the UserName!'
     if user == "None": raise web.seeother('/')
     return checkusername(user)
Ejemplo n.º 3
0
 def GET(self):
     web.header("Content-Type", "text/html; charset=utf-8")
     data = web.input()
     user = data.get('user')
     if user:
         luckynnumber = checkusername(user)
     else:
         pass
         luckynnumber = None
     return renter.index(user, luckynnumber)
Ejemplo n.º 4
0
 def GET(self):
     web.header("Content-Type", "text/html; charset=utf-8")
     ip = web.ctx.ip
     user = session.user
     if user:
         luckynnumber = checkusername(user)
         if len(str(luckynnumber)) > 4:
             a = json.loads(luckynnumber)
             if a['id'] == 'Null':
                 user = None
                 return renter.index(user, luckynnumber)
         return renter.index(user, luckynnumber)
     else:
         user = None
         luckynnumber = None
         return renter.index(user, luckynnumber)
Ejemplo n.º 5
0
 def GET(self):
     web.header('Content-Type', 'text/json; charset=utf-8', unique=True)
     user = session.user
     if user == "None": raise web.seeother('/')
     return checkusername(user)