Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
43 views64 pages

Moses Project

Uploaded by

Moses A. William
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)
43 views64 pages

Moses Project

Uploaded by

Moses A. William
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
You are on page 1/ 64

CHAPTER ONE

INTRODUCTION

1.1 Background of Study

Online Restaurant Management System is a web application. It is developed to

automate day to day activity of a restaurant. Restaurant is a kind of business that serves people

all over the world with ready-made food. Services to be provided include ordering of food and

reservation of table online, customer information management, waiter information

management, menu information management and reporting are some menu of the system.

The restaurant menu is divided into categories such as appetizers, soups, salads, and

drinks. The main goal of the system is to provide online ordering and reservation services. Each

menu item has a name, price, and recipe. To place an order, customers must first create an

account and become a member. This helps to reduce the risk of fake bookings (Yung-Fu, 2012).

The system also facilitates online ordering and reservations, making it more convenient for

customers.

According to (Ching-Su, 2012), Online Restaurant management system is a system

used to manage the restaurant business. After successful login, the customer can access the

menu page with the items listed according to the desired time. The main point of developing

this system is to help restaurant administrator manage the restaurant business and help customer

for online ordering and reserve table.

1.2 Problem definition

The following problems initiated this study

i. Record taken in restaurants today are manually done using paper and pen.

ii. For transactions to be done in a restaurant the customer has to be present.

iii. Most of the management activities of the restaurants are manually done and are

inefficient.

1
1.3 Aim and objectives of the study

The aim of this study is to design and implement an Online Restaurant Management

System. The following objectives will help to achieve the aim:

i. To analyze existing systems by reviewing recent literature, carrying out surveys and
interviews of restaurants owners.
ii. To perform requirement analysis of the proposed system.
iii. To design a Computerized Restaurant Management System using PHP & MySQL.
iv. To implement the System using Laragon Wampp Server (which includes PHP and
MySQL).
v. To evaluate the system by giving required input to test its performance.
1.4 Significance of the Study

The development of a PHP-based Restaurant Management System is a significant step

towards improving the efficiency and effectiveness of restaurant operations. This study

holds value for several stakeholders, including restaurant owners, staff, and customers,

by addressing the challenges of traditional restaurant management and introducing a

digital solution tailored to streamline various processes.

For restaurant owners, the system provides a comprehensive platform to manage day-

to-day operations, including menu updates, order tracking, inventory management, and

sales monitoring. The system enhances decision-making through real-time access to

critical business data, enabling owners to make informed choices that improve

profitability and resource utilization.

For customers, the system enhances the dining experience by introducing features such

as online reservations, digital menu browsing, and quick order placement. These

conveniences reduce waiting times, improve service accuracy, and provide a more

personalized dining experience.

From a broader perspective, the study demonstrates how technology, specifically PHP

and MySQL, can be applied to create scalable and efficient solutions for the foodservice

2
industry. It highlights the importance of adopting digital tools in enhancing operational

efficiency, reducing errors, and staying competitive in an increasingly tech-driven

market.

1.5 Scope and limitation of the study

This study focuses on the Design, Documentation and Implementation of an online

Restaurant Management System.

i. The limitation of this work includes erratic power supply both in school and home

ii. The programming aspect of this, posed a lot of problematic bases that took me some

days to debug

iii. Poor internet facilities, lack of proper materials

iv. Cost, which is a major constraint in the course of fact finding

1.6 Definition of terms

Online Restaurant Management System: Is a web application that is developed to automate

day to day activity of a restaurant. Restaurant is a kind of business that serves people all over

world with ready-made food. This system is developed to provide service facility to restaurant

and also to the customer. This restaurant management system can be used by employees in a

restaurant to handle the clients, their orders and can help them easily find free tables or place

orders.

Administrator: Administrator or manager is the person who will manage the entire system.

He is allowed to reassign the cook according to his priority; he can edit the menu information

such as its price, items available currently, etc.

Customer: This user will register to be a member to use the online system of this online

restaurant management system. This online ordering divided into two type of customer; it is

customer dine-in ordering and takeaway ordering.

3
Dine in ordering: Dine in ordering, customer will view menu, make online ordering and make

a reservation table. This system allows customer to place an order or allow him to cancel the

book order.

Take away ordering: In takeaway ordering, customer can view menu and online ordering

without reservation table.

System: A computer whole, together as a mechanism or interconnecting network.

Information: A processed data that is conveyed or presented by a particular sequence of

symbols, impulses etc.

Customer: Guest/person who patronizes Restaurant.

Authorization: To give staff permission or approval to access information.

Record: Is the collection of information or data for evidence purpose which can easily be

accessed when need arises.

Management: This is the process of getting activities completed efficiently with and through

other people.

1.7 Chapter Layout

This section provides an overview of the structure of the project document. It outlines

the content of each chapter, providing a roadmap for the reader.

Chapter One: Introduction - This chapter introduces the study, providing background

information, problem definition, research justification, and outlining the scope, limitations, and

objectives of the study.

Chapter Two: Literature Review - This chapter reviews relevant literature, including

previous research on health and fitness tracking technologies, wearable devices, data

integration, personalized plans, and motivational features.

Chapter Three: System Analysis and Design Methodology- This chapter details the system

requirements, design methodology, and architectural framework of the proposed Health and

Fitness Tracking application.

4
Chapter Four: System Implementation and Result - This chapter describes the

implementation of the system, including the coding, integration, and testing phases. It also

discusses the results of system testing and validation.

Chapter Five: Summary and Conclusion - This chapter provides an analysis of the findings,

discusses the implications of the study, and offers recommendations for future research. It also

presents the study's conclusion.

5
CHAPTER TWO

LITERATURE REVIEW

2.1 Technology’s effect on hotels and restaurants

Current economic conditions have had a dramatic, negative financial impact on the

hospitality industry (Brandau, 2011). Consumer behavior patterns have been changed for

multiple reasons, including high levels of unemployment, a deep recession, and overall fear of

what the future holds. Hoteliers and restaurateurs will need to look at various strategic vehicles

to build and regain customers. The face of innovation in technology is continually changing.

The hotel and restaurant industry needs to take a proactive stance in implementing

technological advances, while continually striving to build levels of service quality and guest

loyalty. A 2004 study conducted by the National Restaurant Association stated that 70% of a

restaurants business base comes from repeat customers. The same survey asked restaurateurs

if it was getting more difficult to maintain customer loyalty. Fifty-two percent of the

respondents said. Tapping into customers’ needs through the use of information can be

instrumental in building loyalty and gaining competitive advantage. (Piccoli, 2011). Hotels and

restaurants are continually competing for employees, locations, and more recently information

about customers. As more people are using the Internet there is a high amount of information

that is being captured on web server logs. Proper extraction of this information coupled with

high levels of service is what will help the hotel and restaurant industry build competitive

advantage in a troubled economy. An organization’s ability to take advantage of external

environmental factors will help the firm sustain and grow in economically challenging times.

(Oparanma et al, 2011).

By accomplishing a customer-centered focus, companies will be able to highlight their

strengths and highlight opportunities for improvement. Information regarding customers will

continue to have a big impact on the future of the industry. This information base can be seen

through the explosion of personal and business social network sites such as LinkedIn,

6
Facebook, Twitter. Identifying patterns of current and potential customers and servicing their

needs is one way that organizations are attempting to use information as a leverage tool against

competitors. (Piccoli, 2010). The following manuscript analyzed the strategic analysis

methodology for evaluating and taking advantage of future technological innovations for the

industry. Proactive identification and implementation of these technologies can help in building

a sustainable competitive advantage (Piccoli, 2008). The manuscript additionally reviewed the

existing literature regarding the role technology has played in the hotel and restaurant industry

and how strategic innovation has spurred “best practices” for the industry.

2.2 State of the art

The evolution of restaurant management systems has been a transformative journey,

reflecting advancements in technology and the dynamic needs of the foodservice industry.

From manual processes to sophisticated digital platforms, these systems have become integral

to the success of modern restaurants.

1. Manual Processes and Basic POS Systems (Pre-2000s)

In the early stages, restaurant management relied heavily on manual processes. Orders

were taken on paper, cash registers handled billing, and inventory tracking was done

using physical ledgers. While these methods were functional, they were error-prone,

time-consuming, and inefficient. The introduction of basic Point of Sale (POS) systems

in the late 20th century marked a critical milestone. These early POS systems, though

limited to basic billing and sales tracking, brought a semblance of automation to

restaurant operations. However, their functionality was isolated, with no integration

between ordering, inventory, or employee management. They also required significant

hardware investments, making them accessible only to larger restaurants.

2. Integration and Standalone Systems (2000–2010)

The early 2000s witnessed a surge in the development of standalone restaurant

management software. These systems combined core functions like inventory

7
management, employee scheduling, and sales reporting with the POS system. They

allowed restaurants to streamline operations but were often installed on-premises,

requiring dedicated servers and technical expertise to manage. The era also saw the

adoption of electronic menu boards and order processing systems, which improved

communication between the front-of-house and kitchen staff. However, these solutions

still lacked the scalability and accessibility required by smaller or multi-location

establishments.

3. Web-Based and Cloud-Enabled Systems (2010–2020)

The emergence of web-based technologies and cloud computing revolutionized

restaurant management. Systems developed using technologies like PHP and MySQL

became the norm, offering affordable, scalable, and accessible solutions. Key features

during this era included:

a. Cloud Storage: Enabled real-time data synchronization across multiple

locations, allowing managers to monitor sales and inventory remotely.

b. Online Ordering and Delivery Integration: Platforms integrated seamlessly

with third-party delivery apps like Uber Eats and DoorDash, catering to the

growing demand for takeout and delivery services.

c. Mobile Applications: Allowed customers to browse menus, place orders, and

make payments via their smartphones, enhancing convenience.

d. Loyalty Programs: Restaurants began incorporating customer retention

strategies, such as loyalty points and rewards systems.

e. This era democratized restaurant management technology, making it accessible

to small and medium-sized enterprises while enabling multi-branch

coordination for larger chains.

8
4. Advanced Technology Integration (2020–Present)

The current phase of restaurant management systems is characterized by the integration

of advanced technologies that optimize every aspect of operations and customer

interaction:

a. Artificial Intelligence (AI): AI-driven systems predict demand, suggest menu

optimizations, and personalize customer experiences. Chatbots powered by AI

assist in order placement and customer service.

b. Internet of Things (IoT): Smart kitchen appliances and IoT-enabled devices

track food preparation, monitor inventory levels in real-time, and reduce energy

consumption.

c. Contactless Solutions: The pandemic accelerated the adoption of QR code

menus, digital wallets, and contactless payment systems, enhancing hygiene and

customer convenience.

d. Advanced Analytics: Real-time data analysis empowers restaurant owners to

make data-driven decisions regarding menu performance, staffing, and

inventory management.

e. Sustainability Features: Modern systems now include tools for tracking food

waste, optimizing resource usage, and aligning with eco-friendly practices.

f. The integration of these technologies has elevated restaurant management

systems from mere operational tools to strategic assets, driving profitability and

customer satisfaction.

5. Future Prospects (Beyond 2023)

The future of restaurant management systems is poised to embrace even more

groundbreaking innovations:

a. Blockchain Technology: For secure and transparent transactions, particularly

in supply chain management and customer loyalty programs.

9
b. Augmented Reality (AR): For interactive menu displays and immersive dining

experiences, enhancing customer engagement.

c. Machine Learning (ML): For refining predictive analytics, improving demand

forecasting, and offering hyper-personalized customer experiences.

d. Omnichannel Integration: Seamless connections between dine-in, takeout,

and delivery services will further enhance operational efficiency and customer

convenience.

This progression underscores the critical role that restaurant management systems play in

adapting to industry challenges, technological shifts, and evolving customer expectations. As

these systems continue to evolve, they will remain indispensable for restaurants aiming to

thrive in a competitive, tech-driven marketplace.

2.3 Review of related works:

Karthick Panneerselvam et al. (2022) designed and implemented Food Board, a Restaurant

Management System aimed at optimizing the operational workflows of fast-food restaurants.

The system integrates features such as Point of Sale (POS), real-time order management, and

a kitchen dashboard to enhance communication between front-of-house and back-of-house

staff. Developed using modern web technologies, including HTML, CSS, JavaScript,

Bootstrap, ReactJS, and NodeJS, it provides a responsive and user-friendly interface. The

system replaces traditional, error-prone paper-based methods, allowing seamless menu

organization, order tracking, food preparation updates, and inventory management. Additional

functionality includes real-time updates for staff and visibility for customers regarding order

preparation status. The implementation aims to reduce waiting times, improve service

accuracy, and enhance customer satisfaction. This solution is particularly relevant for fast-

paced foodservice environments where efficiency and precision are critical for success.

10
Ziteng Xie (2023) explored the development of a Restaurant Management Database System to

address the challenges associated with manual and fragmented restaurant management

practices. By leveraging MySQL, the system supports functionalities like customer

reservations, menu management, staff scheduling, and order processing. The study detailed the

importance of creating a robust database structure, employing conceptual tools such as Entity-

Relationship (ER) diagrams and logical design principles to ensure scalability, accuracy, and

reliability. SQL queries are utilized extensively to generate detailed reports on key performance

metrics, such as popular dishes, revenue analysis, and inventory levels. These insights enable

restaurant owners to optimize their operations, minimize waste, and improve decision-making.

The study also underscores the need for integrating dynamic features like real-time updates and

analytics dashboards to create a data-driven ecosystem. This system represents a step forward

in automating restaurant operations and achieving greater efficiency in the foodservice

industry.

Sahaved Bhargava et al. (2024) presented the design and development of a Restaurant Table

Booking Website, addressing the growing demand for digital solutions in dining reservations.

Built using a cutting-edge technology stack—PHP, MySQL, AngularJS, ExpressJS, and

NodeJS—the system provides users with an intuitive interface for making reservations.

Customers can specify the date, time, and number of attendees, with all data securely stored

and managed in a MySQL database. AngularJS ensures an interactive and dynamic frontend,

enhancing user experience, while ExpressJS manages backend operations efficiently. The

project emphasized user-centric design, informed by surveys and feedback that revealed

customer preferences for digital convenience and casual dining atmospheres.

Recommendations for restaurant owners included adopting integrated digital ordering

platforms and expanding online reservation capabilities. This system not only simplifies the

table booking process but also positions restaurants to meet modern customer expectations in

an increasingly competitive market.

11
Satya Singh et al. (2024) examined the Food Restaurant Management System, focusing on the

integration of technology into restaurant operations to address common inefficiencies. The

study employed advanced tools like PHP, MySQL, and JavaScript for system development,

ensuring a user-friendly experience. The system automates critical restaurant functions such as

food ordering, table reservations, inventory management, and payment processing, thereby

reducing manual errors and operational delays. The authors highlighted key challenges in

traditional management, such as prolonged service times and inventory inaccuracies, and

proposed solutions rooted in real-time updates, database-driven processes, and dynamic

reporting. Their research emphasized the role of technology in transforming customer

experiences and enhancing overall operational efficiency in the restaurant industry.

Kajanan et al. (2021) designed and implemented DetroEats, a mobile-based restaurant

management application tailored to the needs of modern dining and delivery during the

COVID-19 pandemic. DetroEats integrates four main functionalities: Food Order

Management, Delivery Management, Payment Management, and User Management.

Developed using Android Studio and Firebase, the system offers innovative features, such as

offline functionality, seamless database connectivity, and customizable user interfaces. Users

can manage accounts, update menus, and track orders through intuitive CRUD operations. A

standout feature of the system is its self-pickup mechanism, allowing customers to collect

orders without staff interaction, adhering to health and safety protocols. DetroEats also includes

robust validation mechanisms, user-level access controls, and notifications for enhanced

usability and security. By offering high-speed performance even on low-network conditions,

DetroEats ensures accessibility and reliability. The project underlined the app’s historic

location in Galle, Sri Lanka, blending tradition with cutting-edge technology to attract tourists

and locals alike.

12
2.4 Summary of literature review:

The restaurant management systems described in the section above focus on leveraging

technology to enhance operational efficiency, improve customer experience, and address

challenges posed by traditional manual processes. The systems showcase innovative

approaches to integrating core functionalities such as food ordering, delivery management, and

user account control. While these projects present numerous strengths that make them effective

solutions in the restaurant industry, they also reveal certain limitations that could impact their

scalability and adaptability. The strengths and weaknesses of these systems are analyzed below.

a. Strengths:

a. The Restaurant Management System described in the section above

demonstrates several notable strengths. Its comprehensive automation of

restaurant operations, such as food ordering, table reservations, and inventory

management, significantly enhances efficiency and reduces manual errors. The

system employs robust technologies, including PHP, MySQL, and JavaScript,

providing a scalable and high-performing platform. Additionally, the

incorporation of real-time data processing ensures prompt decision-making and

responsiveness, which are critical in dynamic restaurant environments. A strong

emphasis on customer-centric design is evident, with a user-friendly interface

aimed at improving the overall dining experience.

b. They also boasts several key strengths. It effectively integrates core

functionalities like food ordering, delivery, payment, and user management into

a single mobile application, reducing reliance on multiple systems. Its offline

capability is a major advantage, allowing uninterrupted use even in areas with

poor network connectivity. The innovative self-pickup feature is particularly

relevant in the context of the COVID-19 pandemic, minimizing physical

interaction while maintaining customer convenience. Enhanced security

13
measures, such as robust validation and user-level access controls, add

reliability and trust to the system. Moreover, the project strategically

incorporates the cultural and historical appeal of its location, leveraging the

restaurant’s heritage as a unique marketing point.

b. Weakness
a. Despite their strengths, the Food Restaurant Management Systems described in

the section above has some limitations. The system’s lack of flexibility may

hinder customization for restaurants with unique operational needs or niche

markets. Additionally, its heavy reliance on technology could pose challenges

in regions with inadequate technical infrastructure or expertise. The document

also does not explicitly address scalability, raising concerns about how well the

system can handle growth or increased demand, which is essential for

expanding businesses.

b. Similarly, the DetroEats system has a few weaknesses. The reliance on Firebase

and Android Studio, while effective, might limit the adaptability of the system

for restaurants seeking web-based or alternative platform integrations. The

advanced functionalities of the application may require user training, potentially

posing a barrier for less tech-savvy staff or customers. Furthermore, the

development and deployment of the system may demand significant resources

in terms of time and investment, which could be a challenge for smaller

businesses. Lastly, the app’s focus on a specific location, such as Galle, Sri

Lanka, might limit its broader applicability without additional adaptation to suit

other markets.

14
CHAPTER THREE

SYSTEM ANALYSIS AND DESIGN METHODOLOGY

3.1 Chapter Overview

This chapter provides an in-depth analysis of the system architecture, including a

detailed examination of both the existing and proposed systems. It covers the analysis of the

current state, highlights the improvements made with the proposed solution, and presents a

design methodology based on the gathered requirements. Finally, a comprehensive system

design approach is laid out, accompanied by various diagrams illustrating the system's

functionality.

3.2 System Analysis

This section examines the existing online restaurant management system (ORMS),

identifying its strengths and limitations, followed by an analysis of the proposed system to

address these limitations. The analysis highlights the system's architecture and its effectiveness

in handling operations like user management, food ordering, and billing, and it proposes

improvements for scalability, security, and user experience.

System analysis is a discipline process which begins with the establishment of user

requirement for a given application and concludes with the implementation of a fully operated

and amended with facts control system. System analysis and design deals with planning the

development of information systems through understanding and specifying in details what a

system should do and how the components of the system should be implemented and work

together (Gupta and Bansal, 2019).

3.2.1 Analysis of the Existing System

The current online restaurant management system (ORMS) handles various essential

operations such as user registration, login, food ordering, cart management, billing, and

reservation of party halls. However, the system is static and lacks flexibility in terms of

administrative control and dynamic management of restaurant services.

15
3.2.1.1 Block Diagram of the Existing System

The block diagram of the existing system is based on the database relationships and

entities shown in the image. Each entity in the system represents key components that handle

data related to users, staff, orders, and food details.

1. Login

This module handles the login functionality for users. It contains:

i. Id: Unique identifier for each user.

ii. Username: The username used for login.

iii. Password: A secured password for authentication.

2. Members

This table stores information related to members (users who have registered in the system).

Fields include:

i. Id: Unique member identifier.

ii. Firstname: First name of the user.

iii. Lastname: Last name of the user.

iv. loginID: A reference to the Login table for authentication.

3. Order

The order table stores information related to the orders placed by users. This entity links

members with the food they order:

i. Order_ID: Unique identifier for each order.

ii. Food_Category: The category of food ordered (e.g., appetizers, main course).

iii. Food_type: The specific type of food.

iv. Billing_Details: Billing information for the order.

v. Quantities: Quantity of the food ordered.

vi. Tables: Information about the table assigned (if applicable for dine-in).

4. Order_Details

16
This table handles more specific details related to each order, such as delivery or staff

interaction. It includes:

i. Id: A unique identifier for the order details record.

ii. Member_id: A reference to the member who placed the order.

iii. Delivery_date: Date of order delivery (useful for both dine-in and delivery).

iv. Staff_Id: Reference to the staff responsible for fulfilling the order.

v. Time_stamp: The time the order was placed or processed.

5. Staff

This entity manages the staff members who are responsible for handling orders, deliveries,

and other restaurant activities:

i. Id: Unique identifier for each staff member.

ii. Firstname: First name of the staff member.

iii. Lastname: Last name of the staff member.

iv. Street_address: Address of the staff member (useful for deliveries or contact).

v. Phonenumber: Contact number for the staff member.

6. Food_Details

This table stores detailed information about the food items available in the restaurant:

i. Id: Unique identifier for each food item.

ii. Food_name: Name of the food item.

iii. Food_description: Description of the food item.

iv. Food_price: Price of the food item.

v. Food_photo: Visual representation of the food item.

vi. Food_Category: Category to which the food item belongs (e.g., starter, main course).

7. Specials

This table manages special offers or promotional food items available in the restaurant. It

includes:

17
i. Id: Unique identifier for each special offer.

ii. Special_name: Name of the special offer.

iii. Special_description: Description of the special deal or offer.

iv. Special_price: Price of the special food item.

v. Start_date: The start date of the offer.

vi. End_date: The end date of the offer.

vii. Special_photo: A visual representation of the special item.

System Workflow:

1. User Login/Registration: Users register with the system through the Login module

and their details are stored in the Members table.

2. Order Processing: Once logged in, users can place orders via the Order table, which

stores details such as the food category, type, and quantity.

3. Food Details: The food details related to each order (name, description, price, etc.)

are stored in the Food_Details table.

4. Order Details & Fulfillment: The Order_Details table links the placed order to the

responsible staff (Staff), tracking the order's delivery time and status.

5. Specials: Any special deals or promotions are available for selection by users, with

details stored in the Specials table.

18
3.2.1.2 Block Diagram Representation

FIG 1: Block Diagram of the Restaurant Management System

19
3.2.1.3 Flowchart of the Existing System

Below is the flowchart representing the functionality of the existing online restaurant

management system (ORMS). The flow is basic, focusing on key actions such as user login,

menu browsing, cart management, order processing, and billing.

Start

User Logs In/Register

Browse Menu

View Cart

Place Order

Order
Confirmation No
Return to View Cart

Yes
Redirect to Billing

Payment Confirmation

Order Complete

Deliver food

Stop

FIG 2: Flowchart of the Restaurant Management System

20
3.2.1.4 Merits and Demerits of the Existing System
Merits:

i. Simplicity: The system is easy to use for both customers and administrators, requiring

minimal training.

ii. Basic Functionality: Handles fundamental tasks like user management, menu

browsing, and order placement effectively.

iii. Low Maintenance: Since the system has limited features, the maintenance and

operational costs are low.

Demerits:

i. Lack of Flexibility: Menu items cannot be updated dynamically, limiting real-time

management of inventory or special offers.

ii. No Role-Based Access: All administrators have equal control, leading to potential

security risks or unauthorized changes.

iii. Limited User Engagement: No features exist for customer feedback or ratings,

reducing user interaction with the system.

iv. Rigid Workflow: The order and billing system lacks customization or integration with

advanced payment solutions.

1.2.2 Analysis of the Proposed System

The proposed system introduces a more flexible and dynamic approach, enhancing user

experience with streamlined processes for ordering and billing. It offers a more robust back-

end for managing different restaurant services and improves administrative control through a

more detailed role-based access system. It also integrates additional features such as party hall

bookings, enhanced customer reviews, and ratings.

21
High Level Model of The Proposed System

FIG 3: High level model of the Restaurant Management System

3.2.2.1 Merits and Demerits of the Proposed System

Merits:

i. Scalability: The system can accommodate growing menu items, multiple branches, or

expanded services like delivery.

ii. Dynamic Menu and Inventory Updates: Real-time updates ensure the menu reflects

current stock, promotional offers, and special deals.

iii. Role-Based Access Control: Different roles for staff, managers, and super admins

provide enhanced security and control over system operations.

iv. Improved User Experience: Features like customer reviews, food ratings, and

streamlined order processing increase customer satisfaction and engagement.

v. Security: Integration with secure payment gateways ensures encrypted and secure

transaction processing.

22
Demerits:
i. Complexity: The proposed system’s additional features may increase its complexity,
requiring more robust support and training for staff.
ii. Higher Maintenance: More dynamic and complex functionalities could lead to higher
maintenance costs and require frequent updates.
3.2.2.2 Justification of the Proposed System

The justification for the proposed system lies in its ability to meet the growing

demands of a modern restaurant business. The proposed system's dynamic nature allows

restaurant administrators to respond quickly to changes in stock, menu updates, and customer

feedback. Additionally, role-based access control and advanced billing systems provide

security and operational efficiency. This enhanced functionality will lead to better customer

service and increased operational control for restaurant staff.

3.3 Design Methodology

This section outlines the approach used in developing the online restaurant

management system (ORMS), including the methodologies adopted, information gathering

techniques, and how these were applied to create a robust and scalable system. The focus is on

ensuring that the design aligns with user requirements, providing a dynamic and efficient

system.

Overall Dataflow Diagram \ System Flowchart

FIG 4: Dataflow diagram of the system

23
3.3.1 Adopted Methodology

The Incremental Development Model was adopted for this project. This

methodology was chosen due to its flexibility and iterative nature, allowing for gradual

improvements and additions to the system. The key features of this model include:

1. Phased Development: The system was broken down into smaller, manageable modules

such as user authentication, menu management, order processing, and billing. Each phase

was developed, tested, and integrated before moving on to the next phase.

2. Feedback Loop: Each phase provided an opportunity to gather feedback from potential

users (e.g., restaurant staff and customers). This feedback was used to refine the system

and ensure it met user expectations.

3. Risk Mitigation: By building the system in small increments, potential risks were

identified and addressed early in the development process. For example, security features

such as encrypted payment processing were added after evaluating risks during the initial

order processing phase.

4. Continuous Integration: Each module was integrated with the existing system once it was

completed, ensuring that the system worked as a cohesive whole and minimizing the

chances of unexpected failures.

3.3.2 Information Gathering Procedure

The development process was driven by extensive research and information gathering to

ensure the system met user needs and aligned with restaurant operational requirements. The

following methods were employed:

1. Interviews with Restaurant Staff and Management:

Interviews were conducted with the restaurant's managers and key staff members to

understand their challenges and requirements. This helped in identifying key areas of

improvement, such as menu flexibility, order processing efficiency, and party hall

reservations.

24
Specific user roles (admins, waiters, customers) were analyzed to understand what features

were needed for each category.

2. User Surveys:

Customers were surveyed to gather their input on desired features, user experience, and

pain points they faced when ordering food online or booking a table. Insights from these

surveys were used to improve user interaction features, such as streamlined ordering,

ratings, and reviews.

3. Competitive Analysis:

Existing restaurant management systems and their features were examined to benchmark

against industry standards and gather best practices. This helped in determining how to

differentiate this system by focusing on user engagement and backend flexibility for

restaurant management.

4. Review of Technical Requirements:

The restaurant's existing technical setup, including hardware and software resources, was

reviewed to ensure the new system could be easily integrated without additional

infrastructure costs. This included evaluating the compatibility of the proposed system with

their current payment and order handling processes.

3.4 System Design

The system design phase covers the architecture, data flow, and various diagrams that

represent the logical structure of the proposed Online Restaurant Management System

(ORMS). This section breaks down the system's logical design, flow of data, and how the

different components interact to achieve the system's goals.

25
The organization of the present system

Restaurant

Hall

customer Staff
Customer
Kitchen

FIG 5: Organization Diagram of the present system

3.4.1 Logical Design

The logical design defines the conceptual framework of the system, including how users

interact with the system and how different modules (e.g., login, order processing, staff

management) work together. The system design outlines the structure, workflows, and

relationships between different entities.

3.4.1.1 Block Diagram of the Proposed System

The block diagram of the new system illustrates the key modules and their interactions.

These modules are interconnected to handle tasks like user authentication, order management,

staff management, menu control, and billing.

User Login
Menu Manager Order Processing
(Registration)

User Profile Special Offers Billing System

FIG 6: Block diagram of the Proposed System

26
The new system consists of multiple interconnected blocks, such as:

 User Login: Handles user registration and authentication.

 Menu Manager: Allows admins to manage menu items and special offers.

 Order Processing: Manages orders placed by users.

 Billing System: Handles payment processes and order confirmation.

3.4.1.2 Flowchart of the New System

A flowchart visualizes the sequential steps users follow within the system. Here's a

flowchart that outlines how users interact with the system:

Start

User Logs In/Register

Browse Menu

Add to Cart

Place Order

Payment & Billing

Order Complete

Deliver food

Stop

FIG 7: Flowchart of the proposed system

27
3.4.1.3 Use Case Diagram of the New System

A use case diagram shows the interactions between users and the system. Below is a

simplified explanation of how the system works:

FIG 8: usecase diagram for the proposed system

Actors:

i. Customer: Places orders, manages reservations.

ii. Restaurant Staff (admin): Manages menu items, views reports, updates

system settings.

iii. Kitchen Staff: Handles food preparation and restaurant inventory.

28
The use case diagram outlines the key interactions between these actors and the system

components.

3.4.1.4 Activity Diagram of the New System

An activity diagram shows the flow of actions between the components of the system

during an operation like placing an order.

FIG 9: Activity Diagram of the Proposes System

29
3.4.1.5 - Class Diagram of the New System

The class diagram represents the object-oriented structure of the system. Classes include:

i. User: Attributes like username, password, and user role.

ii. Order: Attributes like order ID, food category, and quantities.

iii. Menu: Attributes for food items, categories, and prices.

iv. Billing: Attributes like payment method, amount, and billing ID.

Classes interact with one another through associations (e.g., a user places an order, an order is

billed).

FIG 10: Class Diagram of the proposed system

30
3.4.2 Physical Design

The physical design of a system involves the hardware and software setup required to

implement the system in a real-world environment. It defines how data is physically stored

and processed, the layout of system components, and the actual interaction between hardware

devices and the software layers.

3.4.2.1 Program Specifications

This program is an internet-based system which must be hosted on the internet for

general access. It is designed with several interaction cues on each webpage that makes up the

web application. The system is developed using PHP for server-side logic and MySQL for the

database. Client-side technologies include HTML, CSS, and JavaScript for a responsive design.

This program gives functional requirement that is applicable to the system. There are two major

modules in this application.

i. Customer module

ii. Administrator module.

3.4.2.2 Database Design

A database is a structural collection of meaningful information stored over a period of

time in machine readable form for subsequent retrieval. The database design is used to group

data into a number of tables and minimize the artificiality embedded in using spate files. The

database used for this project is MySQL Database management system. MySQL database

management system served as the database for building and testing the system. It also served

as a platform where all data used in the application could be manipulated. Below is database

diagram. The database consists of the following tables:

i. Users: Stores user details like username, password, and role.

ii. Orders: Stores orders with foreign keys to users and menu items.

iii. Menu: Stores available items with attributes like price and category.

iv. Ratings: Stores customer reviews and ratings for menu items.

31
The tables in the database are organizing to help:

a. Reduce data duplication

b. Ease data retrieval

c. Simplify functions like inserting, deleting, updating user data etc.

d. Access large amount of information at a very fast speed.

3.4.2.3 System Control

System control refers to the mechanisms and structures implemented to ensure that the

system operates effectively, securely, and reliably. In the context of the Online Restaurant

Management System, system control encompasses role-based access, security protocols,

auditing, and error-handling mechanisms. It ensures that the Online Restaurant Management

System remains secure, stable, and functional, even under potential threats or failures. By using

Role-Based Access Control , encryption, logging, error handling, and monitoring, the system

is optimized to provide reliable performance while maintaining data integrity and user security.

32
CHAPTER FOUR

SYSTEM IMPLEMENTATION RESULTS

4.1 Chapter Overview

This chapter delves into the technical aspects of the Online Restaurant Management

System, describing the programming tools used, testing strategies employed, system

requirements, and a discussion of results. The system is designed to streamline the operations

of a restaurant by enabling users to browse menus, place orders, book reservations, and rate

their experiences, while also allowing administrators to manage menus, orders, and customer

interactions.

4.2 Choice of Programming Tools Used

The system was developed using a combination of modern and reliable web development

technologies, chosen for their efficiency, scalability, and ease of use in developing a dynamic,

database-driven application.

i. Server-Side Programming: PHP (Hypertext Preprocessor)

PHP was chosen as the primary server-side scripting language due to its wide use in

web development, support for MySQL, and its ability to handle complex logic such as

user authentication, order processing, and form validation. Key scripts such as login-

exec.php, order-exec.php, and ratings-exec.php handle user requests, interact with the

database, and return dynamic content based on user inputs.

ii. Front-End Technologies: HTML, CSS, JavaScript

The user interface is structured using HTML, while CSS (with Bootstrap) provides

responsive design capabilities, ensuring that the system renders well on devices ranging

from smartphones to desktop computers. JavaScript, combined with AJAX, is

employed for front-end validation, enhancing the user experience by providing real-

time feedback without requiring page reloads. For example, the cart-exec.php

dynamically updates the cart without reloading the page.

33
iii. Bootstrap Framework

The use of Bootstrap enhances the system’s appearance and accessibility across

different screen sizes. Its pre-designed components, such as forms, buttons, and

navigation bars, accelerated the development of a responsive UI.

iv. Database: MySQL

MySQL serves as the backend database management system, chosen for its scalability,

reliability, and compatibility with PHP. The system’s database contains tables for users,

menu items, orders, ratings, and reservation details. The rms.sql file includes SQL

commands that create and manage these tables. Efficient SQL queries ensure the system

can quickly retrieve and update information, even with a large number of records.

v. Development Tools:

i. Visual Studio Code: Used as the primary IDE for developing and editing the

system's PHP, HTML, CSS, and JavaScript files.

ii. Git: Version control was managed through Git, enabling multiple versions of the

system to be maintained, tracked, and tested effectively during the development

cycle.

4.3 System Testing Strategies

Testing was a crucial part of the Restaurant Management System project development,

ensuring that each module and feature worked as intended. Multiple testing strategies were

adopted to validate both the individual components and the system as a whole.

4.3.1 Unit Testing

Each module, such as login, order processing, reservation, and rating, was

independently tested to ensure that it performed its specific function correctly. Unit testing

focused on:

i. User Login: Ensured that users could log in with valid credentials and that incorrect

credentials triggered appropriate error messages.

34
ii. Order Processing: Verified that the system correctly stored user orders in the

database and returned the correct confirmation.

iii. Ratings and Reviews: Checked that users could submit ratings for their dining

experiences and that these ratings were stored in the system and displayed correctly.

Unit tests were performed using test data to validate whether each script or module worked as

expected in isolation.

4.3.2 Integration Testing

Integration testing was performed to ensure that individual modules interact correctly

when integrated into the larger system. This include:

i. User Actions and Database Integration: Testing the interaction between the front-

end (where users place orders, reserve tables, and submit ratings) and the backend

MySQL database to ensure data consistency. For instance, when an order was placed

via the cart-exec.php script, it was verified that the correct information was saved in the

orders table.

ii. User Sessions: Ensured that session handling worked across different pages (e.g.,

maintaining user login state between the login-exec.php and member-index.php pages).

iii. Feedback Mechanism: Validated those actions like order placement, rating

submission, and profile updates resulted in the correct responses (e.g., success or error

messages).

4.4 Computer System Requirements

This section outlines the hardware and software specifications necessary for

developing, testing, and deploying the Restaurant Management System (RMS). The system is

designed to be lightweight, ensuring that it can operate efficiently on standard hardware

configurations, making it suitable for small to medium-sized restaurant setups.

35
4.4.1 Hardware Requirements

The hardware requirements to deploy and run the RMS system are minimal, making it

suitable for most modern computing environments. The minimum hardware requirements are:

i. Processor:

i. Minimum: Intel Core i3 or equivalent AMD processor. This ensures that the system

can run basic development tasks and execute PHP scripts with minimal load.

ii. Recommended: Intel Core i5 or higher for optimal performance, especially during

high-demand periods when the system handles many simultaneous user requests

(such as during lunch or dinner hours in a restaurant).

ii. Memory (RAM):

i. Minimum: 4 GB of RAM. This configuration is sufficient for local development

and small-scale testing.

ii. Recommended: 8 GB or more. Adequate memory is crucial for handling multiple

requests from customers (placing orders, booking reservations) and system tasks

such as database operations.

iii. Storage:

i. Minimum: 500 MB of free disk space for project files and database storage. This

includes space for code, media (e.g., images for the restaurant's menu), and database

records.

ii. Recommended: 1 GB or more, especially for production environments where

larger datasets (menu items, orders, customer information) are stored. Adequate

storage will also be needed if the system expands to store analytics data, detailed

customer histories, or logs.

36
iv. Network:

i. Minimum: Basic internet access for local development.

ii. Recommended: A high-speed internet connection is required for real-time

customer interactions, especially when the system is deployed online. A reliable

connection ensures quick order processing, reservation updates, and

communication with the database.

v. Display:

i. Minimum: Any monitor capable of displaying at least 1024x768 resolution for

basic development and testing.

ii. Recommended: Full HD (1920x1080) resolution for better visibility of the user

interface, especially when working with responsive layouts that need testing

across different screen sizes.

4.4.2 Software Requirements

To develop, run, and deploy the RMS, the following software is required. These tools

support the server-side scripting, database management, and front-end rendering of the system.

i. Operating System:

i. Minimum: Windows 10 or higher, macOS Catalina or higher, or any modern

Linux distribution (Ubuntu, Fedora, etc.).

ii. Recommended: Any of the above, depending on the development team's

preference. Linux (specifically Ubuntu) is recommended for production

environments due to its stability, ease of use with LAMP stacks, and minimal

resource consumption.

ii. Web Server:

i. Minimum: Apache 2.4 or Nginx. Apache is used for serving the PHP scripts and

handling HTTP requests in a local or hosted environment.

37
ii. Recommended: Apache is ideal for development, and for deployment, a

combination of Nginx and PHP-FPM can be used for better performance,

especially in production setups where high traffic is expected.

iii. Database Management System (DBMS):

i. Minimum: MySQL 5.7 or higher. This is essential for storing all dynamic data

related to users, orders, menus, and reservations.

ii. Recommended: MySQL 8.0 or higher for improved performance and security

features, especially when dealing with more complex queries and larger datasets.

iv. Programming Languages:

i. Minimum: PHP 7.4 or higher. This is the core language used to handle server-

side operations, including user authentication, data processing, and interactions

with the MySQL database.

ii. Recommended: PHP 8.0 or higher. PHP 8 brings significant performance

improvements, which are particularly beneficial for systems handling real-time

operations like RMS. Additionally, newer versions provide more robust error

handling and additional security features.

v. Development Environment:

i. Minimum: XAMPP (for Windows/macOS) or LAMP (Linux). These provide a

local development environment that includes Apache, PHP, and MySQL,

allowing developers to simulate a web server on their machines.

ii. Recommended: A dedicated development server or Docker containers. Using

Docker for development provides consistency across environments and makes

deployment easier by packaging the web server, database, and the entire RMS

stack in a portable format.

38
vi. Text Editor/IDE:

i. Minimum: Visual Studio Code, Sublime Text, or Atom. These lightweight

editors allow for fast development and debugging of PHP, HTML, CSS, and

JavaScript.

ii. Recommended: Visual Studio Code with PHP and MySQL extensions,

providing autocompletion, linting, and error detection. VS Code's integrated

terminal and Git support make it an excellent choice for full-stack development.

vii. Web Browser:

i. Minimum: Any modern web browser (Google Chrome, Mozilla Firefox,

Microsoft Edge) that supports HTML5, CSS3, and JavaScript.

ii. Recommended: Google Chrome with developer tools for testing front-end

responsiveness and debugging network requests. Chrome's compatibility with

Lighthouse also enables performance testing, which is important for ensuring the

system's usability across different devices.

viii. Version Control System:

i. Minimum: Git for managing source code versions and collaborating with other

developers. A GitHub or GitLab repository is recommended to store and manage

code.

ii. Recommended: Git with continuous integration/continuous deployment

(CI/CD) tools such as Jenkins or GitLab CI for automatic testing and deployment

during project development.

ix. Security Tools:

i. Minimum: SSL/TLS for securing web traffic, especially if the system is

deployed on a public server.

39
ii. Recommended: OpenSSL for managing SSL certificates in a production

environment, along with firewall rules and DDoS protection to safeguard the

system against external attacks.

4.5 Results
This section shows the results gotten from the implemented Restaurant Management system,
showcasing its unique, simple and reliant design to help restaurants.

FIG 11: Home page of Restaurant Management System

The figure above shows the home page, which is the starting point of the system, it allows
users to browse through the features of the system, also having links to create an account,
login or check available restaurants nearby.

FIG 12: Restaurants page

40
The figure above shows the available restaurants of the system, here users can choose from
available restaurants and checkout their menus for food to order from.

FIG 13: Menu page

The figure above shows the menu page of a selected restaurants, here the user or customer
can see a variety of food from the menu and can choose from.

FIG 14: login page of the system

The figure above shows the login page of the system, here users or customers will provide
their respective login credentials to be able to make orders from the website, allowing them to
track their orders.

41
FIG 15: Admin dashboard page

The figure above shows the admin dashboard page of the system, here the admin have access
to manage everything that goes on in the system from, adding more restaurants spots, adding
food to the menu and checking for available orders to process.

FIG 16: Admin Order page

The figure above shows the admin order page, here the admin or kitchen staffs can see
available orders to delivery and when its delivered they can change the status, so it reflects.

42
CHAPTER FIVE

SUMMARY, CONCLUSION AND RECOMMENDATION

5.1 Summary
This research focused on designing and developing a web-based Restaurant
Management System aimed at improving the efficiency of restaurant operations
and enhancing customer experience. The project utilized the Waterfall
methodology, a structured approach to software development, guiding the process
through stages of requirements analysis, system design, implementation, testing,
and deployment.
The system was implemented using PHP for server-side scripting, MySQL for
database management, and HTML for the front-end structure and user interface.
These technologies were chosen for their compatibility, reliability, and ability to
create a dynamic and responsive web application.
Upon completion, the system addressed key functionalities in restaurant
management, including order management, menu management, inventory
tracking, customer feedback, and payment processing. The system successfully
met its objectives, providing a seamless and efficient tool for managing restaurant
operations, improving customer satisfaction, and streamlining day-to-day tasks.

5.2 Recommendations and Feature Research


While the development of the web-based Restaurant Management System
achieved its core objectives, several challenges and limitations were encountered,
which suggest areas for further improvement. Future research should focus on
overcoming these limitations to enhance the system’s scalability, functionality,
and performance.
A critical area for future research is scalability and performance optimization. As
restaurants grow in size and customer base, the system must be able to handle
increased traffic and data without compromising performance. Advanced
techniques in database optimization, load balancing, and cloud-based solutions

43
should be explored to ensure the system can scale efficiently and remain
responsive during peak hours.
Security and data protection also require attention. Although basic security
measures were integrated, there is a need for stronger protection mechanisms to
prevent unauthorized access to sensitive data. Future research should investigate
the use of more robust security protocols such as multi-factor authentication, data
encryption, and real-time threat detection to safeguard user and transaction data
from evolving cyber threats.
User experience (UX) design is another area for improvement. While the system
provides a functional interface, enhancing the user experience through detailed
usability studies and incorporating feedback from both restaurant staff and
customers will be beneficial. Ensuring the system is intuitive, accessible for users
with disabilities, and visually engaging will improve customer satisfaction and
overall usability.
Lastly, future research should explore integration with external systems, such as
digital payment solutions, food delivery platforms, and customer relationship
management (CRM) tools. This integration would expand the system’s
capabilities, allowing the restaurant to offer additional services such as online
orders, loyalty programs, and targeted promotions, further enhancing the overall
customer experience.
Addressing these limitations will strengthen the functionality and usability of
web-based restaurant management systems, making them more robust, secure,
and adaptable to the growing needs of the restaurant industry.

5.3 Conclusion
The primary goal of this research was to design and develop a web-based
Restaurant Management System that would improve restaurant operations,
enhance customer access to services, and streamline daily activities. By utilizing
the Waterfall methodology and implementing the system with PHP, MySQL, and

44
HTML, the project aimed to deliver a reliable and user-friendly solution to the
challenges faced by modern restaurants.
The outcome of the research successfully achieved these objectives. The
developed system effectively manages key restaurant functions such as order
management, menu updates, inventory tracking, and payment processing. It has
proven to be an effective tool in facilitating day-to-day restaurant operations and
providing a seamless experience for both staff and customers. While there is room
for improvement in areas like scalability, security, and user experience, the
research has laid a solid foundation for further development, contributing
valuable insights to the domain of restaurant management systems.
.

45
APPENDIX A

Code

<?php

require_once('auth.php');

?>

<?php

//checking connection and connecting to a database

require_once('connection/config.php');

//Connect to mysql server

$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);

if(!$link) {

die('Failed to connect to server: ' . mysql_error());

//Select database

$db = mysql_select_db(DB_DATABASE);

if(!$db) {

die("Unable to select database");

//define default value for flag

$flag_1 = 1;

//defining global variables

$qry="";

$excellent_qry="";

46
$good_qry="";

$average_qry="";

$bad_qry="";

$worse_qry="";

//count the number of records in the members, orders_details, and reservations_details tables

$members=mysql_query("SELECT * FROM members")

or die("There are no records to count ... \n" . mysql_error());

$orders_placed=mysql_query("SELECT * FROM orders_details")

or die("There are no records to count ... \n" . mysql_error());

$orders_processed=mysql_query("SELECT * FROM orders_details WHERE flag='$flag_1'")

or die("There are no records to count ... \n" . mysql_error());

$tables_reserved=mysql_query("SELECT * FROM reservations_details WHERE

table_flag='$flag_1'")

or die("There are no records to count ... \n" . mysql_error());

$partyhalls_reserved=mysql_query("SELECT * FROM reservations_details WHERE

partyhall_flag='$flag_1'")

or die("There are no records to count ... \n" . mysql_error());

$tables_allocated=mysql_query("SELECT * FROM reservations_details WHERE

flag='$flag_1' AND table_flag='$flag_1'")

or die("There are no records to count ... \n" . mysql_error());

47
$partyhalls_allocated=mysql_query("SELECT * FROM reservations_details WHERE

flag='$flag_1' AND partyhall_flag='$flag_1'")

or die("There are no records to count ... \n" . mysql_error());

//get food names and ids from food_details table

$foods=mysql_query("SELECT * FROM food_details")

or die("Something is wrong ... \n" . mysql_error());

?>

<?php

if(isset($_POST['Submit'])){

//Function to sanitize values received from the form. Prevents SQL injection

function clean($str) {

$str = @trim($str);

if(get_magic_quotes_gpc()) {

$str = stripslashes($str);

return mysql_real_escape_string($str);

//get category id

$id = clean($_POST['food']);

//get ratings ids

$ratings=mysql_query("SELECT * FROM ratings")

or die("Something is wrong ... \n" . mysql_error());

$row_1=mysql_fetch_array($ratings);

$row_2=mysql_fetch_array($ratings);

48
$row_3=mysql_fetch_array($ratings);

$row_4=mysql_fetch_array($ratings);

$row_5=mysql_fetch_array($ratings);

if($row_1){

$excellent=$row_1['rate_id'];

if($row_2){

$good=$row_2['rate_id'];

if($row_3){

$average=$row_3['rate_id'];

if($row_4){

$bad=$row_4['rate_id'];

if($row_5){

$worse=$row_5['rate_id'];

//selecting all records from the food_details and polls_details tables based on food id.

Return an error if there are no records in the table

$qry=mysql_query("SELECT * FROM food_details, polls_details WHERE

polls_details.food_id='$id' AND food_details.food_id='$id'")

or die("Something is wrong ... \n" . mysql_error());

49
$excellent_qry=mysql_query("SELECT * FROM food_details, polls_details WHERE

polls_details.food_id='$id' AND food_details.food_id='$id' AND

polls_details.rate_id='$excellent'")

or die("Something is wrong ... \n" . mysql_error());

$good_qry=mysql_query("SELECT * FROM food_details, polls_details WHERE

polls_details.food_id='$id' AND food_details.food_id='$id' AND

polls_details.rate_id='$good'")

or die("Something is wrong ... \n" . mysql_error());

$average_qry=mysql_query("SELECT * FROM food_details, polls_details WHERE

polls_details.food_id='$id' AND food_details.food_id='$id' AND

polls_details.rate_id='$average'")

or die("Something is wrong ... \n" . mysql_error());

$bad_qry=mysql_query("SELECT * FROM food_details, polls_details WHERE

polls_details.food_id='$id' AND food_details.food_id='$id' AND

polls_details.rate_id='$bad'")

or die("Something is wrong ... \n" . mysql_error());

$worse_qry=mysql_query("SELECT * FROM food_details, polls_details WHERE

polls_details.food_id='$id' AND food_details.food_id='$id' AND

polls_details.rate_id='$worse'")

or die("Something is wrong ... \n" . mysql_error());

$no_rate_qry=mysql_query("SELECT * FROM food_details WHERE food_id='$id'")

50
or die("Something is wrong ... \n" . mysql_error());

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Admin Index</title>

<link href="stylesheets/admin_styles.css" rel="stylesheet" type="text/css" />

<script language="JavaScript" src="validation/admin.js">

</script>

</head>

<body>

<div id="page">

<div id="header">

<h1>Administrator Control Panel</h1>

<a href="profile.php">Profile</a> | <a href="categories.php">Categories</a> | <a

href="foods.php">Foods</a> | <a href="accounts.php">Accounts</a> | <a

href="orders.php">Orders</a> | <a href="reservations.php">Reservations</a> | <a

href="specials.php">Specials</a> | <a href="allocation.php">Staff</a> | <a

href="messages.php">Messages</a> | <a href="options.php">Options</a> | <a

href="logout.php">Logout</a>

</div>

<div id="container">

<table width="1000" align="center" style="text-align:center">

51
<CAPTION><h3>CURRENT STATUS</h3></CAPTION>

<tr>

<th>Members Registered</th>

<th>Orders Placed</th>

<th>Orders Processed</th>

<th>Orders Pending</th>

<th>Table(s) Reserved</th>

<th>Table(s) Allocated</th>

<th>Table(s) Pending</th>

<th>PartyHall(s) Reserved</th>

<th>PartyHall(s) Allocated</th>

<th>PartyHall(s) Pending</th>

</tr>

<?php

$result1=mysql_num_rows($members);

$result2=mysql_num_rows($orders_placed);

$result3=mysql_num_rows($orders_processed);

$result4=$result2-$result3; //gets pending order(s)

$result5=mysql_num_rows($tables_reserved);

$result6=mysql_num_rows($tables_allocated);

$result7=$result5-$result6; //gets pending table(s)

$result8=mysql_num_rows($partyhalls_reserved);

$result9=mysql_num_rows($partyhalls_allocated);

$result10=$result8-$result9; //gets pending partyhall(s)

echo "<tr align=>";

52
echo "<td>" . $result1."</td>";

echo "<td>" . $result2."</td>";

echo "<td>" . $result3."</td>";

echo "<td>" . $result4."</td>";

echo "<td>" . $result5."</td>";

echo "<td>" . $result6."</td>";

echo "<td>" . $result7."</td>";

echo "<td>" . $result8."</td>";

echo "<td>" . $result9."</td>";

echo "<td>" . $result10."</td>";

echo "</tr>";

?>

</table>

<hr>

<form name="foodStatusForm" id="foodStatusForm" method="post" action="index.php"

onsubmit="return statusValidate(this)">

<table width="360" align="center">

<CAPTION><h3>CUSTOMERS' RATINGS (100%)</h3></CAPTION>

<tr>

<td>Food</td>

<td width="168"><select name="food" id="food">

<option value="select">- select food -

<?php

//loop through food_details table rows

while ($row=mysql_fetch_array($foods)){

echo "<option value=$row[food_id]>$row[food_name]";

53
}

?>

</select></td>

<td><input type="submit" name="Submit" value="Show Ratings" /></td>

</tr>

</table>

</form>

<table width="900" align="center">

<tr>

<th></th>

<th>Excellent</th>

<th>Good</th>

<th>Average</th>

<th>Bad</th>

<th>Worse</th>

</tr>

<?php

if(isset($_POST['Submit'])){

//actual values

$excellent_value=mysql_num_rows($excellent_qry);

$good_value=mysql_num_rows($good_qry);

$average_value=mysql_num_rows($average_qry);

$bad_value=mysql_num_rows($bad_qry);

$worse_value=mysql_num_rows($worse_qry);

//percentile rates

54
$total_value=mysql_num_rows($qry);

if($total_value != 0){

$excellent_rate=$excellent_value/$total_value*100;

$good_rate=$good_value/$total_value*100;

$average_rate=$average_value/$total_value*100;

$bad_rate=$bad_value/$total_value*100;

$worse_rate=$worse_value/$total_value*100;

else{

$excellent_rate=0;

$good_rate=0;

$average_rate=0;

$bad_rate=0;

$worse_rate=0;

//get food name

if(mysql_num_rows($qry)>0){

$row=mysql_fetch_array($qry);

$food_name=$row['food_name'];

else{

$row=mysql_fetch_array($no_rate_qry);

$food_name=$row['food_name'];

echo "<tr>";

echo "<th>" .$food_name."</th>";

55
echo "<td>" .$excellent_value."(". $excellent_rate."%)"."</td>";

echo "<td>" .$good_value."(". $good_rate."%)"."</td>";

echo "<td>" .$average_value."(". $average_rate."%)"."</td>";

echo "<td>" .$bad_value."(". $bad_rate."%)"."</td>";

echo "<td>" .$worse_value."(". $worse_rate."%)"."</td>";

echo "</tr>";

?>

</table>

<hr>

</div>

<div id="footer">

<div class="bottom_addr">&copy; 2012-2013 Food Plaza. All Rights Reserved</div>

</div>

</div>

</body>

</html>

<?php

require_once('auth.php');

?>

<?php

//checking connection and connecting to a database

require_once('connection/config.php');

//Connect to mysql server

$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);

if(!$link) {

56
die('Failed to connect to server: ' . mysql_error());

//Select database

$db = mysql_select_db(DB_DATABASE);

if(!$db) {

die("Unable to select database");

//selecting all records from almost all tables. Return an error if there are no records in the tables

$result=mysql_query("SELECT members.member_id, members.firstname,

members.lastname, billing_details.Street_Address, billing_details.Mobile_No,

orders_details.*, food_details.*, cart_details.*, quantities.* FROM members, billing_details,

orders_details, quantities, food_details, cart_details WHERE

members.member_id=orders_details.member_id AND

billing_details.billing_id=orders_details.billing_id AND

orders_details.cart_id=cart_details.cart_id AND cart_details.food_id=food_details.food_id

AND cart_details.quantity_id=quantities.quantity_id")

or die("There are no records to display ... \n" . mysql_error());

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Orders</title>

<link href="stylesheets/admin_styles.css" rel="stylesheet" type="text/css" />

57
</head>

<body>

<div id="page">

<div id="header">

<h1>Orders Management </h1>

<a href="index.php">Home</a> | <a href="categories.php">Categories</a> | <a

href="foods.php">Foods</a> | <a href="accounts.php">Accounts</a> | <a

href="orders.php">Orders</a> | <a href="reservations.php">Reservations</a> | <a

href="specials.php">Specials</a> | <a href="allocation.php">Staff</a> | <a

href="messages.php">Messages</a> | <a href="options.php">Options</a> | <a

href="logout.php">Logout</a>

</div>

<div id="container">

<table border="0" width="970" align="center">

<CAPTION><h3>ORDERS LIST</h3></CAPTION>

<tr>

<th>Order ID</th>

<th>Customer Names</th>

<th>Food Name</th>

<th>Food Price</th>

<th>Quantity</th>

<th>Total Cost</th>

<th>Delivery Date</th>

<th>Delivery Address</th>

<th>Mobile No</th>

<th>Actions(s)</th>

58
</tr>

<?php

//loop through all tables rows

while ($row=mysql_fetch_assoc($result)){

echo "<tr>";

echo "<td>" . $row['order_id']."</td>";

echo "<td>" . $row['firstname']."\t".$row['lastname']."</td>";

echo "<td>" . $row['food_name']."</td>";

echo "<td>" . $row['food_price']."</td>";

echo "<td>" . $row['quantity_value']."</td>";

echo "<td>" . $row['total']."</td>";

echo "<td>" . $row['delivery_date']."</td>";

echo "<td>" . $row['Street_Address']."</td>";

echo "<td>" . $row['Mobile_No']."</td>";

echo '<td><a href="delete-order.php?id=' . $row['order_id'] . '">Remove Order</a></td>';

echo "</tr>";

mysql_free_result($result);

mysql_close($link);

?>

</table>

<hr>

</div>

<div id="footer">

<div class="bottom_addr">&copy; 2012-2013 Food Plaza. All Rights Reserved</div>

59
</div>

</div>

</body>

</html>

<?php

//Start session

session_start();

//Include database connection details

require_once('connection/config.php');

//Connect to mysql server

$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);

if(!$link) {

die('Failed to connect to server: ' . mysql_error());

//Select database

$db = mysql_select_db(DB_DATABASE);

if(!$db) {

die("Unable to select database");

//Function to sanitize values received from the form. Prevents SQL injection

function clean($str) {

$str = @trim($str);

60
if(get_magic_quotes_gpc()) {

$str = stripslashes($str);

return mysql_real_escape_string($str);

//Sanitize the POST values

$FirstName = clean($_POST['fName']);

$LastName = clean($_POST['lName']);

$StreetAddress = clean($_POST['sAddress']);

$MobileNo = clean($_POST['mobile']);

//Create INSERT query

$qry = "INSERT INTO staff(firstname,lastname,Street_Address,Mobile_Tel)

VALUES('$FirstName','$LastName','$StreetAddress','$MobileNo')";

$result = @mysql_query($qry);

//Check whether the query was successful or not

if($result) {

echo "<html><script language='JavaScript'>alert('Staff information added

successifully.')</script></html>";

exit();

}else {

die("Adding staff information failed ... " . mysql_error());

?>

61
APPENDIX B

homepage

Options

62
Add Food

Category

63
Messages

Specials

64

You might also like