Вы находитесь на странице: 1из 3

# -*- coding: utf-8 -*-

"""
Created on Mon Jan 27 15:54:12 2020

@author: security services


"""

###################################################################################
#######
e=["abc@gmail.com"]
p=["abc123"]
from PIL import Image,ImageTk
from tkinter import*
from tkinter import *
rootm=Tk()
Label(rootm,text="LOGIN PANEL",font=3).pack()
rootm.geometry("300x150")
var1=StringVar()
var2=StringVar()
def show():
global e
global p
e=["abc@gmail.com"]
p=["abc123"]
global us
us=var1.get()
global ps
ps=var2.get()
if( us in e):
ind=e.index(us)
pws=p[ind]
if(pws==ps):
root=Tk()
root.geometry("450x600")
root.title("Enquery Form")
root.configure(background="light yellow")
Label(root,text="ENQUIRY FORM",fg="black",
font=("Times", "24","bold italic"),relief="solid").place(x=100,y=30)

###########################################################################
Label(root,text="NAME FULL",font=2,bg="light
yellow",relief="solid").place(x=50,y=150)
Label(root,text="MOBILE ",font=2,bg="light
yellow",relief="solid").place(x=50,y=190)
Label(root,text="Email ID ",font=2,bg="light
yellow",relief="solid").place(x=50,y=230)
Label(root,text="VISITOR",font=2,bg="light
yellow",relief="solid").place(x=50,y=270)
Label(root,text="DESTINATION",font=2,bg="light
yellow",relief="solid").place(x=50,y=310)
Label(root,text="GALLERY",font=2,bg="light
yellow",relief="solid").place(x=50,y=350)
###########################################################################
n=StringVar()
m=StringVar()
e=StringVar()
v=StringVar()
Entry(root,textvariable=n,insertwidth=10).place(x=220,y=150)
Entry(root,textvariable=m,insertwidth=10).place(x=220,y=190)
Entry(root,textvariable=e,insertwidth=10).place(x=220,y=230)
Entry(root,textvariable=n,insertwidth=10).place(x=220,y=270)

var=StringVar()
var.set("LOCATION")
OptionMenu(root,var,"Canada","USA").place(x=220,y=310)

######################Button gallry#############################
def gal_btn():
master=Tk()
master.title("PHOT GALLERY")
master.geometry("200x200")
Label(master,text="PHOTO GALLERY").pack()
Label(master,text="LOCATION").place(x=20,y=60)
def can():
from PIL import Image
im=Image.open(r"E:\can.jpg")
im.show()
def us():
from PIL import Image,ImageTk
from tkinter import Tk
master1=Tk()
pho=Image.open(r"D:\li.jpg")
img=ImageTk.PhotoImage(pho)
Label(master1,image=img).pack()
master1.mainloop()
Button(master,text="Canada",command=can).place(x=100,y=60)
Label(master,text="LOCATION").place(x=20,y=90)
Button(master,text="USA",command=us).place(x=100,y=90)

Button(master,text="exit",fg="red",command=master.destroy).place(x=70,y=140)
master.mainloop()
###################################################################################
##

Button(root,
text="PICTURE",fg="black",relief="solid",command=gal_btn).place(x=220, y=350)

def submit():
#import pymysql
#conn=pymysql.connect("localhost","root","","data")
#cur=conn.cursor()
#cur.execute("insert into en('name','mob','email','ves','des')
values(%s,%s,%s,%s,%s)",())
pass

Button(root,
text="Submit",fg="black",relief="solid",font=5).place(x=140, y=500)
Button(root,
text="Exit",fg="black",relief="solid",font=5,command=root.destroy).place(x=240,
y=500)

root.mainloop()
else:
r2=Tk()
Label(r2,text="INVALID PASSWORD").pack()
r2.mainloop()
else:
r3=Tk()
Label(r3,text="Inavlid email").pack()
r3.mainloop()

Label(rootm,text="user Id").place(x=20,y=50)
Label(rootm,text="password").place(x=20,y=90)
Entry(rootm,textvariable=var1).place(x=80,y=50)
Entry(rootm,textvariable=var2).place(x=80,y=90)

Button(rootm,text="submit",command=show).place(x=40,y=120)
Button(rootm,text="exit",command=rootm.destroy).place(x=90,y=120)
rootm.mainloop()

Вам также может понравиться