# Path: config/setting.py



import web
import hashlib
import os
from config import setting
from datetime import datetime
#encoding=utf-8
# /login

config = setting.config
salt = config["salt"]
db = setting.db

def sha1(str):
    m = hashlib.sha1()
    m.update(str)
    return m.hexdigest()


# Path: config/setting.py



# Path: util/login.py
import web
import hashlib
import os
from config import setting
from datetime import datetime

#encoding=utf-8
# /login

config = setting.config
salt = config["salt"]
db = setting.db

def sha1(str):
    m = hashlib.sha1()
    m.update(str)
    return m.hexdigest()


def get_user(id):