Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 67

PROFORMA FOR THE APPROVAL PROJECT

PROPOSAL
(Note:All entries of the proforma of approval should be filled up with appropriate and
complete information. Incomplete proforma of approval in any respect will be
summarily rejected.)
PNR No.: …………………… Roll no: _____________
1. Name of the Student

2. Title of the Project


___________________________________________________________________________

3. Name of the Guide


___________________________________________________________________________

4. Teaching experience of the Guide ____________________________________________

5. Is this your first submission? Yes £ No £

Signature of the Student Signature of the Guide

Date: ……………………. Date: …………………

Signature of the coordinator

Date: …………………….
TABLE BOOKING MANAGEMENT SYSTEM
A Project Report

Submitted in partial fulfillment of the

Requirements for the award of the Degree of

BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY)


By

Devray Divya Dhanraj


19015
Under the esteemed guidance of

Mrs. Arogya Selvi

DEPARTMENT OF INFORMATION TECHNOLOGY

S.I.W.S

N.R. SWAMY COLLEGE OF COMMERCE AND ECONOMICS

&

SMT.THIRUMALAI COLLEGE OF SCIENCE


(Affiliated to University of Mumbai)

337 SEWREE- WADALA ESTATE, MUMBAI MAHARASHTRA- 400031

2022 – 2023
S.I.W.S

N.R. SWAMY COLLEGE OF COMMERCE AND ECONOMICS

&

SMT.THIRUMALAI COLLEGE OF SCIENCE


(Affiliated to University of Mumbai)

337 SEWREE – WADALA ESTATE, MUMBAI MAHARASHTRA – 400031

DEPARTMENT OF INFORMATION TECHNOLOGY

CERTIFICATE

Class: T.Y.BSc.IT Roll No: 19015 Examination Seat No: ____________


This is to certify that the project entitled, “Table Booking Management System” is bonafied
work of “Devray Divya Dhanraj” bearing Seat No: _____________ submitted in
partial fulfillment of the requirements for the requirements of the award of degree of
BACHELOR OF SCIENCE in INFORMATION TECHNOLOGY from University of
Mumbai.

Internal Guide Co-Ordinator

College Seal

Date: External Examiner


ABSTRACT
The project is based on an Android Application that can be used by customer to book the desired
table and menu of their choice from a restaurant as per their convenience. Previously table
reservation was manual which is ending up progressively in well-known restaurants but now a
days people are getting into digital era of reservation of restaurants, and suppliers are considering
to choose a digital system of booking. In manual system, everything depends upon waiter &
booking diary and there is no automated system for keeping the records. The general objective is
to build a reservation system for table and menu to assist workers with solving basic issues with
their manual reservation system. For example, utilization of time and cash. Today's generation
encourages high tech services especially over the Internet. Hence the project is developed
proficiently to help restaurant owners automate their business operations. In proposed reservation
system, we provide facility to the customers to reserve table or menu or both according to their
convenience. On booking menu the customer has to pay 50 percent amount in advance. The
customer can cancel the booking if failed to arrive on time and hence book the table in the next
possible time slot provided that the booking is cancelled before 30mins of the selected timeslot
else the advance paid will not be refunded.
ACKNOWLEDGEMENT
I am greatly indebted to my project supervisor Mrs. Arogya Selvi for her guidance and
constant supervision as well as providing us with all the information regarding the project .

I am also thankful to Mumbai University for providing me with all the latest
technologies, thus, comforting me with project.

I take this opportunity to express my deep gratitude towards all the members of the
Information Technology Department, for helping me in the completion of the project. Finally,
I am thanking to all my Friends for their encouragement & support throughout the period of
completion.
Again, I owe my profound gratitude to my project guide, for not only helping me with the
project but also developing a keen interest in the same during its progress.
DECLARATION
I hereby declare that the project entitled “Table Booking Management System”
done at S.I.W.S. N.R. Swamy college of Commerce and Economics &
Smt.Thirumalai College of Science, has not been in any case duplicated to submit to
any other university for the award of any degree. To the best of my knowledge other
than me, no one has submitted to any other university.
The project is done in partial fulfillment of the requirements for the award of degree
of BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY) to be submitted as
final semester project as part of our curriculum.

Name and Signature of the Student

Devray Divya Dhanraj


TABLE OF CONTENTS
Sr. No. Index Date
1 INTRODUCTION
1.1 Background
1.2 Objectives
1.3 Purpose and Scope
1.2.1 Purpose
1.2.2 Scope
2 SYSTEM ANALYSIS
2.1 Existing System
2.2 Proposed System
2.3 Requirement Analysis
2.4 Hardware Requirements
2.5 Software Requirements
2.6 Justification of Selection of Technology
3 SYSTEM DESIGN
3.1 Module Division
3.2 Data Dictionary
3.3 ER Diagrams
3.4 DFD/UML Diagrams
4 IMPLEMENTATION AND TESTING
4.1 Code
4.2 Testing Approach
5 RESULTS AND DISCUSSION
5.1 Test Report
5.2 Discussion
6 CONCLUSION
7 REFERENCES

Chapter 1
Introduction

1.1 Background:
The project is developing because; many restaurants have a lot difficult to manage the
business such as customer ordering and reservation table. If the customer book. an order
and later wants to cancel the order, he is permitted to do this only within a specific time
period. By using manual customer ordering it is difficult for the waiter to keep the correct
customer information and may lose the customer information. The customer is also given
the facility to view the status of the order to determine if it is ready...
Online Restaurant management system is the system for 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. In proposed system user can search for a menu according to
his choice i.e. according to price range and category of food and later he can order a
meal.

1.2 Objective:
 To determine the nature of on-line restaurant.
 To manage the restaurant more effectively and efficiently by computerizing meal
ordering,billing and inventory control.
 To determine the Documentation for online table booking Management system.

1.3 Purpose and Scope:

1.3.1Purpose:
The restaurant reservation system is a software solution that offers consumers the convenience of
booking a table and ordering food in advance. Customers can use a designated website or mobile
application to place orders even before they set foot in a restaurant.

1.3.2 Scope:
The scope of this project is to build an application for reserving tables for restaurants.
Through restaurant reservation system online, user can be allowed to take reservations
quickly and easily. These reservations are completely under users' control. The user can
choose and update their reservation as per their preference of location and time. The
manager doesn't have to maintain a guest book anymore. The managers can see who is
coming and at what time. In that they are aware about which tables have been booked.
This method also makes it easy to change the status of a reservation once your guests
walks in. Time management becomes simple. You can also inform your restaurant staff
about who has arrived as you have the information about the customer from the database
and how to take care of them. It also makes it easy to let them know in case of cancelled
reservations or no shows.

1.3.3 Applicability
The table booking system can be used by restaurants, bars, hotels, pubs, cafes, and food
trucks. The biggest advantage of the online restaurant reservation app is that tables will
always be available for booking by the users, and there will not be any instances of
wrong reservations.

1.3.4 Achievements:
The table booking system can be used by restaurants, bars, hotels, pubs, cafes, and food
trucks. The biggest advantage of the online restaurant reservation app is that tables will
always be available for booking by the users, and there will not be any instances of
wrong reservations.

Chapter 2
System Analysis
2.1 Existing System:
There are many computerised Table booking management systems available but for each system
there exist disadvantages or missing features. The most common type of table booking
management system contains a static order entry computer system usually in the shape of a
desktop computer with a touch screen. Typically this common approach is adequate to the
restaurants requirements but still requires handwritten orders to be relayed to the order entry
computer system.

2.2 Proposed System:


.
The aim of this project is to create a table booking management system that can
incorporate the benefits of all the existing solutions but without any of the drawbacks as well as
including many new features.

Many of the existing solutions to POS (Point-of-Sale) systems are sold with the required
expensive hardware so for any business looking to work to a budget, the more enriched software
solutions are just out of their range.

2.3 Requirement Analysis:


2.3.1Problem Definition:
This service represents an important benefit for restaurants, because by guaranteeing
customers a seat, they will be able to start operating at an earlier time, and serve food until a later
time than average, and thus, serve more parties each day, and consequently, have a higher daily
income.

2.3.2 Requirement Specification:


This phase is concerned about collection of requirements of the system. This process
involves generating document and requirement review.

2.4 Hardware Requirements:


1. Processor : Intel I5
2. Ram : 8GB
3. Keyboard
4. Mouse

2.5 Software Requirements:


1. Language: Python ,MySQL & PHP
2. Operating System: Windows 7 ultimate
3. Other Software: Machine Learning

2.6 Justification of Platform:

Python:
The python language is one of the most accessible programming languages available because it
has simplified syntax and not complicated, which gives more emphasis on natural language.
Due to its ease of learning and usage, python codes can be easily written and executed much
faster than other programming languages.

PHP:
PHP is an open-source server-side scripting language that many devs use for web development.
It is also a general-purpose language that you can use to make lots of projects, including
Graphical User Interfaces (GUIs)
PHP is platform-independent. You don't have to have a particular OS to use it because it runs on
every platform, whether it's Mac, Windows, or Linux.
PHP is open source. The original code is made available to everyone who wants to build upon it.
This is one of the reasons why one of its frameworks, Laravel, is so popular.
Easy to learn: PHP is not hard to learn for absolute beginners. You can pick it up pretty if you
already have programming knowledge.

MySQL:
MySQL is relational database management system(RDBMS) developed by oracle that is based
on structured query language (SQL). A database is a structured collection of data. It may be
anything from simple shopping list to a picture or a place to hold a vast amounts of information
in a corporate network.

Machine Learning:

Machine learning is a field of inquiry devoted to understanding and building methods that 'learn', that
is, methods that leverage data to improve performance on some set of tasks. It is seen as a part of
artificial intelligence.

Chapter 3

System Design
3.1 Module Division:

Login and user inputs

Module Privacy and Security

Payment gateway

Login and User inputs: User can login to the app and book table at desired restaurant and
select menu.

Privacy and Security : Privacy refers to the users ability to control, access, and regulate their
personal information and Security refers to the system that protects the data from getting into
wrong hands, through a breach, leak, or cyber attack.

Payment gateway : Payment gateway is required because the user has to pay the required
amount while booking the table.

3.2 Data Dictionary:

Field name Data type Field size Description Example

Login id Varchar 255 User will provide at the time Divya1234


of login
Password Varchar 255 Password provided by the div@111
user
Email Varchar 255 User Email address for divya@gm
sending messages ail.com
Payment Varchar 255 For paying the required 1005
amount

3.3 ER Diagram:
Fig.3.2: Entity Relationship Diagram

An Entity-Relationship diagram describes interrelated things of interest in a specific domain of


knowledge. A basic ER diagram is composed of entity types and specifies relationships that can
exist between entities.

3.4 Class Diagram:


Fig.3.4: Class Diagram

Class diagram in the Unified Modeling Language (UML) is a type of static structure diagram
that describes the structure of a system by showing the system’s classes, their attributes,
operations and the relationships among objects

3.5 Use case Diagram:


Fig.3.5: Use Case Diagram

A use case diagram is a graphical depiction of user’s possible interactions with a system.
A use cases and different types of users the system has.

3.6 Sequence Diagram:


Fig.3.6: Sequence Diagram

A Sequence Diagram simply depicts interaction between objects in a sequential describes


how and in what order a group of objects works together.

3.7 State Transition:


Fig.3.7: State Transition Diagram

State Transition Diagrams describe all of the states that an object can have, the events
under which an object changes state, the conditions that must be fulfilled before the transition
occur and the activities undertakes during the life of an object.

3.8 Data Flow Diagram:


Fig.3.8: Data Flow Diagram

A Data-Flow Diagram is a way of representing a flow of data through a process or a


system.

3.9 Activity Diagram:


Fig.3.9: Activity Diagram

Activity Diagram are graphical representation of workflows of stepwise activities and actions
with support for choice, iteration and concurrency.

Chapter 4: Implementation and Testing


4.1 Code
Index.php
<!-- index.php -->
<?php include 'template/header.php'; ?>
<body>

<?php include 'template/nav-bar.php'; ?>


<!-- END nav -->

<section class="home-slider owl-carousel">


<div class="slider-item" style="background-image: url('images/bg_1.jpg');">
<div class="overlay"></div>
<div class="container">
<div class="row slider-text align-items-center justify-content-center text-
center">
<div class="col-md-10 col-sm-12 ftco-animate">
<h1 class="mb-3">Book a table for yourself at a time convenient for you</h1>
</div>
</div>
</div>
</div>

<div class="slider-item" style="background-image: url('images/bg_2.jpg');">


<div class="overlay"></div>
<div class="container">
<div class="row slider-text align-items-center justify-content-center text-
center">
<div class="col-md-10 col-sm-12 ftco-animate">
<h1 class="mb-3">Tasty &amp; Delicious Food</h1>
</div>
</div>
</div>
</div>

<div class="slider-item" style="background-image: url('images/bg_3.jpg');">


<div class="overlay"></div>
<div class="container">
<div class="row slider-text align-items-center justify-content-center text-
center">
<div class="col-md-10 col-sm-12 ftco-animate">
<h1 class="mb-3">Book a table for yourself at a time convenient for you</h1>
</div>
</div>
</div>
</div>
</section>
<!-- END slider -->

<div class="ftco-section-reservation">
<div class="container">
<div class="row">
<div class="col-md-12 reservation pt-5 px-5">
<p style="font-size: 20px; color: #000;font-weight: bold;margin-top: -
30px">Make a Reservation</p>
<div class="block-17" style="min-height: 100px;">

<form action="restaurant-list.php" method="POST" class="d-block d-lg-flex">


<div class="fields d-block d-lg-flex">
<p style="font-size: 20px;color: #000">Country</p>
<div class="select-wrap one-half">
<div class="icon"><span class="ion-ios-arrow-down"></span></div>
<select name="city" id="" class="form-control" disabled="">
<option value="India">India</option>
</select>
</div>
<p style="font-size: 20px;color: #000">Location</p>
<div class="select-wrap one-half">
<div class="icon"><span class="ion-ios-arrow-down"></span></div>
<select data-plugin-selectTwo class="form-control populate" name="area"
required="" style="cursor: pointer;">
<option value=""> -Select- </option>
<?php
include 'dbCon.php';
$con = connect();
$sql = "SELECT * FROM `locations`;";
$result = $con->query($sql);
foreach ($result as $r) {
?>
<option value="<?php echo $r['id']; ?>"><?php echo $r['location_name'];
?></option>
<?php } ?>
</select>
</div>
</div>
<input type="submit" class="search-submit btn btn-primary" name="find"
value="Find">
</form>
</div>
</div>
</div>
</div>
</div>

<?php include 'template/font-menu.php'; ?>


<section class="ftco-section bg-light">
<div class="container special-dish">

<h3 style="text-align: center;">Our Specialties</h3>


Usually, we're all about getting out more. But these are unprecedented times.
<br/>

We intend to do everything we can to support our restaurant partners in what


is an extremely challenging time for the industry. Please remember that
supporting restaurants does not necessarily mean dining out right now, and we
would encourage our users to look out for any opportunity to do this -
whether that is through buying vouchers to use at a later date, or ordering
delivery. If you choose to spread the word on social media around how you’re
supporting restaurants, please do let us know and we’ll continue to amplify
these messages wherever we’re able.<br/>

We will of course continue to monitor the situation, and adapt as quickly and
as sensitively as possible. In terms of our social media and email, you won’t
hear the same messaging from us that you’re used to. Right now, we’re solely
focused on what’s best for both diners and restaurants.<br/>

You can access the most up to date information surrounding COVID-19 via the
World Health Organization, as well as the government's website. We’d urge our
entire dining community to keep themselves informed at this time.
</div>
</section>

<?php include 'template/instagram.php'; ?>


<?php include 'template/footer.php'; ?>
<?php include 'template/script.php'; ?>

<script src="dashboard/assets/vendor/jquery/jquery.js"></script>
<script src="dashboard/assets/vendor/select2/select2.js"></script>
<script src="dashboard/assets/vendor/bootstrap-multiselect/bootstrap-
multiselect.js"></script>

</body>
</html>

login.php
<!-- signin.php -->
<?php include 'template/header.php'; ?>
<body>

<?php include 'template/nav-bar.php'; ?>


<!-- END nav -->

<section class="home-slider owl-carousel" style="height: 400px;">


<div class="slider-item" style="background-image:
url('images/bg_1.jpg');" data-stellar-background-ratio="0.5">
<div class="overlay"></div>
<div class="container">
<div class="row slider-text align-items-center justify-content-
center">
<div class="col-md-10 col-sm-12 ftco-animate text-center"
style="padding-bottom: 25%;">
<p class="breadcrumbs"><span class="mr-2"><a
href="index.php">Home</a></span> <span>Login</span></p>
<h1 class="mb-3">Login</h1>
</div>
</div>
</div>
</div>
</section>

<section class="ftco-section bg-light">


<div class="container">
<div class="row justify-content-center mb-5 pb-5">
<div class="col-md-7 text-center heading-section ftco-animate">
<span class="subheading">Login</span>
<h2>Log In Our Site</h2>
</div>
</div>
<div class="row">
<div class="col-md-12 dish-menu">

<div class="nav nav-pills justify-content-center ftco-animate"


id="v-pills-tab" role="tablist" aria-orientation="vertical">
<a class="nav-link py-3 px-4 active" id="v-pills-home-tab"
data-toggle="pill" href="#v-pills-home" role="tab" aria-controls="v-pills-
home" aria-selected="true"><span class="flaticon-meat"></span> Login</a>

</div>

<div class="tab-content py-5" id="v-pills-tabContent">


<div class="tab-pane fade show active" id="v-pills-home"
role="tabpanel" aria-labelledby="v-pills-home-tab">
<div class="row">
<div class="col-lg-2"></div>
<div class="col-lg-8">
<div class="menus d-flex ftco-animate" style="background:
white;">
<div class="row" style="width: 100%">
<div class="col-md-12">
<form action="" method="POST" enctype="multipart/form-
data">
<div class="form-group">
<input type="email" name="email" class="form-
control" required="" placeholder="Your Email">
</div>
<div class="form-group">
<input type="password" name="password" class="form-
control" required="" placeholder="Your Password">
</div>
<div class="form-group">
<input type="submit" value="Login" name="login"
class="btn btn-primary py-3 px-5">
</div>
</form>
<p class="text-center">For Register <a
href="register.php">Click Here.</a> </p>
</div>
</div>
</div>
</div>
</div>
</div><!-- END -->

</div>
</div>
</div>
</div>
</section>

<?php include 'template/instagram.php'; ?>

<?php include 'template/footer.php'; ?>

<?php include 'template/script.php'; ?>


</body>
</html>

<?php
if (isset($_POST['login'])) {

$email = $_POST['email'];
$password = $_POST['password'];

include 'dbCon.php';
$con = connect();

$emailSQL = "SELECT * FROM restaurant_info WHERE email = '$email';";

$passwordSQL = "SELECT * FROM restaurant_info WHERE email = '$email' And


password = '$password';";

$emailResult = $con->query($emailSQL);

$passwordResult = $con->query($passwordSQL);

if ($emailResult->num_rows <= 0) {
echo '<script>alert("This Email Does Not Exist.")</script>';
echo '<script>window.location="login.php"</script>';
}else if ($passwordResult->num_rows <= 0) {
echo '<script>alert("This Password is Incorrect.")</script>';
echo '<script>window.location="login.php"</script>';
}else{

$_SESSION['isLoggedIn'] = TRUE;

$SQL = "SELECT * FROM restaurant_info WHERE email = '$email' And


password = '$password'";

$result = $con->query($SQL);

foreach ($result as $r) {


$_SESSION['id'] = $r['id'];
$_SESSION['name'] = $r['restaurent_name'];
$_SESSION['phone'] = $r['phone'];
$_SESSION['email'] = $r['email'];
$_SESSION['password'] = $r['password'];
$_SESSION['role'] = $r['role'];
}
if ($_SESSION['role'] == 1) {
echo '<script>window.location="dashboard/index.php"</script>';
}elseif ($_SESSION['role'] == 2) {
echo '<script>window.location="index.php"</script>';
}
}
}
?>
Register.php

<!-- signin.php -->


<?php include 'template/header.php'; ?>
<body>

<?php include 'template/nav-bar.php'; ?>


<!-- END nav -->

<section class="home-slider owl-carousel" style="height: 400px;">


<div class="slider-item" style="background-image: url('images/bg_1.jpg');"
data-stellar-background-ratio="0.5">
<div class="overlay"></div>
<div class="container">
<div class="row slider-text align-items-center justify-content-
center">
<div class="col-md-10 col-sm-12 ftco-animate text-center"
style="padding-bottom: 25%;">
<p class="breadcrumbs"><span class="mr-2"><a
href="index.php">Home</a></span> <span>Register</span></p>
<h1 class="mb-3">Register</h1>
</div>
</div>
</div>
</div>
</section>

<section class="ftco-section bg-light">


<div class="container">
<div class="row justify-content-center mb-5 pb-5">
<div class="col-md-7 text-center heading-section ftco-animate">
<span class="subheading">Register</span>
<h2>Register In Our Site</h2>
</div>
</div>
<div class="row">
<div class="col-md-12 dish-menu">

<div class="nav nav-pills justify-content-center ftco-animate"


id="v-pills-tab" role="tablist" aria-orientation="vertical">
<a class="nav-link py-3 px-4 active" id="v-pills-home-tab" data-
toggle="pill" href="#v-pills-home" role="tab" aria-controls="v-pills-home" aria-
selected="true"><span class="flaticon-meat"></span> As Customer</a>
<a class="nav-link py-3 px-4" id="v-pills-profile-tab" data-
toggle="pill" href="#v-pills-profile" role="tab" aria-controls="v-pills-profile"
aria-selected="false"><span class="flaticon-cutlery"></span> As Restaurant</a>
</div>

<!--register as customer-->
<div class="tab-content py-5" id="v-pills-tabContent">
<div class="tab-pane fade show active" id="v-pills-home"
role="tabpanel" aria-labelledby="v-pills-home-tab">
<div class="row">
<div class="col-lg-2"></div>
<div class="col-lg-8">
<div class="menus d-flex ftco-animate" style="background:
white;">
<div class="row" style="width: 100%">
<div class="col-md-12">

<!-- register as customer -->


<form action="manage-insert.php" method="POST"
enctype="multipart/form-data">
<div class="form-group">
<input type="text" name="fullname" class="form-
control" required="" placeholder="Your Name">
</div>
<div class="form-group">
<input type="email" name="email" class="form-control"
required="" placeholder="Your Email">
</div>
<div class="form-group">
<input type="text" name="phone" class="form-control"
required="" placeholder="Your Phone">
</div>
<div class="form-group">
<textarea name="address" id="" cols="30" rows="2"
class="form-control" placeholder="Address"></textarea>
</div>
<div class="form-group">
<input type="password" name="password" class="form-
control" required="" placeholder="Your Password">
</div>
<div class="form-group">
<input type="file" name="image" class="form-control"
required="" >
</div>
<div class="form-group">
<input type="submit" value="Register" name="regascus"
class="btn btn-primary py-3 px-5">
</div>
</form>
<p class="text-center">For Login <a href="login.php">Click
Here</a> </p>
</div>
</div>
</div>
</div>
</div>
</div><!-- END -->

<!--register as restaurant-->
<div class="tab-pane fade" id="v-pills-profile" role="tabpanel"
aria-labelledby="v-pills-profile-tab">
<div class="row">
<div class="col-lg-2"></div>
<div class="col-lg-8">
<div class="menus d-flex ftco-animate" style="background:
white;">
<div class="row" style="width: 100%">
<div class="col-md-12">
<form action="manage-insert.php" method="POST"
enctype="multipart/form-data">
<div class="form-group">
<input type="text" name="fullname" class="form-
control" required="" placeholder="Restaurant Name">
</div>
<div class="form-group">
<input type="email" name="email" class="form-control"
required="" placeholder="Restaurant Email">
</div>
<div class="form-group">
<input type="text" name="phone" class="form-control"
required="" placeholder="Restaurant Phone">
</div>
<!-- <div class="form-group">
<input type="text" name="bkashnumber" class="form-
control" required="" placeholder="Restaurant Bkash Number">
</div> -->
<div class="form-group">
<select class="form-control " name="area" required="">
<option value=""> -Select Restaurant Area- </option>
<?php
include 'dbCon.php';
$con = connect();
$sql = "SELECT * FROM `locations`;";
$result = $con->query($sql);
foreach ($result as $r) {
?>
<option value="<?php echo $r['id']; ?>"><?php echo
$r['location_name']; ?></option>
<?php } ?>
</select>
</div>
<div class="form-group">
<textarea name="address" id="" cols="30" rows="2"
class="form-control" placeholder="Restaurant Address"></textarea>
</div>
<div class="form-group">
<input type="password" name="password" class="form-
control" required="" placeholder="Password">
</div>
<div class="form-group">
<input type="file" name="image" class="form-control"
required="" >
</div>
<div class="form-group">
<input type="submit" value="Register" name="regasres"
class="btn btn-primary py-3 px-5">
</div>
</form>
<p class="text-center">For Login <a href="login.php">Click
Here</a> </p>
</div>
</div>
</div>
</div>
</div>
</div><!-- END -->
</div>
</div>
</div>
</div>
</section>

<?php include 'template/instagram.php'; ?>

<?php include 'template/footer.php'; ?>

<?php include 'template/script.php'; ?>


</body>
</html>

Book.php
<!-- select-menu.php -->
<?php
if (isset($_POST['confirm'])) {
include 'dbCon.php';
$con = connect();

$res_id = $_POST['res_id'];
$reservation_name = $_POST['reservation_name'];
$reservation_phone = $_POST['reservation_phone'];
$reservation_date = $_POST['reservation_date'];
$reservation_time = $_POST['reservation_time'];

$bkashnumber = '';
$Rinsql = "SELECT * from restaurant_info WHERE id = '$res_id';";
$Rinresult = $con->query($Rinsql);
foreach ($Rinresult as $rri) {
$bkashnumber = $rri['bkashnumber'];
}

$table = $_POST["table"];
$chair = $_POST["chair"];

include 'template/header.php'; ?>


<body>

<?php include 'template/nav-bar.php'; ?>


<!-- END nav -->

<section class="home-slider owl-carousel" style="height: 400px;">


<div class="slider-item" style="background-image: url('images/bg_1.jpg');"
data-stellar-background-ratio="0.5">
<div class="overlay"></div>
<div class="container">
<div class="row slider-text align-items-center justify-content-
center">
<div class="col-md-10 col-sm-12 ftco-animate text-center"
style="padding-bottom: 25%;">
<p class="breadcrumbs"><span class="mr-2"><a
href="index.php">Home</a></span> <span>Booking</span></p>
<h1 class="mb-3">Booking</h1>
</div>
</div>
</div>
</div>
</section>

<section class="ftco-section bg-light">


<div class="container">
<div class="row justify-content-center mb-5 pb-5">
<div class="col-md-7 text-center heading-section ftco-animate">
<span class="subheading">Booking</span>
<h2>Confirm Your Booking</h2>
</div>
</div>
<div class="row block-9 mb-4">
<div class="col-md-6 pr-md-5 flex-column">
<div class="row d-block flex-row">
<h2 class="h4 mb-4">Contact Information</h2>
<div class="col mb-3 d-flex py-4 border" style="background:
white;">
<div class="align-self-center">
<p class="mb-0"><span>Name:</span> <a href=""><?php
echo $reservation_name; ?></a></p>
<p class="mb-0"><span>Phone:</span> <a
href="tel://1234567920"><?php echo $reservation_phone; ?></a></p>
<p class="mb-0"><span>Reservation Date:</span> <a
href=""><?php echo $reservation_date; ?></a></p>
<p class="mb-0"><span>Reservation Time:</span> <a
href=""><?php echo $reservation_time; ?></a></p>
</div>
</div>
<div class="col mb-3 d-flex py-4 border" style="background:
white;">
<div class="align-self-center">
<p class="mb-0"><span>Table No:</span>
<?php for($p = 0; $p < count($_POST["table"]); $p++){
$t_id = $_POST['table'][$p];
$sql4 = "SELECT * FROM `restaurant_tables` WHERE id
= '$t_id';";
$result4 = $con->query($sql4);
foreach ($result4 as $r4) {
?>
<a style="color: #FFB911;"><?php echo
$r4['table_name']; ?></a>
<?php } } ?>
</p>
<p class="mb-0"><span>Chair No:</span>
<?php for($q = 0; $q < count($_POST["chair"]); $q++)
{
$c_id = $_POST['chair'][$q];
$sql5 = "SELECT * FROM `restaurant_chair` WHERE id =
'$c_id';";
$result5 = $con->query($sql5);
foreach ($result5 as $r5) {
?>
<a style="color: #FFB911;"><?php echo
$r5['chair_no']; ?>,</a>
<?php } } ?>
</p>
</div>
</div>
</div>
</div>
<div class="col-md-6 pr-md-5 flex-column">
<div class="row d-block flex-row">
<h2 class="h4 mb-4">Menu Item Information</h2>
<div class="col mb-3 d-flex py-4 border" style="background:
white;">
<div class="align-self-center" style="width: 100%">
<table style="width: 100%">
<thead>
<tr>
<th>Image</th>
<th>Item Name</th>
<th>Unit Price</th>
<th>Quantity</th>
<th>Subtotal</th>
</tr>

</thead>
<tbody>
<?php

$total_price = 0;
for($i = 0; $i < count($_POST["item"]);
$i++){
$i_id = $_POST['item'][$i];
$qty = $_POST["qty"][$i];
//echo $qty;

$c = 1;
$Itmsql = "SELECT * FROM `menu_item`
WHERE id = '$i_id';";
$Itmresult = $con->query($Itmsql);
foreach ($Itmresult as $itmr) {
//echo $itmr['price'];
$total_price = $total_price + ($qty *
$itmr['price']);
?>
<tr>
<td><img style="height: 40px;width:
40px;" src="dashboard/item-image/<?php echo $itmr['image']; ?>" >
</td>
<td><?php echo $itmr['item_name'];
?></td>
<td><?php echo $itmr['price']; ?></td>
<td><?php echo $qty; ?></td>
<td><?php echo $qty * $itmr['price']; ?
></td>
</tr>
<?php $c++; } } ?>
</tbody>
</table>
</div>
</div>
<div class="col mb-3 d-flex py-4 border" style="background:
white;">
<div class="align-self-center">
<p class="mb-0"><span>Total Price:</span> <a
href=""><?php echo $total_price; ?> ₹</a></p>
</div>
</div>
</div>
</div>
<!-- <div class="col-md-12">
<div class="col mb-3 border" style="background: white;">
<h3 class="text-center">Pay First</h3>
<div class="row">
<div class="col-md-6" style="text-align: center;">
<img style="height: 100px; width: 152px;"
src="images/bkash-logo.png">
<p class="text-center">Account Number:</p>
<h6 class="text-center"><?php echo $bkashnumber; ?></h6>
</div>
<div class="col-md-6">
<h6>Procedure:</h6>
<ol>
<li>send money</li>
<li>netbanking</li>
<li>upi</li>
<li>wallet</li>
<li>paytm</li>
<li>Enter transaction number</li>
</ol>
</div>
</div>
</div>
</div> -->

<form action="manage-insert.php" method="POST">


<div class="col-lg-12" style="text-align: center;">
<div class="form-group">
<input type="text" name="transaction_id" class="form-control"
placeholder="Transaction Id" required="">
</div>
<input type="hidden" name="res_id" value="<?php echo
$res_id; ?>">
<input type="hidden" name="total_price" value="<?php echo
$total_price; ?>">
<input type="hidden" name="reservation_name" value="<?php
echo $reservation_name; ?>">
<input type="hidden" name="reservation_phone" value="<?php
echo $reservation_phone; ?>">
<input type="hidden" name="reservation_date" value="<?php
echo $reservation_date; ?>">
<input type="hidden" name="reservation_time" value="<?php
echo $reservation_time; ?>">
<?php for($r = 0; $r < count($_POST["table"]); $r++){
$tbl_id = $_POST['table'][$r]; ?>
<input type="hidden" name="table[]" value="<?php echo
$tbl_id; ?>">
<?php } for($s = 0; $s < count($_POST["chair"]); $s++){
$chr_id = $_POST['chair'][$s]; ?>
<input type="hidden" name="chair[]" value="<?php echo
$chr_id; ?>">
<?php } ?>
<?php for($t = 0; $t < count($_POST["item"]); $t++){
$i_id = $_POST['item'][$t];
$qty = $_POST['qty'][$t];
?>
<input type="hidden" name="item[]" value="<?php echo $i_id;
?>">
<input type="hidden" name="qty[]" value="<?php echo $qty; ?>">
<?php } ?>
<input type="submit" value="Book" name="book" class="btn
btn-primary py-3 px-5">
</div>
</form>
</div>
</section>

<?php include 'template/instagram.php'; ?>

<?php include 'template/footer.php'; ?>

<?php include 'template/script.php'; ?>

</body>
</html>
<?php } ?>
Choose-table.php
<!-- choose-table.php -->
<?php
if (isset($_POST['reservation'])) {

$res_id = $_POST['res_id'];
$reservation_name = $_POST['reservation_name'];
$reservation_phone = $_POST['reservation_phone'];
$reservation_date = $_POST['reservation_date'];
$reservation_time = $_POST['reservation_time'];

include 'template/header.php'; ?>


<link rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-
fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
crossorigin="anonymous">

<body style="background-image:url('images/squares.png')">

<?php include 'template/nav-bar.php'; ?>


<!-- END nav -->

<section class="home-slider owl-carousel" style="height: 400px;">


<div class="slider-item" style="background-image:
url('images/cover.jpg');" data-stellar-background-ratio="0.5">
<div class="overlay"></div>
<div class="container">
<div class="row slider-text align-items-center justify-content-
center">
<div class="col-md-10 col-sm-12 ftco-animate text-center"
style="padding-bottom: 25%;">
<p class="breadcrumbs"><span class="mr-2"><a
href="index.php">Home</a></span> <span>Tables</span></p>
<h1 class="mb-3">Choose Tables</h1>
</div>
</div>
</div>
</div>
</section>
<section class="ftco-section" >
<div class="container">
<div class="row justify-content-center mb-5 pb-5">
<div class="col-md-7 text-center heading-section ftco-animate">
<span class="subheading">Our Tables</span>
<h2>Choose Your Table</h2>
</div>
</div>

<form action="select-menu.php" method="POST">


<div class="row">
<div class="col-md-12 dish-menu">
<div class="tab-content py-5" id="v-pills-tabContent">
<div class="tab-pane fade show active" id="v-pills-home"
role="tabpanel" aria-labelledby="v-pills-home-tab">
<div class="row">
<?php
include 'dbCon.php';
$con = connect();
$sql = "SELECT * FROM `restaurant_tables` WHERE res_id =
'$res_id';";
$result = $con->query($sql);
foreach ($result as $r) {
$table_id = $r['id'];
?>
<div class="col-lg-3" style="min-height: 190px">
<p style="font-weight: bold; padding: ">Table <?php echo
@$i += 1 ?></p>
<nav class="menu2">
<input type="checkbox" id="restTable<?php echo
$table_id; ?>" name="table[]" value="<?php echo $table_id; ?>" class="menu-
toggler2 restTable" data-id="<?php echo $table_id; ?>">
<label for="menu-toggler2"></label>
<ul>
<?php
$sql2 = "SELECT * FROM `restaurant_chair` WHERE
tbl_id = '$table_id';";
$result2 = $con->query($sql2);
foreach ($result2 as $r2) {
$c_id = $r2['id'];
$booked = false;
$cbbook = "SELECT
bc.id,bc.booking_id,bc.chair_id,bc.chair_no,bd.booking_id,bd.res_id,bd.booking_da
te,bd.booking_time
FROM booking_chair as bc, booking_details as
bd
WHERE bc.booking_id = bd.booking_id
AND bd.res_id = '$res_id'
AND bd.booking_date = '$reservation_date'
AND bd.booking_time ='$reservation_time'
AND bc.chair_id = '$c_id';";
$cbbookresult = $con->query($cbbook);
if ($cbbookresult->num_rows > 0) {
$booked = true;
}
if ($booked == true) {
?>
<li class="menu-item2">
<input type="checkbox" disabled="">
</li>
<?php } else{ ?>
<li class="menu-item2">
<input type="checkbox" name="chair[]" id="chair"
value="<?php echo $r2['id']; ?>">
</li>
<?php } ?>
<?php } ?>
</ul>
</nav>
</div>
<?php } ?>
<div class="col-lg-12" style="margin-top: 15%;text-align:
center;">
<div class="form-group">
<select>
<option></option>
</select>
<input type="hidden" name="res_id" value="<?php echo
$res_id; ?>">
<input type="hidden" name="reservation_name" value="<?
php echo $reservation_name; ?>">
<input type="hidden" name="reservation_phone"
value="<?php echo $reservation_phone; ?>">
<input type="hidden" name="reservation_date" value="<?
php echo $reservation_date; ?>">
<input type="hidden" name="reservation_time" value="<?
php echo $reservation_time; ?>">
<p style="display:none;text-align: center;"
id="viewMenu">
<input type="submit" value="Confrirm"
name="selectChair" class="btn btn-primary py-3 px-5" >
</p>
</div>
</div>
</div><!-- END -->
</div>
</div>
</div>
</form>
</div>
</section>

<?php include 'template/instagram.php'; ?>

<?php include 'template/footer.php'; ?>

<?php include 'template/script.php'; ?>

</body>
</html>
<?php }else{

}
?>

<script type="text/javascript">
// $(".restTable").click(function() {
// // body...
// var id = $(this).data("id");
// var tbl = document.getElementById("restTable"+id);
// var btnmenu = document.getElementById("viewMenu");

// // alert(tbl.checked);

// if (tbl.checked == true){
// btnmenu.style.display = "block";
// } else {
// btnmenu.style.display = "none";
// }

// });

$(document).ready(function(){
$('input[type="checkbox"]').click(function(){
// alert($('.menu:checked').length);

var btnmenu = document.getElementById("viewMenu");


var maxchecked = $('#chair:checked').length;
// alert(maxchecked)
if (maxchecked > 0 ) {
btnmenu.style.display = "block";
} else {
btnmenu.style.display = "none";
}

});
});
</script>
Reservation.php
<!-- reservation.php -->
<?php include 'template/header.php';

include 'dbCon.php';
if (!isset($_SESSION['isLoggedIn'])) {
echo '<script>alert("You need to login first.")</script>';
echo '<script>window.location="login.php"</script>';
}
?>

<body>

<?php include 'template/nav-bar.php'; ?>


<!-- END nav -->

<section class="home-slider owl-carousel" >


<div class="slider-item" style="background-image: url('images/bg_1.jpg');"
data-stellar-background-ratio="0.5">
<div class="overlay"></div>
<div class="container">
<div class="row slider-text align-items-center justify-content-
center">
<div class="col-md-10 col-sm-12 ftco-animate text-center" >
<p class="breadcrumbs"><span class="mr-2"><a
href="index.php">Home</a></span> <span>Reservation</span></p>
<h1 class="mb-3">Make a Reservation</h1>
</div>
</div>
</div>
</div>
</section>

<div class="ftco-section-reservation" >


<div class="container">
<div class="row">
<div class="col-md-12 reservation pt-5 px-5">
<p style="font-size: 20px; color: #000;font-weight: bold;margin-
top: -30px">Make a Reservation</p>
<div class="block-17" style="min-height: 100px;">

<form action="restaurant-list.php" method="POST" class="d-block d-


lg-flex">
<div class="fields d-block d-lg-flex">
<p style="font-size: 20px;color: #000">Country</p>
<div class="select-wrap one-half">
<div class="icon"><span class="ion-ios-arrow-
down"></span></div>
<select name="city" id="" class="form-control" disabled="">
<option value="India">India</option>
</select>
</div>
<p style="font-size: 20px;color: #000">Location</p>
<div class="select-wrap one-half">
<div class="icon"><span class="ion-ios-arrow-
down"></span></div>
<select data-plugin-selectTwo class="form-control populate"
name="area" required="" style="cursor: pointer;">
<option value=""> -Select- </option>
<?php
$con = connect();
$sql = "SELECT * FROM `locations`;";
$result = $con->query($sql);
foreach ($result as $r) {
?>
<option value="<?php echo $r['id']; ?>"><?php echo
$r['location_name']; ?></option>
<?php } ?>
</select>
</div>
</div>
<input type="submit" class="search-submit btn btn-primary"
name="find" value="Find">
</form>
</div>
</div>
</div>
</div>
</div>
<section class="ftco-section bg-light">
<div class="container">
<div class="row no-gutters justify-content-center mb-5 pb-5">
<div class="col-md-7 text-center heading-section ftco-animate">
<h2>Choose a Reservation Date and Time</h2>
</div>
</div>
<div class="row d-flex">
<div class="col-md-4 ftco-animate img" style="background-image:
url(images/bg_1.jpg);"></div>
<div class="col-md-8 ftco-animate makereservation p-5 bg-light">

<form action="choose-table.php" method="POST">


<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="">Name</label>
<input type="text" name="reservation_name" class="form-
control" placeholder="Your Name" required="" value="<?php echo
$_SESSION['name'];?>">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="">Phone</label>
<input type="text" name="reservation_phone" class="form-
control" placeholder="Phone" required="" value="<?php echo $_SESSION['phone'];?
>">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="">Date</label>
<input type="date" name="reservation_date" class="form-
control" placeholder="Date" required="">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="">Time</label>
<select name="reservation_time" class="form-control"
placeholder="Time" required="">
<option value="10:00am">10:00am</option>
<option value="10:45am">10:45am</option>
<option value="11:30am">11:30am</option>
<option value="12:15pm">12:15pm</option>
<option value="1:15pm">1:15pm</option>
<option value="2:15pm">2:15pm</option>
<option value="3:15pm">3:15pm</option>
<option value="4:15pm">4:15pm</option>
<option value="5:15pm">5:15pm</option>
<option value="6:15pm">6:15pm</option>
<option value="7:15pm">7:15pm</option>
<option value="8:00pm">8:00pm</option>
<option value="8:45pm">8:45pm</option>
<option value="9:30pm">9:30pm</option>
</select>
</div>
</div>

<div class="col-md-12 mt-3">


<div class="form-group">
<input type="hidden" name="res_id" value="<?php echo
$_GET['res_id']; ?>">
<input type="submit" name="reservation" value="Submit"
class="btn btn-primary py-3 px-5">
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>

<?php include 'template/instagram.php'; ?>

<?php include 'template/footer.php'; ?>

<?php include 'template/script.php'; ?>

</body>
</html>
Select-menu.php
<!-- select-menu.php -->
<?php
if (isset($_POST['selectChair'])) {
$res_id = $_POST['res_id'];
$reservation_name = $_POST['reservation_name'];
$reservation_phone = $_POST['reservation_phone'];
$reservation_date = $_POST['reservation_date'];
$reservation_time = $_POST['reservation_time'];

$table = $_POST["table"];
$chair = $_POST["chair"];

include 'template/header.php'; ?>

<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<body>

<?php include 'template/nav-bar.php'; ?>


<!-- END nav -->

<section class="home-slider owl-carousel" style="height: 400px;">


<div class="slider-item" style="background-image: url('images/bg_1.jpg');"
data-stellar-background-ratio="0.5">
<div class="overlay"></div>
<div class="container">
<div class="row slider-text align-items-center justify-content-
center">
<div class="col-md-10 col-sm-12 ftco-animate text-center"
style="padding-bottom: 25%;">
<p class="breadcrumbs"><span class="mr-2"><a
href="index.php">Home</a></span> <span>Menu</span></p>
<h1 class="mb-3">Our Exclusive Menu</h1>
</div>
</div>
</div>
</div>
</section>
<form action="book.php" method="POST">
<section class="ftco-section bg-light">
<div class="container">
<div class="row justify-content-center mb-5 pb-5">
<div class="col-md-7 text-center heading-section ftco-animate">
<span class="subheading">Our Menu</span>
<h2>Discover Our Exclusive Menu</h2>
</div>
</div>
<div class="row">
<div class="col-md-8 dish-menu">

<div class="nav nav-pills justify-content-center ftco-animate"


id="v-pills-tab" role="tablist" aria-orientation="vertical">
<a class="nav-link py-3 px-4 active" id="v-pills-home-tab" data-
toggle="pill" href="#v-pills-home" role="tab" aria-controls="v-pills-home" aria-
selected="true"><span class="flaticon-meat"></span> Fast Food</a>
<a class="nav-link py-3 px-4" id="v-pills-profile-tab" data-
toggle="pill" href="#v-pills-profile" role="tab" aria-controls="v-pills-profile"
aria-selected="false"><span class="flaticon-cutlery"></span> Dessert</a>
<a class="nav-link py-3 px-4" id="v-pills-messages-tab" data-
toggle="pill" href="#v-pills-messages" role="tab" aria-controls="v-pills-
messages" aria-selected="false"><span class="flaticon-cheers"></span> Drinks</a>
</div>

<div class="tab-content py-5" id="v-pills-tabContent">


<div class="tab-pane fade show active" id="v-pills-home"
role="tabpanel" aria-labelledby="v-pills-home-tab">
<div class="row">
<div class="col-lg-12">
<?php
include 'dbCon.php';
$con = connect();
$sql = "SELECT * FROM `menu_item` WHERE res_id = '$res_id'
AND food_type = 'Fast Food';";
$result = $con->query($sql);
foreach ($result as $r) {
?>
<div class="menus d-flex ftco-animate">
<div class="menu-img" style="background-image:
url(dashboard/item-image/<?php echo $r['image']; ?>);"></div>
<div class="text d-flex">
<div class="one-half" style="width: calc(100% -
200px);">
<h3><?php echo $r['item_name']; ?></h3>
<p><span><?php echo $r['madeby']; ?></p>
</div>
<div class="one-forth" style="text-align: center;">
<span class="price"><?php echo $r['price'];
?></span><br>
<input type="checkbox" name="item[]" value="<?php echo
$r['id']; ?>" id="menu[]" class="menu">
</div>
<div class="one-forth" style="text-align: center;">
<input type="number" name="qty[]" min="1"
style="width: 100%;margin-left: 23px;margin-top: 18px;">
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div><!-- END -->

<div class="tab-pane fade" id="v-pills-profile" role="tabpanel"


aria-labelledby="v-pills-profile-tab">
<div class="row">
<div class="col-lg-12">
<?php
$sql2 = "SELECT * FROM `menu_item` WHERE res_id =
'$res_id' AND food_type = 'Dessert';";
$result2 = $con->query($sql2);
foreach ($result2 as $r2) {
?>
<div class="menus d-flex ftco-animate">
<div class="menu-img" style="background-image:
url(dashboard/item-image/<?php echo $r2['image']; ?>);"></div>
<div class="text d-flex">
<div class="one-half">
<h3><?php echo $r2['item_name']; ?></h3>
<p><span><?php echo $r2['madeby']; ?></p>
</div>
<div class="one-forth">
<span class="price"><?php echo $r2['price'];
?></span><br>
<input type="checkbox" name="item[]" value="<?php echo
$r2['id']; ?>" id="menu<?php echo $r2['id']; ?>" data-id="<?php echo $r2['id'];
?>" class="menu">
</div>
<div class="one-forth" style="text-align: center;">
<input type="number" name="qty[]" min="0"
style="width: 100%;margin-left: 23px;margin-top: 18px;">
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div><!-- END -->

<div class="tab-pane fade" id="v-pills-messages" role="tabpanel"


aria-labelledby="v-pills-messages-tab">
<div class="row">
<div class="col-lg-12">
<?php
$sql3 = "SELECT * FROM `menu_item` WHERE res_id =
'$res_id' AND food_type = 'Drink';";
$result3 = $con->query($sql3);
foreach ($result3 as $r3) {
?>
<div class="menus d-flex ftco-animate">
<div class="menu-img" style="background-image:
url(dashboard/item-image/<?php echo $r3['image']; ?>);"></div>
<div class="text d-flex">
<div class="one-half">
<h3><?php echo $r3['item_name']; ?></h3>
<p><span><?php echo $r3['madeby']; ?></p>
</div>
<div class="one-forth">
<span class="price"><?php echo $r3['price'];
?></span><br>
<input type="checkbox" name="item[]" value="<?php echo
$r3['id']; ?>" id="menu<?php echo $r3['id']; ?>" data-id="<?php echo $r3['id'];
?>" class="menu"/>
</div>
<div class="one-forth" style="text-align: center;">
<input type="number" name="qty[]" min="0" value="1"
style="width: 100%;margin-left: 23px;margin-top: 18px;">
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>

</div>
<div class="col-md-4">
<h2 class="h4 mb-4">Reservation Information</h2>
<div class="d-flex ftco-animate">
<div class="col-md-12 flex-column">
<div class="row d-block flex-row">
<div class="col mb-2 d-flex py-4 border" style="background:
white;">
<div class="align-self-center">
<p class="mb-0"><span>Reservation Date:</span> <a
href=""><?php echo $reservation_date; ?></a></p>
</div>
</div>
<div class="col mb-2 d-flex py-4 border" style="background:
white;">
<div class="align-self-center">
<p class="mb-0"><span>Reservation Time:</span> <a
href=""><?php echo $reservation_time; ?></a></p>
</div>
</div>
<div class="col mb-2 d-flex py-4 border" style="background:
white;">
<div class="align-self-center">
<p class="mb-0"><span>Table No:</span>
<?php for($p = 0; $p < count($_POST["table"]); $p++){
$t_id = $_POST['table'][$p];
$sql4 = "SELECT * FROM `restaurant_tables` WHERE id =
'$t_id';";
$result4 = $con->query($sql4);
foreach ($result4 as $r4) {
?>
<a style="color: #FFB911;"><?php echo $r4['table_name'];
?></a>
<?php } } ?>
</p>
<p class="mb-0"><span>Chair No:</span>
<?php for($q = 0; $q < count($_POST["chair"]); $q++){
$c_id = $_POST['chair'][$q];
$sql5 = "SELECT * FROM `restaurant_chair` WHERE id =
'$c_id';";
$result5 = $con->query($sql5);
foreach ($result5 as $r5) {
?>
<a style="color: #FFB911;"><?php echo $r5['chair_no']; ?
>,</a>
<?php } } ?>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-12" style="text-align: center;">
<input type="hidden" name="res_id" value="<?php echo $res_id; ?
>">
<input type="hidden" name="reservation_name" value="<?php echo
$reservation_name; ?>">
<input type="hidden" name="reservation_phone" value="<?php echo
$reservation_phone; ?>">
<input type="hidden" name="reservation_date" value="<?php echo
$reservation_date; ?>">
<input type="hidden" name="reservation_time" value="<?php echo
$reservation_time; ?>">
<?php for($r = 0; $r < count($_POST["table"]); $r++){
$tbl_id = $_POST['table'][$r]; ?>
<input type="hidden" name="table[]" value="<?php echo $tbl_id; ?
>">
<?php } for($s = 0; $s < count($_POST["chair"]); $s++){
$chr_id = $_POST['chair'][$s]; ?>
<input type="hidden" name="chair[]" value="<?php echo $chr_id; ?
>">
<?php } ?>
<p style="display: none" id="confirm"><input type="submit"
value="Confirm" name="confirm" class="btn btn-primary py-3 px-5" ></p>

</div>
</div>
</div>
</section>
</form>

<?php include 'template/instagram.php'; ?>

<?php include 'template/footer.php'; ?>


<?php include 'template/script.php'; ?>

</body>
</html>
<?php } ?>

<script type="text/javascript">

$(document).ready(function(){
$('input[type="checkbox"]').click(function(){
// alert($('.menu:checked').length);

var btnconfirm = document.getElementById("confirm");


var maxchecked = $('.menu:checked').length;
// alert(maxchecked)
if (maxchecked > 0 ) {
btnconfirm.style.display = "block";
} else {
btnconfirm.style.display = "none";
}

});
});

</script>
4.2 Testing Approach
4.2.1 Unit Testing
Unit testing concentrates on the tiniest aspects of software development. This is where we
measure a single unit or a group of interconnected units. In this, registering the user, getting
user logged in and if the user is able to access the pdf or not is checked module wise one by one
.

4.2.2 Integration Testing


The aim of integration testing is to take unit -tested components and put them together in a
software framework that is determined by design. Integration testing entails combining a number
of components to generate outputs. Here in integrity testing test all my modules are working after
combining with each other. And also checked upon if there is any lag while going from one
screen to another.
Chapter 5: Results and Discussion
5.1 Test Reports
Test case name Input Expected Actual Observation

Output Output
1 User login Email id and Homepage open Homepage open Pass
Password
2 User login Email id and Homepage open Error message Fail
Password “Incorrect Email id or
password”.
3. User Status 1.Active Access to homepage When verified Pass
through Database
2.Inactive
4. User Status 1.Active Access denied to When not verified Fail
homepage through Database
2.Inactive

5. Menu-items 1.Active Access to webpage When verified Pass


through admin

2.Inactive
6. Menu-items 1.Active Access denied to webpage When not verified Fail
through admin

2.Inactive
7. Book table 1.Active Access to webpage When verified Pass
through admin

2.Inactive
8. Book table 1.Active Access denied to webpage When not verified Fail
through admin
2.Inactive

5.2 Outputs
Login page:

User Login: The will log in with the credentials that are provided by the
Admin.
Register page:

In this registration user can register, and get the credentials.


In this module restaurants can also register on this website.

Home page:
This is the home page, where you can see a sliding background
image.

On the same page we can see different menu-items divided into


three categories main course, desserts and drinks.

Restaurants-list:
In this page we can find different lists of restros, and the user
can select as per their convient time and place nearby.
Chapter 6: Conclusion and Future Work

Conclusion:
The project has concluded that if a customer is willing to visit any restaurant and
finds no table is available for the meal then the customer has to wait long
for the table availability. With the help of this application the customer can
choose the desired table according to the location. E.g. Table can be
reserved as according to number of members. Moreover, the customer can
easily see pictures of interior from the Application.

Future Work:
Keeping in view the demand of proposed project that gives a series of
services and provides the customer to book a table and menu without waiting
for a long time through an android application. This application will get its
importance as day by day people are getting into android and fast life.

You might also like