Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

Restaurant Management

1
Abstract:

To order many dishes and make them and surprise your loved one. There
are many dishes in it , and the any user can access the food and can order
them and eat them soon. Every item is made by popular chef around the
world.
These dishes can be added by the admin. He can only add any new dishes
to the food and the users can view and order them. There is no priority or
premium so everyone can view anything on the dish list.
The things that are needed for the foods are also not a costly one , you can
buy them in very low cost and they can be bought in this restaurant .
The Foods can be ordered easily and this application is user friendly, so
not to worry of any issues in this. Can access anywhere anytime and order
foods when you are in the restaurant.

2
CHAPTER 1

INTRODUCTION

1.1 OVERVIEW OF THE PROJECT

Restaurant management is a web based platform that manages the


restaurant according to the project and user role. RESTAURANT
MANAGEMENT reduces the complexity of managing restaurant
separately. Instead of managing contents in manual records , Each user
(i.e.admin ) can upload the foods, that needs to enlarge the end product /
organization.

Main goal of RESTAURANT MANAGEMENT is to produce a UI


based Web food, that is handy to users for applying managing within the
project. It reduces the time needed for circulating hardcopy of restaurant
and the time that taken to add the users and admins in bcc of Email.

1.2 EXISTING SYSTEM

Sharing Managings within the project plays a major role to develop


or modify the project. Enterprise / Organization couldn’t manage the
details about Which managing is shared to which luxury and project. So,
they need a professionals or third party to manage the details about shared
restaurant.These details are only visible to the admin. Other users have
the access to view the details.

3
1.3 PROBLEM DEFINITION

Software development life cycle (SDLC) is a major part in


managing. But in these Life cycle, some organistion doesn’t have enough
time to manage the details about each phase of the developing project.
Some organization manually store the details in the format like pdf,jpg
etc.., But in rare case, hardcopy of records are used. These type of
managing the details was more complicated in the way of searching and
storing.For that, third party involves to manage those details. It also have
a disadvantage.They costs for managing the details.

1.4 OBJECTIVE OF THE PROJECT

Main goal of RESTAURANT MANAGEMENT is to produce a UI


based Web food, that is handy to users for sharing restaurant and also the
details about the developed product within the project. It reduces the time
needed for applying for a managing and the time that tooks to add the
luxury members in bcc of Email. Any type of format can use to manage
the details. Formats like image, zip restaurant, pdf, docs, xlsx, xml, js, txt,
json, etc..,

4
CHAPTER 2

REQUIREMENT SPECIFICATIONS

2.1 SOFTWARE REQUIREMENTS

 OPERATING SYSTEM :WINDOWS XP/7/8/10


 FRONT END :HTML/CSS/Bootstrap/JS
 BACKEND :SQL,PHP
 BROWSER :IE,CHROME,FIREFOX

2.2 HARDWARE REQUIREMENTS

 PROCESSOR :INTEL PENTIUM WITH CPU B950 AND

2.10 GHZ PROCESSOR.

 RAM :512 MB
 HARD DISK :25GB
 MOTHER BOARD :INTEL V2130 CHIPSET
 KEYBOARD :104 KEYS
 MOUSE :OPTICAL SCROLLING
 NETWORK :LAN

5
CHAPTER 3

IMPLEMENTATION & RESULTS

3.1 MODULE DESIGN METHOD AND IMPLEMENTATION

The following are the list of modules in this project and it is stated as
follow

ADMIN MODULE

 Food management
 Chef management
 Bill Management

USER MODULE

 Login maintenance
 Registration
 Order Foods
 View Orders

6
3.1.1 LOGIN

Login Module plays a major role. There are two type of users.
Admin, User. Each users can login into the food. For user requires
registration for login. Admin is the only user can view all the dish.

Login table (users)

Login table (admin)

3.1.2 ADMIN

This is the first module of Restaurant management. In this module,


Admin have all privileges like create description. Adding all the foods
restaurants is predefined to reduce the admin burden.

Admin can upload a food that can contain either an project details
like user story, solving techniques or customer feedback about the project.
There is no constraint in restaurant format. It can either be anything.

7
3.1.3 QUALITY CONTROL

In Food, Maintain a quality of dish and records are essential. Dish


also provides a solution to obtain the quality in dish and records. User like
People can view the restaurant those were uploaded by the admin. Within
the assigned project, users can see a managing alerts , those are only
visible to the user who were in same access. Details that are uploaded by
users and people do not have the privilege to delete those restaurant. In
Restaurant management, people can view the dish and make use of it in
product development.

3.1.4 PROJECT RESTAURANT

It is the most important module in every managing process. Because


an managing organization or enterprise, simultaneously developing more
than one product. For that, separate luxury are assigned and they are
involved in developing the product.

In Restaurant management, admin create a new food with a details


and then records them. Creation of users provides a new environment,
knowledge about project, understanding the food& customer needs and
managing needs. It provides a huge benefit to managing and users.

8
3.1.5 VIEW

View module plays a vital role in every managing. Without proper


view, identification of particular record is more complex. So every
organization maintains a view about every records, day based manner,
week based manner and year based manner. But the difficulty is no one
reads the view, because of view placed in a user control. Here, food is a
platform that shares a restaurant to everyone within the organization.
Everyone within the organization can understand about what our
organization moves on and also restaurant acts a evidence to recover the
information.

IMPLEMENTATION

 Web Page Developed :HTML, CSS, JS, Bootstrap


 Web Page Connected :PHP
 Back End Database :SQL

9
3.1.6 HTML

Hypertext Markup Language (HTML) is the standard markup


language for creating web pages and web foods. With Cascading Style
Sheets (CSS) and JavaScript, it forms a triad of cornerstone technologies
for the World Wide Web. Web browsers receive HTML documents from
a web server or from local storage and render the documents into
multimedia web pages. HTML describes the structure of a web page
semantically and originally included cues for the appearance of the
document.

HTML elements are the building blocks of HTML pages. With


HTML constructs, images and other objects such as interactive forms may
be embedded into the rendered page. HTML provides a means to create
structured documents by denoting structural semantics for text such as
headings, paragraphs, lists, links, quotes and other items.

HTML elements are delineated by tags, written using angle


brackets. Tags such as <img /> and <input /> directly introduce
content into the page. Other tags such as <p>...</p> surround and
provide information about document text and may include other tags as
sub-elements. Browsers do not display the HTML tags, but use them to
interpret the content of the page.

10
HTML can embed programs written in a scripting language such as
JavaScript which affects the behavior and content of web pages. Inclusion
of CSS defines the look and layout of content. The World Wide Web
Consortium (W3C), maintainer of both the HTML and the CSS standards,
has encouraged the use of CSS over explicit presentational HTML.

3.1.7 CSS

Cascading Style Sheets (CSS) is a style sheet language used for


describing the presentation of a document written in a markup language.
Although most often used to set the visual style of web pages and user
interfaces written in HTML and XHTML, the language can be applied to
any XML document, including plain XML, SVG and XUL, and is
applicable to rendering in speech, or on other media. Along with HTML
and JavaScript, CSS is a cornerstone technology used by most websites to
create visually engaging webpages, user interfaces for web foods, and
user interfaces for many mobile foods.

CSS is designed primarily to enable the separation of presentation


and content, including aspects such as the layout, colors, and fonts. This
separation can improve content accessibility, provide more flexibility and
control in the specification of presentation characteristics, enable multiple
HTML pages to share formatting by specifying the relevant CSS.

11
Separation of formatting and content makes it possible to present the
same markup page in different styles for different rendering methods,
such as on-screen, in print, by voice (via speech-based browser or screen
reader), and on Braille-based tactile devices. It can also display the web
page differently depending on the screen size or viewing device.

3.1.8 JavaScript

JavaScript often abbreviated as JS, is a high-level, interpreted


programming language. It is a language which is also characterized as
dynamic, weakly typed, prototype-based and multi-paradigm.

Alongside HTML and CSS, JavaScript is one of the three core


technologies of the World Wide Web. It is used to make dynamic
webpages interactive and provide online programs, including video
games. The majority of websites employ it, and all modern web browsers
support it without the need for plug-ins by means of a built-in JavaScript
engine. Each of the many JavaScript engines represent a different
implementation of JavaScript, all based on the ECMA Script
specification, with some engines not supporting the spec fully, and with
many engines supporting additional features beyond ECMA.

As a multi-paradigm language, JavaScript supports event-driven,


functional, and imperative (including object-oriented and prototype-
based) programming styles.

12
It has an API for working with text, arrays, dates, regular
expressions, and basic manipulation of the DOM, but the language itself
does not include any I/O, such as networking, storage, or graphics
facilities, relying for these upon the host environment in which it is
embedded.

Initially only implemented client-side in web browsers, JavaScript


engines are now embedded in many other types of host software,
including server-side in web servers and databases, and in non-web
programs such as word processors and PDF software, and in runtime
environments that make JavaScript available for writing mobile and
desktop foods, including desktop widgets.

3.1.9 JQUERY

jQuery is a Javascript library designed to


simplify HTML DOM tree traversal and manipulation, as well as event
handling, CSS animation, and Ajax. It is free, open-source software using
the permissive MIT License. Web analysis indicates that it is the most
widely deployed JavaScript library by a large margin.

jQuery's syntax is designed to make it easier to navigate a document,


select DOM elements, create animations, handle events, and
develop Ajax foods. jQuery also provides capabilities for developers to
create plug-ins on top of the JavaScript library.

13
This enables developers to create abstractions for low-level interaction
and animation, advanced effects and high-level, themeable widgets. The
modular approach to the jQuery library allows the creation of
powerful dynamic web pages and Web foods. The set of jQuery core
features—DOM element selections, traversal and manipulation—enabled
by its selector engine (named "Sizzle" from v1.3), created a new
"programming style", fusing algorithms and DOM data structures. This
style influenced the architecture of other JavaScript frameworks like YUI
v3 and Dojo, later stimulating the creation of the standard Selectors API.
Microsoft and Nokia bundle jQuery on their platforms. Microsoft includes
it with Visual Studio for use within Microsoft's ASP.NET
AJAX and ASP.NET MVC frameworks while Nokia has integrated it into
the Web Run-Time widget development platform.

jQuery, at its core, is a Document Object Model (DOM)


manipulation library. The DOM is a tree-structure representation of all the
elements of a Web page. jQuery simplifies the syntax for finding,
selecting, and manipulating these DOM elements. For example, jQuery
can be used for finding an element in the document with a certain property
(e.g. all elements with an h1 tag), changing one or more of its attributes
(e.g. color, visibility), or making it respond to an event (e.g. a mouse
click). jQuery also provides a paradigm for event handling that goes
beyond basic DOM element selection and manipulation.

14
The event assignment and the event callback function definition are
done in a single step in a single location in the code. jQuery also aims to
incorporate other highly used JavaScript functionality (e.g. fade ins and
fade outs).

The principles of developing with jQuery are:

 Separation of JavaScript and HTML: The jQuery library provides


simple syntax for adding event handlers to the DOM using JavaScript,
rather than adding HTML event attributesto call JavaScript functions.
Thus, it encourages developers to completely separate JavaScript code
from HTML markup.
 Brevity and clarity: jQuery promotes brevity and clarity with features
like "chainable" functions and shorthand function names.
 Elimination of cross-browser incompatibilities: The JavaScript
engines of different browsers differ slightly so JavaScript code that
works for one browser may not work for another. Like other JavaScript
toolkits, jQuery handles all these cross-browser inconsistencies and
provides a consistent interface that works across different browsers.
 Extensibility: New events, elements, and methods can be easily added
and then reused as a plugin.

15
3.1.10 BOOTSTRAP

Bootstrap is a free and open-source front-end Web framework. It


contains HTML and CSS-based design templates for typography, forms,
buttons, navigation and other interface components, as well as
optional JavaScript extensions. Unlike many earlier web frameworks, it
concerns itself with front-end development only. Bootstrap is the second
most-starred project on GitHub, with more than 129,000 stars. Bootstrap
is modular and consists of a series of Less (or Sass in version 4 and
onward) stylesheets that implement the various components of the toolkit.
These stylesheets are generally compiled into a bundle and included in
web pages, but individual components can be included or removed.
Bootstrap provides a number of configuration variables that control things
such as color and padding of various components.

Since Bootstrap 2, the Bootstrap documentation has included a


customization wizard which generates a customized version of Bootstrap
based on the requested components and various settings. As of Bootstrap
4, Sass is used instead of Less for the stylesheets. Each Bootstrap
component consists of an HTML structure, CSS declarations, and in some
cases accompanying JavaScript code. Grid system and responsive design
comes standard with an 1170-pixel-wide grid layout. Alternatively, the
developer can use a variable-width layout. For both cases, the toolkit has
four variations to make use of different resolutions and types of devices:

16
mobile phones, portrait and landscape, tablets and PCs with low and high
resolution. Each variation adjusts the width of the columns.

Bootstrap provides a set of stylesheets that provide basic style


definitions for all key HTML components. These provide a uniform,
modern appearance for formatting text, tables and form elements. In
addition to the regular HTML elements, Bootstrap contains other
commonly used interface elements.

The components are implemented as CSS classes, which must be


applied to certain HTML elements in a page. Bootstrap comes with
several JavaScript components in the form of jQuery plugins.

They provide additional user interface elements such as dialog


boxes, tooltips, and carousels. They also extend the functionality of some
existing interface elements, including for example an auto-complete
function for input fields. In version 1.3, the following JavaScript plugins
are supported: Modal, Dropdown, Scrollspy, Tab, Tooltip, Popover, Alert,
Button, Collapse, Carousel and Typeahead.

17
3.1.11 PHP

PHP: Hypertext Preprocessor (or simply PHP) is a server-side


scripting language designed for web development but also used as a
general-purpose programming language. It was originally created by
Rasmus Lerdorf in 1994, the PHP reference implementation is now
produced by The PHP Group. PHP originally stood for Personal Home
Page, but it now stands for the recursive acronym PHP: Hypertext
Preprocessor.

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


combination with various web template systems, web content
management systems, and web frameworks. PHP code is usually
processed by a PHP interpreter implemented as a module in the web server
or as a Common Gateway Interface (CGI) executable. The web server
combines the results of the interpreted and executed PHP code, which may
be any type of data, including images, with the generated web page. PHP
code may also be executed with a command-line interface (CLI) and can
be used to implement standalone graphical foods.

18
3.1.12 SQL

SQL is an abbreviation for Structured query language, and


pronounced either see-kweel or as separate letters. SQL is a standardized
query language for requesting information from a database.

SQL consists of many types of statements, which may be informally


classed as sublanguages, commonly a data query language (DQL), a data
definition language (DDL), a data control language (DCL), and a data
manipulation language (DML). The scope of SQL includes data query,
data manipulation (insert, update and delete), data definition (schema
creation and modification), and data access control.

SQL became a standard of the American National Standards


Institute (ANSI) in 1986, and of the International Organization for
Standardization (ISO) in 1987. Since then, the standard has been revised
to include a larger set of features.

The following commands are used in this project

19
SQL Command

INSERT The Insert statement is used to insert new records in a table.


INSERTINTOtable_name
(column1,column2,column3,…..)VALUES
(value1,value2,value3,...);
UPDATE The Update statement is used to modify the existing records
in a table.
UPDATE table_name SET column1=value1,
column2=value2,… WHERE condition;
DELETE The Delete statement is used to delete existing records in a
table.
DELETE FROM table_name WHERE condition;

20
DATA FLOW DIAGRAM

START

LOGIN

USER ADMIN

ORDER FOOD VIEW ORDERS ORDERS BILL

LOGOUT

END

21
TABLE STRUCTURE

Admin

Users

Orders

22
Foods

23
3.2.1 OUTPUT SCREENS

ADMIN

24
25
USER

26
27
28
29
30
4.3 CODING

<?php

$conn=mysqli_connect("localhost","root","","restaurant");

?>

<?php

session_start();

include 'conn.php';

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

$username=$_POST['username'];

$password=$_POST['password'];

$sql="SELECT * FROM admin WHERE username='".$username."' AND


password='".$password."'";

$result=mysqli_query($conn,$sql);

$sql2="SELECT * FROM users WHERE username='".$username."' AND


password='".$password."'";

$result2=mysqli_query($conn,$sql2);

31
if(mysqli_num_rows($result)>0){

header("location:adminhome.php");

elseif(mysqli_num_rows($result2)>0){

$_SESSION["username"]=$username;

header("location:home.php");

else{

header("location:index.php?id=1");

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

$username=$_POST['username'];

$password=$_POST['password'];

$sql="SELECT * FROM users WHERE username='$username'";

$result=mysqli_query($conn,$sql);

if(mysqli_num_rows($result)>0){

32
header("location:index.php?id=try");

else{

$sql2="INSERT INTO users(username,password)


values('$username','$password')";

$result2=mysqli_query($conn,$sql2);

header("location:index.php");

if(isset($_GET['id'])){

$id=$_GET['id'];

if($id=='ready'){

$id2=$_GET['id2'];

$sql="UPDATE orders SET delivered='1' WHERE id='".$id2."'";

$res=mysqli_query($conn,$sql);

if($res){

header("location:adminhome.php?id=orders");

33
}

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

$name=$_POST['name'];

$chef=$_POST['chef'];

$type=$_POST['type'];

$taste=$_POST['taste'];

$cost=$_POST['cost'];

$file=$_FILES['pic'];

$fileName=$_FILES['pic']['name'];

$fileTmpName=$_FILES['pic']['tmp_name'];

$fileSize=$_FILES['pic']['size'];

$fileError=$_FILES['pic']['error'];

$fileType=$_FILES['pic']['type'];

$fileExt=explode('.',$fileName);

$fileActualExt=strtolower(end($fileExt));

$allowed=array('jpg');

34
$sql="SELECT * FROM foods WHERE name='".$name."'";

$result=mysqli_query($conn,$sql);

if(mysqli_num_rows($result)>0){

header("location:adminhome.php?id3=alreadyadded");

else{

if(in_array($fileActualExt,$allowed)){

$fileDest=$name.'.'.$fileActualExt;

move_uploaded_file($fileTmpName,$fileDest);

$sql2="INSERT INTO foods(name,chef,type,taste,cost)


values('".$name."','".$chef."','".$type."','".$taste."','".$cost."')";

$res2=mysqli_query($conn,$sql2);

header("location:adminhome.php?id=added");

?>

35
REFERENCES

1. Deitel and Deitel and Nieto, “Internet and World Wide Web – How to Program”,
Published by Prentice Hall,5th Edition, 2011.

2. Jeffrey C. Jackson, “Web Technologies: A Computer Science Perspective”,


Published by Prentice Hall, 2007.

3. Matt Zandstra , “PHP Objects, Patterns, and Practice (Paperback)” , Published by a


Press,2nd Edition, 2007.

3. https://www.w3schools.com/php

4. https://www.javatpoint.com/php-tutorial

36

You might also like