You are on page 1of 46

A

PROJECT BASED LAB REPORT


On

Online Cinema Ticket Booking System


Submitted in partial fulfilment of the
Requirements for the award of the Degree of

Bachelor of Technology
In
Computer Science & Engineering
By
S.Prathyusha
(12006189)

G.Nikhila
(12003108)

K.Srinidhi
(12003163)

K.Varshini
(12003150)

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

K L University
Green Fields, Vaddeswaram, Guntur District-522 502
2014-2015

K L University
1

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

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

Head of the Department


Dr.K.Tirupathi Rao

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

1.1 PROJECT SPECIFICATION


The main objective of the project online movie ticket booking system is to book
movie tickets online. It provides an alternate and convenient method for a customer to
purchase tickets. The system is automatic in nature. Once the data is fed into the database, the
staff need not do anything and the entire order is processed by the system.
Module #1: Admin
1. User Registration

4. List of Movies

2. Ticket availability

5. Validations

3. Insertion

6. Deletions

Module #2: Transactions


1. Tickets Issue

4. Check out

2. Payment

5. Refreshments

3. Validations

6. Cancellation

Module #3: Maintenance


1. Creation of users

5. Movies

2. Theatres

7. Validations

4. Insertion

8. Review

Module #4: Reports


1. Ticket printing

4. List of frequently used theatre

2. List of nil sale items

5. List of frequently visiting customers

3. List the maximum viewers of a movie

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.

2.2 Transaction Module


The transaction module takes care about the issue of the tickets it is used to enter the details
like name, cinema name, no of tickets, timings and dates, types of class, phone no and total
price for ticket.
Next we enter submit and enter into payment page . In this payment page we enter details like
CVV no and card number . During the payment after entering details we enter pay button
then it run and display transaction is successful. This will be a safe payment procedure.
During the tickets booking the user can also add some refreshments to the payments.
In this cancellation they can also cancel the tickets after ticket booking.
check out is used to verify whether details entered for ticket booking is correct or not if not
entered correctly we can rectify the errors in this check out.
Points to customer is used to add points to customer for frequently used theatres .if the
customers frequently enter to theatres they can gain more points.
The Validation is automatic checks make ensure that any data entered into system is sensible.
This validation does not make sure that data has been entered correctly. It only ensures that
data is sensible.
In this module we provide favourites when we click the favourites next to theatre name on
any show times page to mark it as favourites and then come back here to see show time at
your favourites theatres.

10

2.3 Maintenance Module


In this maintenance module we have creation of users in which we enter details like name,
account no, seat no's, amount.
In this module we show the list of movies and maintaining schedule timings for each movie.
Points to be added to the for frequently visiting customers, points for the available customers
will be given some offers so that they will be attracted towards these cinemas.
The Timings, upcoming movies should be updated time to time so that customers will be
given correct information about the movies running at present and the show timings.
The Publicity material should be maintained such as the contact details and frequently
updated. In this module we make the user available to contact us regarding any problem and
also to advertise with us.
The Validation is an automatic check make ensure that any data entered into system is
sensible. This validation does not make sure that data has been entered correctly. It only
ensures that data is sensible.
At the end in this module we provide report for different customers. Here we provide
different advertising options for marketing.

2.4 Reports Module


In the reports module we will maintain reports regarding many things like list of nill sale
items, list of daily sales, list of frequently used theatre, list of frequently visited customers
and others. This helps us to analize the profits and also improve our infrastructure and
services if necessary. In this module the user can also print his ticket. This will be shown at
the theatre for getting the ticket at time of show.

11

3. FLOWCHART
3.1 Admin Module

Figure 3.1 Admin FlowChart

12

3.2 Transaction Module

Figure 3.2 .Transaction Flow Chart

13

3.3 Maintenance Module

Figure 3.3 Maintenance FlowChart

14

3.4 Reports Module

Figure 3.4 Reports Module

15

3.5 Database Tables

Figure 3.5.1 Adminlogin Table

Figure 3.5.2 Tbooking Table

Figure 3.5.3 Movie Table

16

Figure 3.5.4 MovieReview Table

Figure 3.5.5 Cancel Table

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.img a:hover img {


border:1px solid #0000ff;
}

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

font-family: 'Open Sans', Arial, Helvetica, sans-serif;


font-size: 16px;
line-height: 1.5em;
}
a { text-decoration: none; }
h1 { font-size: 1em; }
h1, p {
margin-bottom: 10px;
}
strong {
font-weight: bold;
}
.uppercase { text-transform: uppercase; }

/* ---------- LOGIN ---------- */


#login {
margin: 50px auto;
width: 300px;
}
form fieldset input[type="text"], input[type="password"] {
background-color: #e5e5e5;
border: none;
border-radius: 3px;
-moz-border-radius: 3px;
24

-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

* Processes requests for both HTTP <code>GET</code> and <code>POST</code>


* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
/* TODO output your page here. You may use following sample code. */
out.println("<!DOCTYPE html>");
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet Users</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Servlet Users at " + request.getContextPath() + "</h1>");
out.println("</body>");
out.println("</html>");
}
}
29

// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on


the left to edit the code.">
/**
* Handles the HTTP <code>GET</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 doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//processRequest(request, response);
System.out.println("servlet");
String name=request.getParameter("Username");
String pass=request.getParameter("Password");
Connection con=DBConnection.createConnection();
System.out.println("connected");
try {
PreparedStatement pstmt=con.prepareStatement("select username,password from
users where username=? and password=?");
pstmt.setString(1,name);
pstmt.setString(2,pass);
30

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

4.2 Transaction Module


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<form action="Display" method="get">
<input type="submit" value="Submit">
</form>
</body>
</html>
Servlet page
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 javax.servlet.http.HttpSession;
import java.util.*;
import javax.servlet.annotation.WebServlet;
/**
*
* @author Nikhila
*/
@WebServlet(urlPatterns = {"/Displayaagadu"})
public class Displayaagadu extends HttpServlet {
/**
*
* @param request
* @param response
33

* @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);
}
}
}

4.3 Maintenance Module


34

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 &nbsp &nbsp &nbsp &nbsp <a
href="aagadupvr11.html">11.00 AM</a> &nbsp <a href="aagadupvr11.html">2.00 PM
</a>&nbsp <a href="aagadupvr11.html">6.00 PM</a> &nbsp <a
href="aagadupvr11.html">9.00 PM</a><br/><br/>
Inox Cinema &nbsp &nbsp &nbsp<a href="aagadupvr11.html"> 11.00 AM </a>&nbsp <a
href="aagadupvr11.html">2.00 PM</a> &nbsp<a href="aagadupvr11.html"> 6.00 PM</a>
&nbsp <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);
}
}
}

4.4 Reports Module


Frozen.html
<html>
<head>
39

<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

Genre:Adventure, Animation, Family, Musical<br/>


Movie Director:Chris Buck,Jennifer Lee<br/>
Frozen Release Date:10 September 2014
</p>
<p class="text2"><strong>THEATRES & TIMINGS</strong><br/><br/></p>
<p class="text4">Sravan &nbsp &nbsp &nbsp &nbsp<a href="frozenpvr11.html"> 11.00
AM</a> &nbsp <a href="frozenpvr11.html">2.00 PM </a>&nbsp <a
href="frozenpvr11.html">6.00 PM</a> &nbsp <a href="frozenpvr11.html">9.00
PM</a><br/><br/>
Srinivas &nbsp &nbsp &nbsp <a href="frozenpvr11.html">11.00 </a>AM &nbsp<a
href="frozenpvr11.html"> 2.00 PM</a> &nbsp<a href="frozenpvr11.html"> 6.00 PM</a>
&nbsp <a href="frozenpvr11.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></select><br/>
</p>
</body>
</html>
Jsp code
<%
String name=request.getParameter("name");
String date=(request.getParameter("date"));
String tickets=request.getParameter("tickets");
String seat=request.getParameter("seats");
String sex=request.getParameter("sex");
String city=request.getParameter("city");
String refresh=request.getParameter("refresh");
String email=request.getParameter("email");
String dob=request.getParameter("dob");
String mobile=request.getParameter("mobile");
String s="111";
try{
Class.forName("org.apache.derby.jdbc.ClientDriver");
java.sql.Connection con =
DriverManager.getConnection("jdbc:derby://localhost:1527/movie","manu","manu");
java.sql.Statement st = con.createStatement();
s="222" ;
int i=st.executeUpdate("insert into
manu.ticket(name,date,tickets,seat,sex,city,refresh,email,dob,mobile)
values('"+name+"','"+date+"','"+tickets+"','"+seat+"','"+sex+"','"+city+"','"+refresh+"','"+emai
l+"','"+dob+"','"+mobile+"')");
out.println("<p><h3>Name:</h3></p>"+name);
out.println("<p><h3>Date:</h3>"+date);
out.println("<p><h3>No of Tickets:</h3>"+tickets);
41

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

Figure 5.1:Homepage Display

Figure5.2: Home Page Display

43

Figure 5.3: Displaying Timings And Ticket Availability

Figure 5.4: Booking A Ticket

44

Figure 5.5: Login Page

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

You might also like