示例#1
0
文件: utils.py 项目: zeus911/vpnbot
def in_state(call):
    with AdoptBranch() as bd:
        sign = True
        if not bd.execute(AdoptBranch.in_state(call)):
            sign = False
        print("SSS")
        return sign
示例#2
0
文件: utils.py 项目: zeus911/vpnbot
def in_country(call):
    with AdoptBranch() as bd:
        sign = True
        if not bd.execute(AdoptBranch.in_country(call)):
            sign = False

        return sign
示例#3
0
文件: utils.py 项目: zeus911/vpnbot
def update_status_product(file_name, sign):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.update_status_product(file_name, sign))
示例#4
0
文件: utils.py 项目: zeus911/vpnbot
def our_choice(city):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.our_choice(city))

        return bd.fetchall()
示例#5
0
文件: utils.py 项目: zeus911/vpnbot
def city(state):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.select_city(state))
        return bd.fetchall()
示例#6
0
文件: utils.py 项目: zeus911/vpnbot
def add_user(user_id):
    with AdoptBranch() as cur:
        cur.execute(AdoptBranch.add_user(user_id))
示例#7
0
文件: utils.py 项目: zeus911/vpnbot
def add_pay(token, user_id, file_name, data_req, status):
    with AdoptBranch() as bd:
        bd.execute(
            AdoptBranch.add_pay(token, user_id, file_name, data_req, status))
示例#8
0
文件: utils.py 项目: zeus911/vpnbot
def in_city(call):
    with AdoptBranch() as bd:
        if not bd.execute(AdoptBranch.in_city(call)):
            return 0
        else:
            return 1
示例#9
0
文件: utils.py 项目: zeus911/vpnbot
def select_user_state(user_id):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.select_user_state(user_id))
        return bd.fetchone()[0]
示例#10
0
文件: utils.py 项目: zeus911/vpnbot
def delete_payment(data_req, token):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.delete_payment(data_req, token))
示例#11
0
文件: utils.py 项目: zeus911/vpnbot
def change_user_state(user_id, state):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.update_user_state(user_id, state))
示例#12
0
文件: utils.py 项目: zeus911/vpnbot
def get_all():
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.get_all())
        return bd.fetchall()
示例#13
0
文件: utils.py 项目: zeus911/vpnbot
def get_zip(zip_code):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.get_zip(zip_code))
        return bd.fetchall()
示例#14
0
文件: utils.py 项目: zeus911/vpnbot
def cmp_token(token):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.cmp_token(token))
        return bd.fetchall()
示例#15
0
文件: utils.py 项目: zeus911/vpnbot
def get_login_pass(filename):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.get_login_pass(filename))
        return bd.fetchall()
示例#16
0
文件: utils.py 项目: zeus911/vpnbot
def exist(call):
    with AdoptBranch() as bd:
        if len(bd.exist(call)) == 0:
            return False
        else:
            return True
示例#17
0
文件: utils.py 项目: zeus911/vpnbot
def get_token(user_id):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.get_token(user_id))
        return bd.fetchall()
示例#18
0
文件: utils.py 项目: zeus911/vpnbot
def country():
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.select_country())
        return bd.fetchall()
示例#19
0
文件: utils.py 项目: zeus911/vpnbot
def autorisation(user_id):
    with AdoptBranch() as bd:
        if not bd.execute(AdoptBranch.select_user(user_id)):
            return 0
        return 1
示例#20
0
文件: utils.py 项目: zeus911/vpnbot
def state(country):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.select_state(country))
        print("ASD)")
        return bd.fetchall()
示例#21
0
文件: utils.py 项目: zeus911/vpnbot
def add_payment(call):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.in_zip(call))
示例#22
0
文件: utils.py 项目: zeus911/vpnbot
def get_filename(val):
    with AdoptBranch() as bd:
        bd.execute(AdoptBranch.get_filename(val))
        return bd.fetchone()[0]