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
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
def display(): global lift eel.display(lift)
def displayAverageTeacher(): result, message = db.displayAverageTeacher() eel.display(message, result)
def displayHighest(std): result, message = db.displayHighest(std) eel.display(message, result)
def displayStudent(rollno): result, message = db.displayStudent(rollno) eel.display(message, result)
def crypt(string, key): res = '' for i in range(len(string)): res += chr(ord(string[i]) + key) eel.display('d_text', res)