Professional Documents
Culture Documents
Bachelor of Technology
In
Computer Science & Engineering
By
S.Prathyusha
(12006189)
G.Nikhila
(12003108)
K.Srinidhi
(12003163)
K.Varshini
(12003150)
K L University
Green Fields, Vaddeswaram, Guntur District-522 502
2014-2015
K L University
1
CERTIFICA
TE
This is to certify that this project based lab report entitled Online Cinema ticket
booking system is a bonafide work done by S.Prathyusha (12006189), G.Nikhila
(12003108), K.Srinidhi (12003163), K.Varshini (12003150) in partial fulfillment of the
requirement for the award of degree in BACHELOR OF TECHNOLOGY in Computer
Science and Engineering during the academic year 2014-2015.
Lecturer in Charge
Mrs. P.Lakshmi Prasanna
K L University
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
DECLARATI
ON
We hereby declare that this project based lab report entitled Online Cinema Ticket Booking
System has been prepared by us in partial fulfilment of the requirement for the award of degree
BACHELOR OF TECHNOLOGY in COMPUTER SCIENCE AND ENGINEERING during
the academic year 2014-2015.
We also declare that this project based lab report is of our own effort and it has not been
submitted to any other university for the award of any degree.
Date: 7-11-2014
Place: Vaddeswaram
S.PR
ATHYUSHA(12006189)
G.NIKHILA(12003108)
K.SRINIDHI(12003163)
3
K.VARSHINI(12003150)
ACKNOWLEDGEMENT
Our sincere thanks to Mrs. P.Lakshmi Prasanna, Mr A.Vijay Kumar in the Lab for their
outstanding support throughout the project for the successful completion of the work
We express our gratitude to Dr.K.Tirupathi Rao , Head of the Department for Computer
Science and Engineering for providing us with adequate facilities, ways and means by which
we are able to complete this project work.
We would like to place on record the deep sense of gratitude to the honourable Vice
Chancellor, K L University for providing the necessary facilities to carry the concluded
project work.
Last but not the least, we thank all Teaching and Non-Teaching Staff of our department and
especially my classmates and my friends for their support in the completion of our project
work.
S.PRATHYUSHA(12006189)
G.NIKHILA(12003108)
K.SRINIDHI(12003163)
K.VARSHINI(12003150)
CONTENTS
Content
1. 1.1 Project specification
2.
3.
4.
5.
6.
1.1
1.2 Abstract
Project Description
2.1 Admin
2.2 Transaction
2.3 Maintenance
2.4 Reports
Flowcharts
Sample Code
Snapshots of the outputs
References
Pg. No
6
7
8
9
10
10
11
15
38
41
4. List of Movies
2. Ticket availability
5. Validations
3. Insertion
6. Deletions
4. Check out
2. Payment
5. Refreshments
3. Validations
6. Cancellation
5. Movies
2. Theatres
7. Validations
4. Insertion
8. Review
1.2 ABSTRACT
The project objective is to book cinema tickets in online. The Ticket Reservation
System is an Internet based application that can be accessed throughout the Net and can be
accessed by anyone who has a net connection. This application will reserve the tickets. This
online ticket reservation system provides a website for a cinema hall where any user of
internet can access it. User is required to login to the system and needs a credit card for
booking the tickets. Tickets can be collected at the counter and Watching movies with family
and friends in theatres is one of the best medium of entertainment after having a hectic
schedule. But all this excitement vanishes after standing in hours in long queues to get tickets
booked. The website provides complete information regarding currently running movies on
all the screens with details of show timings, available seats. Ticket reservations are done
using credit card and can be cancelled if needed. Our online tickets reservation system is one
of the best
opportunities for those who cannot afford enough time to get their tickets
reserved standing in long queues. People can book tickets online at any time of day or night.
Our reservation system also provides option to cancel the tickets which are reserved
previously.
2. MODULES DESCRIPTION
2.1 Admin Module
The admin module makes the admin user to login with admin username and
password. The admin is the main administrator and controller of the whole system. He also
maintains the user registration and the logins. The admin needs to manage the show timings.
Admin can add a movie, update the information regarding an old movie and even delete a
movie from the theatre. The admin can even add a theatre and delete a theatre.
The admin makes the user available with search by movie and by theatre. The admin
also maintains the list of movies.
The first page in my module is the main page of the project which contain a menu
consisting of options like home, now showing, cinema, coming soon, contact, advertise with
us , and ticket info. This page also contains the login option for the users to login into their
account and also to register an account with us.
The next page is the user login page asking them to enter their username and
password. If the password and the username exists in our database the user enters into his
main page. A registration page is also available for the new users to register.
In cinemas page the user can select the movie by using search by theatre. In now
showing page the user can search by movie.
Admin has a separate admin page where the admin can login using a username and
password. In admin the user can add a theatre , delete a theatre, add a movie and also delete a
movie.
In add theatre the admin can add a theatre by entering the name , type of theatre,
capacity, number of screens, theatre manager, theatre address of a theatre. In delete theatre the
admin can directly enter the theatre name and delete that particular theatre.
In add movie the admin can add a movie by entering the name, rating, review, genre, director,
producer and music director of a movie. In delete movie the admin can directly enter the
movie name and delete the movie.
10
11
3. FLOWCHART
3.1 Admin Module
12
13
14
15
16
17
4. SAMPLE CODE
4.1 Admin Module
Home.html
<html>
<head>
<title>ONLINE TICKET BOOKING</title>
<style>
div.img {
margin: 5px;
padding: 5px;
height: auto;
width: auto;
float: left;
text-align: center;
}
.image{
position:relative;
top: 50px;
left: 125px;
z-index:1;
}
18
div.img img {
display: inline;
margin: 5px;
border: 1px solid #ffffff;
}
div.desc {
text-align: center;
font-weight: normal;
font-size:10pt;
width:1px;
margin: 5px;
}
.text{
position:absolute;
top:200px;
left:130px;
z-index:2;
}
.text1{
19
position:absolute;
top:150px;
left:130px;
z-index:2;
}
</style>
</style>
<head>
<body class="text" style="background-image:url(back.jpg);background-size:250%">
<img src="logo1.png" width="900" height="100" class="image">
<a href="home.html" class="popup-container" align="right">
<img src="home.jpg" width="40" align="right"></a>
<a href="login.html" class="popup-container" align="right">
<img src="login.jpg" width="50" align="right"></a>
<center><h1 class="text1">WELCOME TO ONLINE TICKET BOOKING</h1></center>
<br><br><br><br><br><br><br><br><br>
<h2>TELUGU</h2><hr>
<div class="img">
<a target="_blank" href="aagadu.html">
<img src="aagadu.jpg" width="210" height="200">
</a>
<div class="desc">AAGADU</div>
</div>
20
<div class="img">
<a target="_blank" href="power.html">
<img src="power.jpg" width="210" height="200">
</a>
<div class="desc">POWER</div>
</div>
<div class="img">
<a target="_blank" href="loukyam.html">
<img src="loukyam.jpg" width="210" height="200">
</a>
<div class="desc">LOUKYAM</div>
</div>
<div class="img">
<a target="_blank" href="anukshanam.htm">
<img src="anukshanam.jpg" width="210" height="200">
</a>
<div class="desc">Anukshanam</div>
</div>
<br><br><br><br><br><br><br><br><br>
<hr><h2>HINDI<h2><hr>
<div class="img">
<a target="_blank" href="daawat.html">
<img src="daawat.jpg" width="210" height="200">
</a>
21
<div class="desc">DAAWAT-E-ISHQ</div>
</div>
<div class="img">
<a target="_blank" href="kooubsurath.html">
<img src="kooubsurath.jpg" width="210" height="200">
</a>
<div class="desc">kooubsurath</div>
</div>
<div class="img">
<a target="_blank" href="mary.html">
<img src="mary.jpg" width="210" height="200">
</a>
<div class="desc">MARY KOM</div>
</div>
<div class="img">
<a target="_blank" href="creature.html">
<img src="creature.jpg" width="210" height="200">
</a>
<div class="desc">CREATURE</div>
</div>
<br>
<br>
<br><br><br><br><br><br><br>
<hr><h2>ENGLISH</h2><hr>
22
<div class="img">
<a target="_blank" href="frozen.html">
<img src="frozen.jpg" width="210" height="200">
</a>
<div class="desc">FROZEN</div>
</div>
<div class="img">
<a target="_blank" href="tangled.html">
<img src="tangled.jpg" width="210" height="200">
</a>
<div class="desc">TANGLED</div>
</div>
</body>
</html>
Login.html
<html>
<head>
<meta charset="utf-8">
<title>Best Login Page design in html and css</title>
<style type="text/css">
body {
background-color: #f4f4f4;
color: #5a5656;
23
-webkit-border-radius: 3px;
color: #5a5656;
font-family: 'Open Sans', Arial, Helvetica, sans-serif;
font-size: 14px;
height: 50px;
outline: none;
padding: 0px 10px;
width: 280px;
-webkit-appearance:none;
}
form fieldset input[type="submit"] {
background-color: #008dde;
border: none;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
color: #f4f4f4;
cursor: pointer;
font-family: 'Open Sans', Arial, Helvetica, sans-serif;
height: 50px;
text-transform: uppercase;
width: 300px;
-webkit-appearance:none;
}
25
form fieldset a {
color: #5a5656;
font-size: 10px;
}
form fieldset a:hover { text-decoration: underline; }
.btn-round {
background-color: #5a5656;
border-radius: 50%;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
color: #f4f4f4;
display: block;
font-size: 12px;
height: 50px;
line-height: 50px;
margin: 30px 125px;
text-align: center;
text-transform: uppercase;
width: 50px;
}
</style>
</head>
26
<body>
<div id="login">
<h1><strong>Welcome.</strong> Please login.</h1>
<form method="get">
<fieldset>
<p><input
type="text"
required
value="Username"
onBlur="if(this.value=='')this.value='Username'"
onFocus="if(this.value=='Username')this.value='' "></p>
<p><input
type="password"
required
value="Password"
onBlur="if(this.value=='')this.value='Password'"
onFocus="if(this.value=='Password')this.value='' "></p>
<p><a href="#">Forgot Password?</a></p>
<p><input type="submit" value="Login"></p>
</fieldset>
</form>
<p><a href="sign.html">NOT YET REGESTERED?! REGESTER</a>
</body>
</html>
User.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
27
import com.dbconnection.DBConnection;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
*
* @author prathyusha
*/
@WebServlet(urlPatterns = {"/Users"})
public class Users extends HttpServlet {
/**
28
ResultSet rs=pstmt.executeQuery();
while(rs.next()){
RequestDispatcher rd=request.getRequestDispatcher("home.html");
rd.forward(request, response);
}
} catch (SQLException ex) {
Logger.getLogger(Users.class.getName()).log(Level.SEVERE, null, ex);
}
/**
* Handles the HTTP <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
31
/**
* Returns a short description of the servlet.
*
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
32
* @throws ServletException
* @throws IOException
*/
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
PrintWriter out = response.getWriter();
response.setContentType("text/html");
try {
out.println("<html>");
out.println("<body>");
LinkedList l = new LinkedList();
l.add("1");
l.add("2");
l.add("3");
l.add("4");
l.add("5");
l.add("6");
l.add("7");
l.add("8");
l.add("9");
l.add("10");
HttpSession session = request.getSession(true);
session.setAttribute("linked", l);
out.println("<center><h1>" + l + "</h1>");
out.println("<a href = 'Seats'>Book A Ticket</a>");
} catch (Exception e) {
out.println(e);
}
}
}
Aagadu.html
<html>
<head>
<style type="text/css">
.image{
position:relative;
top: 50px;
left: 125px;
z-index:1;
}
.text{
position:absolute;
top:200px;
left:130px;
z-index:2;
}
.text1{
position:absolute;
top:650px;
left:130px;
z-index:3;
}
.text2{
position:absolute;
top:350px;
left:500px;
}
.text3{
position:absolute;
top:250px;
left:500px;
}
.text4{
position:absolute;
top:400px;
left:500px;
}
.text5{
position:absolute;
top:600px;
left:130px;
}
.imgdisplayed {
display: block;
margin-top:150px;
margin-left: 125px;
}
</style>
35
</head>
<body style="background-image:url(back.jpg);background-size:140%">
<p><img src="logo1.png" width="1100" height="100" class="image" /></p>
<p class="text" style="color:red;font-size:20pt"><strong>Aagadu(U/A) - Telugu
Online Booking</strong></p>
<img class="imgdisplayed" src="aagadu.jpg" width="300" height="300" align="left"
alt="img not found">
<p class="text5" style="color:red;font-size:15pt"><strong>Aagadu (U/A) - Telugu
Movie Casts:</strong><br/><br/> </p>
<p class="text1">Mahesh Babu,Tamanna Bhatia,Rajendra Prasad,Sonu
Sood,Brahmanandam<br/>
Genre :
Comedy<br/>
Language
:
Telugu<br/>
Movie Producer
:
Anil Sunkara,Gopichand Achanta<br/>
Aagadu (U/A) - Telugu Release Date :
19 September 2014</p>
<p class="text2" style="font-size:15pt;color:red"><strong>Theatres &
Timings</strong><br/><br/></p>
<p class="text4">Pvr Ripples         <a
href="aagadupvr11.html">11.00 AM</a>   <a href="aagadupvr11.html">2.00 PM
</a>  <a href="aagadupvr11.html">6.00 PM</a>   <a
href="aagadupvr11.html">9.00 PM</a><br/><br/>
Inox Cinema      <a href="aagadupvr11.html"> 11.00 AM </a>  <a
href="aagadupvr11.html">2.00 PM</a>  <a href="aagadupvr11.html"> 6.00 PM</a>
  <a href="aagadupvr11.html">9.00 PM</a>
</p>
<p class="text3">
Date:<select> <option>25-thu</option><option>26-fri</option><option>27sat</option><option>28-sun</option></select><br/><br/>
Seats:<select><option>1</option><option>2</option><option>3</option><option>4</optio
n><option>5</option><option>6</option><option>7</option><option>8</option><option>
9</option><option>10</option></select><br/>
</p>
</body>
</html>
Booked.java
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
import javax.servlet.annotation.WebServlet;
@WebServlet(urlPatterns = {"/Seats"})
public class Seats extends HttpServlet {
36
/**
*
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
PrintWriter out = response.getWriter();
response.setContentType("text/html");
String cust_name = request.getParameter("cust_name");
String Tname = request.getParameter("Tname");
String Mname = request.getParameter("Mname");
String seat = request.getParameter("seat");
try {
LinkedList l = new LinkedList();
out.println("<html>");
out.println("<body>");
out.println("<center>");
out.println("<form method = 'get' action = 'Booked'>");
out.println("<h1><u>Fill The Form Below To Book A Ticket<u></h1>");
out.println("<table><tr>");
out.println("<th>Name :</th>");
out.println("<td><input type = 'text' name = 'cust_name'></td>");
out.println("<th>Theatre Name:</th>");
out.println("<td><input type = 'text' name = 'Tname'></td>");
out.println("<th>Movie Name :</th>");
out.println("<td><input type = 'text' name = 'Mname'></td></th>");
out.println("<th>Seat No :</th>");
out.println("<td><input type = 'text' name = 'seat'></td></th></tr></table><br>");
out.println("<input type = 'submit' value = 'Booked'>");
out.println("</form>");
out.println("</center>");
out.println("</body>");
out.println("</html>");
} catch (Exception e) {
out.println(e);
}
}
}
Seat.java
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
37
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.sql.*;
import java.util.*;
import javax.servlet.annotation.WebServlet;
/**
*
* @author Srinidhi
*/
@WebServlet(urlPatterns = {"/Booked"})
public class Booked extends HttpServlet {
/**
*
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
PrintWriter out = response.getWriter();
response.setContentType("text/html");
String cust_name = request.getParameter("cust_name");
String Tname = request.getParameter("Tname");
String Mname = request.getParameter("Mname");
String seat = request.getParameter("seat");
int n=0;
HttpSession session = request.getSession(true);
try{
n=Integer.parseInt(seat);
}catch(NumberFormatException e){}
LinkedList l =(LinkedList) session.getAttribute("linked");
try{
Class.forName("com.mysql.jdbc.Driver");
Connection cn =
DriverManager.getConnection("jdbc:mysql://localhost:3306/dbase","root","root");
out.println("Ticket has been booked");
PreparedStatement s = cn.prepareStatement("insert into tbooking values(?,?,?,?)");
s.setString(1, cust_name);
s.setString(2, Tname);
s.setString(3,Mname);
s.setString(4,seat);
s.executeUpdate();
out.println("Ticket has been booked");
38
try{
l.remove(n-1);
}catch(Exception e){
out.print(e);
}
out.println("<h1>"+l+"</h1>");
}catch(ClassNotFoundException | SQLException e){
out.println(e);
}
}
}
<style type="text/css">
.image{
position:relative;
top: 50px;
left: 125px;
z-index:1;
}
.text{
position:absolute;
top:200px;
left:130px;
z-index:2;
}
.text1{
position:absolute;
top:600px;
left:130px;
z-index:3;
}
.text2{
position:absolute;
top:350px;
left:500px;
}
.text3{
position:absolute;
top:250px;
left:500px;
}
.text4{
position:absolute;
top:400px;
left:500px;
}
.imgdisplayed {
display: block;
margin-top:150px;
margin-left: 125px;
}
</style>
</head>
<body>
<p><img src="logo1.png" width="1100" height="100" class="image" /></p>
<p class="text"><strong>FROZEN (U/A) - English Online Booking</strong></p>
<img class="imgdisplayed" src="frozen.jpg" width="300" height="300" align="left"
alt="img not found">
<p class="text1"><strong>FROZEN (U/A) Movie Casts: </strong><br/><br/>
Kristen Bell as Anna,Idina Menzel as Elsa - Snow Queen<br/>
40
out.println("<p><h3>Sex:</h3>"+sex);
out.println("<p><h3>city:</h3>"+city);
out.println("<p><h3>Refreshments:</h3>"+refresh);
out.println("<p><h3>Email Id:</h3>"+email);
out.println("<p><h3>Date of Birth:</h3>"+dob);
out.println("<p><h3>Mobile:</h3>"+mobile);
}
catch(Exception e){
out.print(e+s);
e.printStackTrace();
}
%>
5. SCREEN SHOTS
42
43
44
45
6. REFERENCES
Text Books
1. Budd, T. (1997b), An Introduction to Object-Oriented Programming,
2nd edn, Addison-Wesley.
2. Ghezzi, C., Jayazeri, M. & Mandrioli, D. (1998), Fundamentals of
Software Engineering, 2nd edn,Prentice-Hall.
3. K. Appel and W. Haken. (1976), Every Planar Map is 4-colorable,
Bull. Amer. Math. Soc., vol. 82, pp. 711-712.
Websites
1. www.xentris.com
2. www.ticketnew.com
3. www.BookMyShow.com
46