Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions view/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,14 @@ def GET(self,*args):
else:
ShowName = d.nickname
if d.loginfo != d.LID:
g2 = db.query('''select L.ip,L.date from users as U left join login_logs as L on U.loginfo=L.id where U.id="%s"''' % uid)
g2 = db.query('''select L.ip,L.date,L.location from users as U left join login_logs as L on U.loginfo=L.id where U.id="%s"''' % uid)
d = g2[0]
# 这里还可以返回一个异地浏览器登录的提示
Lstat = "other" #上次登录在别的浏览器或者异地、异机
LastIP = d.ip
LastDate = d.date
genSession(uid,Username,ShowName,LastIP,LastDate,token,Lstat,kpl='yes')
LastLocation = d.location
genSession(uid,Username,ShowName,LastIP,LastLocation,LastDate,token,Lstat,kpl='yes')
if HTTP_REFERER:
web.setcookie('HTTP_REFERER', '88888888', -1000)
return web.seeother(HTTP_REFERER)
Expand Down