ONLINE MOVIE TICKET BOOKING SYSTEM

April 6, 2017 | Author: Beverly Norton | Category: N/A
Share Embed Donate


Short Description

project using java,servlet,html,css,javascript,jsp...

Description

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

2

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)

4

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)

5

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

6

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

7

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.

8

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.

9

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 favourite’s 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 ONLINE TICKET BOOKING 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; }

WELCOME TO ONLINE TICKET BOOKING TELUGU AAGADU 20

POWER LOUKYAM Anukshanam HINDI 21

DAAWAT-E-ISHQ kooubsurath MARY KOM CREATURE ENGLISH 22

FROZEN TANGLED

Login.html Best Login Page design in html and 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; }

26

Welcome. Please login. Forgot Password? NOT YET REGESTERED?! REGESTER 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 GET and POST * 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(""); out.println(""); out.println(""); out.println("Servlet Users"); out.println(""); out.println(""); out.println("Servlet Users at " + request.getContextPath() + ""); out.println(""); out.println(""); } } 29

// /** * Handles the HTTP GET 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 POST 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"; }//

}

32

4.2 Transaction Module JSP Page 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(""); out.println(""); 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("" + l + ""); out.println("Book A Ticket"); } catch (Exception e) { out.println(e); } } }

4.3 Maintenance Module 34

Aagadu.html .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; } 35

Aagadu(U/A) - Telugu Online Booking Aagadu (U/A) - Telugu Movie Casts: Mahesh Babu,Tamanna Bhatia,Rajendra Prasad,Sonu Sood,Brahmanandam Genre : Comedy Language : Telugu Movie Producer : Anil Sunkara,Gopichand Achanta Aagadu (U/A) - Telugu Release Date : 19 September 2014 Theatres & Timings Pvr Ripples         11.00 AM   2.00 PM   6.00 PM   9.00 PM Inox Cinema       11.00 AM   2.00 PM   6.00 PM   9.00 PM Date: 25-thu26-fri27sat28-sun Seats:12345678 910 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(""); out.println(""); out.println(""); out.println(""); out.println("Fill The Form Below To Book A Ticket"); out.println(""); out.println("Name :"); out.println(""); out.println("Theatre Name:"); out.println(""); out.println("Movie Name :"); out.println(""); out.println("Seat No :"); out.println(""); out.println(""); out.println(""); out.println(""); out.println(""); out.println(""); } 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(""+l+""); }catch(ClassNotFoundException | SQLException e){ out.println(e); } } }

4.4 Reports Module Frozen.html 39

.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; } FROZEN (U/A) - English Online Booking FROZEN (U/A) Movie Casts: Kristen Bell as Anna,Idina Menzel as Elsa - Snow Queen 40

Genre:Adventure, Animation, Family, Musical Movie Director:Chris Buck,Jennifer Lee Frozen Release Date:10 September 2014 THEATRES & TIMINGS Sravan         11.00 AM   2.00 PM   6.00 PM   9.00 PM Srinivas       11.00 AM   2.00 PM   6.00 PM   9.00 PM Date: 25-thu26-fri27sat28-sun Seats:123456 Jsp code

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

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF