-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUser_Choices.py
300 lines (247 loc) · 10.6 KB
/
User_Choices.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
import mysql.connector
from PIL import Image
import webbrowser
import urllib
import urllib.parse
from tkinter import *
from tkinter import ttk
from PIL import Image,ImageTk
import pyfiglet
def Meditation():
url2='https://www.nccih.nih.gov/health/meditation-in-depth'
webbrowser.open(url2)
#Meditation()
def User_Diseases():
conn=mysql.connector.connect(host="localhost",user="root",password="tiger",database="project")
cur=conn.cursor()
n=0
while True:
q="select Sno,diseases from diseases"
cur.execute(q)
for i in cur:
print("\t\t\t",i[0],".",i[1].upper())
print("\t\t\t 6 . EXIT")
print("*"*100)
ch=int(input("ENTER THE CHOICE \t\t:\t"))
print("*"*100)
if ch==1:
query="SELECT symptoms from diseases where diseases= 'Asthma'"
cur.execute(query)
rec=cur.fetchone()
m1=rec[0]
print("1.SYMPTOMS OF A DISEASE \t:\t",m1)
query="SELECT yoga_asanas from diseases where diseases= 'Asthma'"
cur.execute(query)
rec=cur.fetchone()
m2=rec[0]
print("2.YOGA ASANA \t\t\t:\t",m2)
query="SELECT diet_offered from diseases where diseases= 'Asthma'"
cur.execute(query)
rec=cur.fetchone()
m3=rec[0]
print("3.DIET REQUIRED FOR A DISEASE \t:\t",m3)
F=Image.open("Uttanasana.jpg" )
F.show()
print("*"*100)
if ch==2:
query="SELECT symptoms from diseases where diseases= 'Arthritis'"
cur.execute(query)
rec=cur.fetchone()
m1=rec[0]
print("1.SYMPTOMS OF A DISEASE \t:\t",m1)
query="SELECT yoga_asanas from diseases where diseases= 'Arthritis'"
cur.execute(query)
rec=cur.fetchone()
m2=rec[0]
print("2.YOGA ASANA \t\t\t:\t",m2)
query="SELECT diet_offered from diseases where diseases= 'Arthritis'"
cur.execute(query)
rec=cur.fetchone()
m3=rec[0]
print("3.DIET REQUIRED FOR A DISEASE \t:\t",m3)
F=Image.open("Vrikshasana.png" )
F.show()
print("*"*100)
if ch==3:
query="SELECT symptoms from diseases where diseases= 'Thyroid'"
cur.execute(query)
rec=cur.fetchone()
m1=rec[0]
print("1.SYMPTOMS OF A DISEASE \t:\t",m1)
query="SELECT yoga_asanas from diseases where diseases= 'Thyroid'"
cur.execute(query)
rec=cur.fetchone()
m2=rec[0]
print("2.YOGA ASANA \t\t\t:\t",m2)
query="SELECT diet_offered from diseases where diseases= 'Thyroid'"
cur.execute(query)
rec=cur.fetchone()
m3=rec[0]
print("3.DIET REQUIRED FOR A DISEASE\t:\t",m3)
F=Image.open("bandhasana.png" )
F.show()
print("*"*100)
if ch==4:
query="SELECT symptoms from diseases where diseases= 'Migraine'"
cur.execute(query)
rec=cur.fetchone()
m1=rec[0]
print("1.SYMPTOMS OF A DISEASE \t:\t",m1)
query="SELECT yoga_asanas from diseases where diseases= 'Migraine'"
cur.execute(query)
rec=cur.fetchone()
m2=rec[0]
print("2.YOGA ASANA \t\t\t:\t",m2)
query="SELECT diet_offered from diseases where diseases= 'Migraine'"
cur.execute(query)
rec=cur.fetchone()
m3=rec[0]
print("3.DIET REQUIRED FOR A DISEASE \t:\t",m3)
F=Image.open("shishuasana.png" )
F.show()
print("*"*100)
if ch==5:
query="SELECT symptoms from diseases where diseases= 'Diabetes'"
cur.execute(query)
rec=cur.fetchone()
m1=rec[0]
print("1.SYMPTOMS OF A DISEASE \t:\t",m1)
query="SELECT yoga_asanas from diseases where diseases= 'Diabetes'"
cur.execute(query)
rec=cur.fetchone()
m2=rec[0]
print("2.YOGA ASANA \t\t\t:\t",m2)
query="SELECT diet_offered from diseases where diseases= 'Diabetes'"
cur.execute(query)
rec=cur.fetchone()
m3=rec[0]
print("3.DIET REQUIRED FOR A DISEASE \t:\t",m3)
F=Image.open("Tadasana.png" )
F.show()
print("*"*100)
if ch==6:
break
User_Diseases()
def User_YogaCentres():
conn=mysql.connector.connect(host="localhost",user="root",password="tiger",database="project")
cur=conn.cursor()
n=0
while True:
quer="SELECT sno,centre_name from centres"
cur.execute(quer)
for i in cur:
print("\t\t\t",i[0],".",i[1].upper())
print("\t\t\t 5 . EXIT")
print("*"*100)
ch=int(input("ENTER THE CHOICE \t\t:\t"))
print("*"*100)
if ch==1:
query="SELECT * from centres where centre_name='Satwa Yoga Studio'"
cur.execute(query)
rows=cur.fetchall()
for i in rows:
print("ADDRESS OF THE CENTRE \t:\t",i[2])
print("CONTACT OF THE CENTRE \t:\t",i[3])
print("EMAIL-ID OF THE CENTRE \t:\t",i[4])
print("TIMINGS OF THE CENTRE \t:\t",i[5])
print("MEMBERSHIP FEES OFFERED :\t",i[6])
print("*"*100)
if ch==2:
query="SELECT * from centres where centre_name='Yoga Mantra'"
cur.execute(query)
rows=cur.fetchall()
for i in rows:
print("ADDRESS OF THE CENTRE \t:\t",i[2])
print("CONTACT OF THE CENTRE \t:\t",i[3])
print("EMAIL-ID OF THE CENTRE \t:\t",i[4])
print("TIMINGS OF THE CENTRE \t:\t",i[5])
print("MEMBERSHIP FEES OFFERED :\t",i[6])
print("*"*100)
if ch==3:
query="SELECT * from centres where centre_name='Sivananda Yoga Vedanta Centre'"
cur.execute(query)
rows=cur.fetchall()
for i in rows:
print("ADDRESS OF THE CENTRE \t:\t",i[2])
print("CONTACT OF THE CENTRE \t:\t",i[3])
print("EMAIL-ID OF THE CENTRE \t:\t",i[4])
print("TIMINGS OF THE CENTRE \t:\t",i[5])
print("MEMBERSHIP FEES OFFERED :\t",i[6])
print("*"*100)
if ch==4:
query="SELECT * from centres where centre_name='The Yoga House'"
cur.execute(query)
rows=cur.fetchall()
for i in rows:
print("ADDRESS OF THE CENTRE \t:\t",i[2])
print("CONTACT OF THE CENTRE \t:\t",i[3])
print("EMAIL-ID OF THE CENTRE \t:\t",i[4])
print("TIMINGS OF THE CENTRE \t:\t",i[5])
print("MEMBERSHIP FEES OFFERED :\t",i[6])
print("*"*100)
if ch==5:
break
#User_YogaCentres()
def Screen():
def Link1():
url1='http://www.mea.gov.in/in-focus-article.htm?25096/Yoga+Its+Origin+History+and+Development'
webbrowser.open(url1)
def Link2():
Link="https://www.youtube.com/watch?v=_8kV4FHSdNA"
webbrowser.open(Link)
W.destroy()
W=Tk()
W.geometry("840x540")
W.configure(bg="yellow")
W.title("WORKING SCREEN")
image=Image.open("New1.png")
R=image.resize((760,250))
R2=ImageTk.PhotoImage(R)
Lb=Label(W,image=R2)
Lb.place(x=32,y=66)
L1=Label(W,text=" Y O G A R I S I N G A P P L I C A T I O N ",bg="light green",font=("TIMES NEW ROMAN",24,"bold"))
L1.pack(fill=BOTH,padx=0,pady=0)
F=Frame(height=200,bg="#FF7F50",width=350,border=1)
F.place(x=32,y=335)
Fl=Frame(height=200,bg="#FF7F50",width=350,border=1)
Fl.place(x=445,y=335)
L2=Label(W,text=" HISTORY OF YOGA AND ITS INFLUENCE ",bg="light blue",font=("Comic Sans MS",11,"bold"))
L2.place(x=34,y=338)
L4=Label(W,text=" THROUGH READING ON CHROME ",bg="#FFEFD5",font=("Comic Sans MS",11,"bold"))
L4.place(x=60,y=400)
L3=Label(W,text=" HISTORY OF YOGA AND ITS INFLUENCE ",bg="cyan",font=("Comic Sans MS",11,"bold"))
L3.place(x=447,y=338)
L5=Label(W,text=" THROUGH WATCHING ON YOUTUBE ",bg="#FFEFD5",font=("Comic Sans MS",11,"bold"))
L5.place(x=460,y=395)
B1=Button(F,text="GO",relief=GROOVE,bg="light blue",fg="red",command=Link1,font=("Arial",30,"bold")).place(x=130,y=110)
B2=Button(Fl,text="GO",relief=GROOVE,bg="light blue",fg="red",command=Link2,font=("Arial",30,"bold")).place(x=120,y=110)
W.mainloop()
#Screen()
def STYLES(x):
res=pyfiglet.figlet_format(x,font="digital")# Use standard,digital,bubble,etc fonts.
print("*"*80)
print(res)
print("*"*80)
def User_Searching():
print("*"*100)
while True:
print("\t\t\t 1.INFORMATION ABOUT YOGA AND IT'S HISTORY")
print("\t\t\t 2.DISEASES AND THEIR CURING")
print("\t\t\t 3.MEDITATION - A BRANCH OF YOGA")
print("\t\t\t 4.BEST YOGA CENTRES IN INDIA")
print("\t\t\t 5.EXIT")
print("*"*100)
ch=int(input("ENTER THE CHOICE\t\t:\t"))
print("*"*100)
if ch==1:
Screen()
if ch==2:
User_Diseases()
if ch==3:
Meditation()
if ch==4:
User_YogaCentres()
if ch==5:
STYLES(" STAY HEALTHY AND KEEP VISITING YOGA RISING APPLICATION")
break
#User_Searching()