-
Notifications
You must be signed in to change notification settings - Fork 0
/
Code.py
801 lines (773 loc) · 26.8 KB
/
Code.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
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
import time
from prettytable import PrettyTable
import matplotlib.pyplot as plt
import numpy as np
import mysql.connector as mc
conn=mc.connect(host='localhost',port='3306',user='root',passwd='',database='broker')
mycursor=conn.cursor()
user_id=0
print(" ____")
print(" ________")
print(" __________")
print(" ____________")
print(" ______________")
print(" ________________")
print(" ___________________")
print(" || ||")
print(" || ________ ||")
print(" || | | ||")
print(" || | | ||")
print(" || | | ||")
print(" ________________")
print(" LUXURY HOMES")
print()
print(" WELCOME TO A PLACE WHERE YOUR DREAM HOUSE IS OUR MATTER OF CONCERN")
print(" AND WHERE WE WILL HELP YOU SEARCH A CONVINIENT AND HARMONIOUS")
print(" PLACE TO LIVE LIFE IN FULL BLOOM")
#==============================validation functions=========================================
def isnumber():
flag=True
s=input(">>> Enter your choice : ")
s=s.strip()
if len(s)==0:
print("It Can't Be Empty")
return "nonum"
for i in range(len(s)):
if s[i].isdigit()!=True:
flag=False
if flag:
return(int(s))
else:
print("\t\t\tPlease Enter a Valid Integer Choice Value !!!")
return "nonum"
def aadhaar():
flag=True
s=input(">>> Enter Aadhaar Number : ")
s=s.strip()
if len(s)==0:
print("It Can't Be Empty")
return "nonum"
for i in range(len(s)):
if s[i].isdigit()!=True:
flag=False
if flag:
if len(s)==12:
return(int(s))
else:
print("\t\t\tPlease Enter Correct Digit Aadhaar Number !!!")
return "nonum"
else:
print("\t\t\tPlease Enter a Valid Integer Choice Value !!!")
return "nonum"
def phone():
flag=True
s=input(">>> Enter Phone Number : ")
s=s.strip()
if len(s)==0:
print("It Can't Be Empty")
return "nonum"
for i in range(len(s)):
if s[i].isdigit()!=True:
flag=False
if flag:
if len(s)==10 or (len(s)==11 and s[0]=='0'):
return(int(s))
else:
print("\t\t\tPlease Enter Correct Digit Phone Number !!!")
return "nonum"
else:
print("Please Enter a Valid Integer Choice Value !!!")
return "nonum"
#===============main code============= ====================
def search():
print()
print("_"*65)
print("_"*65)
print("\t\t Search ")
x=PrettyTable()
c_name=input(">>> Enter Your Name : ")
print("_"*65)
while True:
c_cont=phone()
if c_cont!="nonum":
break
while True:
aadhaar_no=aadhaar()
if aadhaar_no!="nonum":
break
print(" ENTER YOUR CHOICE OF PREFERENCE ")
print("1. By Locality")
print("2. By Cost")
print("3. Show All Available Localities")
while True:
pre_fer=isnumber()
if pre_fer!="nonum":
break
if pre_fer==1:
ch10=input(">>> Enter Locality : ")
print(" YOU WANT HOUSE ")
print("1. For Rent")
print("2. To Buy")
print("_"*65)
while True:
rb=isnumber()
if rb!="nonum":
break
while True:
if rb==1:
s_type="rent"
break
elif rb==2:
s_type="sell"
break
else:
print("Enter a valid choice")
while True:
rb=isnumber()
if rb!="nonum":
break
s1="select p_id,owner_name,p_type,address,locality,dimn,floor,cost,own_cont from property_info where status='vacant' and s_type='{}'and locality like'%{}%'".format(s_type,ch10[0:4])
mycursor.execute(s1)
data=mycursor.fetchall()
print("_"*65)
time.sleep(2)
print(" These Are Available Choices ")
print("_"*65)
x.field_names=["P_ID","OWNER NAME","P-TYPE","ADDRESS","LOCALITY","DIMENSION/BHK","FLOOR","COST","OWN_CONTACT"]
for i in data:
x.add_row(list(i))
print(x)
if data==[]:
print("\t\tWE DO NOT SEEM TO HAVE THE HOUSE YOU WANTED....")
print("\t\tSORRY FOR THE INCONVINIENCE")
print("\t\tTRY FOR ANOTHER PROPERTIES..")
print("_"*65)
search()
else:
print(" Do You Like Any Deal 1 For YES And 2 For NO ")
while True:
d1=isnumber()
if d1!="nonum":
break
while True:
if d1==1:
p1=int(input(">>> Enter The Corresponding P_ID : "))
break
elif d1==2:
print("### Sorry Search For Any Other Deal ### ")
search()
else:
print("Enter a valid choice")
while True:
d1=isnumber()
if d1!="nonum":
break
elif pre_fer==2:
print(" You Want House ")
print("1.For rent")
print("2.To buy")
print("_"*65)
while True:
rb=isnumber()
if rb!="nonum":
break
while True:
if rb==1:
s_type="rent"
break
elif rb==2:
s_type="sell"
break
else:
print(" Enter a valid choice !!! ")
search()
try:
cost=float(input("Cost Of your Prefernce : "))
except:
print("Enter valid cost !!!")
s1="select p_id,owner_name,p_type,address,locality,dimn,floor,cost,own_cont from property_info where status='vacant' and s_type='{}'and cost between {}-1000 and {}+1000".format(s_type,cost,cost)
mycursor.execute(s1)
data=mycursor.fetchall()
print(" These Are Available Choices ")
print("_"*65)
x.field_names=["P_ID","OWNER NAME","P-TYPE","ADDRESS","LOCALITY","DIMENSION/BHK","FLOOR","COST","OWN_CONTACT"]
for i in data:
x.add_row(list(i))
print(x)
if data==[]:
print(" No Choices Are Available ")
print("_"*65)
search()
else:
print(" Do You Like Any Deal 1 For Y And 2 For N : ")
while True:
d1=isnumber()
if d1!="nonum":
break
while True:
if d1==1:
p1=int(input(">>> Enter The Corresponding P_ID : "))
break
elif d1==2:
print("\t\t Sorry Search For Other Deal ")
main_menu()
else:
while True:
d1=isnumber()
if d1!="nonum":
break
elif pre_fer==3:
print(" You Want House ")
print("1.For rent")
print("2.To buy")
print("_"*65)
while True:
rb=isnumber()
if rb!="nonum":
break
while True:
if rb==1:
s_type="rent"
break
elif rb==2:
s_type="sell"
break
else:
print(" Enter a valid choice ")
search()
s1="select p_id,owner_name,p_type,address,locality,dimn,floor,cost,own_cont from property_info where status='vacant' and s_type='{}'".format(s_type)
mycursor.execute(s1)
data=mycursor.fetchall()
print(" These Are Available Choices ")
print("_"*65)
x.field_names=["P_ID","OWNER NAME","P-TYPE","ADDRESS","LOCALITY","DIMENSION/BHK","FLOOR","COST","OWN_CONTACT"]
for i in data:
x.add_row(list(i))
print(x)
if data==[]:
print(" No Choices Are Available ")
print("_"*65)
search()
else:
print(" Did You Like Any Deal(1 For Y And 2 For N) ")
while True:
d1=isnumber()
if d1!="nonum":
break
while True:
if d1==1:
p1=int(input(">>> Enter The Corresponding P_ID : "))
break
elif d1==2:
print("### Sorry Search For Any Other Deal ")
search()
else:
while True:
d1=isnumber()
if d1!="nonum":
break
else:
print("Enter A Valid Number")
while True:
pre_fer=isnumber()
if pre_fer!="nonum":
break
s4="select p_id,owner_name,p_type,address,locality,dimn,floor,cost,own_cont from property_info where status='vacant' and s_type='{}' and p_id={}".format(s_type,p1)
mycursor.execute(s4)
data2=mycursor.fetchall()
if mycursor.rowcount==1:
pass
else:
print("P_id Entered By You Is Not Correct")
search()
print(" Are You Sure To Continue ")
print(' If Yes Enter 1 ')
print(' If No Enter 2 ')
while True:
choi_ce=isnumber()
if choi_ce!="nonum":
break
if choi_ce==2:
print("Want To Search For More Properties")
print("1 For Yes And 2 For No")
while True:
pre1=isnumber()
if pre1!="nonum":
break
if pre1==1:
search()
elif pre1==2:
print('##### Thank You #####')
main_menu()
else:
while True:
pre1=isnumber()
if pre1!="nonum":
break
elif choi_ce==1:
print(" WE Request You To Contact Owner And Set Deal And Then Inform Us ")
time.sleep(3)
input("Press 'ENTER' To Continue ")
print(" So Is Deal Confirmed...? ")
print("1 for YES and 2 for NO")
while True:
choice2=isnumber()
if choice2!="nonum":
break
if choice2==2:
choice3=int(input("If You Want To Look Any Other Property Choose 1 Else 2: "))
if choice3==2:
print(" THANK YOU...VISIT AGAIN ")
print("_"*65)
main_menu()
elif choice3==1:
search()
else:
print("Enter valid choices")
search()
elif choice2==1 and s_type=="rent":
print("Congratulations......")
time.sleep(3)
print()
s7="update property_info set status='occupied' where p_id={}".format(p1)
mycursor.execute(s7)
conn.commit()
comm=(8*data[0][7])/100
deal_amt=comm+data[0][7]
print(" Commision Charged : ",comm)
print()
print(" Deal Amount : ",deal_amt)
print()
sql8="insert into trans_info(c_id,client_name,c_cont,s_type,comm,deal_amt,aadhaar_no,date) values({},'{}','{}','{}',{},{},'{}',curdate())".format(p1,c_name,c_cont,s_type,comm,deal_amt,aadhaar_no)
mycursor.execute(sql8)
conn.commit()
print('YOUR DEAL HAS BEEN SUCCESSFULL ENTERED....:-)')
time.sleep(1)
print('THANK You ......')
print("-"*65)
print("-"*65)
main_menu()
elif choice2==1 and s_type=="sell":
print("Congratulations......")
time.sleep(3)
print()
s7="delete from property_info where p_id={}".format(p1)
mycursor.execute(s7)
conn.commit()
comm=(2*data[0][7])/100
deal_amt=comm+data[0][7]
print(" Commision Charged : ",comm)
print()
print(" Deal Amount : ",deal_amt)
print()
sql8="insert into trans_info(c_id,client_name,c_cont,s_type,comm,deal_amt,aadhaar_no,date) values({},'{}','{}','{}',{},{},'{}',curdate())".format(p1,c_name,c_cont,s_type,comm,deal_amt,aadhaar_no)
mycursor.execute(sql8)
conn.commit()
print("YOUR DEAL HAS BEEN SUCCESSFULL ENTERED....:-)")
time.sleep(2)
print()
print("Thank You ......")
print("-"*65)
print("-"*65)
print()
input("Press 'ENTER' To Continue")
main_menu()
else:
print("### Enter A Valid Choice ###")
while True:
cho_ice=isnumber()
if cho_ice!="nonum":
break
#=======================================Add account===========================================
def add():
print()
print("_"*65)
print("_"*65)
print("\t\t Add Account ")
x=PrettyTable()
print()
print(" Enter the following required details ")
owner_name=input(">>> Owner name : ")
while True:
aadhaar_no=aadhaar()
if aadhaar_no!="nonum":
break
print('''Your House Is For
1.Sell
2.Rent''')
while True:
p=isnumber()
if p!="nonum":
break
while True:
if p==1:
s_type="sell"
break
elif p==2:
s_type="rent"
break
else:
print("Enter a valid choice!!")
while True:
p=isnumber()
if p!="nonum":
break
address=input(">>> Address: ")
locality=input(">>> Locality:")
print('''Property type:
1.House
2.Flat''')
while True:
k=isnumber()
if k!="nonum":
break
while True:
if k==1:
p_type="house"
break
elif k==2:
p_type="flat"
break
else:
print(" Enter a valid choice !!! ")
while True:
k=isnumber()
if k!="nonum":
break
dimn=input(">>> BHK/Dimension : ")
floor=int(input(">>> Floor : "))
cost=float(input(">>> Cost In Rupees : "))
while True:
own_cont=phone()
if own_cont!="nonum":
break
sql1="insert into property_info(owner_name,aadhaar_no,own_cont,s_type,p_type,address,dimn,floor,locality,cost)\
values('{}','{}','{}'\
,'{}','{}','{}','{}',{},'{}',{})"\
.format(owner_name,aadhaar_no,own_cont,s_type,p_type,address,dimn,floor,locality,cost)
mycursor.execute(sql1)
conn.commit()
s1="select p_id,owner_name,p_type,address,locality,dimn,floor,cost,own_cont from property_info where status='vacant' and aadhaar_no='{}'".format(aadhaar_no)
mycursor.execute(s1)
data30=mycursor.fetchall()
print()
print("##### Data Has Been Saved Successfully #####")
x.field_names=["P_ID","OWNER NAME","P-TYPE","ADDRESS","LOCALITY","DIMENSION/BHK","FLOOR","COST","OWN_CONTACT"]
for i in data30:
x.add_row(list(i))
print(x)
time.sleep(2)
print("### This Is Your P_id ### ",data30[0][0])
print(" WARNING : Make Sure You Keep This P_id Otherwise You Want Be Able To Update Or Delete Your Records Any More")
print("="*65)
input("Press Enter To Continue")
print()
main_menu()
#===================delete================================================================
def delete_acc():
x=PrettyTable()
print()
print("_"*65)
print("_"*65)
print("\t\t Delete Account ")
print(" Hope You Have p_id Provided To You 1 for Yes and 2 for N0 ")
while True:
c2=isnumber()
if c2!="nonum":
break
print()
if c2==1:
p=int(input(">>> Enter The p_id Provided To You :"))
while True:
aadhaar_no=aadhaar()
if aadhaar_no!="nonum":
break
else:
print("Wait For Alternate Solution....")
time.sleep(2)
print(".....")
print(" Login Through Aadhaar Number")
while True:
aadhaar_no=aadhaar()
if aadhaar_no!="nonum":
break
s4="select p_id,owner_name,s_type,address,cost,own_cont from property_info where aadhaar_no='{}' ".format(aadhaar_no)
mycursor.execute(s4)
data3=mycursor.fetchall()
if mycursor.rowcount==1:
print()
print("Loading...")
time.sleep(1)
print("Loading...")
time.sleep(1)
print(" You have selected to delete your property with details ")
x.field_names=["P_ID","OWNER NAME","S_TYPE","ADDRESS","COST","OWN_CONT"]
for i in data3:
x.add_row(list(i))
print(x)
print()
print(" Are you sure to drop it from records1 For Yes And 2 For No ")
while True:
c1=isnumber()
if c1!="nonum":
break
if c1==2:
print("\t\t Thank you for continuing ")
input("\t\tPress 'ENTER' To Continue")
main_menu()
elif c1==1:
s5="delete from property_info where p_id={}".format(data3[0][0])
mycursor.execute(s5)
conn.commit()
print(" Your Record Has Been Successfully Deleted ")
main_menu()
else:
print("Please Enter Valid Number Only")
delete_acc()
else:
print(" ...........FAILED................. ")
print()
print(" It might be the case that either aadhaar number or p_id number entered by you is wrong ")
delete_acc()
#=====================update============================================================
def update():
print()
print("_"*65)
print("_"*65)
print("\t\t Update Property Details ")
print()
x=PrettyTable()
print(" You can update following details ")
print(" 1.) UPDATE PHONE NUMBER")
print(" 2.) UPDATE COST ")
print(" 3.) NAME OF THE OWNER ")
print(" 4.) RENT TO SELL ")
print(" 5.) Status To Vacant ")
print(" 6.) Main_Menu ")
print()
while True:
c1=isnumber()
if c1!="nonum":
break
print("Hope You Have p_id Provided To You 1 Y Or 2 N ")
while True:
c2=isnumber()
if c2!="nonum":
break
if c2==1:
print()
p=int(input(">>> Enter The p_id Provided To You :"))
while True:
aadhaar_no=aadhaar()
if aadhaar_no!="nonum":
break
s4="select p_id,owner_name,s_type,address,cost,own_cont from property_info where p_id={} and aadhaar_no='{}' ".format(p,aadhaar_no)
mycursor.execute(s4)
data3=mycursor.fetchall()
else:
print("Wait For Alternate Solution....")
time.sleep(2)
print(".....")
print(" Login Through Aadhaar Number")
while True:
aadhaar_no=aadhaar()
if aadhaar_no!="nonum":
break
s4="select p_id,owner_name,s_type,address,cost,own_cont from property_info where aadhaar_no='{}' ".format(aadhaar_no)
mycursor.execute(s4)
data3=mycursor.fetchall()
if mycursor.rowcount==1:
print(" You Have Selected To Update Your Property With Details ")
x.field_names=["P_ID","OWNER NAME","S_TYPE","ADDRESS","COST","OWN_CONT"]
for i in data3:
x.add_row(list(i))
print(x)
else:
print(" ..........Failed............. ")
print()
print(" It might be the case that either aadhaar number or p_id number entered by you is wrong ")
update()
if c1==3:
new_name=input(">>> Provide Us Your New Name : ")
if new_name=='':
print("It Can't Be Empty !!!")
update()
else:
pass
s7="update property_info set owner_name='{}' where owner_name='{}'".format(new_name,data3[0][1])
mycursor.execute(s7)
conn.commit()
elif c1==2:
new_cost=input(">>> New Cost For Your House : ")
if new_cost=='':
print("It Can't Be Empty !!!")
update()
else:
pass
s7="update property_info set cost={} where cost={}".format(new_cost,data3[0][4])
mycursor.execute(s7)
conn.commit()
elif c1==1:
while True:
new_cont=phone()
if new_cont!="nonum":
break
s7="update property_info set own_cont='{}' where own_cont='{}'".format(new_cont,data3[0][5])
mycursor.execute(s7)
conn.commit()
elif c1==4:
s_type="sell"
s7="update property_info set s_type='{}' where aadhaar_no='{}'".format(s_type,aadhaar_no)
mycursor.execute(s7)
conn.commit()
elif c1==5:
status="occupied"
print("\t\t Are You Sure To Change Your Status To Vacant 1 For Yes")
ch23=isnumber()
if ch23==1:
s7="update property_info set status='{}' where aadhaar_no='{}'".format(status,aadhaar_no)
else:
print("\t\tReturning Bach To Main_Menu")
print("Loading......")
time.sleep(2)
main_menu()
elif c1==6:
main_menu()
else:
while True:
c1=isnumber()
if c1!="nonum":
break
print(" Your Record Has Been Successfully Updated ")
print()
print(" New Record ")
s50="select p_id,owner_name,s_type,address,cost,own_cont from property_info where p_id={}".format(data3[0][0])
mycursor.execute(s50)
data50=mycursor.fetchall()
x.field_names=["P_ID","OWNER NAME","S_TYPE","ADDRESS","COST","OWN_CONT"]
for i in data50:
x.add_row(list(i))
print(x)
input("\t\tPress 'ENTER To Continue'")
main_menu()
#=====================About us===========================
def about_us():
print()
print('|','-'*50,'|')
print('|',' ABOUT US |')
print('|','-'*50,'|')
print('|',' FOR QUERIES,FEEDBACK & ALLIANCE REACH US AT |')
print('|','-'*50,'|')
print('|',' LUXURY HOMES |')
print('|','-'*50,'|')
print('|','TIMES CENTER(DIGITAL CONTENT PRODUCTION FACILITY) |')
print('|','FC-6,(GROUND FLOOR),SECTOR 16A,FILM CITY |')
print('|','RATLAM-457001 |')
print('|','-'*50,'|')
print('|','CONTACT US:0120-686660000 |')
print('|','Email:[email protected] |')
print('|','-'*50,'|')
print('|','FOR CORPORATE ALLIANCES |')
print('|','Email:[email protected] |')
print('|','-'*50,'|')
input("Press 'ENTER' To Continue")
main_menu()
#=====================market status===========================
def m_status():
print()
print("#### Here You Will Get To Know About Market Prices Of Properties In Different Parts Of Countries ### ")
print()
delhi=9087
mumbai=10242
bhopal=2212
indore=2295
kolkata=6035
chennai=6055
list1=['delhi','mumbai','bhopal','indore','kolkata','chennai']
list2=[delhi,mumbai,bhopal,indore,kolkata,chennai]
plt.bar(list1,list2,color=["b","k","m","g","c","y","r"])
plt.xticks(list1,["DELHI","MUMBAI","BHOPAL","INDORE","KOLKATA","CHENNAI"])
plt.title("______________________PROPERTY PRICE STATUS__________________________")
plt.xlabel("CITY")
plt.ylabel("PRICES (In Square Feet)")
time.sleep(4)
plt.show()
input("Press 'ENTER' To Continue")
main_menu()
def main_menu():
print("="*30,"MAINMENU","="*30)
print("="*69)
print()
print("1.Search house")
print("2.Add property")
print("3.Delete property")
print("4.Update property")
print("5.About us")
print("6.Price Status")
print("7.Logout")
print("8.Exit")
print()
choice=input(">>> Enter Menu To Open : ")
if choice=="1":
search()
elif choice=="2":
add()
elif choice=="3":
delete_acc()
elif choice=="4":
update()
elif choice=="5":
about_us()
elif choice=="6":
m_status()
elif choice=="7":
login()
elif choice=="8":
exit()
else:
print()
print("\t\t The Menu Entered By You Do not Exist ")
print()
main_menu()
def login():
print()
print()
a=input(">>> Enter Username : ")
b=input(">>> Enter Password : ")
sql="select * from login where username='{}' and password='{}'".format(a,b)
mycursor.execute(sql)
mycursor.fetchall()
print(mycursor.rowcount)
if mycursor.rowcount==1:
print()
time.sleep(1)
print("......Loading")
print(".")
print(".")
print(".")
time.sleep(1)
print("......Loading")
print(".")
print(".")
print(".")
time.sleep(1)
print("......Loading")
print(".")
print(".")
print(".")
time.sleep(1)
print("......Loading")
print(".")
print(".")
print(".")
print("......ACCESS CONFIRMED")
time.sleep(1)
print()
main_menu()
else:
print()
print("......ACCESS DENIED")
time.sleep(1)
print()
login()
login()