def admin_sign_in():
    try:
        id = input("\nEnter Admin ID : ")
    except:
        print("Invalid ID")
        return

    password = input("\nEnter Password : "******"Wrong ID or Password")
        print("Attempts Remaining : ",count)
        try:
            id = int(input("Enter Admin ID\n"))
        except:
            print("Invalid ID")
            return
        password = input("Enter Password\n")
        res = database.login_admin(id,password)
        count = count-1

    if res == True:
        print("Login Successful")
        ch = 1
        while ch != 0:
            print("\n --- Menu --- ")
            print("1. Print Closed Accounts History")
            print("2. FD report of a customer")
            print("3. FD report of a customer vis-a-vis another customer")
            print("4. FD report w.r.t a particular FD amount")
            print("5. Loan report of a customer")
            print("6. Loan report of a customer vis-a-vis another customer")
            print("7. Loan report w.r.t a particular loan amount")
            print("8. Loan - FD report of customers")
            print("9. Report of customers who are yet to avail a loan")
            print("10. Report of customers who are yet to open an FD account")
            print("11. Report of customers who neither have a loan nor an FD account with the bank")
            print("0. Admin Log Out")

            try:
                ch = int(input())
            except:
                print("Invalid Choice")
                ch = 1
                continue

            if ch == 1:
                admin_menu.print_closed_acc_history()
            elif ch == 2:
                admin_menu.print_fd_report()
            elif ch == 3:
                admin_menu.print_fd_report_vis_customer()
            elif ch == 4:
                admin_menu.print_fd_report_wrt_amount()
            elif ch == 5:
                admin_menu.print_loan_report()
            elif ch == 6:
                admin_menu.print_loan_report_vis_customer()
            elif ch == 7:
                admin_menu.print_loan_report_wrt_amount()
            elif ch == 8:
                admin_menu.print_loan_fd_report()
            elif ch == 9:
                admin_menu.print_report_no_loan()
            elif ch == 10:
                admin_menu.print_report_no_fd()
            elif ch == 11:
                admin_menu.print_report_no_fd_loan()
            elif ch == 0:
                print("Logged Out Successfully")
            else:
                print("Invalid Choice")

    else:
        print("Sorry all Attempts Finished")
def admin_sign_in():
    try:
        id = input("\nEnter Admin ID : ")
    except:
        print("Invalid ID")
        return

    password = input("\nEnter Password : "******"Wrong ID or Password")
        try:
            id = int(input("Enter Admin ID\n"))
        except:
            print("Invalid ID")
            return
        password = input("Enter Password\n")
        res = database.login_admin(id, password)

    if res == True:
        print("Login Successful")
        ch = 1
        while ch != 0:
            print("\n --- Menu --- ")
            print("1. All Books")
            print("2. Available Books")
            print("3. Add Book")
            print("4. Remove Book")
            print("5. All Customers")
            print("6. Remove Customer")
            print("7. Check Issue History")
            print("0. Admin Log Out")

            try:
                ch = int(input())
            except:
                print("Invalid Choice")
                ch = 1
                continue

            if ch == 1:
                database.all_books()
            elif ch == 2:
                database.avail_book()
            elif ch == 3:
                admin_menu.add_book()
            elif ch == 4:
                admin_menu.remove_book()
            elif ch == 5:
                admin_menu.all_customers()
            elif ch == 6:
                admin_menu.remove_customer()
            elif ch == 7:
                admin_menu.check_history()
            elif ch == 0:
                print("Logged Out Successfully")
            else:
                print("Invalid Choice")

    else:
        print("Sorry all Attempts Finished")