You are on page 1of 69

INTRODUCTION

A Website on a Movie Site in a web system provides the customers an anytime and
anywhere service for booking cinema tickets and giving information regarding movies and
their online schedule. Due to the increase in technology and digitalization, the online movie
system has become much more popular. Instead of wasting time in queues at the movie
counter, it provides an easy and efficient way to book the tickets online. It is pretty
fascinating to sit at home, browse the movies released, read the review and then book the
tickets according to our feasibility.

The system's primary purpose is to create an automatic online-based system that will
provide an easy and alternate way to book a ticket for a movie. First, the customer will need
to enter the information related to the film, after which the system will provide options to
book the ticket.

• List of movies playing in theatres.


• Simple Plot, Cast & Crew, Genre, Year Released, Runtime
• Show Times.
• Similar Movie Suggestions

1
OBJECTIVES OF THE PROJECT

The project is a web-based platform for booking tickets, its main objective was to increase
its visibility by connecting to consumers using various social media platforms. The ultimate
goal was to boost sale of tickets through its platform for all the events and its offerings.
They also felt the need to better connect with customers by giving them a comfortable
experience in solving their queries and grievances in a more effective manner.
.

• The website allows users to browse different movie categories.

• The system is flexible to use and cost-effective.

• Provide detailed information about movies, shows, etc.

• Provides the search facilities based on various factors, such as Movie, Customer, Show
timing, etc.

2
SYSTEM ANALYSIS

3.1 PRESENT SYSTEM IN USE:

The system's primary purpose is to create an automatic online-based System that will
provide an easy and alternative way to book a ticket for a movie.

3.2 PROBLEM DEFINITION:

A problem statement is a concise description of an issue to be addressed or a condition.


Problem Definition and Solution Definition are two key but often overlooked. Efficiently
resolve PHP issues, so you must understand what kind of problem occurs.

In our project we have reduced the time and hectic process of doing certain lengthy work of
managing items and sales of every item doing it manually, it had been converted into
Mobile form due to which items and man hours are properly utilized.

3
3.3 FLAWS IN THE PRESENT SYSTEM

There are always going to be some limitations to a project.


This is not an exception too.
The following are the flaws in the present system.

1. Limited resources.
2. This is a static website.

3.4 NEED FOR A NEW SYSTEM :

It is a web-based online project. The project's main aim is that any user can access the
system through the website at any time without going to the company. A user, can access
the website from anywhere whether he/she be at work or stuck in some business, one can
book tickets for his/her favourite movie at the tap of his phone.

3.5 PROPOSED SYSTEM

The main aim of this Movie Ticket Booking is online booking tickets for various movies in
Registered theatres by the users. This project report details now playing movies and number
tickets available in particular. Theatre for a particular movie, Movie Details, ticket cost for
registered users. It supports different controls like HTML controls and server controls. It
Supports language interoperability.

4
3.6Feasibility Study
The main objective of the feasibility study is to establish whether the proposed system is
feasible or not. To be more accurate, desirable resources are committed to the full-scale
project. The three essential aspects of a feasibility study include - operational feasibility,
technical feasibility, and economic feasibility. These are explained as follows:

a) Operational Feasibility:
The proposed system is user-friendly. This system will be helpful for a user to perform
access all course-related documents. The Graphic User Interface is self-explanatory; as a
result, there is no need to provide any kind of training to the user about the software.
Providing the user a computer literate demonstration of software will make the user operate
the software efficiently.

b) Technical Feasibility:

Technical feasibility is the quality of the product we are producing in its defined form.
Without technical knowledge, we can't proceed with our project. It is the quality of the
product which we are using. Technical feasibility is the prominent aspect of a Feasibility
Study. Technical Feasibility is centered around the existing computer system that is the
availability of the required hardware, software, and operating system. This project is
developed in PHP MySQL, which can be easily copied and run on any system with the
required configuration.

5
c) Economic Feasibility:

To carry out an Economic Feasibility study, it is necessary to place actual money values
against any purchases or activities needed to implement the project. It is also essential to put
money values against any benefits from a new system created by the project. Thus, any
project made should be more profitable than the existing system. The present course
registrations require more human resources to maintain the records. Since the records are
maintained & stored in a database, the cost of keeping the books can be avoided. Thus, this
makes it economically feasible.

3.7 PROJECT CATEGORY

The project is based on a web application that helps store and manage information and
procedures that theatre owner have to deal with every day and keep track of the customer.
HTML makes the pages, and MySQL handles the database; PHP controls the application logic.

6
Software Engineering Paradigm Applied
4.1 MODULES:
• Admin Module:
In the Admin profile, the admin can view all the details of users. In addition, the admin can
add or delete the user and theatre and manage all the details.

• Movie Module:
This module will help the viewer to see the details of the movies available for the show. The
number of seats available will be displayed to the viewer along with their timings and the
cost of different types of tickets.

• Booking Module:
The main purpose of developing this module is to manage the booking of the movie. So all
movie ticket booking will be managed by the theatre owner, and the customer will be able to
book the movie. Admin and owner can see the list of the entire movie category and filter it
according to the customers. So customers can see all the booking details.

• Payment Module:
After filling in the details like the name of the movie, category of cards, the timings of the
show, and the number of seats to be reserved, the viewers need to pay the money using
different options available like cash.

7
4.2 System Modular Chart.

Home Page.

Home Page

Home Movies

Current
All Movies
Showing

8
Movie Selection.

Selected
Movie

Resverse
Seat

Contact Choose Choose


Last Name First Name Theatre Quantity
Number Seat Group Seat

Various Various Select Your


Theatres Group Seat

Book Your
Seat

9
Admin Page.

Login

Home

Books Movie List Theatre List

Shows details of
Add New Movie Add Theatre
booked person

Add Seat
Edit Movie
Groups

Edit Theatre

10
Data Structure and Tables

Database Table :

o Admin
o Book
o Theatre
o Theatre Seat
o Movie

1) Admin table

2) Book table

3) Theatre table

11
4) Theatre Seat table

5) Movie Table

12
Software & Hardware Requirement
• Hardware requirement:-

This software requires the following minimum hardware configuration:

❖ Processor: Pentium-iii

❖ RAM: 2 GB

❖ Hard Disk: 4.3GB

• Software Requirement:-

• Operating System
❖ Windows / Linux
❖ Wamp Server
❖ Sublime Text

• Language Used
❖ HTML
❖ CSS
❖ PHP
❖ JavaScript

• Technologies and Framework used :


❖ Bootstrap

• Browser :
❖ Mozilla Firefox (Recommended)
❖ Google Chrome

13
TOOLS/PLATFORMS, LANGUAGES USED

Platform used: Microsoft Windows, commonly referred to as Windows, is a group of


several proprietary graphical operating system families, all of which are developed and
marketed by Microsoft. Each family caters to a specific sector of the computing industry.

Language used: HTML, CSS, JavaScript and PHP :

• HTML :

This language is similar to HTML Language, but Using HTML develops a dynamic web
page. HTML stands for dynamic Hypertext Mark-up Language. DHTML is a new and
emerging technology that has evolved to meet the increasing demand for an eye-catching
and mind-catching website.

HTML allows different scripting languages in a web page to change their variables,
which enhances the effects, looks, and many other functions after the whole page have
been fully loaded or under a view process, or otherwise static HTML pages on the same.
But in true ways, there is nothing that is as dynamic in HTML, and there is only th e
enclosing of different technologies like CSS, JS, DOM, and different sets of static
languages which make it as dynamic.

14
Features of HTML:

• Enables us to separate from formatting.


• Reduces download time by removing formatting information from the document.
• Allows us to ensure a consistent appearance across a site.
• Creates interactive web pages.
• It can be embedded in an HTML file without creating a separate file.

CSS:

CSS stands for Cascading Style Sheet. This is the language for describing the presentation
of the Web page, including colors, layout, and font. It allows one to adapt the presentation to
different types of devices, such as large screens, small screens, or printers. CSS is
independent of HTML and can be used with any XML-based mark-up language.

Features of CSS:

• Easier to maintain and update.


• Greater consistency in design.
• More formatting options.
• Lightweight code.
• Search engine optimization benefits.
• Greater accessibility.

15
• PHP:

PHP is a server-side scripting language designed primarily for web development but also
used as a general-purpose programming language. Originally created by Rasmus Lerdorf in
1994, the PHP reference implementation is now produced by The PHP Development Team.

Features of PHP:

• All components are free to use and distribute.


• It can be used to design any type of website and can handle a website with a lot of traffic.
• It has readable and easily understandable syntax.
• It can run on all operating systems like UNIX, Mac OS, and windows.
• It supports all major web servers like Apache, Netscape, etc.
• It has multiple levels of security to prevent threats and malicious attacks.

16
Software Design

Software design is a process to transform user requirements into some suitable form, which
helps the programmer in software coding and implementation.
For assessing user requirements, an SRS (Software Requirement Specification) document is
created whereas for coding and implementation, there is a need of more specific and
detailed requirements in software terms. The output of this process can directly be used into
implementation in programming languages.
Software design is the first step in SDLC (Software Design Life Cycle), which moves the
concentration from problem domain to solution domain. It tries to specify how to fulfill the
requirements mentioned in SRS.

17
Source Code

Home Page
<?php
include 'admin/db_connect.php';

$movies = $conn->query("SELECT * FROM movies where '".date('Y-m-d')."'


BETWEEN date(date_showing) and date(end_date) order by rand() limit 10");
?>

<center><h3 class="text-primary">Now Showing</h3></center>


<div id="movie-carousel-field">
<div class="list-prev list-nav">
<a href="javascript:void(0)" class="text"><i class="fa fa-angle-
left"></i></a>
</div>
<div class="list">
<?php while($row=$movies->fetch_assoc()): ?>
<div class="movie-item">
<img class="" src="assets/img/<?php echo $row['cover_img'] ?>" alt="<?php
echo $row['title'] ?>" >
<div class="mov-det">
<button type="button" class="btn btn-primary" data-id="<?php echo $row['id']
?>">Reserve Seat</button>
</div>
</div>
<?php endwhile; ?>
</div>
<div class="list-next list-nav">
<a href="javascript:void(0)" class="text"><i class="fa fa-angle-
right"></i></a>
</div>
</div>
<script>
$('#movie-carousel-field .list-next').click(function(){
$('#movie-carousel-field .list').animate({
scrollLeft:$('#movie-carousel-field .list').scrollLeft() + ($('#movie-
carousel-field .list').find('img').width() * 3)

18
}, 'slow');
})
$('#movie-carousel-field .list-prev').click(function(){
$('#movie-carousel-field .list').animate({
scrollLeft:$('#movie-carousel-field .list').scrollLeft() - ($('#movie-
carousel-field .list').find('img').width() * 3)
}, 'slow');
})
$('.mov-det button').click(function(){
location.replace('index.php?page=reserve&id='+$(this).attr('data-id'))
})
</script>
<?php
include 'admin/db_connect.php';
$movies = $conn->query("SELECT * FROM movies where '".date('Y-m-d')."'
BETWEEN date(date_showing) and date(end_date) order by rand() limit 10");
?>

<center><h3 class="text-primary">Now Showing</h3></center>


<div id="movie-carousel-field">
<div class="list-prev list-nav">
<a href="javascript:void(0)" class="text"><i class="fa fa-angle-
left"></i></a>
</div>
<div class="list">
<?php while($row=$movies->fetch_assoc()): ?>
<div class="movie-item">
<img class="" src="assets/img/<?php echo $row['cover_img'] ?>" alt="<?php
echo $row['title'] ?>" >
<div class="mov-det">
<button type="button" class="btn btn-primary" data-id="<?php echo $row['id']
?>">Reserve Seat</button>
</div>
</div>
<?php endwhile; ?>
</div>
<div class="list-next list-nav">
<a href="javascript:void(0)" class="text"><i class="fa fa-angle-
right"></i></a>
</div>
</div>
<script>

19
$('#movie-carousel-field .list-next').click(function(){
$('#movie-carousel-field .list').animate({
scrollLeft:$('#movie-carousel-field .list').scrollLeft() + ($('#movie-
carousel-field .list').find('img').width() * 3)
}, 'slow');
})
$('#movie-carousel-field .list-prev').click(function(){
$('#movie-carousel-field .list').animate({
scrollLeft:$('#movie-carousel-field .list').scrollLeft() - ($('#movie-
carousel-field .list').find('img').width() * 3)
}, 'slow');
})
$('.mov-det button').click(function(){
location.replace('index.php?page=reserve&id='+$(this).attr('data-id'))
})
</script>
<?php
include 'admin/db_connect.php';
$movies = $conn->query("SELECT * FROM movies where '".date('Y-m-d')."'
BETWEEN date(date_showing) and date(end_date) order by rand() limit 10");
?>

<center><h3 class="text-primary">Now Showing</h3></center>


<div id="movie-carousel-field">
<div class="list-prev list-nav">
<a href="javascript:void(0)" class="text"><i class="fa fa-angle-
left"></i></a>
</div>
<div class="list">
<?php while($row=$movies->fetch_assoc()): ?>

20
Movie Page

<?php
include 'admin/db_connect.php';
$movies = $conn->query("SELECT * FROM movies where '".date('Y-m-d')."'
BETWEEN date(date_showing) and date(end_date) order by rand()");
?>
<header class="masthead">
<div class="container-fluid">
<div id="movies">
<?php while($row=$movies->fetch_assoc()): ?>
<div class="movie-item">
<img class="" src="assets/img/<?php echo $row['cover_img'] ?>"
alt="<?php echo $row['title'] ?>" >
<div class="mov-det">
<button type="button" class="btn btn-primary" data-id="<?php echo
$row['id'] ?>">Reserve Seat</button>
</div>
</div>
<?php endwhile; ?>

</div>
</div>
</header>
<script>
$('.mov-det button').click(function(){
location.replace('index.php?page=reserve&id='+$(this).attr('data-id'))
})
</script>
<?php
include 'admin/db_connect.php';
$movies = $conn->query("SELECT * FROM movies where '".date('Y-m-d')."'
BETWEEN date(date_showing) and date(end_date) order by rand()");
?>
<header class="masthead">
<div class="container-fluid">
<div id="movies">
<?php while($row=$movies->fetch_assoc()): ?>
<div class="movie-item">

21
<img class="" src="assets/img/<?php echo $row['cover_img'] ?>"
alt="<?php echo $row['title'] ?>" >
<div class="mov-det">
<button type="button" class="btn btn-primary" data-id="<?php echo
$row['id'] ?>">Reserve Seat</button>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
</header>
<script>
$('.mov-det button').click(function(){
location.replace('index.php?page=reserve&id='+$(this).attr('data-id'))
})
</script>
<?php
include 'admin/db_connect.php';
$movies = $conn->query("SELECT * FROM movies where '".date('Y-m-d')."'
BETWEEN date(date_showing) and date(end_date) order by rand()");
?>
<header class="masthead">
<div class="container-fluid">
<div id="movies">
<?php while($row=$movies->fetch_assoc()): ?>
<div class="movie-item">
<img class="" src="assets/img/<?php echo $row['cover_img'] ?>"
alt="<?php echo $row['title'] ?>" >
<div class="mov-det">
<button type="button" class="btn btn-primary" data-id="<?php echo
$row['id'] ?>">Reserve Seat</button>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
</header>
<script>
$('.mov-det button').click(function(){
location.replace('index.php?page=reserve&id='+$(this).attr('data-id'))

22
})
</script>
<?php
include 'admin/db_connect.php';
$movies = $conn->query("SELECT * FROM movies where '".date('Y-m-d')."'
BETWEEN date(date_showing) and date(end_date) order by rand()");
?>
<header class="masthead">
<div class="container-fluid">
<div id="movies">
<?php while($row=$movies->fetch_assoc()): ?>
<div class="movie-item">
<img class="" src="assets/img/<?php echo $row['cover_img'] ?>"
alt="<?php echo $row['title'] ?>" >
<div class="mov-det">
<button type="button" class="btn btn-primary" data-id="<?php echo
$row['id'] ?>">Reserve Seat</button>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
</header>
<script>
$('.mov-det button').click(function(){
location.replace('index.php?page=reserve&id='+$(this).attr('data-id'))
})
</script>
<?php
include 'admin/db_connect.php';
$movies = $conn->query("SELECT * FROM movies where '".date('Y-m-d')."'
BETWEEN date(date_showing) and date(end_date) order by rand()");
?>
<header class="masthead">
<div class="container-fluid">
<div id="movies">
<?php while($row=$movies->fetch_assoc()): ?>
<div class="movie-item">
<img class="" src="assets/img/<?php echo $row['cover_img'] ?>"
alt="<?php echo $row['title'] ?>" >

23
<div class="mov-det">
<button type="button" class="btn btn-primary" data-id="<?php echo
$row['id'] ?>">Reserve Seat</button>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
</header>
<script>
$('.mov-det button').click(function(){
location.replace('index.php?page=reserve&id='+$(this).attr('data-id'))
})
</script>
<?php
include 'admin/db_connect.php';
$movies = $conn->query("SELECT * FROM movies where '".date('Y-m-d')."'
BETWEEN date(date_showing) and date(end_date) order by rand()");
?>

<header class="masthead">
<div class="container-fluid">
<div id="movies">
<?php while($row=$movies->fetch_assoc()): ?>
<div class="movie-item">
<img class="" src="assets/img/<?php echo $row['cover_img'] ?>"
alt="<?php echo $row['title'] ?>" >
<div class="mov-det">
<button type="button" class="btn btn-primary" data-id="<?php echo
$row['id'] ?>">Reserve Seat</button>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
</header>
<script>
$('.mov-det button').click(function(){
location.replace('index.php?page=reserve&id='+$(this).attr('data-id'))

24
})
</script>
<?php
include 'admin/db_connect.php';
$movies = $conn->query("SELECT * FROM movies where '".date('Y-m-d')."'
BETWEEN date(date_showing) and date(end_date) order by rand()");
?>
<header class="masthead">
<div class="container-fluid">
<div id="movies">
<?php while($row=$movies->fetch_assoc()): ?>
<div class="movie-item">
<img class="" src="assets/img/<?php echo $row['cover_img'] ?>"
alt="<?php echo $row['title'] ?>" >
<div class="mov-det">
<button type="button" class="btn btn-primary" data-id="<?php echo
$row['id'] ?>">Reserve Seat</button>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
</header>
<script>
$('.mov-det button').click(function(){
location.replace('index.php?page=reserve&id='+$(this).attr('data-id'))
})
</script>
<?php
include 'admin/db_connect.php';
$movies = $conn->query("SELECT * FROM movies where '".date('Y-m-d')."'
BETWEEN date(date_showing) and date(end_date) order by rand()");
?>
<header class="masthead">
<div class="container-fluid">

<div id="movies">

<?php while($row=$movies->fetch_assoc()): ?>


<div class="movie-item">

25
<img class="" src="assets/img/<?php echo $row['cover_img'] ?>"
alt="<?php echo $row['title'] ?>" >
<div class="mov-det">
<button type="button" class="btn btn-primary" data-id="<?php echo
$row['id'] ?>">Reserve Seat</button>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
</header>
<script>
$('.mov-det button').click(function(){
location.replace('index.php?page=reserve&id='+$(this).attr('data-id'))
})
</script>
<?php
include 'admin/db_connect.php';
$movies = $conn->query("SELECT * FROM movies where '".date('Y-m-d')."'
BETWEEN date(date_showing) and date(end_date) order by rand()");
?>
<header class="masthead">
<div class="container-fluid">
<div id="movies">
<?php while($row=$movies->fetch_assoc()): ?>
<div class="movie-item">
<img class="" src="assets/img/<?php echo $row['cover_img'] ?>"
alt="<?php echo $row['title'] ?>" >
<div class="mov-det">
<button type="button" class="btn btn-primary" data-id="<?php echo
$row['id'] ?>">Reserve Seat</button>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
</header>
<script>
$('.mov-det button').click(function(){
location.replace('index.php?page=reserve&id='+$(this).attr('data-id'))

26
})
</script>
<?php
include 'admin/db_connect.php';
$movies = $conn->query("SELECT * FROM movies where '".date('Y-m-d')."'
BETWEEN date(date_showing) and date(end_date) order by rand()");
?>
<header class="masthead">
<div class="container-fluid">
<div id="movies">
<?php while($row=$movies->fetch_assoc()): ?>

<div class="movie-item">

<img class="" src="assets/img/<?php echo $row['cover_img'] ?>"


alt="<?php echo $row['title'] ?>" >

<div class="mov-det">

<button type="button" class="btn btn-primary" data-id="<?php echo


$row['id'] ?>">Reserve Seat</button>

</div>

</div>

<?php endwhile; ?>

</div>

27
Reservation Table
<?php
include 'admin/db_connect.php';
$mov = $conn->query("SELECT * FROM movies where id =".$_GET['id'])-
>fetch_array();
$duration = explode('.', $mov['duration']);
$hr = sprintf("%'.02d\n",$duration[0]);
$min = isset($duration[1]) ? (60 * ('.'.$duration[1])) : '0';
$min = sprintf("%'.02d\n",$min);
// $min = $min > 0 ? $min : '00';
$duration = $hr.' : '.$min
?>
<header class="masthead">
<div class="container pt-5">
<div class="col-lg-12">
<div class="row">
<div class="col-md-4">
<img src="assets/img/<?php echo $mov['cover_img'] ?>" alt="" class="reserve-
img">
</div>
<div class="col-md-8">
<div class="card bg-primary">
<div class="card-body text-white">
<h3><b><?php echo $mov['title'] ?></b></h3>
<hr>
<p class=""><small><b>Description: </b><i><?php echo $mov['description']
?></i></small></p>
<p class=""><small><b>Duration: </b><i><?php echo $duration
?></i></small></p>
</div>
</div>
<div class="card bg-light mt-2">
<div class="card-body">
<h4>Reserve your seat Here</h4>
<form action="" id="save-reserve">
<input type="hidden" name="movie_id" value="<?php echo $_GET['id'] ?>">
<div class="row">
<div class="form-group col-md-4">
<label for="" class="control-label">Lastname</label>
<input type="text" name="lastname" required="" class="form-control">

28
</div>
<div class="form-group col-md-4">
<label for="" class="control-label">Firstname</label>
<input type="text" name="firstname" required="" class="form-control">
</div>
<div class="form-group col-md-4">
<label for="" class="control-label">Contact #</label>
<input type="text" name="contact_no" required="" class="form-control">
</div>
</div>
<div class="row">
<div class="form-group col-md-4">
<label for="" class="control-label">Theater</label>
<select class="browser-default custom-select" name="ts_id">
<option value=""></option>
<?php
$qry = $conn->query("SELECT * FROM theater order by name asc");
while($row= $qry->fetch_assoc()):
?>
<option value="<?php echo $row['id'] ?>"><?php echo $row['name'] ?></option>
<?php endwhile; ?>
</select>
</div>
</div>
<div id="display-other">

</div>
<div class="row">
<button class="col-md-2 btn btn-block btn-primary">Book</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<script>
$('[name="ts_id"]').change(function(){
$.ajax({

29
url:'manage_reserve.php?id='+$(this).val()+'&mid=<?php echo $_GET['id'] ?>',
success:function(resp){
$('#display-other').html(resp)
}
})
})
$(document).ready(function(){
$('#save-reserve').submit(function(){
$('#save-reserve button').attr('disabled',true).html("Saving...")
$.ajax({
url:'admin/ajax.php?action=save_reserve',
method:'POST',
data:$(this).serialize(),
success:function(resp){
if(resp == 1){
alert("Reservartion successfully saved");
location.replace('process_mybooking.php')
}
}
})
})
})
</script>
<?php
include 'admin/db_connect.php';
$mov = $conn->query("SELECT * FROM movies where id =".$_GET['id'])-
>fetch_array();
$duration = explode('.', $mov['duration']);
$hr = sprintf("%'.02d\n",$duration[0]);
$min = isset($duration[1]) ? (60 * ('.'.$duration[1])) : '0';
$min = sprintf("%'.02d\n",$min);
// $min = $min > 0 ? $min : '00';
$duration = $hr.' : '.$min
?>
<header class="masthead">
<div class="container pt-5">
<div class="col-lg-12">
<div class="row">
<div class="col-md-4">
<img src="assets/img/<?php echo $mov['cover_img'] ?>" alt="" class="reserve-
img">

30
</div>
<div class="col-md-8">
<div class="card bg-primary">
<div class="card-body text-white">
<h3><b><?php echo $mov['title'] ?></b></h3>
<hr>
<p class=""><small><b>Description: </b><i><?php echo $mov['description']
?></i></small></p>
<p class=""><small><b>Duration: </b><i><?php echo $duration
?></i></small></p>
</div>
</div>
<div class="card bg-light mt-2">
<div class="card-body">
<h4>Reserve your seat Here</h4>
<form action="" id="save-reserve">
<input type="hidden" name="movie_id" value="<?php echo $_GET['id'] ?>">
<div class="row">
<div class="form-group col-md-4">
<label for="" class="control-label">Lastname</label>
<input type="text" name="lastname" required="" class="form-control">
</div>
<div class="form-group col-md-4">
<label for="" class="control-label">Firstname</label>
<input type="text" name="firstname" required="" class="form-control">
</div>
<div class="form-group col-md-4">
<label for="" class="control-label">Contact #</label>
<input type="text" name="contact_no" required="" class="form-control">
</div>
</div>
<div class="row">
<div class="form-group col-md-4">
<label for="" class="control-label">Theater</label>
<select class="browser-default custom-select" name="ts_id">
<option value=""></option>
<?php
$qry = $conn->query("SELECT * FROM theater order by name asc");
while($row= $qry->fetch_assoc()):
?>
<option value="<?php echo $row['id'] ?>"><?php echo $row['name'] ?></option>

31
<?php endwhile; ?>
</select>
</div>
</div>
<div id="display-other">

</div>
<div class="row">
<button class="col-md-2 btn btn-block btn-primary">Book</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<script>
$('[name="ts_id"]').change(function(){
$.ajax({
url:'manage_reserve.php?id='+$(this).val()+'&mid=<?php echo $_GET['id'] ?>',
success:function(resp){
$('#display-other').html(resp)
}
})
})
$(document).ready(function(){
$('#save-reserve').submit(function(){
$('#save-reserve button').attr('disabled',true).html("Saving...")
$.ajax({
url:'admin/ajax.php?action=save_reserve',
method:'POST',
data:$(this).serialize(),
success:function(resp){
if(resp == 1){
alert("Reservartion successfully saved");
location.replace('process_mybooking.php')
}
}
})

32
})
})
</script>
<?php
include 'admin/db_connect.php';
$mov = $conn->query("SELECT * FROM movies where id =".$_GET['id'])-
>fetch_array();
$duration = explode('.', $mov['duration']);
$hr = sprintf("%'.02d\n",$duration[0]);
$min = isset($duration[1]) ? (60 * ('.'.$duration[1])) : '0';
$min = sprintf("%'.02d\n",$min);
// $min = $min > 0 ? $min : '00';
$duration = $hr.' : '.$min
?>
<header class="masthead">
<div class="container pt-5">
<div class="col-lg-12">
<div class="row">
<div class="col-md-4">
<img src="assets/img/<?php echo $mov['cover_img'] ?>" alt="" class="reserve-
img">
</div>
<div class="col-md-8">
<div class="card bg-primary">
<div class="card-body text-white">
<h3><b><?php echo $mov['title'] ?></b></h3>
<hr>
<p class=""><small><b>Description: </b><i><?php echo $mov['description']
?></i></small></p>
<p class=""><small><b>Duration: </b><i><?php echo $duration
?></i></small></p>
</div>
</div>
<div class="card bg-light mt-2">
<div class="card-body">
<h4>Reserve your seat Here</h4>
<form action="" id="save-reserve">
<input type="hidden" name="movie_id" value="<?php echo $_GET['id'] ?>">
<div class="row">
<div class="form-group col-md-4">
<label for="" class="control-label">Lastname</label>

33
<input type="text" name="lastname" required="" class="form-control">
</div>
<div class="form-group col-md-4">
<label for="" class="control-label">Firstname</label>
<input type="text" name="firstname" required="" class="form-control">
</div>
<div class="form-group col-md-4">
<label for="" class="control-label">Contact #</label>
<input type="text" name="contact_no" required="" class="form-control">
</div>
</div>
<div class="row">
<div class="form-group col-md-4">
<label for="" class="control-label">Theater</label>
<select class="browser-default custom-select" name="ts_id">
<option value=""></option>
<?php
$qry = $conn->query("SELECT * FROM theater order by name asc");
while($row= $qry->fetch_assoc()):

34
Manage Reservation Page

<?php

include 'admin/db_connect.php';
$ts = $conn->query("SELECT * FROM theater_settings where theater_id=".$_GET['id']);
$data = array();
while($row=$ts->fetch_assoc()){
$data[] = $row;
$seat_group[$row['id']] = $row['seat_group'];
$seat_count[$row['id']] = $row['seat_count'];
}

$mov = $conn->query("SELECT * FROM movies where id =".$_GET['mid'])-


>fetch_array();
$dur = explode('.', $mov['duration']);
$dur[1] = isset($dur[1]) ? $dur[1] : 0;
$hr = sprintf("%'.02d\n",$dur[0]);
$min = isset($dur[1]) ? (60 * ('.'.$dur[1])) : '0';
$min = sprintf("%'.02d\n",$min);
// $min = $min > 0 ? $min : '00';
$duration = $hr.' : '.$min;

?>
<div class="row">
<div class="form-group col-md-4">
<label for="" class="control-label">Choose Seat Group</label>
<select name="seat_group" id="seat_group" class="browser-default custom-select">
<option value="">

</option>
<?php
foreach($seat_group as $k => $v):
?>
<option value="<?php echo $k ?>" data-count="<?php echo $seat_count[$k] ?>"><?php
echo $v ?></option>
<?php endforeach; ?>
</select>

35
</div>

<div id="display-count" class="col-md-5 mt-4 pt-2"></div>


<div id="display-time" class="col-md-5"></div>
</div>
<div class="row">
<div class="form-group col-md-2">
<a class="btn btn-primary" href="movie-seat/index.html" role="button">Choose Seat</a>
<label for="" class="control-label">Qty</label>
<input type="number" name="qty" id="qty" class="form-control" min="0" required="">
</div>
<div class="form-group col-md-4">
<label for="" class="control-label">Date</label>
<select name="date" id="date" class="custom-select browser-default">
<?php
for($i = 0 ; $i < date("Ymd",strtotime($mov['end_date'])) - date('Ymd');$i++ ){
if(date('Ymd') >= date("Ymd",strtotime($mov['date_showing']))){
echo "<option value='".date('Y-m-d',strtotime(date('Y-m-d').' +'.$i.' days'))."'>".date('M
d,Y',strtotime(date('Y-m-d').' +'.$i.' days'))."</option>";
}
}
?>
</select>
</div>
<!-- <div class="form-group col-md-4">
<label for="" class="control-label">Time</label>
<select name="time" id="time" class="custom-select browser-default">
<?php
$i = 1;
$start = '2020-01-01 09:00';
$time='';
$dur[1] = isset($dur[1]) ? $dur[1] : 0;
while ( $i < 10) {
if(empty($time)){
echo '<option value="'.date('h:i A',strtotime($start)).'">'.date('h:i
A',strtotime($start)).'</option>';
$time = date('h:i A',strtotime($start));
}else{
$time = empty($time) ? $start : $time;

36
if(date('Hi',strtotime($time)) < '2100'){
echo '<option value="'.date('h:i A',strtotime($time.' +'.$dur[0].' hours +'.$dur[1].'
minutes')).'">'.date('h:i A',strtotime('+'.$dur[0].' hours +'.$dur[1].'
minutes'.$time)).'</option>';
$time = date('Y-m-d H:i',strtotime('+'.$dur[0].' hours +'.$dur[1].' minutes'.$time));
}
}
$i++;
}
?>
</select>
</div> -->
</div>

<script>

$('#seat_group').change(function(){
$('#display-count').html($(this).find('option[value="'+$(this).val()+'"]').attr('data-count')+'
seats available')
$('#qty').removeAttr('max').attr('max',$(this).find('option[value="'+$(this).val()+'"]').attr('dat
a-count'))
})

$('[name="seat_group"]').change(function(){
$.ajax({
url:'box_details.php?id='+$(this).val(),
success:function(resp){
$('#display-time').html(resp)
}
})
})
</script>

37
Admin Page

<?php

session_start();

Class Action {

private $db;

public function __construct() {

include 'db_connect.php';

$this->db = $conn;

function __destruct() {

$this->db->close();

function login(){

extract($_POST);

$qry = $this->db->query("SELECT * FROM users where username = '".$username."' and


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

if($qry->num_rows > 0){

foreach ($qry->fetch_array() as $key => $value) {

if($key != 'passwors' && !is_numeric($key))

$_SESSION['login_'.$key] = $value;

// var_dump($_SESSION);

38
return 1;

}else{

return 2;

function logout(){

session_destroy();

foreach ($_SESSION as $key => $value) {

unset($_SESSION[$key]);

header("location:login.php");

function save_movie(){

extract($_POST);

$data = " title = '".$title."' ";

$data .= ", description = '".$description."' ";

$data .= ", date_showing = '".$date_showing."' ";

$data .= ", end_date = '".$end_date."' ";

$duration = $duration_hour .'.'.(($duration_min / 60) * 100);

$data .= ", duration = '".$duration."' ";

if($_FILES['cover']['tmp_name'] != ''){

$fname = strtotime(date('y-m-d H:i')).'_'.$_FILES['cover']['name'];

39
$move = move_uploaded_file($_FILES['cover']['tmp_name'],'../assets/img/'. $fname);

$data .= ", cover_img = '".$fname."' ";

if(empty($id)){

$save = $this->db->query("INSERT INTO movies set ". $data);

if($save)

return 1;

}else{

$save = $this->db->query("UPDATE movies set ". $data." where id =".$id);

if($save)

return 1;

function delete_movie(){

extract($_POST);

$delete = $this->db->query("DELETE FROM movies where id =".$id);

if($delete)

return 1;

function delete_theater(){

extract($_POST);

$delete = $this->db->query("DELETE FROM theater where id =".$id);

if($delete)

40
return 1;

function save_theater(){

extract($_POST);

if(empty($id))

$save = $this->db->query("INSERT INTO theater set name = '".$name."' ");

else

$save = $this->db->query("UPDATE theater set name = '".$name."' where id = ".$id);

if($save)

return 1;

function save_seat(){

extract($_POST);

$data = " theater_id = '".$theater_id."' ";

$data .= ", seat_group = '".$seat_group."' ";

$data .= ", seat_count = '".$seat_count."' ";

$data .= ", moviedate = '".$time."' ";

$data .= ", rate = '".$seat_rate."' ";

if(empty($id))

$save = $this->db->query("INSERT INTO theater_settings set ".$data." ");

else

$save = $this->db->query("UPDATE theater_settings set ".$data." where id = ".$id);

41
if($save)

return 1;

function delete_seat(){

extract($_POST);

$delete = $this->db->query("DELETE FROM theater_settings where id =".$id);

if($delete)

return 1;

function save_reserve(){

extract($_POST);

$data = " movie_id = '".$movie_id."' ";

$data .= ", ts_id = '".$seat_group."' ";

$data .= ", lastname = '".$lastname."' ";

$data .= ", firstname = '".$firstname."' ";

$data .= ", contact_no = '".$contact_no."' ";

$data .= ", qty = '".$qty."' ";

$data .= ", `date` = '".$date."' ";

$data .= ", `time` = '".$time."' ";

$save = $this->db->query("INSERT INTO books set ".$data);

if($save)

return 1;

42
}

<?php

$action = $_GET['action'];

include 'admin_class.php';

$crud = new Action();

if($action == 'login'){

$login = $crud->login();

if($login)

echo $login;

if($action == 'logout'){

$logout = $crud->logout();

if($logout)

echo $logout;

if($action == 'save_movie'){

$logout = $crud->save_movie();

if($logout)

echo $logout;

43
if($action == 'save_theater'){

$logout = $crud->save_theater();

if($logout)

echo $logout;

if($action == 'delete_movie'){

$delete = $crud->delete_movie();

if($delete)

echo $delete;

if($action == 'delete_theater'){

$delete = $crud->delete_theater();

if($delete)

echo $delete;

if($action == 'save_seat'){

$logout = $crud->save_seat();

if($logout)

echo $logout;

if($action == 'delete_seat'){

$delete = $crud->delete_seat();

if($delete)

44
echo $delete;

if($action == 'save_reserve'){

$save = $crud->save_reserve();

if($save)

echo $save;

<style>

td img{

width: 50px;

height: 75px;

margin:auto;

td p {

margin: 0

</style>

<?php include ('db_connect.php') ?>

<div class="container-fluid">

<div class="row">

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

<div class="card-body">

<table class="table table-bordered">

45
<thead>

<tr>

<th class="text-center">#</th>

<th class="text-center">Name</th>

<th class="text-center">Contact #</th>

<th class="text-center">Movie</th>

<th class="text-center">Reserved Info</th>

</tr>

</thead>

<tbody>

<?php

$i = 1;

$movie = $conn->query("SELECT b.*,m.title,ts.seat_group,t.name as theater FROM books


b inner join movies m on b.movie_id = m.id inner join theater_settings ts on ts.id = b.ts_id
inner join theater t on t.id = ts.theater_id ");

while($row=$movie->fetch_assoc()){

?>

<tr>

<td><?php echo $i++ ?></td>

<td><?php echo ucwords($row['lastname'].', '.$row['firstname']) ?></td>

<td><?php echo $row['contact_no'] ?></td>

<td><?php echo $row['title'] ?></td>

<td>

<p><small><b>Theater:</b> <?php echo $row['theater'] ?></small></p>

<p><small><b>Seat Group:</b> <?php echo $row['seat_group'] ?></small></p>

46
<p><small><b>qty:</b> <?php echo $row['qty'] ?></small></p>

<p><small><b>Date:</b> <?php echo date("M d,Y",strtotime($row['date']))


?></small></p>

<p><small><b>Time:</b> <?php echo date("h:i A",strtotime($row['time']))


?></small></p>

</td>

</tr>

<?php } ?>

</tbody>

</table>

</div>

</div>

</div>

</div>

<script>

$('table').dataTable();

$('#new_movie').click(function(){

uni_modal('New Movie','manage_movie.php');

})

$('.edit_movie').click(function(){

uni_modal('Edit Movie','manage_movie.php?id='+$(this).attr('data-id'));

47
})

$('.delete_movie').click(function(){

_conf('Are you sure to delete this data?','delete_movie' , [$(this).attr('data-id')])

})

function delete_movie($id=''){

start_load()

$.ajax({

url:'ajax.php?action=delete_movie',

method:'POST',

data:{id:$id},

success:function(resp){

if(resp ==1){

alert_toast("Data successfully deleted",'success');

setTimeout(function(){

location.reload()

},1500)

})

</script>

?php

48
$conn= new mysqli('localhost','root','','theater_db')or die("Could not connect to
mysql".mysqli_error($con));

meta content="" name="descriptison">

<meta content="" name="keywords">

49
Output

Home Page:

50
Movies Page

51
Reseversation Page.

52
Seat Booking Page:

53
Payment Page :

54
OTP Page :

55
Transcation Page :

56
Transcation Complete Page:

57
Admin Login Page:

58
Entries Of Booked Seats Page:

59
Movie Editing Page:

60
Theatre Editing Page:

61
Testing

Software Testing is a method to check whether the actual software product matches
expected requirements and to ensure that the software product is Defect free. It involves the
execution of software/system components using manual or automated tools to evaluate one
or more properties of interest.

Testing provides ultimate support for Visual Basic applications. For these
applications, you can perform almost any kind of test: unit, functional (or user interface),
regression, data-driven, etc.

62
Validation
VALIDATION CHECKS:-
In software project management, software testing, and software engineering,
verification and validation (V&V) is the process of checking that a software system meets
specifications and that it fulfills its intended purpose. It may also be referred to as software
quality control. It is normally the responsibility of software testers as part of the software
development lifecycle. Validation checks that the product design satisfies or fits the
intended use (high-level checking), i.e., the software meets the user requirements. This is
done through dynamic testing and other forms of review. Verification and validation are not
the same things, although they are often confused. Boehm succinctly expressed

Software Verification: The process of evaluating software to determine whether the


products of a given development phase satisfy the conditions imposed at the start of that
phase.

Software Validation: The process of evaluating software during or at the end of the
development process to determine whether it satisfies specified requirements.

As this project has made use of the "PHP”, data is stored in the form of the frame that
distinguishes it from another. The user should know such data is not repeated, and the errors
are minimized. Another validation check is that proper data needs to be inputted so that the
user can get proper output. Users have to need to fill the every filled compulsorily, without
that he cannot move to another filled .in payment form only numbers can be inputted.

In reservation, first field names and last name characters and personal contact numbers
can be taken.

63
SECURITY MEASURES TAKEN

The security of the project needs to be the topmost agenda in the minds of the
programmer so that the system is saved from unidentified sources. Keeping this in mind, we
have made an arrangement for the security of the system.

We have provided the facility of the user password, but still, any mischievous
thing can happen. The cipher, which is kept only for known users, can be decrypted.
Therefore we have surveyed many companies and asked them how they tackle this
challenge. Enquiring all the possibilities, we have done our security system tight.

Security is the prime goal set in the minds of the programmers as the software's
made, but if it is not handled with security measures, it can be decrypted easily. Most of the
time is spent on programming, debugging, and testing; equal time should be spent on the
security of the system. As in big companies security system is very tight no one ever dares
to enter it, seeing that it is a crime under Information Technology Law 2000.

We have just kept it for certain specified persons in the company to keep the
security business. This provision has been made so that no other user can access the system
data.

System Security is the technical innovation and procedures applied to the hardware
and operating system to protect against deliberate or accidental damage from a defined
threat.

There may be threats to the system like errors and omissions, fire, natural, disaster and
external attacks.

Every system must provide built-in features for the security and integrity of data. Without
safeguard against unauthorized access, fraud, and embezzlement and so the system is
vulnerable to

64
Implementation & Maintenance

Implementation

The implementation phase is mainly concerned with user training, site preparations
& file conversions. It also involves the final testing of the system. During implementation,
the components built during development are put into operational use. Brief Reference of
the points that should be addressed during implementation:

a) Writing, testing, Debugging & Documenting programs.


b) Converting data from the old to the new system.
c) Giving training to a user about how to operate the system.
d) Developing operating procedures for the computer center staff.
e) Establishing a maintenance procedure to repair & Enhance the system.
f) Completing system Documentation.
g) Reviewing the administrative plan, personnel requirement plan, and hardware plan.

65
Evaluation and Maintenance

After the Implementation stage, another important stage in project development is


evaluation & maintenance. After keeping the project in working condition for some time, all
the errors that are shown in the computer program should be removed. The programmer
needs to correct them so that the same errors should not be repeated. We should also get
feedback from the users who are using it and ask them whether it is user-friendly or not.
After evaluating the program & satisfying the needs of the user, the program is maintained
fully to give the same functionality that it was intended to be. This stage should be
implemented so as to regular check-ups of errors with error handling techniques. This stage
is the updating & correcting of the program to account for changing conditions or field
experience. Proper testing & documentation significantly reduce the frequency and extent of
the required maintenance.

a) Correcting Errors.
b) Newly discovered bugs.
c) Resolving necessary changes.
d) Specification changes.
e) Enhances or modifies the system maintenance.

66
Future Scope of Project

The project has a very vast scope in the future. The project can be implemented on the
intranet in the future. The project can be updated in the near future as well and when the
requirement for the same arises, as it is very flexible in terms of expansion. With the
proposed software of the database fully functional, the client is now able to manage and
hence run the entire work in a much better, more accurate, and error-free manner. With base
concept of booking movie we can also expand our project to various other quantities like
booking tickets for live shows, for cricket match, etc.

67
Suggestion & Conclusion
SUGGESTIONS:

➢ Advertisement can be done on digital platforms.


➢ A dynamic website can be made instead of a static one; so that the real-life operations
can be performed.
➢ Another User-Type can be added with access to editing/uploading content to make more
courses available.
➢ User can get email, messaging alert to tell what is upcoming movie.

CONCLUSION

The entire project has been developed and deployed as per the requirements stated by the
user, and it is found to be bug-free as per the testing standards that are implemented. Any
specification-untraced errors will be concentrated in the coming versions, which are planned
to be developed in the near future. The website is deployed in localhost for development
purposes. The project can now ease up the task of booking tickets for a movie in few simple
clicks.

Lesson Learnt

Doing something for a long time period always gives a good lesson. Some of the
things that our team learned are listed below:
➢ Basically, we learned to work in a team.
➢ Learned about the Database crud process.
➢ Learned about phpmydatabase technology, its components, and ways to implement them
➢ Learned to manage the database under phpmydatabase

68
Bibliography & References

Book Names:
❖ Beginning PHP and MySQL – Jason Gilmore.
❖ Mastering HTML, CSS & JavaScript – BPB publications.
❖ Lets Us XAMPP – Oreilly Publication

References:
❖ https://www.w3schools.com/php/php_datatypes.asp
❖ https://www.php.net/manual/en/index.php
❖ https://www.w3schools.com/html/default.asp
❖ https://www.w3schools.com/w3css/default.asp
❖ https://www.w3schools.com/js/default.asp
❖ https://www.imdb.com/title/tt2334879/plotsummary
❖ https://www.imdb.com/title/tt4154796/plotsummary
❖ https://en.wikipedia.org/wiki/Extraction_(2020_film)#:~:text=The%20film%20is%20about
%20an,when%20he%20is%20double%2Dcrossed.&text=Netflix%20released%20Extractio
n%20on%20April%2024%2C%202020.
❖ https://www.imdb.com/title/tt0073195/plotsummary
❖ https://www.imdb.com/title/tt1485796/
❖ https://www.imdb.com/title/tt0993846/plotsummary
❖ https://en.wikipedia.org/wiki/The_Matrix#:~:text=It%20depicts%20a%20dystopian%20futu
re,bodies%20as%20an%20energy%20source.

69

You might also like