0% found this document useful (0 votes)
8 views54 pages

Updated Aa Project Compiled Edited Rite

This document provides an introduction and background on developing an online food ordering system. It discusses how online food ordering is becoming more common in the western world. The objectives of developing such a system are to provide customers a simple ordering process, advertise food offerings, reduce workload, and keep accurate records of orders. It defines key terms related to food ordering and delivery systems. Overall, the document lays out the problem statement, objectives, scope, and significance of creating an online food ordering system to improve the process for customers and restaurants.

Uploaded by

Roy Ehigiamusoe
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views54 pages

Updated Aa Project Compiled Edited Rite

This document provides an introduction and background on developing an online food ordering system. It discusses how online food ordering is becoming more common in the western world. The objectives of developing such a system are to provide customers a simple ordering process, advertise food offerings, reduce workload, and keep accurate records of orders. It defines key terms related to food ordering and delivery systems. Overall, the document lays out the problem statement, objectives, scope, and significance of creating an online food ordering system to improve the process for customers and restaurants.

Uploaded by

Roy Ehigiamusoe
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CHAPTER ONE

INTRODUCTION

1.1 BACKGROUND OF STUDY

The online food ordering system is one of the latest services most fast food restaurants in the western

world are adopting. With this method, food is ordered online and delivered to the customer. This is

made possible through the use of electronic payment system. Customers pay with their credit cards,

although credit card customers can be served even before they make payment either through cash or

cheque. So, the system designed in this project will enable customers go online and place order for

their food.

Due to the great increase in the awareness of internet and the technologies associated with it, several

opportunities are coming up on the web. So many businesses and companies now venture into

their business with ease because of the internet. One of such business that the internet introduced is an

online food ordering system. In today’s age of fast food and take out, many restaurants have chosen to

focus on quick preparation and speedy delivery of orders rather than offering a rich dining experience.

Until recently, most of this delivery orders were placed over the phone, but there are many

disadvantages to this system.

It is possible for anybody to order any goods via the internet and have the goods delivered at his/her

doorsteps. But while trying to discuss the transfer method of the goods and services, attention is

focused on the payment mode. In other words, how possible is it to pay for goods and services via the

internet? This then leads to the discussion of the economic consequences of digital cash. What are the

implementations from the view point of economic? Since the world is fast becoming a global village,

the necessary tool for this process is communication of which telecommunication is a key player. A

major breakthrough is the wireless telephone system which comes in either fixed wireless telephone

lines or the Global System of Mobile communication (GSM).

What I propose is an online ordering system originally designed for use in college cafeterias, but just

1
as applicable in any food delivery industry. The main advantage of this system is that it greatly

simplifies the ordering process for both the customer and the restaurant. The system also greatly

lightens the load on the restaurants end, as the entire process of taking orders is automated. Once an

orderis placed on the webpage that will be designed, it is placed into the database and then retrieved, in

pretty much real-time, by a desktop application on the restaurantsend. Within this application, all items

in the order are displayed, along with their corresponding options and delivery details, in a concise and

easy to read manner. This allows the restaurant employees to quickly go through the orders as they are

placed and produce the necessary items with minimal delay and confusion. The greatest advantage of

this system is its FLEXIBILITY.

The structure of the system can be divided into three main logical components. The first component

must provide some form of menu management, allowing the restaurant to control what can be ordered

by customers. The second component is the web ordering system and provides the functionality for

customers to place their order and supply all necessary details. The third and final logical component is

the order retrieval system. Used by the restaurant to keep track of all orders which have been placed,

this component takes care of retrieving and displaying order information, as well as updating orders

which have already been processed.

FIGURE 1.1: FOOD ORDERING SYSTEM

2
1.2 STATEMENT OF PROBLEM

As industries are fast expanding, people are seeking for more ways to purchase products with much

ease and still maintain cost effectiveness. The vendors need to purchase the products in order to sell to

end users. The manual method of going to their local food sales outlets to purchase food is becoming

obsolete and more tasking. Food can be ordered through the internet and payment made without going

to the restaurant or the food vendor. So there is need for a wide range of publicity and enabling direct

order, processing and delivering of food through online system. For this system, there will be a system

administrator who will have the rights to enter the menu with current prevailing prices.

1.3 OBJECTIVE OF STUDY

This study lays out a framework for a new system to be developed and brought to the market for

maximum use and to create an avenue through the web where users can log on to our server and make

a selection of whatever goods or food they like and subsequently pay via the internet. The following

are the objectives this would bring

✓ The home page of this web interfile provides an avenue where customers will be able to

gather more and reliable information about what the fast food industry really does.

✓ The products and services offered would provide the customers with all the different

categories of available products that they can choose and select from.

✓ This will provide a user friendly environment between the customer and employee thus

increasing the efficiency of the food ordering system.

✓ There will also be an online purchase form with which valued customers will be using to

get in touch with any of their request whenever the need arises.

✓ It will also help for easy retrieval of orders made by the customers

1.4 SCOPE OF STUDY

In this project, a fast food company is designed and KUNGFU RESTURANT, KADA PLAZA,

BENIN CITY,EDO STATE is taken as a case study to enable customers order for food and get it

3
delivered accordingly and also to reduce the long queues of customers at the counter ordering for food

and to reduce the work load on the employees.

The following things are among other things that are discussed and what the software would handle:

About the fast food company

 The fast food and the services offered there

 Online purchase

 Type of food provided.

1.5 SIGNIFICANCE OF STUDY

In view of the rapid development of computer technology in almost all the fields of operation and its

use in relation to information management, it has become important to look into the development of

online ordering system for firms to meet up with demands of the customers. Therefore, the food

ordering and delivery system will help customers and management to:

1. Advertise available foods in their company

2. Reduce the workload in the present system

3. Reduce time wasted in data processing

4. Create a platform for online purchase and delivery of fast food

5. Keep accurate record on purchased order and delivery.

1.6 DEFINITION OF TERMS

FOOD: Any nutritious substance that people or animals eat or drink, or that plant absorbs, in order to

maintain life and growth.

MENU: A list of dishes available in a restaurant or the food available or to be served in a restaurant or

at a meal for example "a dinner-party menu”, “politics and sport are on the menu tonight".

ONLINE FOOD ORDERING: Online food ordering services are websites that feature interactive
4
menus allowing customers to place orders with local restaurantsand food cooperatives.

CREDIT CARD: A credit card is a payment card issued to users as a system of payment. It allows

the cardholder to pay for goods and services based on the holder's promise to pay for them.

ORDERING SYSTEM: This is referred to as a set of detailed methods that is being used in handling

the ordering process.

RESTAURANT: (eating place) is a place where meals and drinks are sold and served to customers.

CUSTOMER: Sometimes known as a client, buyer, or purchaser) is the recipient of goods, services,

products or idea obtained from a seller, vendor, or supplier for a monetary or other valuable

consideration.

TECHNOLOGY: It is the study of techniques or process of mobilizing resources (such as

information) for accomplishing objectives that benefit man and his environment.

HAMBURGERS: A hamburger is a sandwich consisting of a cooked patty of ground meat usually

placed inside a sliced hamburger bun.

SHAWARMA: Shawarma is a Levantine Arab meat preparation, where lamb, chicken, turkey, beef,

veal, or mixed meats are placed on a spit, and may be grilled for as long as a day.

BEEF: Beef is the culinary name for meat from bovines, especially cattle. Beef can be harvested from

cows, bulls, heifers or steers. Beef muscle meat can be cut into steak, roasts or short ribs.

5
CHAPTER TWO

LITERATURE REVIEW

2.1 INTRODUCTION

An ordering system is referred to as a set of detail methods that is being used in handling the ordering

process. Food ordering can be computerized or done manually. This helps the customer to order their

food themselves which is known as the customer self-ordering system.

The customer self-ordering system can be defined as a computerized system that is being used by

customers to place their own orders in the restaurant and allow the orders to be tracked, in order to

prepare and deliver the food to the computers.

2.2 SELF-SERVICE/SELF-ORDERING IN RESTAURANT

Self-service or self-ordering in restaurant industry refers to the restaurant taking orders from customers

through applying various types of technologies such as internet and many others. Self-service or self-

ordering is successful when it is applied at restaurants in many other countries. The usage of the self-

service or self-ordering technology is proven to benefit most of the investors.

Odesser-Torpey (2018) reports that most of the Americans hate waiting for an order. Therefore, they

prefer self-service technology, which can be in form of text messaging, the internet and kiosk. Usually,

the customer prefers self-service because of speed and convenience in making order and transaction

while minimize the miscommunication. He also mentioned that self-activated terminals are more

likely to serve as ordering innovation in the future. The implementation of alternative ordering can

increase check size, free up counter staff that need to serve customers and take money handling out of

service equation.

Bhatnagar (2016) mentioned that the innovation of kiosk and computerized table top ordering screen

will force restaurant industry re-jigger an often used acronym quick service restaurant to the self-

service restaurant. Customers can get information or search for recipes from the kiosk and internet.

The kiosk and internet also takes orders and receives credit cards or debit cards payment. As a result,

6
wrong order and long queue can be avoided, order staff can be arranged to somewhere else and focus

to speed up on delivery orders. On the other hand, a table-top touch screen order system can take

customer orders as well as handle other customer requests such as refill drinks, call a waiter and make

payment by credit card and debit card.

Bytes, a restaurant located at Canterbury has been successfully standing apart from the competitors

because of applying online self-service ordering and the payment concepts. The system used in Bytes

allows the customers make an order through the touch screen, and the order will be directed to bar or

kitchen. The system also offers games after a customer placed the orders while internet access will be

provided to customers in the future. Touch screen ordering reduces the need of the waiter. The system

also provides database for customers’ habits and preferences, generate the management reports,

perform analysis as well as allows the menu tobe updated instantly. (Brickers, 2016).

Based on study, it is possible for applying the online food ordering system to the fast food restaurants

in Nigeria. This is because the system can improve workplace efficiency, increase sales of the

restaurant as well as reduce making incorrect order. As a result, it is worth for investing on the

system, whereby it can shorten thereturn on investment.

In addition, the system should be supported by the food origin taste and services to maintain the

customers’ loyalty and satisfaction. However, widely implementing the food ordering system may

cause the influx of labor due to the elimination of waiters in restaurant industry. Even the system is

important to be implemented, yet there is still some risk in other factors such as a direct interaction

and restaurant design concept, which need to be considered for ensuring the success of the system.

Gan (2012) proposed to develop an online fast food restaurantordering system that allows customers to

place orders anytime at any place. The system helps to manage order from customer as well as

advertise promotion. It allows kitchen staff to view ordering information, management to manage

fast food raw materials and staff to search customer delivery and profile information. This system helps

to reduce queue issues during peak hours, speed up food preparation and increase customer volumes.

7
As a result, market share of fast food restaurant can be boosted up and increases return of investment

for the investor.

De Leon (2018) mentioned that there are several aspects that should be included in a good online food

ordering system. System should be simple to navigate, not clustered and easy to make an order,

(Sharma, 2017,) designed with professionals looking with search engine optimize capability and

available 24hours. The system should also have a secure payment gateway to protect their customers’

credit cards information, fast and keep track on orders and sales history easily as well as generate a

comprehensive sales report, (Sharma, 2017).

2.3 E-COMMERCE

Electronic commerce or e-commerce according to Garret, (2016) is the exchange of goods and

services by means of the internet or other computer networks. In e- commerce, buyers and sellers

transact business over networked computers.

Electronic commerce is also sharing business information, maintaining business relationships and

conducting business transactions by means of communication networks. It includes the relationship

between companies (business-to-business), between customers (customer-to customer) as well as

between companies and customers (business- to-customer). Business to business segment currently

dominates the e-commerce while customer oriented segment is significantly lagging behind and

current estimate places it at less than 10% of the total volume, even though they are all experiencing an

exponential growth (Vladimir, 2018). E-commerce offers buyers convenience. They can visit the

World Wide Web (www) sites of multiple vendors 24hours a day and seven days a week to compare

prices and make purchases, without having to leave their homes or offices.

For sellers, e-commerce offers a way to cut costs and expand their markets. They do not need to build

staff or maintain a store or print and distribute mail order catalogs. Because they sell over the global

internet, sellers have the potential to market their products or services globally and are not limited by

the physical location of a store.

8
E-commerce also has some disadvantages, however. Customers are reluctant to buy some products

online. Online furniture businesses for example, have failed for the most part because customers want

to test the comfort of an expensive item such as a sofa before they purchase it. Many people also

consider shopping a social experience, for instance, they may enjoy going to a store or a shopping

mall with friends or family, an experience they cannot get online. Customers also need to be reassured

that credit card transactions are secure and that their privacy is respected. E-commerce is not only

widening customer’s choice of product and services, but also creating new business and compelling

established business to develop internet strategies.

2.4 HISTORY OF FAST FOOD/RESTAURANT

A fast food restaurant is a restaurant characterized both by food ready to eat quickly after ordering and

by minimal service. One trait shared by all fast food establishments is that the customer pays for the

food prior to consuming it. Often this food is referred to as fast food. The food in these restaurants is

often cooked inbulk and in advance and kept warm or reheated on order.

Although fast food restaurants are often viewed as a representation of modern technology, the concept

of “ready cooked food to go” is as old as cities themselves, unique variations are historical in various

cultures. Ancient Roman cities had bread-and-olive stands, East Asian cultures features noodle shops.

Flat bread and falafel are ubiquitous in the Middle East. Popular Indian fast food delicacies include

Vada Pav, Papri Chaat, Bhelpuri, Panipuri and Dahi Vada. In the French speaking nations of west

Africa, meanwhile, roadside stands in and around the larger cities continue to sell- as they have done

for generations-a range of ready-to- eat char grilled meat sticks known locally as “brochettes” (not to

be confused with the bread snack of the same name found in Europe).

The modern history of a fast food in America began on July 7, 1912 with the opening of a fast food

restaurant called the Automat in New York. The Automat was a cafeteria with its prepared foods

behind small glass windows and coin- operated slots. Joseph Horn and Frank Hardart had already

opened an Automat in Philadelphia but their Automat at Broadway and 13th street, in New York

City, created a sensation and numerous Automat restaurants were quickly built around the country to
9
deal with the demand. Automats remained extremely popular throughout the 1920’s and 1930’s. The

company also popularized the notion of “take-out” food, with their slogan “less work for mother”. The

American company White Castle is generally credited with opening the second fast food outlet in

Topeka, Kansas in 1921, selling hamburgers for five cents a piece. White Castle later added five holes

to each beef patty to increase its surface area and speed cooking times. White Castle was successful

from its inception and spawned numerous competitors.

Mc Donald’s, the largest fast food chain in the world and the brand most associated with the term

“fast food” was founded as a barbeque drive-in in 1940 byDick and Mac. After discovering that most

of their profit came from hamburgers, the brothers closed their restaurant for 3months and reopened it

in 1948 as a walk- up stand offering a simple menu of hamburgers, French fries, shakes coffees and

Coca-Cola, served in disposable paper wrapping. As a result, they were able to produce hamburgers

and fries constantly, without waiting for customer orders, and could serve them immediately;

hamburgers cost 15cents, about half the price at a typical dinner. The McDonald’s stand was the

milkshake machine company’s biggest customer and a milkshake salesman named Ray kroc travelled

to California to discover the secret to their high-volume burger-and-shake operation. Kroc thought he

could expand their concept, eventually buying the McDonald’s operation outright in 1961 with the

goal of making cheap, ready-to-go hamburgers, French fries and milkshakes a nationwide business.

10
CHAPTER 3

METHODOLOGY AND SYSTEM ANALYSIS

3.1 RESEARCH METHODOLOGY

Research methodology has many research dimensions and methods. Methodology is the underlying
principles, process, techniques, tool that were used to attain the specific objective of the Food ordering
system. The development was based on the water fall model. It involved the requirement
determination, requirement analysis, system design, implementation, testing and validation. The
approach below describes the sequence of steps involved.

FIGURE 2.1: SOFTWARE DEVELOPMENT LIFE CYCLE

It divides the development process into several stages or processes. After the completion of one stage,

it will logically move to another stage. Sometimes moving back to the previous stage is necessary due

to failure that occurs in current stage.

3.2 METHOD OF DATA COLLECTION FROM SYSTEM ANALYSIS AND STUDY


Although there are various methods of data collection, the researcher chose the two main sources of
data collection carried out through analysis of the existing system. They are:
1. Primary source
2. Secondary source
The primary source refers to the sources of collecting original data in which the researcher made use
of empirical approach such as personal interview.
The secondary sources of data for this kind of project cannot be over emphasized. The secondary data

11
were obtained by the researcher from magazines, journals, newspapers and library source.

3.2.1 ORAL INTERVIEW

The interview method of data collection can be defined as a systematic way of collecting data or

information from a respondent through asking questions directly from the respondent and also

collecting information with the aim of facilitating understanding. The oral interview was done between

the researcher and the management of staff of KUNGFU RESTURANT,KADA PLAZA BENIN.

Reliable facts were gotten based on the questions posed to the staff by the researcher which help the

researcher in starting the work and also helped in the area of solution presentation of the new design.

3.2.2 STUDY OF MANUALS

Manuals and report based on fast food services were obtained and studied and a lot of information

concerning the system to be produced was obtained.

3.2.3 EVALUATION OF FORMS

Some forms that are necessary and available were accessed. These includes the restaurant menu fast

food order form, payment receipts etc. these forms helped in the design of the new system.

3.3 ANALYSIS OF EXISTING SYSTEM


System analysis is a problem solving activity that requires intensive communication between the
system users and system developers
Throughout the system analysis, an in-depth, study of end-user information is conducted, for
producing functional requirement of the proposed system. Data about the existing ordering system is
collected through several fact-finding techniques such as website visit and document review, at the
beginning of this stage. The data collected facilities information required during detailed analysis. A
study on the current system is performed based on the collected data. As a result, user requirement of
the proposed system are determined. At the end of this stage, requirement specification is produced as
deliverable.

3.4 THE EXISTING SYSTEM

The existing system happens to be a non-computerized operating system were all operations are done

manually by the waiter carrying paper and to take down the order of the customer or making an order

12
over the counter. This leads to mistakes because the waiter might not understand what the customer

had ordered therefore serving him/her a different menu. This could be so embarrassing because the

customer might not take it lightly with the waiter which may lead to misunderstanding.

3.5 PROBLEM OF EXISTING SYSTEM

As discussed earlier our main problem area focuses on the “Meal reservation/booking system”, there

are lot of problems in that area which are associated with both the customer and the restaurant staff.

We would like to analyze some of the problems here:

a. An initial problem is that the customer has to get connected over the phone, it

would beharder if the restaurant is very popular and busy.

b. As customer won’t have the menu list with him, it would be harder for him to remember the

entire list (with price as well...!) and come to a decision, i.e. customer is providedwith less time to

make decision.

c. Unnecessary time is wasted conveying information through the ladder of authority.

Management at times seeks to get a copy of the customer’s order form and this may take a lot

of time to obtain it.

d. There might be some communication problems or sometimes language might be a barrier.

e. As entire booking has to be done manually at the restaurant end, the chances of

occurrence of mistakes is high as well.

f. Most of restaurants have single phone line and a single operator to handle incoming calls,

so they can accept limited orders.

g. If the restaurant is of busy type, then the operator is left with no time to decide over the

priority of the order fulfillment.

h. Assigning orders to a specific cook can be cumbersome if it is done parallel with the

bookings of the order.

13
3.6. OBJECTIVES OF THE PROPOSED SYSTEM

The proposed system is developed to manage ordering activities in fast food restaurant. It helps to

record customer submitted orders. The system should cover the following functions in order to support

the restaurant’s business process for achieving the objectives:

1. To allow the customer to make order, view order and make changes before submitting their
order and allow them make payment through prepayment card or credit card or debit card.

2. To provide interface that allows promotion and menu.

3. To prevent interface that shows customers’ orders detail to front-end and kitchen staffs for
delivering customers’ orders

4. Tools that generate reports that can be used for decision making

5. A tool that allows the management to modify the food information such as price, add a new
menu and many others as well as tools for managing user, system menu and promotion

records.

3.7 JUSTIFICATION FOR THE NEW SYSTEM

It is the purpose of the new system to address all the problems plaguing the present system. This

system will do the analyzing and storing of information either automatically or interactively. It will

make use of PhP-MYSQL. This will be like this: a report is generated conforming to particular

information needed by the management via the monitor. This will require the input of necessary data

and record of fast food ordering and delivery and then a report is generated.

The proposed system will also have some other features such as:

 Avoid stationary expense (The volume of paper work will be greatly reduced)

 New system provide online payment facility

 Any record is easy to store and manage

14
 Easy to solve customer query

 Provide better security in new system

 Give the feedback answer

 Proper control of the higher officials.

 Minimize manual data entry.

 Minimum time needed for the various processing.

 Greater efficiency.

 Better service.

 User friendliness and interactive.

 Flexibility (i.e. it can be accessed at any time)

 Accuracy in handling of data

3.8 REQUIREMENTS DETERMINATION

The requirement assurance included the accumulation of data about how the framework ought to
work. The prerequisites assurance action was the most troublesome piece of frameworks
examination. It included assembling and reporting of the genuine and genuine prerequisites for the
framework being created. In here the scientist was fundamentally thinking and endeavouring to
address the inquiry,

"What should the framework do?" This data was utilized to recognize the users‟ necessities and the
framework details.

3.8.1 REQUIREMENTS ANALYSIS

The essential objective of this stage was to make a point by point Functional Specification
characterizing the full arrangement of framework abilities to be actualized, alongside going with
information and procedure models representing the data to be overseen and the procedures to be
upheld by the new framework
15
It included examination of the gathered information. Models, for example, Data Flow Diagrams
(DFD) and Entity Relationship Diagrams (ERD's) were utilized to show individual procedures and
information separately. Under here necessities were delegated useful and non- functional
prerequisites, the assurance and examination of necessities helped the specialist to accomplish his
second target.

3 .9 FEASIBILITY STUDY

Feasibility is defined as the practical extent to which a project can be performed successfully. To

evaluate feasibility, a feasibility study is performed, which determines whether the solution considered

to accomplish the requirements is practical and workable in the software. Information such as resource

availability, cost estimation for software development, benefits of the software to the organization

after it is developed and cost to be incurred on its maintenance are considered during the

feasibility study. The objective of the feasibility study is to establish the reasons for developing the

software that is acceptable to users, adaptable to change and conformable to established standards.

Various other objectives of feasibility studyare listed below.

✓ To analyze whether the software will meet organizational requirements

✓ To determine whether the software can be implemented using the current technology
and within the specified budget and schedule

✓ To determine whether the software can be integrated with other existing software

FIGURE 3.1: DIAGRAM OF TYPES FEASIBILITY

16
3.9.1 TECHNICAL FEASIBILITY

Technical feasibility assesses the current resources (such as hardware and software) and technology,

which are required to accomplish user requirements in the software within the allocated time and

budget. For this, the software development team ascertains whether the current resources and

technology can be upgraded or added in the software to accomplish specified user requirements.

Technical feasibility also performs the following tasks.

✓ Analyzes the technical skills and capabilities of the software development team

members

✓ Determines whether the relevant technology is stable and established

✓ Ascertains that the technology chosen for software development has a large number of

users so that they can be consulted when problems arise or improvements are

required.

3.9.2 OPERATIONAL FEASIBILITY

Operational feasibility assesses the extent to which the required software performs a series of steps to

solve business problems and user requirements. This feasibility is dependent on human resources

(software development team) and involves visualizing whether the software will operate after it is

developed and be operative once it is installed. Operational feasibility also performs the following

tasks.

✓ Determines whether the problems anticipated in user requirements are of high priority

✓ Determines whether the solution suggested by the software development team is

acceptable

✓ Analyzes whether users will adapt to a new software

✓ Determines whether the organization is satisfied by the alternative solutions proposed

by the software development team

17
3.9.3 ECONOMIC FEASIBILITY

Economic feasibility determines whether the required software is capable of generating financial gains

for an organization. It involves the cost incurred on the software development team, estimated cost of

hardware and software, cost of performing feasibility study, and so on. For this, it is essential to

consider expenses made on purchases (such as hardware purchase) and activities required to carry

out software development. In addition, it is necessary to consider the benefits that can be achieved by

developing the software. Software is said to be economically feasible if it focuses on the issues listed

below.

✓ Cost incurred on software development to produce long-term gains for anorganization

✓ Cost required to conduct full software investigation (such as requirements elicitationand

requirements analysis)

Important Features

✓ Accuracy

✓ User Friendly

✓ Availability

✓ Efficiency

✓ Reliable

✓ Durable

3.10 SYSTEM MODEL

The structure of the system can be divided into three main logical components. The first component

must provide some form of menu management, allowing the restaurant to control what can be ordered

by customers. The second component is the web ordering system and provides the functionality for

customers to place their order and supply all necessary details. The third and final logical component is

the order retrieval system. Used by the restaurant to keep track of all orders which have been placed,

this component takes care of retrieving and displaying order information, as well as updating orders
18
which have already been processed.

Web Ordering Restaurant


Customer Database Order Retrieval
System Employee

Menu
Management

Restaurant
Employee

FIGURE 3.2 :WEB ORDERING SYSTEM

3.11 DATABASE STRUCTURE

The system was used by different customers to order food and different food stands to update food

menu. And indeed the orders were reserved and food were delivered on time. This helped to

achieve his last objective.

TABLE 3. 1: ADMIN TABLE

Column Name Data Type Nullable Size


Admin_id Int No 12

Name Varchar Yes 100

Username Varchar Yes 60

Password Varchar Yes 60

Email Varchar Yes 100

Last_login Datetime Yes 60

Role Varchar Yes 60

Status Tinyint Yes 1

19
Table 3. 2: CUSTOMER TABLE

Column Name Data Type Nullable Size

Customer_id Int No 1

Name Varchar Yes 100

Address Varchar Yes 100

Email Varchar Yes 60

Contact Varchar Yes 60

Password Varchar Yes 60

TABLE 3.3 : FOOD TABLE

Column Name Data Type Nullable Size

Food_id Int Yes 11

Categoryid Int Yes 11

Foodname Varchar Yes 100

Foodprice Double Yes 100

Foodimage Varchar Yes 255

Created_by Varchar Yes 100

Created_date Datetime Yes

Updated_by Varchar Yes 100

Updated_date Datetime Yes

Order_id Int No 11

20
TABLE 3.4: ORDER TABLE

Column Name Data Type Nullable Size

Order_id Int Yes 11

Quantity Int Yes 11

Food_id Int Yes 11

Order_date Datetime Yes

Customer_id Int Yes 11

TABLE 3. 5: CATEGORY TABLE

Column Data Type Nullable Size


Name

Category_id Int Yes 11

Categoryname Varchar Yes 250

Created_by Varchar Yes 255

Created_date Datetime Yes

Updated_by Varchar Yes 200

Updated_date Datetime Yes

21
CHAPTER FOUR

SYSTEM DESIGN, IMPLEMENTATION AND TESTING

4.1 SYSTEM DESIGN

SYSTEM DESIGN is the process of designing the elements of a system such as the architecture,

modules and component, the different interfaces of those components and the data that goes through the

system. It’s the segment that portrays the tools that were utilised to create and actualise the framework. These

incorporate the context diagram, level zero, and data flow chart. These apparatuses helped in designing the

framework and concocting the fundamental idea and rationale of the framework. When data frameworks

improvement advanced to the design activities, the researcher who was in the meantime frameworks

examiner and software engineer concentrated on the inquiry, "How does the framework do what it should do.

4.2 SYSTEM DESIGN OBJECTIVES

The Food Ordering System is a software application to assist restaurant with transaction related to
making food reservation, which includes buying food, and delivering it to the required destination. From
the view point the food ordering system provides the following

1. The system should increase the rate of sales in the cafeteria.

2. The system should make it easy for customers to check the menu and know
the totalamount of food.

3. The system should decrease the queue in the cafeteria.

4. The system should maintain customer information in case of emergency.

5. The system should reduce effort of frustration for customers in getting food.

The system has been developed on the following requirements

4.3 FUNCTIONAL REQUIREMENTS

The following requirements were captured for the intended use of the system.

1. User account: The registered user can directly do the ordering of food and if there isa new
user he/she have to register or he only sees the login and registration page.
2. Creation of new user account: When there is a new customer he should fill the
22
form containing field like Name, Address, and Matric No.., and also Email address
and Password.
3. Checking Availability: To check the available food, the user should scan or check
through the menu list.
4. Ordering of Food: After providing all information the system will ask user for
confirmation. After confirming the information, the food will be ordered.

4.4 NON-FUNCTIONAL REQUIREMENTS

The application was designed to fulfil the following non-functional requirements.

4.4.1 Performance Requirements: Performance of the system is dependent on the


bandwidth of the internet and also the hardware itself.
4.4.2 Security Requirements: There is only one authorized person who can see the
confidential Information. The information of the customer is only available for the
administrator.
4.4.3 Software Quality Attributes: The system is user friendly, interoperable and flexible

4.5 DESIGN STANDARD

The system is designed with several interaction cues on each web page that makes up the web

application (Kungfu Resturant). These cues are well-defined such as to make several functionality that

the application exposes to collect, process and output data. Access to these functionalities is made

possible by the well-designed user interface which embodies several technologies such as AJAX

(Asynchronous JavaScript and XML) to process data. The application is built in a modular form where

these functionalities are built into modules. Some of the modules are as follows:

1. [Link]

2. Check_login.php

3. Inventory_details.php

4. Payments php

4.6 OUTPUT DESIGN AND SPECIFICATION


23
The primary consideration and interest in the design of all output is the information requirement and

other objective of the users. It is the most important and direct source of information to the user

The system is designed in such a way that it efficiently provides output to the user promptly and in a

well-organized manner. The format for the several output are made available on the output web pages.

Output can be relayed using the followingpage modules:

1. Product_list.php: This display output information for the list of food


delicacieswhich are currently available

2. Search_result.php: This displays output information for the order report

3. [Link]: This displays output information that talks about the Ordering outfit

(Kungfu Restaurant).

4.7 INPUT DESIGN AND SPECIFICATION

Input design is processing of converting the user oriented description of the inputs of the system. The

goal of designing input data to make data entry as easy logical and free from errors as possible.

The system is designed to accept several input details efficiently through input forms and user clicks.

The data captured through the user keystrokes and clicks are received by specific modules on the system

and relayed to the back-end of the system for processing. Input is collected using the following page

modules:

1. [Link]: This is used to capture preliminary user navigation information and preference

information which gives the system a method of personalizing the page for the user on the next

visit.

2. Admn_login.php: This is used to capture information about the administrative personnel who

controls content and display on the system.

4.8 DATABASE DESIGN

The objectives of data base is for accuracy and integrity, privacy and security of data. This activity deals

with the design of the physical database. It concentrate on file design or data flow organized around user

24
requirements. How data are organized depends on the data and response requirements that determine

system configurations. An integrated approach to file design is the database. The general theme is to

handle information as an integrated whole, with a minimum of redundancy and improved performance,

type and size of data structure used.

4.8.1 DATABASE SPECIFICATION

The database system used to implement the back-end of the system is MySQL. Access to the system

was made possible by a graphical interface (phpMyadmin) with an ISAM engine. The database name is

Kungfu Restaurant and the structure of the data tables in the database are as follows:

1. Admin

2. Payment

3. Products

4. Transactions

25
4.9 MAIN MENU DESIGN

Main Menu

Home Login Fast Food About Us Contact Us

FIGURE 4.1 : MAIN MENU DESIGN

26
4.10 SUBSYSTM DESIGN

4.10.1 SERVER SIDE SUBSYSTEM DESIGN

FIGURE 4 .2: ADMINISTRATOR USE CASE DIAGRAM

27
4.10.2 CUSTOMERS DESIGN [CLIENT SIDE]

CLIENT / CUSTUMER

FIGURE 4.3 :CUSTOMER USE CASE DIAGRAM

28
4.11 SYSTEM FLOW CHART

A flowchart is a type of diagram that represents a workflow or process. A flow chart can also be defined

as a diagrammatic representation of an algorithm, step-by-step approach to solving a task. The flowchart

shows the steps as boxes of various kinds, and their order by connecting the boxes with arrows. This

diagrammatic representation illustrates a solution model to a given problem. Flowcharts are used in

analyzing, designing, documenting or managing a process or program in various fields. . Thus it

summarizes what operations are undertaken and where and when they take place. Normally in a system

flowchart input from outside are shown to the left and outputs to the right. Symbols representing the

operations undertaken and the documents used are then placed in the appropriate places which gives a

general flow of data from top to bottom and left to right. Arrows are used on the connecting lines to

indicate the logical flow or sequence

FIGURE 4. 4 : SYSTEM FLOW CHART

29
4.12 CONTEXT FLOW DIAGRAM

The context diagram shows the system under consideration as a single high-level process and then shows the

relationship that the system has with other external entities (systems, organizational groups, external data

stores etc.)

Context diagram is also referred to as context-level data-flow diagram or a level-0 data flow diagram. Since

a context diagram is a specialized version of data flow diagram, understanding a bit about data flow diagram

can be helpful.

FIGURE 4.5 :CONTEXT FLOW DIAGRAM

4 .13 DATA FLOW DIAGRAM

Level 1 Data-flow diagram (DFD) is a way of representing a flow of a data of a process or a system

(usually an information system). The DFD also provides information about the outputs and inputs of

each entity and the process itself. A data-flow diagram has no control flow, there are no decision rules

and no loops. Specific operations based on the data can be represented by a flow chart the interaction

between the system and outside entities.

A DFD is also known as a “bubble Chart” has the purpose of clarifying system requirements and

identifying major transformations that will become programs in system design. So it is the starting
30
point of the design to the lowest level of detail. A DFD consists of a series of bubbles joined by data

flows in the system.

FIGURE 4.6 : DATA FLOW DIAGRAM

4.14 ENTITY-RELATIONSHIP DIAGRAM

Entity-relationship diagram (ERD) is a data modeling technique that graphically illustrates an

information system’s entities and the relationships between those entities. An ERD is a conceptual and

representational model of data used to represent the entity framework infrastructure. The elements of an

ERD are:

Entities are represented by labeled rectangles

Relationships are represented by a solid line connecting two entities

Attributes: are listed inside the entity rectangle

31
FIGURE 4 .7 : E-R DIAGRAM

4.15 SYSTEM REQUIREMENT

Computer system is made up of units that are put together to work as one in order to achieve a common

goal. The requirements for the implementation of the new system are:

The Hardware

The Software

32
SOFTWARE REQUIREMENT SPECIFICATION

Operating System : Windows XP/7

Presentation layer : PHP(Front-End),HTML, JS, CSS

Database : My SQL(Back-end)

HARDWARE REQUIREMENT SPECIFICATION

Processor : Standard processor with a speed of 2.0GHz

RAM : 2BG

Hard Disk : 50 GB or more

Monitor : Standard color monitor

Keyboard : Standard keyboard

Mouse : Standard mouse

4.16 CHOICE OF PROGRAMMING LANGUAGE

So many programming languages were put into consideration in the cause of designing this software. A

lot of factors were also considered which includes the online database access, data transmission via

networks, online database retrieval, online data capture, multi user network access database security,

etc.

4.16.1 THE FRONT END: Front end development is the front facing part of the web which can be

viewed on web browsers. The technique of generating HTML, CSS, and JavaScript for a website or

33
Web application such that a user can view and interact with them directly is known as front end

development. The front end technologies used for this application include:

a. HTML: Html stands for Hyper Text Markup Language, it is the standard markup language for

documents designed to display in the web browser. HTML is usually used alongside other

technologies such as Cascading Style Sheet (CSS) and scripting Language such as JavaScript.

HTML is a semantic markup language that specifies the structure of a web page. HTML consists of

elements which are called HTML tags which are the building blocks of HTML pages. Tags such as

<input/> and <img/> directly introduce one page contents into the page.

HTML creates structured documents by denoting structural semantics for text such as paragraphs,

headings, links and other items making it a markup language, rather than a programming language.

b . CSS Stands for "Cascading Style Sheet." Cascading style sheets are used to format the layout of Web

pages. It is used to control presentation, formatting, and layout. They can be used to define text styles,

table sizes, and other aspects of Web pages that previously could only be defined in a page's HTML.

Once the style is defined in cascading style sheet, it can be used by any page that references the CSS

file. Plus, CSS makes it easy to change styles across several pages at once files link to one CSS file in

order to style the pages. This means, that if you need to alter the design of all your pages, you only need to edit

one .css file to make global changes to your entire website.

Here are a few reasons this is better.

 Easier Maintenance

 Reduced File Size

 Reduced Bandwidth

 Improved Flexibility

c . JavaScript: is used to control the behavior of different elements of web page. JavaScript often

abbreviated as JS, is a high level, dynamic, untyped, and interpreted programming language. It is one of the three

main technologies of World Wide Web content generation, alongside HTML and CSS; the majority of websites

34
use it, and it is supported by all current web browsers. JavaScript is a multi- paradigm language that supports

object-oriented, imperative, and functional programming activities .

4.16.2 THE BACK END: The back end is the server code that handles client requests and contains the

logic to provide the relevant data back to the client. The database, which will persistently store all of the

data for the application, is also part of the back end. This application's back-end code includes the

following:

a. PHP: PHP means - Personal Home Page, but it now stands for the recursive back acronym

PHP meaning Hypertext Preprocessor. It is a server side scripting language that is used to develop

Static websites or Dynamic (content) websites or Web applications

PHP code may be embedded into HTML code, or it can be used in combination with various

web template systems, web content management system and web frameworks and is used

because it compelling reason:

 PHP is open source and free.

 Large community document

 PHP is cross platform; this means you can deploy your application on a number of

different operating systems such as windows, Linux, Mac OS etc

Php Syntax

PHP was designed to work with HTML, and as such, it is embedded into the HTMLcode.

You can create PHP files without any html tags and that is called Pure PHP file.

The server interprets the PHP code and outputs the results as HTML code to the webbrowsers.

The difference between PHP and client language like HTML is, PHP codes runs on a server while

HTML codes are render on a web browser.

In order for the server to identify the PHP code from the HTML code, we must always enclose

35
the PHP code in PHP tags.

b. MYSQL: MySQL is a relational database management system (RDBMS) based on structured query

language that is free and open source (SQL). It is a component of the widely used LAMP platform,

which consists of Linux, Apache, My SQL, and PHP. My SQL database is currently accessible on the

most popular operating systems. It is compatible with BSD Unix, Linux, Windows, and Mac OS. My

SQL is used by Wikipedia and YouTube. Every day, these sites handle millions of searches. My SQL

comes in two varieties: My SQL server system and My SQL embedded system.

4.17 IMPLEMENTATION

The online food ordering system would need a database to store all the order details, customer details

and employee details to be able to work effectively. MySQL would be used to implement the database.

MySQL was used because installation and setup is a simple task, it is open source and also inexpensive

to maintain. MySQL Workbench would be used as the graphical user interface to make developing the

database simple. The diagram below shows the database implementation for online food ordering

system.

4.18 SYSTEM TESTING

This is the phase were severa technique is used in tthe testing the framework so as to address blunders or

expel errors that may arose. This stage included testing the source code to ensure that it delivered the

normal and wanted outcomes when exposed to a lot of predefined conditions. It was subdivided into

three noteworthy stages, that is, unit trying, framework testing and client acknowledgment testing

Under unit testing, specific parts of the source code were tested. Emphasis was put on the website

database connections to ensure that information sent by a user from the web page form reaches the

systems database.

System testing involved putting the entire software to test in order to find out whether or

36
not the functional requirements of the system had been efficiently and effectively integrated and

satisfied

Finally, User acceptance testing was done; this was a key factor for the success of the system

performance. The system under consideration was tested for user acceptance by constantly keeping

in touch with the system users that is, the airline customers and staff.

FIGURE 4.8: MySQL DATABASE IMPLEMENTATION

37
4.19 RESULT OF THE FRONTEND IMPLEMENTATION

4.19.1 The User Interface Design

FIGURE 4.9 : HOME PAGE

a ) USER’S ENVIRONMENT HOMEPAGE

Welcome Page :This appears when the URL of Kada Plaza - Kungfu Restuarant is typed in any

browser. While on this page customers are required to register or login

38
FIGURE 4. 10 : REGISTRATION LOGIN PAGE

b) User Dashboard : After a successful login the customer is being directed to the user dashboard

section where the user can view the menu list and also order food and log out.

FIGURE 4.11 : USER DASHBOARD ORDERING SYSTEM


c ) Order List
This section shows the list of previously and currently ordered food. It contains the list of the ordered
food as well as the amount spent for each food on the menu, it also contains the quantity of the particular

39
meal purchased and the date and time of purchase.

FIGURE 4 .12 : ORDER LIST FOR FOOD ORDER SYSTEM

d ) Administrator Environment / Password Interface


This is restricted environment; it is used by the administrator to change system content. It’s accessed by

clicking on administrator link on the system menu. Access to this environment requires an admin

password. Once the correct admin password is entered the person will have access to modify/ delete and

all control of the system.

FIGURE 4.13 : ADMINISTRATORS LOGIN PAGE

40
CHAPTER FIVE

SUMMARY, CONCLUSION AND RECOMMENDATIONS

5.1 SUMMARY

At the end of this project work, I was able to design and develop software that can successfully handle

online food ordering and product order for Kungfu Resturant , Benin. In the process of the design,

firsthand information on fast food businesses was obtained. This work also will serve as a stepping-

stone for people who wish to research more on this topic. Other benefits are:

1. Provision of facility for handling text electronically using powerful and sophisticated word

processors to produce elegant and error free documents

2. In addition to storing the organization’s operational data on disk backing storage, other forms of data

used by the organization could also benefit fromstorage on such medium.

3. With the installed software, product ordering and delivery was made easier. The systematic

approaches used during each phase of the software development provides a clear road map that would

be of immense help to anyone carrying out research work in this area.

5.2 CONCLUSION

The development of online food ordering system involved many phases. The approach used is a top-

down one concentrating on what first, then how and moving to successive levels of details.

The first phase started with a detailed study of the problems and prospects of ordering in Kungfu

Restaurant Benin. In the course of this study, many problems were discovered to have hindered the

effectiveness of the existing manual system. These problems, information needs and activities were

documented and later used as the basis for system design, which immediately followed the first phase.

The design phase was concerned primarily with the specification of the system elements in manner

that best met the organization’s business needs.

During this phase, strict adherence was made on proven software engineering principles and practices.

To implement this design, a computer program was then written and tested in phpMyadmin

41
environment.

It is hoped that effective implementation of this software product would eliminate many problems

discovered during systems investigation.

5.3 RECOMMENDATIONS

It is known that for any meaningful computer based information management to be integrated into any

organization, proper training and orientation has to be given both to the staff and management. Proper

training should be given to the data entry staff on how to handle the computer hardware especially

during backup processes. In particular, electronic storage media are usually sensitive to change in

temperature or pressure and as such, data can be lost very easily. The staff should also be highlighted on

the need and advantage of the system and how it will equally assist them in their various field of work.

They should also be informed of the cost of maintaining this new system so that they will handle it with

all carefulness. Training materials should not be presented in formal way but with procedures like

policies and form etc., they should be circulated to the personnel. This will at the end generate

appreciation and needed interest to operate the system.

42
REFERENCES

Ahmed, U., Waqas, H., & Afzal, M. (2019). Pre-production box-office success quotient forecasting.
Soft Computing. Retrieved 14/06/2021 from [Link] 019-04303-w
Alexsoft. (2020). Machine learning pipeline: Architecture of ML platform in production. Retrieved
02/05/2021 from [Link]
Algorithmia. (2020). what an ML pipeline is and why it is so important. Retrieved 02/05/2021 from
[Link]
Ayush P. (2019). An Introduction to machine learning for beginners. Retrieved 02/05/2021 from
[Link]
Copeland, B. J. (2020). Artificial Intelligence. University of Canterbury, Christchurch, New Zealand.
Retrieved 02/05/2021 from [Link]
Edward W. (2018). Supervised and unsupervised machine learning: Which is better for network threat
detection and why? Retrieved 02/15/2021 from
[Link]
learning-for-network-threat-detection/
Hannes H. & Catherine N. (2021). Building machine learning pipelines. Retrieved 03/15/2021 from
[Link] /9781492053187/[Link]
IBM Cloud Education. (2020). IBM cloud learn hub: What is machine learning. Retrieved
02/05/2021 from [Link]
Jake, F. (2021). Artificial Intelligence. Investopedia. Retrieved 02/05/2021 from
[Link]
Keith D. F. (2019). A brief history or machine learning. Retrieved 02/05/2021 from
[Link] . Dataversity.
Navdeep S. G. (2020). Machine learning pipeline deployment and architecture. Retrieved
14/06/2021 from [Link]
Sandy C., Basar O., & Selime S. (2019). Forecasting box office performances using machine
learning algorithms. Retrieved 27/06/2021 from
[Link]
nces_Using_Machine_Learning_Algorithms
Siddharth P. (2021). An Introduction to machine learning. Retrieved 02/05/2021 from
[Link]
Simplilearn (2022). Stock price prediction using Machine Learning: An easy guide. Retrieved
12/11/2022 from [Link] price-
prediction-using-machine-learning
Raphael C. C. D. S. (2020). Movie’s box office performance prediction: An approach based on
movie’s script, text mining and deep learning. Nova information management school
Robbie A. (2020). A Gentle introduction to machine learning concepts. Retrieved 02/05/2021 from
[Link]
learning-concepts-cfe710910eb
Tim, J. M. (2017). Artificial Intelligence: Models for machine learning. Retrieved 02/05/2021 from
[Link] learning
What is a machine learning pipeline?. (2021). Retrieved 03/05/2021 from [Link]
learning-pipeline/
Wikipedia. (2021). Machine learning. Retrieved 02/05/2021 from
[Link]
Kapchnaga, R, (2014). Food Ordering System Using Mobile Phone (Doctoral dissertation, UTAR).
[Link].(2017).database.m[online][Link]

43
APPENDIX 5: PROGRAM SOURCE CODE

REGISTRATION AND LOGIN


<?php
session_start();
if(isset($_SESSION['id']) ){
header("Location:dashboard.p
hp");die();
}

if(isset($_SESSION['admin']
)){
header("Location:admin-
[Link]");die();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta support="Niush" domain=".tk" status="live">
<title> Kada plaza-kungfu restaurant choping-easy</title>
<link rel="stylesheet" href="dist/css/[Link]">
</head>
<body >
<div class="container">
<br/>
<h1> Kada plaza-kungfu restaurant </h1>
<hr/>

<?php
if(isset($_GET['user']) && $_GET['user'] == 'off'){
?>
<div class="alert alert-warning"
role="alert">User Logged Out.
</div>
<?php } ?>

<?php
if(isset($_GET['login'])){
?>
<div class="alert alert-danger"
role="alert">Login Error !!
</div>
<?php } ?>

<?php

44
if(isset($_GET['register'])){
if($_GET['register'] ==
'success'){
?>
<div class="alert alert-success"
role="alert">Register Successful !!
Login to Continue.
</div>
<?php
}else{
?>
<div class="alert alert-danger"
role="alert">Registration Failed !!
</div>
<?php
}
}
?>
<?php
if(isset($_GET['email'])){
if($_GET['email'] == 'taken'){
?>
<div class="alert alert-danger"
role="alert">Opps. Email already
used !!!
</div>
<?php
}
}
?>

<div class="container">
<div class="row">
<div class="col-sm">
<div class="card">
<div class="card-header">
<h4>Login</h4>
</div>

<div class="card-body">
<form id="login" action="[Link]" method="POST">
<div class="form-group">
<label for="email">Email: </label>
<input type="text" class="form-control"
placeholder="Email" id="email" name="email" required/>
</div>

<div class="form-group">
<label for="password">Password: </label>

45
<input type="password" class="form-control"
placeholder="Password" id="password" name="password" required/>
</div>

<input class="btn btn-success" type="submit" value="Login"/>


</form>
</div>

<div class="card-footer">
<a href="[Link]">Login as Admin ?</a>
</div>
</div>
</div>

<div class="col-sm">
<div class="card">
<div class="card-header">
<h4>Register as a new Customer:</h4>
</div>

<div class="card-body">
<form id="register" action="[Link]" method="POST">
<div class="form-group">
<label for="name">Name: </label>
<input type="text" class="form-control"
placeholder="Full Name" id="name" name="name" required/>
</div>

<div class="form-group">
<label for="address">Hostel: </label>
<input type="text" class="form-control"
placeholder="Hostel" id="address" name="address" required/>
</div>

<div class="form-group">
<label for="contact">Matric Number: </label>
<input type="text" class="form-control"
placeholder="Matric Number" id="contact" name="contact" required/>
</div>
<div class="form-group">
<label for="email">Email: </label>
<input type="text" class="form-control"
placeholder="Email" id="email" name="email" required/>
</div>
<div class="form-group">
<label for="password">Password: </label>
<input type="password" class="form-control"
placeholder="Password" id="password" name="password" required/>
</div>

46
<input class="btn btn-success"
type="submit"value="Register"/>
</form>
</div>
</div>
</div>
</div>
</div>

</div>

<br/>
<div class="card-footer">
<h4>&copy; Kada plaza-kungfu restaurant </h4>

</div>
</body>
</html>

REGISTRATION CHECK
<?php
require '[Link]';

$name=isset($_POST['name']) && !empty(trim($_POST['name'])) ?


htmlspecialchars(trim($_POST['name'])):null;
$address=isset($_POST['address']) && !empty(trim($_POST['address'])) ?
htmlspecialchars(trim($_POST['address'])):null;
$contact=isset($_POST['contact']) && !empty(trim($_POST['contact'])) ?
htmlspecialchars(trim($_POST['contact'])):null;
$email=isset($_POST['email']) && !empty(trim($_POST['email'])) ?
htmlspecialchars(trim($_POST['email'])):null;
$password=isset($_POST['password']) && !empty(trim($_POST['password'])) ?
md5(trim($_POST['password'])):null;

//echo $name.$username.$password;

if($password != null && $email != null && $name != null && $address != null &&
$contact != null){
$select_query = "SELECT * FROM tbl_customer WHERE email='${email}'";
$search_user = $db->query($select_query);
$search_result = $search_user->fetch_assoc();

if($db->affected_rows > 0){


header("Location: [Link]?register=taken&email=exist");
die();

47
$insert_query = "INSERT INTO
tbl_customer(name,email,address,contact,password)
VALUES('${name}','${email}','${address}','${contact}','${password}')";
$insert_user = $db->query($insert_query);

if($db->affected_rows > 0){


header("Location:[Link]?register=success"
);
}else{
header("Location:[Link]?register=failed"
);die();
}
}else{
header("Location:[Link]?register=failed_empty");
die();
}
$db->close();
?>

LOGIN CHECK
<?php
require '[Link]';

$email=isset($_POST['email']) &&
!empty(trim($_POST['email'])) ?
htmlspecialchars(trim($_POST['email'])):null;
$password=isset($_POST['password']) &&
!empty(trim($_POST['password'])) ?md5(trim($_POST['password'])):null;

if($password !== null && $email !== null){


$select_query = "SELECT * FROM tbl_customer WHERE email='${email}'
ANDpassword='${password}'";
$search_user = $db->query($select_query);
$search_result = $search_user->fetch_assoc();

if($db->affected_rows > 0){


$user_id = $search_result['customer_id'];
$email = $search_result['email'];
$name = $search_result['name'];
$address =
$search_result['address'];
session_start();
$_SESSION['id']=$user_id;
$_SESSION['name']=$name;
$_SESSION['email']=$email;

$_SESSION['address'] = $address;
48
header("Location:
[Link]");die();
}else{
header("Location:[Link]?login=failed");
die();
}
}else{
header("Location:[Link]?login=failed_empty");
die();
}
$db->close();
?>

CHECK ORDER
<?php
require '[Link]';

$food_id=isset($_POST['food_id']) && !empty(trim($_POST['food_id'])) ?


htmlspecialchars(trim($_POST['food_id'])):null;
$customer_id=isset($_POST['customer_id']) &&
!empty(trim($_POST['customer_id'])) ?
htmlspecialchars(trim($_POST['customer_id'])):null;
$quantity=isset($_POST['quantity']) && !empty(trim($_POST['quantity'])) ?
trim($_POST['quantity']):null;
$orderdate = date('Y-m-d H:i:s');

//echo $name.$username.$password;

if($quantity != null && $customer_id != null && $food_id != null){


$insert_query = "INSERT INTO tbl_order
(quantity,food_id,orderdate,customer_id)
VALUES('${quantity}','${food_id}','${orderdate}','${customer_id}')";
$insert_order = $db->query($insert_query);

if($db->affected_rows > 0)
{ header("Location:[Link]?order=success");
}else{
echo mysqli_error($db); die();
header("Location:[Link]?order=failed"); die();
}
}else{
header("Location:[Link]?order=failed_empty");
die();
}

$db->close();
?>
DASHBOARD
49
<?php
require '[Link]';

session_start();
if(!isset($_SESSION['email']) && !isset($_SESSION['id'])
){header("Location:[Link]?login=failed");
die();
}

if(isset($_SESSION['admin'])){
header("Location:admin-
[Link]");die();
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta support="Niush" domain=".tk" status="live">
<title>Admin Dashboard</title>
<link rel="stylesheet" href="dist/css/[Link]">
</head>
<body>
<br/>
<div class="container">
<h4>Welcome, <?=$_SESSION['name'];?></h4>

<div class="row">
<div class="col-sm">
<h4>User Dashboard</h4>
</div>
<div class="pull-right col-l">
<a href="[Link]" class="btn btn-success">View Orders</a>
<a href="[Link]"><button class="btn btn-danger">Logout</button></a>
</div>
</div>
<hr/>

<?php
if(isset($_GET['order'])){
if($_GET['order'] == 'success'){

50
?>
<div class="alert alert-success" role="alert">
Order Successfully Placed !!
</div>
<?php
}else{
?>
<div class="alert alert-danger" role="alert">
Order Failed !!
</div>
<?php
}
}
?>

<?php
$select_query = "SELECT tbl_food.food_id, tbl_food.foodname,
tbl_food.foodprice, tbl_food.foodimage, tbl_category.categoryname
FROM tbl_food JOIN tbl_category WHERE tbl_food.categoryid =
tbl_category.category_id ORDER BY categoryid";
$search_posts = $db->query($select_query);
?>

<div class="card-footer">
<h2>Food List</h2>
</div>
<table class="table">
<thead class="thead-light">
<tr>
<th scope="col">Name</th>
<th scope="col">Category</th>
<th scope="col">Price</th>
<th scope="col">Image</th>
<th scope="col">Quantity</th>
<th scope="col">Order</th>
</tr>
</thead>
<tbody>
<?php
while($search_result = $search_posts->fetch_assoc()){
echo '<form action="[Link]" method="POST">';
echo '<tr>';
echo '<td>';
echo '<input type="hidden" name="food_id" value="'.
$search_result['food_id'] .'">';
echo '<input type="hidden" name="customer_id" value="'.
$_SESSION['id'] .'">';
echo $search_result['foodname'];

51
echo '</td>';

echo '<td>';
echo $search_result['categoryname'];
echo '</td>';

echo '<td>';
echo $search_result['foodprice'];
echo '</td>';

echo '<td>';

if($search_result['foodimage'] != null){

?>
<img src="<?=$search_result['foodimage']?>" width="120px"/>
<?php
}else{
echo 'NULL';
}
echo '</td>';

echo '<td>';

?>

<input type="number" name="quantity" value="1" min="1">


<?php
echo '</td>';

echo '<td>';

?>
<input class="btn btn-success" onclick="return confirm('Place
TheOrder ?');" type="submit" value="Order">
</form>
<?php
echo '</td>';

echo '</tr>';
}
?>
</tbody>
</table>

<br/>
<div class="card-footer">
<h4>&copy; Kada plaza-kungfu Restuarant</h4>
echo '</td>';
52
echo '<td>';
echo $search_result['categoryname'];
echo '</td>';

echo '<td>';
echo $search_result['foodprice'];
echo '</td>';

echo '<td>';

if($search_result['foodimage'] != null){

?>
<img src="<?=$search_result['foodimage']?>" width="120px"/>
<?php
}else{
echo 'NULL';
}
echo '</td>';

echo '<td>';

?>

<input type="number" name="quantity" value="1" min="1">


<?php
echo '</td>';

echo '<td>';

?>
<input class="btn btn-success" onclick="return confirm('Place
TheOrder ?');" type="submit" value="Order">
</form>
<?php
echo '</td>';

echo '</tr>';
}
?>
</tbody>
</table>

<br/>
<div class="card-footer">
<h4>&copy; Kada plaza-kungfu Restuarant </h4>
echo '</td>';

echo '<td>';
echo $search_result['categoryname'];
53
echo '</td>';

echo '<td>';
echo $search_result['foodprice'];
echo '</td>';

echo '<td>';

if($search_result['foodimage'] != null){

?>
<img src="<?=$search_result['foodimage']?>" width="120px"/>
<?php
}else{
echo 'NULL';
}
echo '</td>';

echo '<td>';

?>

<input type="number" name="quantity" value="1" min="1">


<?php
echo '</td>';

echo '<td>';

?>
<input class="btn btn-success" onclick="return confirm('Place
TheOrder ?');" type="submit" value="Order">
</form>
<?php
echo '</td>';

echo '</tr>';
}
?>
</tbody>
</table>

<br/>
<div class="card-footer">
<h4>&copy; Kada plaza-kungfu Restuarant </h4>
</div>
</body>
</html

54

You might also like