Пример #1
0
def login(inp):

    users_ref = db.collection(u'users')
    docs = users_ref.stream()
    print("Firebaseを参照にパスワードとなるkeyを入力してください:")
    for doc in docs:
        # print(u'{} => {}'.format(doc.id, doc.to_dict()))
        # print(doc.to_dict().values())
        for mykey in doc.to_dict().values():
            # print(mykey)
            while (True):
                # inp = input()
                if inp != mykey:
                    print('パスワードが違います。再度入力してください。')
                    eel.undisplay()
                    eel.write("{}はいません.再度入力してください".format(inp))
                    break

                else:
                    print('ログイン成功')
                    eel.display()
                    eel.write("Hello {} ! ログイン成功".format(inp))

                    time.sleep(1)
                    # 何かしらの関数
                    # print(myprint(inp))

                    break
Пример #2
0
def display(name):
    """
    This function takes company name from front end and send back result as well as message to front end
    
    """
    result, message = db.display(name)  # call display function

    eel.display(message, result)  #send result as well as message to front end
Пример #3
0
def display():
    global lift
    eel.display(lift)
Пример #4
0
def displayAverageTeacher():
    result, message = db.displayAverageTeacher()

    eel.display(message, result)
Пример #5
0
def displayHighest(std):
    result, message = db.displayHighest(std)

    eel.display(message, result)
Пример #6
0
def displayStudent(rollno):
    result, message = db.displayStudent(rollno)

    eel.display(message, result)
Пример #7
0
def crypt(string, key):
    res = ''
    for i in range(len(string)):
        res += chr(ord(string[i]) + key)
    eel.display('d_text', res)