def button_home():
     top.destroy()
     nhome.vp_start_gui1(name, mem, email)
Exemple #2
0
def back(name, mem, email, top):  #if home button is clicked
    top.destroy()
    nhome.vp_start_gui1(name, mem, email)
def back(name, mem, email, top):
    top.destroy()
    nhome.vp_start_gui1(name, mem, email)
 def on_click_home():
     print(f'from final {name} {mem} {email}')
     top.destroy()
     nhome.vp_start_gui1(name, mem, email)
Exemple #5
0
def sub(window, l, slotid, name, mem, email, timing, tdate, cinemaNAd
        ):  #fucntion called when user clicks on payment after selecting seats
    global fin, cosm, dcost
    flag = 0
    chkM = 1
    if (len(fin) == 0):  #check if user has selected any seats
        messagebox.showerror("Error",
                             "No Seats selected")  #if not display error
    else:
        if (l[5] == 'A'):  #check if user selected movie is an adult movie
            age = quera(email)  #if yes check age of the user
            print(age)
            if (
                    age < 18
            ):  #if age is less than 18 dont allow the user to book the ticket
                chkM = 0
                messagebox.showerror(
                    "Error", "Adult Movie and your age is Less than 18")
                window.destroy()
                nhome.vp_start_gui1(name, mem,
                                    email)  #send user back to home page
            elif (age > 18 and len(fin) >
                  1):  #if user is above 18 but is booking more than one ticket
                messagebox.showinfo(
                    "Adult Movie",
                    "You are booking an adult movie so please ensure all the Pals with you are 18+\nAnd do carry Age Proofs of all the peoples"
                )
        if (chkM == 1):
            for i in fin:
                if (i[1] == 'v'
                    ):  #convert user selected seats from valid to occupied
                    i[1] = 'o'
                    flag = 1
    if flag == 1:  #check if the age criteria is satisfied
        sts = ''
        for i in range(len(fin)):
            if i == 0:
                sts += str(fin[i][2])
            else:
                sts += "," + str(fin[i][2])
        #st="Seats Booked successfully\n Seat number : "+sts
        #messagebox.showinfo("Sucess", st)
        print(name, mem, email, timing, tdate, str(cosm), str(dcost), sts,
              cinemaNAd)
        #return(name, mem, email, timing, tdate, str(cosm), str(dcost), sts, cinemaNAd)
        tickets = 'Tickets'
        dbv = []
        for i in fin:

            i.insert(2, slotid)
            i = i[:-1]
            dbv.append(i)
        print(f'{dbv} check')
        prod = [
            tickets,
            str(dcost), timing, tdate,
            str(cosm), sts, cinemaNAd, dbv
        ]
        action = 2

        window.destroy()

        payment.vp_start_gui_P(name, mem, prod, email,
                               action)  #display payment page
Exemple #6
0
def backh(window, name, mem, email):
    window.destroy()
    nhome.vp_start_gui1(name, mem, email)