Cs-Project Bikramsonar Complt
Cs-Project Bikramsonar Complt
LEKHAPANI
DEPERTMENT OF COMPUTER
SCIENCE
FOOD PORTAL
SESSION 2024-2025
PRINCIPAL
ACKNOWLEDGEMENT
IT IS WITH PLEASURE THAT I ACKNOWLEDGE MY
SINCERE GRATITUDE TO OUR TEACHER, MR. ABHIJEET
SANYAL, PGT (COMPUTER SCIENCE) WHO TAUGHT AND
UNDERTOOK THE RESPONSIBILITY OF TEACHING THE
SUBJECT COMPUTER SCIENCE. I HAVE BEEN GREATLY
BENEFITED FROM HIS CLASSES. I AM ESPECIALLY
INDEBTED TO OUR PRINCIPAL MR. KUSH PRATAP SINGH
WHO HAS ALWAYS BEEN A SOURCE OF
ENCOURAGEMENT AND SUPPORT AND WITHOUT
WHOSE INSPIRATION THIS PROJECT WOULD NOT HAVE
BEEN A SUCCESSFUL I WOULD LIKE TO PLACE ON
RECORD HEARTFELT THANKS TO HIM. FINALLY, I
WOULD LIKE TO EXPRESS MY SINCERE APPRECIATION
FOR ALL THE OTHER STUDENTS FOR MY BATCH THEIR
FRIENDSHIP & THE FINE TIME THAT WE ALL SHARED
TOGETHER.
HARDWARES AND SOFTWARES REQUIRED
HARDWARES-
1. DesktopComputer
2. PC
SOFTWARES-
1. Python(latestversion)
2. MySQL
3. PythonConnectorModule
CONTENTS
S.No. Topic Page No.
1 INTRODUCTION
3 MYSQL DATABASE
4 OUTPUTS
5 REFERRENCE
INTRODUCTION
Welcometofoodportal
Inthehustleandbustleofourdailylives,findinga
quickanddeliciousmealcanbeachallenge.Butfear
not,forwepresenttoyouthe FoodPortal –adigital
haven for all your culinary cravings! Whether you're an
admin looking to manage the portal with precision or a
hungry soul ready to explore a world of delectable
options, our portal had made sure that you are covered.
AdminAccess:UnlockthePower
The gateway to culinary control lies in the hands of the
admin. Armed with a secure password, the admin block
opens up a realm of possibilities for managing the Food
Portal with finesse. From overseeing orders to updating
the menu, the admin has the key to culinary command.
OrderingBliss:ExploreandIndulge
For the food enthusiasts who crave a delightful dining
experience, the Food Portal offers an extensive array of
culinary delights. Browse through a tempting menu
showcasing a variety of dishes, each with its own
unique flavour profile. With just a few clicks, you can
place your order and tantalize your taste buds with the
finest cuisines.
SeamlessExit:You’reWayOut
Had your fill of culinary delights or finished managing
the admin block? Fear not, for the exit is as smooth as
your favourite dessert. With a simple command, bid
adieu to the Food Portal, knowing that it's always ready
to welcome you back for your next gastronomic
adventure.
Embrace the fusion of technology and taste with the
Food Portal – where admin control meets culinary
exploration. Join us on this digital journey, and let the
flavours of innovation and convenience tantalize your
senses. Bon appétit!
Our MISSION
Our mission is to create a vibrant and interconnected
food community, fostering a love for diverse cuisines
and culinary experiences. Whether you're a food
enthusiast looking for your next dining adventure or a
restaurant seeking to expand your reach, our project
FOOD PORTAL is the go-to platform for all things
food-related.
Join us on this exciting journey as we redefine the way
people discover, share, and savoir the world of food
through our project FOOD PORTAL.
Feel free to customize this introduction to better fit the
specific features and goals of your food portal project.
XXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX
PYTHONSOURCECODE
XXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX
importmysql.connector aspro
d=pro.connect(host="localhost",user="root",password="
admin",database="food")
e=d.cursor()
#ADDING FOODOPTIONFORADMIN
defadd_food():
d=pro.connect(host="localhost",user="root",password="
admin",database="food")
e=d.cursor()
ser=int(input("Enter the Food ID:"))
fi=input("Enter the Food name:")
fp=int(input("EnterthePriceofFood:"))
ft=input("Enter the Food Type:")
e.execute("insertintoitemvalues ({},'{}',
{},'{}')".format(ser,fi,fp,ft))
print("NEWFOODADDED SUCCESSFULLY")
d.commit()
#UPDATING FOOD&PRICEOPTION
FORADMIN
defupdate_food():
d=pro.connect(host="localhost",user="root",password="
admin",database="food")
e=d.cursor()
print("1. update food name")
print("2. update food price")
us=int(input("Enteryourchoice:")) if
us==1:
fnid=int(input("EntertheFoodIDwhosefood
name you want to update :"))
fna=input("Enter the updated Food Name: ")
e.execute("updateItemsetFood_Item='{}'where
S_no={}".format(fna,fnid))print("UPDATED
SUCCESSFULLY")
d.commit()
elif us==2:
fnic=int(input("EntertheFoodIDwhosefoodprice you
want to update :"))
fnf=input("EntertheupdatedFoodPrice:")
e.execute("update Item set Prices={} where
S_no={}".format(fnf,fnic))
print("UPDATEDSUCCESSFULLY")
d.commit()
print("YouhavebeenRedirectedtotheAdminpage") ad_login()
#DELETING FOOD OPTION FOR
ADMIN
defdelete_food():
d=pro.connect(host="localhost",user="root",password="
admin",database="food")
e=d.cursor()
fidd=int(input("Enter theFoodIDyouwant to delete
:"))
e.execute("deletefromitemwhere
S_no={}".format(fidd))
print("YOUHAVEDELETEDAFOODITEM
SUCCESSFULLY")
d.commit()
d=pro.connect(host="localhost",user="root",password="
admin",database="food")
e=d.cursor()
fgg=("select * from orders")
print("Detailsofallordersare:")
e.execute(fgg)
rtt=e.fetchall()
for i in rtt:
print("********************************************
*********")
print("Foodname:",i[0])
print("Foodprice:",i[1])
print("Total price:",i[2])
print("PhoneNO:",i[3])
print("Address:",i[4])
print("********************************************
**********")
#PASSWORDFOR ADMINTOLOGIN
defad_panel():
pas=input("EnterPassword:")
if pas=='Zomato':
print("Accessgranted")
ad_login()
else:
print("WrongPassword")
print("YouhavebeenREdirectedtotheMainPage") admin()
#FOODITEMSTO SHOW
CUSTOMER
defshow_menu():
e.execute("select*fromitem")
w=e.fetchall()
print("-------------MENUFOR TODAY---------------")
foriin w:
print("FoodNo.",i[0],"FoodName:",i[1],"--
Price:",i[2],"--Foodtype:",i[3])
d.commit()
ui=input("Doyouwanttoorderfood:") if
ui=="Yes" or ui=="yes":
F_order()
else:
print("Thankyou")
print("YouhavebeenRedirectedtotheMainPage") return
#TOPLACEORDEROFFOOD ITEM
defF_order():
io=int(input("Enterthefooditemno.youwantto
order:"))
QTY=int(input("Enter QTY of food:"))
phn=int(input("EnteryourPhoneNO:"))
ADR=input("EnteryourAddress:")
fi=("select*fromitemwhereS_no={}".format(io)) e.execute(fi)
fi=e.fetchall() iname=fi[0]
[1] iprice=fi[0][2]
oprice=iprice*QTY
ins="insert into
orders(O_name,I_price,O_price,P_no,ADR)values('{}',{},{
},{},'{}')".format(iname,iprice,oprice,phn,ADR)
print("********BILL********")
print("Address:",ADR)
print("Phone NO:",phn)
print("Food name:",iname)
print('Food price:',iprice)
print("QTY of food:",QTY)
print('Total price:',oprice)
print("********************")
print("Thanksfororderingfood")
print("Yourorderhasbeen confirmed")
print("YouhavebeenRedirectedtotheMAINPAGE")
e.execute(ins)
d.commit()
#VIEWING YOURFOOD ORDER
HISTORY
defF_View():
yno=int(input("Enteryourphone NO:"))
a=("select*fromorderswhereP_no={}").format(yno)
e.execute(a)
rt=e.fetchall()
if len(rt)>0:
foriinrt:
print("Your recent orders are:")
print("**********YOURORDERDETAILSARE
SHOWNBELOW**********")
print("Foodname:",i[0])
print("Foodprice:",i[1])
print("Totalprice:",i[2])
print("PhoneNO:",i[3])
print("Address:",i[4])
else:
print("YOUHAVENOTPLACEDANYORDER")
d.commit()
#CANCELINGYOURFOOD ORDER
defF_Cancel():
cor=int(input("Enteryourphone NO:"))
dele=("deletefromorderswhereP_no={}").format(cor)
e.execute(dele)
print("Yourorderhasbeencancelled
SUCCESSFULLY")
print("YouhavebeenRedirectedtotheMAINPAGE")
d.commit()
#FEEDBACKOPTION FOR
CUSTOMER
defF_feedb():
fdb=int(input("EnteryourPhoneNO:")) print("Give
us Feedback--")
fdc=input("")
fdp="insert into Feed values
P_no,F_back={},'{}'".format(fdb,fdc)
print("THANKSFORYOURFEEDBACK")
print("YouhavebeenRedirectedtoMAINPAGE") d.commit()
#MAINMENUFOR CUSTOMER
defmain_menu():
while True:
print("----------------------WELCOMETOFOOD
PORTAL----------------------")
print("1. Main Menu")
print("2. Place your Orders")
print("3. View order")
print("4.CancelyourOrder")
print("5. Feedback")print("6.
Exit")
a=int(input("EntertheServiceyouwant:")) if
a==1:
show_menu()
elif a==2:
F_order()
elif a==3:
F_View()
elif a==4:
F_Cancel()
elif a==5:
F_feedb()
elif a==6:
break
#HOMEPAGE
def admin():
whileTrue:
print("********************************************
**")
print("WELCOMETOFOODPORTAL")
print("1. Admin Login")
print("2. Customer Login")
print("3. EXIT")
op=int(input("Enteroption:")) if
op==1:
ad_panel()
elif op==2:
main_menu()
elif op==3:
break
admin()
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
MySQL Database
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
FOODITEMTABLE:
FoodOrderTable:
FeedbackTable:
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
OUTPUTS
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
FOODPORTALMAIN PAGE:
UPDATINGFOODNAMEBYADMIN:
UPDATINGFOODPRICEBY ADMIN
DELETINGFOODITEMBY ADMIN:
VIEWINGORDERHISTORYBY ADMIN:
LOGOUTOPTIONFOR ADMIN:
MAINMENU FORCUSTOMER:
FOODITEMS FOR CUSTOMER:
PLACINGORDERFORCUSTOMER:
FEEDBACKOF CUSTOMER:
PERSONALORDER HISTORYOF CUSTOMER:
EXITOPTIONFORCUSTOMER:
REFERENCES
Wikipedia
https://www.wikipedia.org/
Python
https://www.python.org/
MySQL
https://www.mysql.com/