Sei sulla pagina 1di 126

Railway Management System

A DISSERTATION

Submitted in partial fulfillment of the requirements


Of the degree of

BACHLEOR OF COMPUTER APPLICATION

By

HIMANSHU
20160392

Supervisor:
Mr. Umesh Sharma

DEPARTMENT OF COMPUTER APPLICATIONS


INSTITUTE OF ENGINEERING & TECHNOLOGY
MANGALAYATAN UNIVERSITY
May,2019

1
Approval Sheet

This Dissertation entitled Railway management system by HIMANSHU is approved for


the degree of BACELOR OF COMPUTER APPLICATION.

Examiners

Supervisor (s)

Chairman

Date:
Place:

2
DECLARATION

I declare that this written submission represents my ideas in my own words and where others'
ideas or words have been included, I have adequately cited and referenced the original
sources. I also declare that I have adhered to all principles of academic honesty and integrity
and have not misrepresented or fabricated or falsified any idea/data/fact/source in my
submission. I understand that any violation of the above will be cause for disciplinary action
by the Institute and can also evoke penal action from the sources which have thus not been
properly cited or from whom proper permission has not been taken when needed.

Himanshu
20160392

Date:

3
CERTIFICATE

This is certified that the dissertation titled “RAILWAY MANAGEMENT


SYSTEM” by HIMANSHU in partial fulfillment of the requirements for the award of the
Degree of BACELOR of Computer Applications is an original work carried out by him/her
under my/our supervision and guidance. It is certified that the work has not been submitted
anywhere else for the award of any other diploma or degree of this or any other University.

Supervisor

Mr.Umesh Sharma

4
ACKNOWLEDGEMENT

Successfully completing any task gives us satisfaction as well as internal strength for future

problems but the person alone has never existed. He is truly accompanied by few people.

They use to give the person support as well as suggestion to successfully complete the work.

So we feel pleasure for thanking all such great people who motivates me and provides me

kind support at all stages of my Project work.

Firstly, we would like to honor my institute “Mangalayatan University ”. Here we have

been provided with a workplace and infrastructure to learn recent technologies and conceptual

background to strengthen our programming and professional skills.

We are very much grateful to Mr. Manoj Vashney and Mr. Umesh Sharma(Assistant

Professor), for their helpful attitude and encouragement in making our project.

Furthermore, we are thankful to all faculty members for motivating us and to the Staffs of

computer labs in the department for providing excellent valuable facility as well as issuing us

a computer system of good configuration and providing regular maintenance.

Himanshu
20160392

5
ABLE OF CONTENTS

Chapter.1 Introduction 8-9


Chapter.2 System Requirement Specification 10
Chapter.3design Phase 11-15
Chapter.4 Technology Overview 16-19
Chapter.5 Project Description 20-36
Chapter.6 Screen Shot And Code 37-69
Chapter.7 Scope Of The Project 70
Chapter.8 Contribution In The Project 71
Chapter. 9 Bibliography 72

6
ABSTRACT

The business-to-consumer aspect of product commerce (e-commerce) is the most visible


business use of the World Wide Web. The primary goal of an e-commerce site is to sell
goods online.

This project deals with developing an e-commerce website for Online Product Sale. It
provides the user with a catalog of different product available for purchase in the store. In
order to facilitate online purchase a shopping cart is provided to the user. The system is
implemented using a 3-tier approach, with a backend database, a middle tier of

Microsoft Internet Information Services (IIS) and PHP, and a web browser as the front
end client. In order to develop an e-commerce website, a number of Technologies must be
studied and understood.

These include multi-tiered architecture, server and client side scripting techniques,
implementation technologies such as PHP(OOP), JQUERY, BOOTSTRAP, HTML5,
relational databases (such as MySQLi, Access). This is a project with the objective to
develop a basic website where a consumer is provided with a shopping cart application
and also to know about the technologies used to develop such an application. This
document will discuss each of the underlying technologies to create and implement an e-
commerce website.

Name of the Project:Railway management


system

Users Views:

Administrator
Customer
Platform:
Operating Systems: Microsoft Windows
Technologies Used:
Front End:HTML, JavaScript and CSS,Bootstrap
Web designing language:PHP
RDBMS (Back end): MySQLI

7
CHAPTER – 1
INTRODUCTION

General Overview

Our website has various kinds of information that helps regarding booking of tickets via railways
.

Users will be able to search the train availability ,the exact fare ,the arrival and departure time of
the train and they can also book the ticket by using the debit ,credit or master card and after
booking the ticket if the user want to cancel it then they can easily do it also.

Survey

Railway passengers frequently need to know about their ticket reservation status, ticket
availability on a particular train or for a place, train arrival or departure details, special trains etc..
Customer information centers at the railway stations are unable to serve such queries at peak
periods.
The number of the reservation counters available to the passengers and customers are very less.
On most of the reservation systems there are long queues, so it takes a long time for any individual to
book the ticket.
As now there are no call centers facilities available to solve the queries of the passengers.
The online railway ticket reservation system aims to develop a web application which aims at
providing trains details, trains availability, as well as the facility to book ticket in online for
customers.
So, we thought of developing a web based application which would provide the users all these
facilities from his terminal only as well as help them in booking their tickets. The Application was
to be divided into two parts namely the user part , and the administrator part. And each of these
has their corresponding features.
We decided to give the name of the website “ONLINE RAILWAY TICKET RESEVATION”.
The online railway ticket reservation system is developed using PHP as the backend in the
MYSQL.

Objectives:
The objective of the online railway ticket reservation system Project
is to design software to fully automate
the process of issuing a railway ticket.
That is:-
1. To create a database of the trains
2. To search the trains it’s arrival and departure time,distance between source and
destination.
3. To check the availability of the ticket.
4. To calculate
fare. 5.To book the
ticket.
6.To cancel the ticket if necessary.

Analysis
8
Online railway ticket reservation is a online ticket booking website, which is capable of booking
ticket and serach the train availavility . This website is mainly created to fulfil the following
requirements, it comprises of the following properties:-
1. A central database that will store all information.
2. An online website that will provide real- time information about the availability of
tickets their prices .
3. Every registered user is able to view his booking id that has been made in his/her
name.
4. Every registered user can change his password any time he wants to change.
5. Every guest user can search train availability ,price of the ticket,arrival and
departure time ,distance between source and destination etc.
1. Every registered user has the facilities to print his ticket any time he wishes.
Administration login
1. In admin mode the administrator can make changes in train details.
2. He can also view all booking that has been made by different users.
2. The booking window contains all the facilities at one place, the user can simply login
to his account and can book his ticket.

9
CHAPTER - 2
Software Requirements Specification

The Software Requirements Specification section will deal with the technical details of the
proposed system. It will contain information regarding the developmental and operational
environments, user interfaces, functional and requirements specifications and the exception and
error handling features of the system.
The Design section will provide a detailed insight into the working of the system, how the system
to be framed to make the implementation error free and to avoid a possible rework. All the features
mentioned in the SRS section will be dealt with in detail through the means of architectural design,
block diagram, detailed data flow diagrams, structure charts, flow chart and any other relevant
method.
Through the use of pseudo-codes, the Implementation Details section will provide the final design
step before actual implementation of the system. It will list all the functions that will be used in
the system, parameters used by them, what results they will produce and how they will interact
with the rest of the system.
All queries regarding the actual performance of the developed system will be cleared in the Results
and Discussion section. It will list all the test cases, results of those tests and a discussion on
whether these tests yielded the desired results or not. If negative, this section will also provide
information regarding the failure.
Concluding all this will be the Summary and Conclusion section which will round up the entire
discussion.

Development Environments

Hardware
Intel core 2 duo T6400 2.00 GHz with 2GB RAM, 250 GB hard disk space and other Standard
accessories.

Environment and Applications:


Microsoft Windows 7.
Wamp sever ,Xamp Server.
Microsoft SQL Server 
Microsoft Internet Explorer.
Operating environment:
Hardware configuration:
The minimum configuration for hardware is given below:

1.Intel® Pentium® or higher processor.


2.65 MB RAM or higher

10
CHAPTER – 3
Design Phase

The Design activity is often divided into separate phases – System Design and Detailed Design. System
Design is sometimes also called Top-Level Design. This system design aims to identify and modules that
should be in the system, the specifications of these modules, and how they interact with each other to
produce the desired result. At the end of the System Design all the major data structures, file formats, and
the major modules in the system and their specifications are decided.

Detailed design specification:

11
12
13
14
15
CHAPTER – 4
TECHNOLOGY PREVIEW

EVOLUTION OF PHP

PHP started out as a small open source project that evolved as more and more people found out
how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back in 1994.
1.PHP is a recursive acronym for "PHP: Hypertext Preprocessor".
2.PHP is a server side scripting language that is embedded in HTML. It is used to
manage dynamic content, databases, session tracking, even build entire e-commerce
sites.
3.It is integrated with a number of popular databases, including MySQL, PostgreSQL,
Oracle, Sybase, Informix, and Microsoft SQL Server.
4.PHP is pleasingly zippy in its execution, especially when compiled as an Apache
module on the Unix side. The MySQL server, once started, executes even very complex
queries with huge result sets in record-setting time.
5.PHP supports a large number of major protocols such as POP3, IMAP, and LDAP.
PHP4 added support for Java and distributed object architectures (COM and CORBA),
making n-tier development a possibility for the first time.
6.PHP is forgiving: PHP language tries to be as forgiving as possible.
7.PHP Syntax is C-Like.

Common uses of PHP

PHP performs system functions, i.e. from files on a system it can create, open, read,
write, and close them.
1.PHP can handle forms, i.e. gather data from files, save data to a file, through email
you 2.can send data, return data to the user.
3.You add, delete, modify elements within your database through PHP.
4.Access cookies variables and set cookies.
5.Using PHP, you can restrict users to access some pages of your website.
6.It can encrypt data.

Advantages Of PHP
16
The reason behind the popularity of PHP is its several advantages. PHP is most suited
for the purpose of web development. The advantages of PHP are discussed briefly
below:

1.Cross Platform.
All the PHP based applications can run on various types of platforms.PHP is supported
by majority of Operating Systems, some of which includes Solaris, UNIX, Windows and
Linux. The mentioned platforms can be used to write codes in PHP and also view web
pages or run the PHP based applications.
PHP easily interfaces with MySQL and Apache both. An effortless integration of PHP
can be done with various other technologies like Java and there is no
requirement of re-development. Therefore, saving both time and money, giving it an
important advantage

2.Easy database connection.


A programming language like PHP is widely used on the internet and needs
to connect to the database very often. Therefore, having a feature that could help PHP to
connect to database easily is mandatory. Several websites such as the ecommerce
websites, require good database management system.
PHP has a built-in module that helps it in connecting with database easily. Therefore,
PHP has a great demand in the field of web development where a data driven website
needs to be developed. PHP significantly reduces the time needed in developing the web
application that needs an efficient database management system.

.Easy to use.
PHP is widely used because it is easy to use. In contrast with other programming
languages that are complex, PHP is simple, fluent, clean and organized, hence it is a
boon for the new users. PHP has a well-organized syntax which is logical at the same
time.
PHP does not require any intensive studying or manual to use it. Command functions of
PHP are easily understood as the user can easily figure out from the name of the
commands itself what it does. A person who is new to PHP can still code because the
syntax is somewhat similar to C.
A person who is new to PHP can still code because the syntax is somewhat similar to C.

17
Hence, if a person who knows C can easily code in PHP. Hence, it is easier to create and
optimize the application using PHP . Speed is the primary need of web development.
There are people who face the challenge of slow internet connection and slow data
speed. Furthermore, a fast loading website is always preferred by people across the
globe.When compared to other programming languages, PHP is found to be
the fastest programming language.

4.Easy to use.
PHP is widely used because it is easy to use. In contrast with other programming
languages that are complex, PHP is simple, fluent, clean and organized, hence it is a
boon for the new users. PHP has a well-organized syntax which is logical at the same
time.

PHP does not require any intensive studying or manual to use it. Command functions of
PHP are easily understood as the user can easily figure out from the name of the
commands itself what it does. A person who is new to PHP can still code because the
syntax is somewhat similar to C.
A person who is new to PHP can still code because the syntax is somewhat similar to C.
Hence, if a person who knows C can easily code in PHP. Hence, it is easier to create and
optimize the application using PHP.Speed is the primary need of web development.
There are people who face the challenge of slow internet connection and slow data
speed. Furthermore, a fast loading website is always preferred by people across the
globe.When compared to other programming languages, PHP is found to be
the fastest programming language.

In normal circumstances, it takes a lot of time to connect to the database, when you
attempt to fetch certain data from the database. It takes a lot of time in connecting to the
database, then executing the statement and finally getting the data. PHP performs these
set of tasks faster than other scripting languages. PHP is faster in both connecting to the
database and in using other important applications.

The high speed of PHP gives it an advantage over other scripting languages and gives it
an application in important administrations such as the server administration and mail
functionalities.

Open source.
18
One of the important advantages of PHP is that it is Open Source. Therefore, PHP is
readily available and is entirely free. In contrast to other scripting languages used for
web development which requires the user to pay for the support files, PHP is open to
everyone, anytime and anywhere.

A beginner in PHP need not worry about the support as PHP is maintained and
developed by a large group of PHP developers which helps in creating support
community of PHP that helps people in PHP implementation and manipulation.

MYSQL

MySQL server: - MySQL server is basically a database server which is


mostly used for storing user data into the required database in a specific
table for easy access of these data in the future. The database server
works when a local application invokes it. Before storing data into a
database with the help of database server, PHP sends a SQL query to
MySQL datM address, i.e.,
127.0.0.1 along with the user name and password for getting authentication
from the database server. Since connection is established locally with the
database server by PHP, so there is no chance of getting access to database
server for modifying database by the client. Also , when PHP request for
information retrieval from the database server by sending SQL query then
the database server sends back the result of query after executing it by the
database server. Another method of accessing database server is only
possible by locally, i.e., only administrator of that particular computer can
get all the access facilities of the database server as well as all the database
which are not available to restricted users. PHP can update information in
the database server if it has the administrator username and password to
access thespecific database, otherwise connection will be rejected by
MySQL server and the database cannot be updated.
Since before the dawn of the computer age , people have been using
databases. Before
computers, a database may have been a Rolodex containing phone numbers of the
important people you knew, or it was a filing cabinet that contained all the personnel
records
for the company. Today, databases are computer-based and are found virtually
everywhere.
From desktop databases of your record collection to Web-enabled databases that run
large corporations

Database Tables

The following tables were created for the application:


19
Table Name Description
Admin Manage all contents and actions about the web.
Train List Store details of each train.
Booking Stores details of user and particular train.
Payment Stores the details of all banking information of
user while booking a ticket.
Help Store all the Enquiry of user.
Seats Availability Store seats availability details.
Users Store users details.
Book Store username , mobile number & amount.
InterList Store booking history.

High-level Diagram

Following is a high-level diagram depicting the overall working of the system:

20
CHAPTER – 5

PROJECTION DISCRIPTION

RAILWAY RESERVATION SYSTEM should be able to manage all the reservation related
functions. The system should be distributed in nature. This system is divided into five zones.
Each zone should have same functionalities. Each zone will stores the information about train
name, train schedules, availability. The administrator should be able to enter any change
related to the train information like change in train name, number etc. The system should be
able to reserve seat in a train for a passenger. First the clerk will check for availability for the
seats in a particular train on a specified date of journey. If it is available the clerk will reserve
seats. The passenger will be given a unique PNR no. The system should be able to cancel a
reservation. The clerk will delete the entries in the system. The passenger can check their
reservation status online by entering their PNR no. The system will display his current status
like confirmed, RAC or waiting list. They are also able to see information related to the train
schedules

The system should be able to print the report like it should be able to generate reservation
chart, train report, reservation ticket which will have train no and name, date of journey,
boarding station, destination station, person name, age, [censored], total fare and a unique PNR
no. The system should be able to print the cancellation ticket which will have total fare and the
amount deducted.
The main aim of the project was to develop a website which would facilitate the reservation of
online air tickets through an effective and yet simple GUI for a normal passenger intending to
travel in airways. Apart from reserving tickets, through our system a passenger can compare
online fares ‘from’ various cities ‘to’ various cities.

Brief overview of the technology:


RAILWAY RESERVATION SYSTEM should be able to manage all the reservation related
functions. The system should be distributed in nature. This system is divided into five zones.
Each zone should have same functionalities. Each zone will stores the information
about train name, train schedules, availability. The administrator should be able to
enter any change related to the train information like change in train name, number
etc. The system should be able to reserve seat in a train for a passenger. First the
clerk will check for availability for the seats in a particular train on a specified date
of journey. If it is available the clerk will reserve seats. The passenger will be given a
unique PNR no. The system should be able to cancel a reservation. The clerk will
delete the entries in the system. The passenger can check their reservation status
online by entering their PNR no. The system will display his current status like
confirmed, RAC or waiting list. They are also able to see information related to the
train schedules. PRODUCT PERSPECTIVE Before making this a real time running
21
online reservation system, old system suffered from many of the DRAWBACKS, such
as:
:1.The existing system is highly manual involving a lot of paper work and calculation and
therefore may be erroneous. This has led to inconsistency and inaccuracy in the maintenance of
data.
2.The data, which is stored on the paper only, may be lost, stolen or destroyed due to
any natural calamity of fire or water.
3.Existing system is sluggish and consumes a lot of time, resource etc. causing
inconvenience to customers and staff.
4.Due to manual working, it is difficult to add, delete, update, or view the data.
5.Since number of passengers has increased to an uncertain multiple, it is very difficult
to maintain or retrieve detailed record of passengers.

6.A Railway has many offices around the world, an absence of link between them all causes to a
lack of miscommunication and discoordination. Hence, this Railway reservation system is
proposed, with following benefits:

1.Computerization of reservation system will reduce a lot of daily paperwork and hence
load on the staff of admin department.

2.Machine does all the calculations. Hence, chances of error are low.

3.Reservation, Cancellation or updation lists of Ticket’s can easily be maintained and


retrieved and any required additions, deletion or updation can easily be performed.
This system provides User Name-Password validation, hence unauthorized access is prevented.
PRODUCT FUNCTIONS:

Users with varying levels of familiarity with computers will mostly use this system. With
this in mind, an important feature of this software is that it can be relatively simple to
use. The scope of this project encompasses:

Search: This function allows the user to search for train that is available between two
travel cities namely “Departure City” and “Arrival City” as desired by the traveler. The
System initially prompts the agent for these two column values, the date of the journey,
preferred time slot and the number of passengers. It then displays a list of trains
available with different classes.

Selection: The function allows a particular train to be selected from the displayed list. All
the details of the train are as shown:

Train Number.
22
1.Date, Time and place of departure.
2.Train Duration
3.Fair per head
4.Number of stoppages – 0, 1, 2…

Review: if the seats are available, the software prompts for the booking of train. The
train information is shown, The total fare including taxes is shown and train details are
reviewed before final payment
Travel Information: This system asks for details of all the passenger before the booking
confirmation. Hence, lesser cases of seat issues.
Payment: It requires details of credit/ debit card of the person to make payment and
reserve the required seat, Details such as:

1.Card Number
2.Card Type
3.CVV Number
4.Expiry Date
5.Name on card

Cancellation: System also allow cancellation of existing reservation done, making seats
unreserved for others to book and refunding the money back to the accounts of users
cancelling the tickets.

(The Automated Railway Reservation System diagram showing the overview of the
system’s modules and the relationship of the system to external interface is presented in
Figure 2.1.)

23
24
USER CHARACTERISTICS:
As working on this website will require some basic computer knowledge, we classify
knowledge required by the users in two basic categories:

EDUCATIONAL LEVEL: At least the user of this system should be comfortable with
English Language.
TECHNICAL EXPERTISE: User should be comfortable using general-purpose
applications on the computer system

10
GENERAL CONSTRAINTS:
1.Software Constraints:

This System will run on windows Xp and and higher platform/ operating system
with At least Internet Explorer 8 installed.

ASSUMPTIONS AND DEPENDENCIES:


Every system requires some certain parameters to work, to work as per the requirement,
our system also requires some parameters, and we assume them as fulfilled before using
this system, which are as:

1.Booking agent/ user will be having his/ her own username registered before booking of
any ticket, else, they’ll have to register themselves on our website.
2.This software needs booking agent/ user to have somplete knowledge of railway
reservation system and its working.
3.Software is dependent on access of Internet, as it is a remote application, it is
necessary to have internet acces

11
Specific Requirements:

Requirements refers to the needs of fabricated software to work efficiently and


effectively, some of the requirements of this software are as follows:

EXTERNAL INTERFACE REQUIREMENTS:

External Interface requirements refers to needs of this software’s front end to work
efficiently, the requirements are further classified into certain topics, which are as:

1.User Interfaces:

For the efficient working of the User Interface, i.e. the Front End of the system, the OS
must be having at least Internet Explorer 8 installed. To log into the website.

2.Hardware Interfaces

For the hardware requirements, the SRS specifies the logical characteristics of each
interface b/w the software product and the hardware components. It specifies the
hardware requirements like memory restriction, cache size, processor, RAM etc. those
are required for software to run.

Minimum Hardware Requirements


Processor Pentium
IV HDD 40 GB
RAM 128 MB
Cache 512 kb

12
Preferred Hardware Requirements
Processor Core 2 Duo
E7300 HDD 80 GB
RAM 512 MB
Cache 1 MB L1
Cache 512kb L2

1.Software Interfaces:
For Hosting: Any Windows Operations System with DOS Support and Visual Studio
for development. Primarily Windows 8, having Dream Weaver Installed with a working
LAN connection to be mandatory.
For Using: Any type of Operating System with at Least Internet Explorer Installed and
having minimum of 512 kbps working LAN compulsorily.

1.Communication Interfaces:
Indian Railway’s web-site, www.indianrail.gov.in offers PRS enquiries on the internet
Berth/Seat availability, Passenger Status, Fare, Train Schedule etc,.

National Train Enquiry System (NTES) website, www.trainenquiry.comgives dynamic


information about the running status of any train and its expected arrival/departure at
any given station. Mobile telephone based SMS enquiry service. A new mobile phone
based facility for rail users’ which is. Country wide extension of Universal Rail Enquiry
number “139”through setting up of Interactive Voice Response System (IVRS)

FUNCTIONAL REQUIREMENTS:
Functional requirements refer to the Functions, which were required before and covered
in this system/ software we have developed. Mentioned below are the functions/
features of our newly fabricated software system:

13
Feature #1 - TRAIN DETAILS:
Customers may view the train timing at a date their name and number of tickets.

Feature #2 – RESERVATION:
After checking the number of seats available the customers reserve the tickets.

Feature #3 – BILLING:
After reserving the required amount of tickets, the customer paid the amount.

Feature #4 – CANCELLATION:
If the customers want to cancel the ticket, then half of the amount paid bythe customer will be refunded to
him.

Feature #5 – PERFORMANCE REQUIREMENTS:


It is available during all 24 hours.

Feature #6 – SOFTWARE SYSTEM ATTRIBUTES:


Reliable
Available
Secure

14
USE CASES:

A use case diagram in the Unified Modeling Language (UML) is a type of behavioral diagram
defined by and created from a Use-case analysis. Its purpose is to present a graphical overview of the
functionality provided by a system in terms of actors, their goals (represented as use cases),
and any dependencies between those use cases. The main purpose of a use case diagram is to show
what system functions are performed for which actor. Roles of the actors in the system can be
depicted. Interaction among actors is not shown on the use case diagram. If this interaction
is essential to a coherent description of the desired behavior, perhaps the system or use case boundaries
should be re-examined. Alternatively, interaction among actors can be part of the
assumptions used in the use case.

Use cases: A use case describes a sequence of actions that provide something of measurable value to
anactor and is drawn as a horizontal ellipse.
Actors: An actor is a person, organization, or external system that plays a role in one
or more interactions with the system.
System boundary boxes (optional): A rectangle is drawn around the use cases, called the system
boundary box, to6 indicate the scope of system. Anything within the box represents functionality that is
in scope and anything outside the box is not

(Use Cases for our System are on the next page

15
Use case #1 –Ticket Availability, Reservation type, Booking and Cancellation :

16
Use case #2 – Ticket Booking and Cancellation and money refunding:

17
OBJECTS/ CLASSES:

In software engineering, a class diagram in the Unified Modeling Language(UML) is a


type of static structure diagram that describes the structure of a system by showing the
system's classes, their attributes, operations (or methods), and the relationships among
objects.

The class diagram is the main building block of object-oriented modelling. It is used
both for general conceptual modelling of the systematics of the application, and for
detailed modelling translating the models into programming code. Class diagrams can
also be used for data modeling. The classes in a class diagram represent both the main
elements, interactions in the application, and the classes to be programmed.

Classes are represented with boxes that contain three compartments:

1.The top compartment contains the name of the class. It is printed in bold and centered,
and the first letter is capitalized.
2. The middle compartment contains the attributes of the class. They are left-aligned
and the first letter is lowercase.
3.The bottom compartment contains the operations the class can execute. They are also
left-aligned and the first letter is lowercase

18
In the design of a system, a number of classes are identified and grouped together in a
class diagram that helps to determine the static relations between them. With detailed
modelling, the classes of the conceptual design are often split into a number of
subclasses.

In order to further describe the behavior of systems, these class diagrams can be complemented
by a state diagram or UML state machine.
Classes:
o Train
o Passenger
o RailwayAdministration
o Ticket

20
NON-FUNCTIONAL REQUIREMENTS:
Nonfunctional requirements make up a significant part of the specification. They are
important as the client and user may well judge the product on its non- functional
properties. Provided the product meets its required amount of functionality, the
nonfunctional properties -- how usable, convenient, inviting and secure it is -- may be the
difference between an accepted, well-liked product, and an unused one

1.Performance:
This system helps in increasing the overall performance of the Railway Reservation
functionality by shifting a large chunk of load online causing in less hassle in ticket
booking, cancellation or querying. This System is 22 hours Live per day giving us
greater availability time as compared to that of 9 hours offline activity.

2.Reliability:

The Reliability of the overall project depends on the reliability of the separate components. The
main pillar of reliability of the system is the backup of the database which is continuously
maintained and updated to reflect the most recent changes. Also, the system will be functioning
inside a container. Thus, the overall stability of the system depends on the stability of container
and its underlying operating system.

3.Availability:
The system should be available at all times, meaning the user can access it using a web
browser, only restricted by the down time of the server on which the system runs. A
customer friendly system which is in access of people around the world should work 24
hours. In case of a hardware failure or database corruption, a replacement page will be
shown. Also, in case of a hardware failure or database corruption, backup of the
database should be retrieved from the server and saved by the Organizer. Then the
service will be restarted. It means 24x7 availability.

Security:
This system should work under 3-Level Architecture combining DB-Class- Front end
with different security facilities and encryption. The System use SSL in all transactions
that include any confidential customer information. The system must automatically log
out all customer after a period of inactivity 21
of those users respectively. The system
should not leave any cookies on the customer’s computer containing the user’s
password. The system’s back-end servers shall only be accessible to authenticated
management.

Maintainability:

A commercial database is used for maintaining the database and the application server takes care
of the site. In case of a failure, a re-initialization of the project will be done. Also the software
design is being done with modularity in mind so that maintainability can be done efficiently.
Supportability:

The code and supporting modules of the system will be well documented and easy to
understand. Online user Documentation and Help system requirements.

22
CHAPTER – 5
Screen Shot And Code

After starting the web application this is the front page.


INDEX.PHP

HOME PAGE

Home page is the most popular name for the main page of the website. It is called home as it usually
provides a starting point with many further directions for the user, containing direct links to the most
important areas of interaction with a website. In other words, it can be also named initial page or index
page. Home page is mostly the start of users’ journey if they are directed to the site by search engines
which means that it is the page visited by the biggest number of website users.

Contents of Home Page:- PNR Enquiry , Help Enquiry , Find Train , Train , Reservation , Profile ,
Booking History.

23
HOME PAGE CODE

<?php
session_start();
?>

<!DOCTYPE html>
<html>
<head>
<title> Indian Railways </title>
<link rel="shortcut icon" href="images/favicon.png"></link>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="css/bootstrap.min.css" rel="stylesheet" ></link>
<link href="css/bootstrap.css" rel="stylesheet" ></link>
<link href="css/Default.css" rel="stylesheet" > </link>
<script type="text/javascript" src="js/jquery.js"></script>
<script>
$(document).ready(function()
{
var x=(($(window).width())-1024)/2;
$('.wrap').css("left",x+"px");
});
</script>

<script type="text/javascript" src="js/bootstrap.min.js"></script>


<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/man.js"></script>

</head>

24
<body>

<div class="wrap">
<!-- Header -->
<div class="header">
<div style="float:left;width:150px;">
<img src="images/logo.jpg"/>
</div>
<div>
<div style="float:right; font-size:20px;margin-top:20px;">

<?php
//print_r($_SESSION);
if(isset($_SESSION['name']))
{
echo "Welcome,".$_SESSION['name']."&nbsp;&nbsp;&nbsp;<a
href=\"logout.php\" class=\"btn btn-info\">Logout</a>";
}
else
{
?>
<a href="login1.php" class="btn btn-
info">Login</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="signup.php?value=0" class="btn btn-info">Signup</a>
<?php } ?>

</div>
<div id="heading">
<a href="index.php">Indian Railways</a>
</div>
</div>
</div>

25
<!-- Navigation bar -->
<div class="navbar navbar-inverse">
<div class="navbar-inner">
<div class="container" >
<a class="brand" href="index.php" >HOME</a>
<a class="brand" href="PNR.php" >PNR ENQUIRY</a>
<a class="brand" href="Help.php" >HELP ENQUIRY</a>

<a class="brand" href="train.php" >FIND TRAIN</a>


<a class="brand" href="reservation.php">RESERVATION</a>
<a class="brand" href="profile.php">PROFILE</a>
<a class="brand" href="booking_h.php">BOOKING HISTORY</a>
</div>
</div>
</div>
<div class="span12 well">
<!-- Photos slider -->
<div id="myCarousel" class="carousel slide" style="width:600px;
float:left;margin-bottom:3px;">
<div class="carousel-inner">
<div class="active item"><img src="images/6.jpg"
style="width:600px;height:350px;"/></div>
<div class="item"><img src="images/7.jpg"
style="width:600px;height:350px;"/> </div>
<div class="item"><img src="images/8.jpg"
style="width:600px;height:350px;"/></div>
<div class="item"><img src="images/9.jpg"
style="width:600px;height:350px;"/></div>
<div class="item"><img src="images/10.jpg"
style="width:600px;height:350px;"/> </div>
<div class="item"><img
src="images/11.png"style="width:600px;height:350px;"/></div>

26
</div>
<a class="carousel-control left" href="#myCarousel" data-
slide="prev">&lsaquo;</a>
<a class="carousel-control right" href="#myCarousel" data-
slide="next">&rsaquo;</a>
</div>
<!-- News and Alert-->
<div class="news" Style="float:right;">
<marquee behavior="scroll" id="marq" scrollamount=3 direction="up"
height="294px" onmouseover="nestop()" onmouseout="nestrt()">
<div>
<p><b>There is no proposal to extend to mail/express and superfast trains
the flexi-fares currently applicable only to Rajdhani, Shatabdi and Duronto trains, said Railways
Minister Suresh Prabhu.</b></p>
</br>
<p><b>The Railway ministry has posted the rate list on its Twitter
account while asking people to lodge a complaint if they are overcharged.</b></p></br>
<p><b>The Comptroller and Auditor General (CAG) has asked the
railways to revise passenger fares and curtail concessional passes to recover its operating cost in a
phased manner.</b></p></br>
<p><b>Railway issues new catering policy for better food.</b></p></br>
<p><b>Passengers will now be involved in judging cleanliness level of
popular trains including Rajdhani, Shatabdi and Duronto as well as major stations across the
country.</b><p></br>
</div>
</marquee>
</div>
</div>
<!-- Copyright -->
<footer >
<div style="width:100%;">
<div style="float:left;">

27
<p class="text-right text-info"> &copy; bantykuar9999@gmail.com</p>
</div>
<div style="float:right;">
<p class="text-right text-info"> Desinged By : HIMANSHU</p>
</div>
</div>
</footer>
</div>
</body>
</html>
<?php
if(isset($_SESSION['error']))
{
session_destroy();
?>

PNR STATUS PAGE

The PNR status refers to the booking status of the train ticket. It states whether the ticket has been
confirmed, on waiting list (WL) or is under reservation against cancellation (RAC). ... The PNR number
of a ticket is generally printed on the top left corner of the ticket.
If you read this on your live PNR status, you've got a 'Confirmed' ticket. ... WL – 'Waiting List' meaning
that you're lined up to get a confirmed ticket only if one decides to cancel their booking. If the chart has
28
been prepared and your IRCTCPNR status still says WL, you cannot board the train
To check your current reservation status enter 10 digit PNR Number in the text box given above and
click 'Get PNR Status' button.
You can check passenger reservation status of your ticket or IRCTC pnr statusthrough mobile by
sending SMS to any of these numbers.
Their system creates a 10-digit PNR status number every time a person buys an Indian Railways ticket.
In case of group booking, a single PNR number can have a maximum of six passengers. The first
3 digits of the PNR tell us from which Passenger Reservation System or PRS the ticket has been booked.

PNR STATUS PAGE CODE

<?php
//session_start();
require('dbconfig.php');
require('firstimport.php');
$tbl_name="interlist";
?>
<!DOCTYPE html>
<html>
<head>
<title> Find Train </title>
<link rel="shortcut icon" href="images/favicon.png"></link>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="css/bootstrap.min.css" rel="stylesheet">
</link>
<link href="css/Default.css" rel="stylesheet">
</link>
<script type="text/javascript" src="js/jquery.js"></script>
<script>
$(document).ready(function()
29
{
var x=(($(window).width())-1024)/2;
$('.wrap').css("left",x+"px");
});
</script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/man.js"></script>
</head>
<body>
<div class="wrap">
<!-- Header -->
<div class="header">
<div style="float:left;width:150px;">
<img src="images/logo.jpg"/>
</div>
<div>
<div style="float:right; font-size:20px;margin-top:20px;">
<?php
if(isset($_SESSION['name']))
{
echo "Welcome,".$_SESSION['name']."&nbsp;&nbsp;&nbsp;<a
href=\"logout.php\" class=\"btn btn-info\">Logout</a>";
}
?>
</div>
<div id="heading">
<a href="index.php">Indian Railways</a>
</div>
</div>
</div>
<div class="navbar navbar-inverse" >
<div class="navbar-inner">

30
<div class="container" >
<a class="brand" href="index.php" >HOME</a>
<a class="brand" href="PNR.php" >PNR ENQUIRY</a>
<a class="brand" href="Help.php" >HELP ENQUIRY</a>

<a class="brand" href="train.php" >FIND TRAIN</a>


<a class="brand" href="reservation.php">RESERVATION</a>
<a class="brand" href="profile.php">PROFILE</a>
<a class="brand" href="booking_h.php">BOOKING HISTORY</a>
</div>
</div>
</div>
<div class="span12 well" id="boxh">

<form style="margin:0px;" method="post" >


<table class="table" style="margin-bottom:0px;">
<tr>
<th style="border-top:0px;"><label><b>Enter PNR
Number</label></th>
<td style="border-top:0px;"><input id="xbox1" type="text"
class="input-block-level" name="pnr" ></td>
<td style="border-top:0px;"><input class="btn btn-info"
name="submit" type="submit" value="Submit"> </td>
</tr>
</table>
</form>
</div>
<!-- display result --><?php
if(isset($_POST['submit']))
{

$pnr=$_POST['pnr'];
//$from=strtoupper($from);

31
//$to=strtoupper($to);
$sql="SELECT * FROM `booking` WHERE PNR='$pnr'";
$result=select($sql);
while($r= mysqli_fetch_array($result))
{
?>
<div class="span12 well">
<div class="display" >
<table class="table" border="5px">
<tr>
<th style="width:70px;border-top:0px;"> username</th>
<th style="width:210px;border-top:0px;"> Train Number</th>
<th style="width:65px;border-top:0px;"> Class </th>
<th style="width:55px;border-top:0px;"> From </th>
<th style="width:60px;border-top:0px;"> To</th>
<th style="width:65px;border-top:0px;"> Name</th>
<th style="width:20px;border-top:0px;"> Status</th>
</tr>
<tr>
<th style="width:70px;border-top:0px;"> <?=$r['uname']?></th>
<th style="width:210px;border-top:0px;">
<?=$r['Tnumber']?></th>
<th style="width:65px;border-top:0px;"> <?=$r['class']?></th>
<th style="width:55px;border-top:0px;"> <?=$r['fromstn']?></th>
<th style="width:60px;border-top:0px;"> <?=$r['tostn']?></th>
<th style="width:65px;border-top:0px;"> <?=$r['Name']?></th>
<th style="width:20px;border-top:0px;"> <?=$r['Status']?></th>
</tr>
</table>
</div>

</div>
</div>

32
<?php
}
}
?>
<footer >
<div style="width:100%;">
<div style="float:left;">
<p class="text-right text-info"> &copy; bantykuar9999@gmail.com</p>
</div>
<div style="float:right;">
<p class="text-right text-info"> Desinged By :HIMANSHU </p>
</div>
</div>
</footer> </div>
</body>
</html>

HELP ENQUIRY

33
A web search query is a query based on a specific search term that a user enters into a web search engine
to satisfy his or her information needs. Web search queries are distinctive in that they are often plain text
or hypertext with optional search-directives (such as "and"/"or" with "-" to exclude).
1. Ask. ...
2. 2. Make it easy for people to contact you. ...
3. Just ask for their name and email address. ...
4. Get your full contact details into the 'signature' of your emails. ...
5. Search Engine Optimisation or SEO. ...
6. Professionally written copy. ...
7. Network online.

HELP ENQUIRY PAGE CODE

<?php
//session_start();
require('dbconfig.php');
require('firstimport.php');
$tbl_name="interlist";
?>
<!DOCTYPE html>
<html>
<head>
<title> Find Train </title>
<link rel="shortcut icon" href="images/favicon.png"></link>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="css/bootstrap.min.css" rel="stylesheet">
</link>
<link href="css/Default.css" rel="stylesheet">
</link>
<script type="text/javascript" src="js/jquery.js"></script>
<script>
34
$(document).ready(function()
{
var x=(($(window).width())-1024)/2;
$('.wrap').css("left",x+"px");
});
</script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/man.js"></script>
</head>
<body>
<div class="wrap">
<!-- Header -->
<div class="header">
<div style="float:left;width:150px;">
<img src="images/logo.jpg"/>
</div>
<div>
<div style="float:right; font-size:20px;margin-top:20px;">
<?php
if(isset($_SESSION['name']))
{
echo "Welcome,".$_SESSION['name']."&nbsp;&nbsp;&nbsp;<a
href=\"logout.php\" class=\"btn btn-info\">Logout</a>";
}
?>
</div>
<div id="heading">
<a href="index.php">Indian Railways</a>
</div>
</div>
</div>
<div class="navbar navbar-inverse" >

35
<div class="navbar-inner">
<div class="container" >
<a class="brand" href="index.php" >HOME</a>
<a class="brand" href="PNR.php" >PNR ENQUIRY</a>
<a class="brand" href="Help.php" >HELP ENQUIRY</a>
<a class="brand" href="train.php" >FIND
TRAIN</a>
<a class="brand" href="reservation.php">RESERVATION</a>
<a class="brand" href="profile.php">PROFILE</a>
<a class="brand" href="booking_h.php">BOOKING HISTORY</a>
</div>
</div>
</div>
<div class="span12 well" id="boxh"><h3 style="color:#0089C7">HELP ENQUIRY</h3>
<div style="margin-left:300px">
<form method="post" class="form">
<div class="form-group">
<label>Name-<label>
<input type="text" class="form-control" name="name"
placeholder="Name"></div>
<div class="form-group">
<label>Mobile Number-<label>
<input type="text" class="form-control" name="mobile" placeholder="Mobile"></div>
<div class="form-group"><label>Help-<label>
<textarea name="help" class="form-control"> Type Here..</textarea>
</div>
<input type="submit" name="submit" class="btn btn-success">
</form>
</div>
</div>
<!-- display result --><?php
if(isset($_POST['submit']))
{

36
extract($_POST);
//$pnr=$_POST['pnr'];
//$from=strtoupper($from);
//$to=strtoupper($to);
$sql="INSERT INTO `Help`( `name`, `mobile`, `help`) VALUES ('$name', '$mobile', '$help') ";
$n=iud($sql);
if($n==1)
{
echo'<script>alert("Successful")</script>';
}
}
?>
<footer >
<div style="width:100%;">
<div style="float:left;">
<p class="text-right text-info"> &copy; bantykuar9999@gmail.com</p>
</div>
<div style="float:right;">
<p class="text-right text-info"> Desinged By : HIMANSHU</p>
</div>
</div>
</footer> </div>
</body>
</html>

37
Find train

Login Page. The login page allows a user to gain access to an application by entering their username
and password or by authenticating using a social media login.

After login this page is open and in this page there are two parts one is TRAIN INFORMATION
which is atomatically comes from the train details page and other part is PERSONAL DETAILS
which is filled by user.

FIND TRAIN PAGE CODE


<?php
session_start();
require('firstimport.php');
$tbl_name="interlist";
mysqli_select_db($conn,"$db_name") or die("cannot select db");
$k=0;
if(isset($_POST['byname']) && ($_POST['bynum']==""))
{
$name1=$_POST['byname'];
$k=2;
$name1=strtoupper($name1);
$tbl_name="train_list";
$sql="SELECT * FROM $tbl_name WHERE Number='$name1' or Name='$name1' ";
$result=mysqli_query($conn,$sql);
}
else if(isset($_POST['byname']) && isset($_POST['bynum']))
38
{
$k=1;
$from=$_POST['byname'];
$to=$_POST['bynum'];
$from=strtoupper($from);
$to=strtoupper($to);
$sql="SELECT * FROM $tbl_name WHERE (Ori='$from' or st1='$from' or st2='$from' or
st3='$from' or st4='$from' or st5='$from') and (st1='$to' or st2='$to' or st3='$to' or st4='$to' or st5='$to'
or Dest='$to')";
$result=mysqli_query($conn,$sql);
}
else if((!isset($_POST['byname'])) && (!isset($_POST['bynum'])))
{
$k=0;
$from="";
$to="";
}
?>
<!DOCTYPE html>
<html>
<head>
<title> Find Train </title>
<link rel="shortcut icon" href="images/favicon.png"></link>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="css/bootstrap.min.css" rel="stylesheet">
</link>
<link href="css/Default.css" rel="stylesheet">
</link>
<script type="text/javascript" src="js/jquery.js"></script>
<script>
$(document).ready(function()
{
var x=(($(window).width())-1024)/2;
$('.wrap').css("left",x+"px");
});

</script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/man.js"></script>
</head>
<body>
<div class="wrap">
<!-- Header -->
<div class="header">
<div style="float:left;width:150px;">
<img src="images/logo.jpg"/>
39
</div>
<div>
<div style="float:right; font-size:20px;margin-top:20px;">
<?php
if(isset($_SESSION['name']))
{
echo "Welcome,".$_SESSION['name']."&nbsp;&nbsp;&nbsp;<a
href=\"logout.php\" class=\"btn btn-info\">Logout</a>";
}
?>
</div>
<div id="heading">
<a href="index.php">Indian Railways</a>
</div>
</div>
</div>
<div class="navbar navbar-inverse" >
<div class="navbar-inner">
<div class="container" >
<a class="brand" href="index.php" >HOME</a>
<a class="brand" href="PNR.php" >PNR ENQUIRY</a>
<a class="brand" href="Help.php" >HELP ENQUIRY</a>

<a class="brand" href="train.php" >FIND TRAIN</a>


<a class="brand" href="reservation.php">RESERVATION</a>
<a class="brand" href="profile.php">PROFILE</a>
<a class="brand" href="booking_h.php">BOOKING HISTORY</a>
</div>
</div>
</div>
<div class="span12 well" id="boxh">
<form style="margin:0px;" method="post" >
<table class="table" style="margin-bottom:0px;">
<tr>
<th style="border-top:0px;"><label><b>Search
Train</label></th>
<td style="border-top:0px;">
<select id="myselect" onchange="clicker()">
<option value="plf">By Station</option>
<option value="name" >By Name</option>
<option value="num" >By Number</option>
</select>
</td>
<td id="mbox" style="border-top:0px;"> <label>From
</label></td>
<td style="border-top:0px;"><input type="text" class="input-
block-level" name="byname" id="byn"></td>
<td id="xbox" style="border-top:0px;"><label> To </label></td>
<td style="border-top:0px;"><input id="xbox1" type="text"
class="input-block-level" name="bynum" ></td>
40
<td style="border-top:0px;"><input class="btn btn-info"
type="submit" value="Find"> </td>
<td style="border-top:0px;"><a href="train.php" class="btn btn-
info" type="reset" value="Reset">Reset</a></td>
</tr>
</table>
</form>
</div>
<!-- display result -->
<div class="span12 well">
<div class="display" style="height:30px;">
<table class="table" border="5px">
<tr>
<th style="width:70px;border-top:0px;"> Train No.</th>
<th style="width:210px;border-top:0px;"> Train Name </th>
<th style="width:65px;border-top:0px;"> Orig. </th>
<th style="width:55px;border-top:0px;"> Des. </th>
<th style="width:60px;border-top:0px;"> Arr. </th>
<th style="width:65px;border-top:0px;"> Dep. </th>
<th style="width:20px;border-top:0px;"> M </th>
<th style="width:25px;border-top:0px;"> T </th>
<th style="width:29px;border-top:0px;"> W </th>
<th style="width:25px;border-top:0px;"> T </th>
<th style="width:25px;border-top:0px;"> F </th>
<th style="width:25px;border-top:0px;"> S </th>
<th style="border-top:0px;"><font color=red> S </font></th>
</tr>
</table>
</div>
<div class="display" style="margin-top:0px;overflow:auto;">
<table class="table" >
<?php
if($k==1)
{ echo "<script>
document.getElementById(\"byn\").value=\"$from\";

document.getElementById(\"xbox1\").value=\"$to\";
</script>";
$n=0;
while($row=mysqli_fetch_array($result)){
//$q="from: ".$from;
if($from==$row['st1'])
{ $q=$row['st1arri'];
//echo $q;
}
else
if($from==$row['st2'])
{ $q=$row['st2arri']; }
else if($from==$row['st3'])
{ $q=$row['st3arri']; }
41
else if($from==$row['st4'])
{ $q=$row['st4arri']; }
else if($from==$row['st5'])
{ $q=$row['st5arri']; }
else if($from==$row['Ori'])
{ $q=$row['Oriarri']; }
else if($from==$row['Dest'])
{ $q=$row['Destarri'];}

$p1=substr($q,0,2);
$p2=substr($q,3,2);
$p2=$p2+5;
if($p2<10)
{$p2="0".$p2;}
$d=$p1.":".$p2;
if($n%2==0)
{
?>
<tr class="text-error">
<td style="width:70px;"><?php echo $row['Number']; ?> </td>
<td style="width:210px;"> <?php echo $row['Name']; ?> </td>
<td style="width:65px;"> <?php echo $row['Ori']; ?> </td>
<td style="width:55px;"> <?php echo $row['Dest']; ?> </td>
<td style="width:60px;"> <?php echo $q; ?> </td>
<td style="width:65px;"> <?php echo $d; ?> </td>
<td style="width:20p;"><?php echo $row['Mon']; ?> </td>
<td style="width:25px;"> <?php echo $row['Tue']; ?> </td>
<td style="width:29px;"> <?php echo $row['Wed']; ?> </td>
<td style="width:25px;"> <?php echo $row['Thu']; ?> </td>
<td style="width:25px;"> <?php echo $row['Fri']; ?> </td>
<td style="width:25px;"> <?php echo $row['Sat']; ?> </td>
<td> <?php echo $row['Sun']; ?> </td>
</tr>
<?php
}
else
{
?>
<tr class="text-info">
<td style="width:80px;"> <?php echo $row['Number']; ?> </td>
<td style="width:210px;"> <?php echo $row['Name']; ?> </td>
<td style="width:65px;"> <?php echo $row['Ori']; ?> </td>
<td style="width:60px;"> <?php echo $row['Dest']; ?> </td>
<td style="width:70px;"> <?php echo $q; ?> </td>
<td style="width:55px;"> <?php echo $d; ?> </td>
<td style="width:20p;"> <?php echo $row['Mon']; ?> </td>
<td style="width:25px;"> <?php echo $row['Tue']; ?> </td>
<td style="width:29px;"> <?php echo $row['Wed']; ?> </td>
<td style="width:25px;"> <?php echo $row['Thu']; ?> </td>
<td style="width:25px;"> <?php echo $row['Fri']; ?> </td>
42
<td style="width:25px;"> <?php echo $row['Sat']; ?> </td>
<td> <?php echo $row['Sun']; ?> </td>
</tr>
<?php
}
$n++;
}
}
else if($k==2)
{ $n=0;
while($row=mysqli_fetch_array($result)){
if($n%2==0)
{
?>
<tr class="text-error">
<td style="width:80px;"> <?php echo $row['Number']; ?> </td>
<td style="width:210px;"> <?php echo $row['Name']; ?> </td>
<td style="width:65px;"> <?php echo $row['Origin']; ?> </td>
<td style="width:60px;"> <?php echo $row['Destination']; ?>
</td>
<td style="width:70px;"> <?php echo $row['Arrival']; ?> </td>
<td style="width:55px;"> <?php echo $row['Departure']; ?> </td>
<td style="width:20p;"> <?php echo $row['Mon']; ?> </td>
<td style="width:25px;"> <?php echo $row['Tue']; ?> </td>
<td style="width:29px;"> <?php echo $row['Wed']; ?> </td>
<td style="width:25px;"> <?php echo $row['Thu']; ?> </td>
<td style="width:25px;"> <?php echo $row['Fri']; ?> </td>
<td style="width:25px;"> <?php echo $row['Sat']; ?> </td>
<td> <?php echo $row['Sun']; ?> </td>
</tr>
<?php
}
else
{
?>
<tr class="text-info">
<td style="width:80px;"> <?php echo $row['Number']; ?> </td>
<td style="width:210px;"> <?php echo $row['Name']; ?> </td>
<td style="width:65px;"> <?php echo $row['Origin']; ?> </td>
<td style="width:60px;"> <?php echo $row['Destination']; ?>
</td>
<td style="width:70px;"> <?php echo $row['Arrival']; ?> </td>
<td style="width:55px;"> <?php echo $row['Departure']; ?> </td>
<td style="width:20p;"> <?php echo $row['Mon']; ?> </td>
<td style="width:25px;"> <?php echo $row['Tue']; ?> </td>
<td style="width:29px;"> <?php echo $row['Wed']; ?> </td>
<td style="width:25px;"> <?php echo $row['Thu']; ?> </td>
<td style="width:25px;"> <?php echo $row['Fri']; ?> </td>
<td style="width:25px;"> <?php echo $row['Sat']; ?> </td>
<td> <?php echo $row['Sun']; ?> </td>
43
</tr>
<?php
}
$n++;
}
}
else
{
echo "<div class=\"alert alert-error\" style=\"margin:100px 350px;\">
please search the train.. </div>";
}
mysqli_close($conn);
?>
</table>
</div>
</div>

<footer >
<div style="width:100%;">
<div style="float:left;">
<p class="text-right text-info"> &copy; bantykuar9999@gmail.com</p>
</div>
<div style="float:right;">
<p class="text-right text-info"> Desinged By : HIMANSHU</p>
</div>
</div>
</footer> </div>
</body>
</html>

44
CREATE NEW USER

For a new user there is a hyperlink by which user can create a new account.

SIGNUP PAGE CODE

<?php
$val=$_GET['value'];
if($val==1){
?>
<h3>USer already exists</h3
<?php
}
?>
45
<!DOCTYPE html>
<html>
<head>
<title> Registration </title>
<link rel="shortcut icon" href="images/favicon.png"></link>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="css/bootstrap.min.css" rel="stylesheet">
</link>
<link href="css/Default.css" rel="stylesheet">
</link>
<script type="text/javascript" src="js/jquery.js"></script>
<script>
$(document).ready(function()
{
//alert($(window).width());
var x=(($(window).width())-1024)/2;
//alert(x);
$('.wrap').css("left",x+"px");
});

</script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/man.js"></script>

</head>

<body>

<div class="wrap">
<!-- Header -->
<div class="header">
<div style="float:left;width:150px;">
<img src="images/logo.jpg"/>
</div>
<div id="heading">
<a href="index.php">Indian Railways</a>
</div>
</div>
<!-- Navigation bar -->
<div class="navbar navbar-inverse" >
<div class="navbar-inner">
<div class="container" >
<a class="brand" href="index.php" >HOME</a>
<a class="brand" href="PNR.php" >PNR ENQUIRY</a>
<a class="brand" href="Help.php" >HELP ENQUIRY</a>

46
<a class="brand" href="train.php" >FIND TRAIN</a>
<a class="brand" href="reservation.php">RESERVATION</a>
<a class="brand" href="profile.php">PROFILE</a>
<a class="brand" href="booking_h.php">BOOKING
HISTORY</a>
</div>
</div>
</div>

<!-- registration form -->


<div align="center">
<div class="span12 well">
<div style="font-size:30px;"> Signup</div>
<br/>
<div class="table">
<form name="signup" method="post" action="register.php" onsubmit="return
valid12()">
<table>
<tr>
<td style="border-top:0px;"> First Name <font color=red>* </font></td>
<td style="border-top:0px;"><input type="text" name="fname"
class="input-block-level" placeholder="Enter the First name" onblur="return name1()"><span
id="fn"></span></td>
</tr>
<tr>
<td style="border-top:0px;"> Last Name <font color=red>* </font> </td>
<td style="border-top:0px;"><input type="text" name="lname"
class="input-block-level" placeholder="Enter the Last name" onblur="return name12()"><span
id="ln"></span></td>
</tr>
<tr>
<td style="border-top:0px;"> Email ID <font color=red>* </font> </td>
<td style="border-top:0px;"><input type="email" class="input-block-
level" name="eid" placeholder="Enter the valid email id"></td>
</tr>
<tr>
<td style="border-top:0px;"> Password <font color=red>* </font> </td>
<td style="border-top:0px;"><input type="password" class="input-block-
level" name="psd" placeholder="Enter the password" onblur="return check1()"> <span id="ps"
></span></td>
</tr>
<tr>
<td style="border-top:0px;"> Confirm Password <font color=red>*
</font> </td>
<td style="border-top:0px;"><input type="password" class="input-block-
level" name="cpsd" placeholder="Re-type the password" onblur="return confirm1()"> <span
id="cps" ></span></td>
</tr>

<tr>
47
<td style="border-top:0px;"> Gender <font color=red>* </font> </td>
<td style="border-top:0px;"><select name="gnd">
<option value="male">MALE</option>
<option value="female">FEMALE</option>
</select>
</td>
</tr>
<tr>
<td style="border-top:0px;">Marital Status <font color=red>* </font>
</td>
<td style="border-top:0px;"><select name="mrt">
<option value="married">Married</option>
<option value="unmarried">Unmarried</option>
</select>
</td>
</tr>
<tr>
<td style="border-top:0px;"> Date of Birth <font color=red>*
</font></td>
<td style="border-top:0px;"><input type="date" class="input-block-level
input-medium" name="dob" max="<?php echo date('Y-m-d',time()-60*60*24*365*18);?>"
value="<?php echo date('Y-m-d',time()-60*60*24*365*18);?>"> </td>
</tr>
<tr>
<td style="border-top:0px;"> Mobile No. <font color=red>*</font> </td>
<td style="border-top:0px;"> +91 <input type="text" class="input-block-
level" name="mobile" placeholder="" onblur="return mobile1()"> <span
id="mn"></span></td>
</tr>
<tr>
<td style="border-top:0px;"> Security Question <font color=red>*
</font></td>
<td style="border-top:0px;">
<select name="ques">
<option value="What is your pets name ?">What is your pets
name ?</option>
<option value="What was the name of your first school?">What
was the name of your first school?</option>
<option value="What is your favorite hero?">What is your favorite
hero?</option>
<option value="What is your favorite movie?">What is your
favorite movie?</option>
</select>
</td>
</tr>
<tr>
<td style="border-top:0px;"> Your Answer <font color=red>*
</font></td>
<td style="border-top:0px;"> <input type="text" name="ans"
class="input-block-level" placeholder="Enter the your answer" onblur="return ans1()"><span
48
id="an"></span></td>
</tr>
<tr>
<td style="border-top:0px;"><input class="btn btn-info"type="submit"
value="submit" id="subb" ></td>
<td style="border-top:0px;"><input class="btn btn-info"type="reset"
value="Reset"></td>
</tr>
</table>
</form>
</div>
</div>
</div>
<!-- Footer -->
<footer >
<div style="width:100%;">
<div style="float:left;">
<p class="text-right text-info"> &copy; bantykuar9999@gmail.com</p>
</div>
<div style="float:right;">
<p class="text-right text-info"> Desinged By : HIMANSHU</p>
</div>
</div>
</footer>
</div>
</body>
</html>

PROFILE PAGE:
49
PROFILE PAGE CODE
<?php
session_start();
if(isset($_SESSION['name'])){}
else{
header("location:login1.php");
}
$tbl_name="users"; // Table name
$name=$_SESSION['name'];

require('firstimport.php');
mysqli_select_db($conn,"$db_name") or die("cannot select db");
$result=mysqli_query($conn,"SELECT * FROM $tbl_name WHERE f_name='$name'");
$row=mysqli_fetch_array($result);
?>
<!DOCTYPE html>
<html>
<head>
<title> Profile </title>
<link rel="shortcut icon" href="images/favicon.png"></link>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="css/bootstrap.min.css" rel="stylesheet">
</link>
<link href="css/Default.css" rel="stylesheet">
</link>
<script type="text/javascript" src="js/jquery.js"></script>
<script>
$(document).ready(function()
{
//alert($(window).width());
var x=(($(window).width())-1024)/2;
//alert(x);
$('.wrap').css("left",x+"px");
});
</script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/man.js"></script>
</head>
<body>
<div class="wrap">
<!-- Header -->
<div class="header">
<div style="float:left;width:150px;">
<img src="images/logo.jpg"/>
50
</div>
<div>
<div style="float:right; font-size:20px;margin-top:20px;">
<?php
if(isset($_SESSION['name']))
{
echo "Welcome,".$_SESSION['name']."&nbsp;&nbsp;&nbsp;<a
href=\"logout.php\" class=\"btn btn-info\">Logout</a>";
}
else
{
$_SESSION['error']=15;
//echo "fgfggy".$_SESSION['error'];
header("location:login1.php");
}
?>
</div>
<div id="heading">
<a href="index.php">Indian Railways</a>
</div>
</div>
</div>
<!-- Navigation bar -->
<div class="navbar navbar-inverse" >
<div class="navbar-inner">
<div class="container" >
<a class="brand" href="index.php" >HOME</a>
<a class="brand" href="PNR.php" >PNR ENQUIRY</a>
<a class="brand" href="Help.php" >HELP ENQUIRY</a>
<a class="brand" href="train.php" >FIND TRAIN</a>
<a class="brand" href="reservation.php">RESERVATION</a>
<a class="brand" href="profile.php">PROFILE</a>
<a class="brand" href="booking_h.php">BOOKING HISTORY</a>
</div>
</div>
</div>
<div class="span12 well pass1">
<table style="width:100%;">
<tr>
<td><span style="font-weight:bold;font-size:25px;">Profile</span>
<a id="editp1" style="float:right;margin-right:5%;"class="btn btn-info">
Edit Profile</a></td>
<tr/>
<tr>
<td>
<div class="span8" style="float:left;width:80%;">
<table class="table">
<tr><td >First Name : </td> <td style="text-
transform:capitalize;"><?php echo $row['f_name']; ?></td></tr>
<tr><td >Last Name : </td> <td style="text-
51
transform:capitalize;"><?php echo $row['l_name']; ?></td></tr>
<tr><td>E-Mail : </td> <td><?php echo
$row['email'];?></td></tr>
<tr><td>Dob : </td> <td><?php echo $row['dob']; ?></td></tr>
<tr><td> Gender :</td> <td><?php echo
$row['gender'];?></td></tr>
<tr><td>Marital Status : </td> <td><?php echo $row['marital'];
?></td></tr>
<tr><td>Mobile No : </td> <td><?php echo
$row['mobile'];?></td></tr>
<tr><td>Security Question : </td> <td><?php echo $row['ques'];
?></td></tr>
<tr><td>Answer : </td> <td><?php echo $row['ans']; ?></td></tr>
<tr><td></td> <td></td></tr>
</table>
</div>
</td>
</tr>
<tr>
<td>
<span style="width:35%;"><a id="cpass">Change Password</a></span>
<span class="label label-success" id="chang"
style="float:right;display:none;">Password Successfully Changed &nbsp;&nbsp;&nbsp;<span> <!--
display:none; color:#0000ff;-->
</td>
</tr>
</table>
</div>
<div class="span12 pass2 " style="display:none;">
<div class="span4 well">
<h2>Change Password</h2>
<br/>
<br/>
<form action="changepass.php" method="get" onsubmit="return fgth()">
<label>New Password</label><input id="p1" name ="new1"
type="password" class="input-large" onkeyup="return check123()"><span id="ps"
></span></td><br><br> <!-- onkeyup=="check()" -->
<label>Repeat Password</label><input id="p2" name="pass"
class="input-large" type="password" onkeyup="checkk()">
<br /><span id="match"
style="color:#ff0000;visibility:hidden;">&nbsp;&nbsp;Password Don't Match</span><br><br>
<input id="sub" type="submit" disabled="disabled" class="btn btn-info"
value="Change Password">
</form>
</div>
</div>
<div class="span12 pass3 " style="display:none;">
<div class="span8 well">
<table style="width:100%;">
<tr>
52
<td><span style="font-weight:bold;font-size:25px;">Profile</span>
<tr/>
<tr>
<td>
<form action="editprofile.php" method="post"
enctype="multipart/form-data">
<div class="span6" style="float:left;width:80%;">
<table class="table"> <tr><td >First
Name </td> <td style="text-transform:capitalize; onblur="return name1()"><?php echo
$name;?></td></tr>
<tr><td> Last name </td> <td><input name="ln" type="text"
value="<?php echo $row['l_name'];?>"></td></tr>
<tr><td>E-Mail </td> <td><input name="mail1" type="mail"
value="<?php echo $row['email'];?>"></td></tr>
<tr><td>Dob </td> <td><input name="dob1" type="text"
value="<?php echo $row['dob'];?>"></td></tr>
<tr><td>Gender </td> <td><input name="gnd1" type="text"
value="<?php echo $row['gender'];?>"></td></tr>
<tr><td>Marital Status </td> <td><input name="mrt1"
type="text" value="<?php echo $row['marital'];?>"></td></tr>
<tr><td>Mobile No. </td> <td><input name="mon1" type="text"
value="<?php echo $row['mobile'];?>"></td></tr>
<tr><td>Security Question </td> <td><input name="que1"
type="text" value="<?php echo $row['ques'];?>"></td></tr>
<tr><td>Answer </td> <td><input name="ans1" type="text"
value="<?php echo $row['ans'];?>"></td></tr>
<tr><td></td> <td><input type="submit" value="Save Profile"
class="btn btn-info"></td></tr>
</table>
</div>
</form>
</td>
</tr>
</table>
</div>
</div>

<footer >
<div style="width:100%;">
<div style="float:left;">
<p class="text-right text-info"> &copy; bantykuar9999@gmail.com</p>
</div>
<div style="float:right;">
<p class="text-right text-info"> Desinged By : HIMANSHU</p>
</div>
</div>
</footer>
</div>
<?php mysqli_close($conn); ?>
<script type="text/javascript">
53
$(document).ready(function(){
$("#cpass").click(function(){
$(".pass1").fadeOut(1000,"linear",function(){$(".pass2").fadeIn(1000);});
});
});
$(document).ready(function(){
$("#editp1").click(function(){
$(".pass1").fadeOut(1000,"linear",function(){$(".pass3").fadeIn(1000);});
});
});
$(document).ready(function(){
$("#editp2").click(function(){
$(".pass3").fadeOut(1000,"linear",function(){$(".pass1").fadeIn(1000);});
});
});
function checkk(){
var p1=document.getElementById("p1").value;
var p2=document.getElementById("p2").value;
//alert(" p1 : "+p1+" p2 : "+p2);
if(p1 == p2)
{document.getElementById("match").style.visibility="hidden";
document.getElementById("sub").disabled=false;
}else
{
document.getElementById("match").style.visibility="";
document.getElementById("sub").disabled=true;
}
}
function check123()
{ var c=document.getElementById("p1").value;
//alert(c.length);
if(c.length < 8 )
{
document.getElementById("ps").innerHTML="<br/><font color=red>password
must be atleast 8 - 32 char long</font>";
return false;
}
else
{
document.getElementById("ps").innerHTML="";
return true;
}
}
</script>
<?php
if(isset($_SESSION['error']))
{
if($_SESSION['error']==6)
{echo "<script>document.getElementById(\"chang\").style.display=\"\";</script>";
}
54
//unset($_SESSION['error']);
}
?>
</body>
</html>

This is profile page which shows all the personal details of the log in account user.

BOOKING HISTORY
This page show all the resvervation booking datails

BOOKING HISTORY PAGE CODE


<?php
session_start();
require('firstimport.php');
if(isset($_SESSION['name'])){}
else{
header("location:login1.php");
}
$name1=$_SESSION['name'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title> Reservation </title>
<link rel="shortcut icon" href="images/favicon.png"></link>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="css/bootstrap.min.css" rel="stylesheet">
55
</link>
<link href="css/Default.css" rel="stylesheet">
</link>
<script type="text/javascript" src="js/jquery.js"></script>
<script>
$(document).ready(function()
{
var x=(($(window).width())-1024)/2;
$('.wrap').css("left",x+"px");
});
</script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/man.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Bare - Start Bootstrap Template</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="wrap">
<div class="header">
<div style="float:left;width:150px;">
<img src="images/logo.jpg"/>
</div>
<div>
<div style="float:right; font-size:20px;margin-top:20px;">
<?php
if(isset($_SESSION['name']))
{
echo "Welcome,".$_SESSION['name']."&nbsp;&nbsp;&nbsp;<a
href=\"logout.php\" class=\"btn btn-info\">Logout</a>";
}
?>
</div>
<div id="heading">
<a href="index.php">Indian Railways</a>
</div>
</div>
</div>
<!-- Navigation bar -->
<div class="navbar navbar-inverse" >
<div class="navbar-inner">
<div class="container" >
<a class="brand" href="index.php" >HOME</a>
<a class="brand" href="PNR.php" >PNR ENQUIRY</a>

56
<a class="brand" href="train.php" >FIND TRAIN</a>
<a class="brand" href="reservation.php">RESERVATION</a>
<a class="brand" href="profile.php">PROFILE</a>
<a class="brand" href="booking_h.php">BOOKING HISTORY</a>
</div>
</div>
</div>
<div class="span12 well">
<div align="center" style="border-bottom: 3px solid #ddd;">
<h2><?=ucwords($_SESSION['name'])?> Booking History </h2>

</div>
<br>
<!--
<div >
<table class="table">
<tr>
<th style="border-top:0px;" > <label>Train No.<label></th>
<td style="border-top:0px;"><label class="text-error"><?php echo
$tnum;?></label></td>
<th style="border-top:0px;"><label> Train Name<label> </th>
<td style="border-top:0px;"><label class="text-error"><?php echo
$tname;?></label></td>
<th style="border-top:0px;"> <label>Class <label></th>
<td style="border-top:0px;"><label class="text-error"><?php echo
$cl;?></label></td>
</tr>
</table>
</div>
-->
<div>

</div>
<div >
<table class="table">
<tr>
<th >SNo.</th>
<th >Name</th>
<th >Train Number</th>
<th >Date Of Journey</th>
<th >From</th>
<th>To</th>
<th >Date Of Booking</th>
<th > Status</th>
<th > Cancel</th>
</tr>
<?php
$name=$_SESSION['name'];
define("server","localhost",true);
define("user","root",true);
57
define("password","",true);
define("database","railres",true);
$cid=mysqli_connect(server,user,password,database) or die("connection failed");
$result=mysqli_query($cid,"SELECT * FROM `booking` WHERE
uname='$name' and cancel='0'");
$n=1;
while($row=mysqli_fetch_array($result))
{
?>
<tr class="text-error">
<th style="width:10px;"> <?php echo $n; ?> </th>
<th style="width:10px;"> <?php echo $row['Name'] ?> </th>
<th style="width:100px;"> <?php echo $row['Tnumber']; ?> </th>
<th style="width:100px;"> <?php echo $row['doj']; ?> </th>
<th style="width:100px;"> <?php echo $row['fromstn']; ?> </th>
<th style="width:100px;"> <?php echo $row['tostn']; ?> </th>
<th style="width:100px;"> <?php echo $row['DOB']; ?> </th>
<th style="width:100px;"> <?php echo $row['Status']; ?> </th>
<th ><a
href="reson_cancel.php?name=<?=$row['Name']?>&age=<?=$row['Age']?>"> Cancel</a>
</th>
</tr>
<?php
$n++;
}
?>
</table>
</div>
</div>

<!-- Copyright -->


<footer >
<div style="width:100%;">
<div style="float:left;">
<p class="text-right text-info"> &copy; bantykuar9999@gmail.com</p>
</div>
<div style="float:right;">
<p class="text-right text-info"> Desinged By : <a
href="https://projecttunnel.com/">HIMANSHU</p>
</div>
</div>
</footer>
</div>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
</body>
</html>

58
SEAT AVAILABILTY CHECKING PAGE
Current availability means train seat availability after final chart preparation. Many a times
some seats are left vacant even after chart preparation which can be booked under current
availability on irctc portal or from offline ticket counters. ... No waitlist tickets are issued
under current availability.
1: Go to http://www.makemytrip.com/railways/ to know seat availability.
Step 2: Enter the details of your Originating and Destination Station name. Step 3: Then, enter your
journey date or you can also directly click the calendar icon to enter the journey date.
CNF – If you read this on your live PNR status, you've got a 'Confirmed' ticket. ... WL – 'Waiting List'
meaning that you're lined up to get a confirmed ticket only if one decides to cancel their booking. If the
chart has been prepared and your IRCTCPNR status still says WL, you cannot board the train.

REVERVATION PAGE CODE


<?php
session_start();
if(isset($_SESSION['name'])){}
else{
header("location:login1.php");
}
require('firstimport.php');
$tbl_name="interlist";
mysqli_select_db($conn,"$db_name") or die("cannot select db");
$tostn = '';
$fromstn = '';
$doj = '';
if(isset($_POST['from']) && isset($_POST['to']))
59
{ $k=1;
$tostn = $_POST['to'];
$fromstn = $_POST['from'];
$doj = $_POST['date'];
$from=$_POST['from'];
$to=$_POST['to'];
$quota=$_POST['quota'];
$from=strtoupper($from);
$tostn=strtoupper($tostn);
$fromstn=strtoupper($fromstn);
$to=strtoupper($to);
$day=date("D",strtotime("".$doj));
//echo $day."</br>";
$sql="SELECT * FROM $tbl_name WHERE (Ori='$from' or st1='$from' or st2='$from' or st3='$from'
or st4='$from' or st5='$from') and (st1='$to' or st2='$to' or st3='$to' or st4='$to' or st5='$to' or Dest='$to')
and ($day='Y')";
$result=mysqli_query($conn,$sql);
}
else if((!isset($_POST['from'])) && (!isset($_POST['to'])))
{ $k=0;
$from="";
$to="";
}
?>

<!DOCTYPE html>
<html>
<head>
<title> Reservation </title>
<link rel="shortcut icon" href="images/favicon.png"></link>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="css/bootstrap.min.css" rel="stylesheet"></link>
<link href="css/Default.css" rel="stylesheet"></link>
<script type="text/javascript" src="js/jquery.js"></script>
<script>
$(document).ready(function()
{
var x=(($(window).width())-1024)/2;
$('.wrap').css("left",x+"px");
});
</script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/man.js"></script>
</head>
<body>
<div class="wrap">
60
<!-- Header -->
<div class="header">
<div style="float:left;width:150px;">
<img src="images/logo.jpg"/>
</div>
<div>
<div style="float:right; font-size:20px;margin-top:20px;">
<?php
if(isset($_SESSION['name']))
{
echo "Welcome, ".$_SESSION['name']."&nbsp;&nbsp;&nbsp;<a
href=\"logout.php\" class=\"btn btn-info\">Logout</a>";
}
else
{
$_SESSION['error']=15;
header("location:login1.php")
?>
<a href="login.html" class="btn btn-
info">Login</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="signup.php" class="btn btn-info">Signup</a>
<?php } ?>
</div>
<div id="heading">
<a href="index.php" >Indian Railways</a>
</div>
</div>
</div>
<!-- Navigation bar -->
<div class="navbar navbar-inverse" >
<div class="navbar-inner">
<div class="container" >
<a class="brand" href="index.php" >HOME</a>
<a class="brand" href="PNR.php" >PNR ENQUIRY</a>
<a class="brand" href="Help.php" >HELP ENQUIRY</a>
<a class="brand" href="train.php" >FIND TRAIN</a>
<a class="brand " href="reservation.php">RESERVATION</a>
<a class="brand" href="profile.php">PROFILE</a>
<a class="brand" href="booking_h.php">BOOKING HISTORY</a>
</div>
</div>
</div>
<div class="row">
<!-- find train with qouta-->
<div class="span4 well">
<form method="post" action="reservation.php">
<table class="table">
<tr>
<th style="border-top:0px;"><label> From <label></th>
<td style="border-top:0px;"><input type="text" class="input-
61
block-level" name="from" id="fr" ></td>
</tr>
<tr>
<th style="border-top:0px;"><label> To <label></th>
<td style="border-top:0px;"><input type="text" class="input-
block-level" name="to" id="to1" ></td>
</tr>
<tr>
<th style="border-top:0px;" ><label > Quota <label></th>
<td style="border-top:0px;"><input list="q1" class="input-block-
level" name="quota" id="q12" value="<?php if(isset($_POST['quota']))echo $_POST['quota'];?>">
<datalist id="q1" >
<option value="General">General</option>
<option value="Tatkal">Tatkal</option>
<option value="Ladies">Ladies</option>
</datalist>
</td>
</tr>
<tr>
<th style="border-top:0px;"><label> Date<label></th>
<td style="border-top:0px;"><input type="date" class="input-
block-level input-medium" name="date" max="<?php echo date('Y-m-d',time()+60*60*24*90);?>"
min="<?php echo date('Y-m-d')?>" value="<?php if(isset($_POST['date'])){echo $_POST['date'];}else
{echo date('Y-m-d');}?>"> </td>
</tr>
<tr>
<td style="border-top:0px;"><input class="btn btn-info"
type="submit" value="OK"></td>
<td style="border-top:0px;"><a href="reservation.php" class="btn
btn-info" type="reset" value="Reset">Reset</a></td>
</tr>
</table>
</form>
</div>
<!-- display train -->
<div class="span8 well">
<div class="display" style="height:30px;">
<table class="table">
<tr>
<th style="width:80px;border-top:0px;"> Train No.</th>
<th style="width:270px;border-top:0px;"> Train Name </th>
<th style="width:65px;border-top:0px;"> Orig. </th>
<th style="width:55px;border-top:0px;"> Des. </th>
<th style="width:70px;border-top:0px;"> Arr. </th>
<th style="width:80px;border-top:0px;"> Dep. </th>
<th style="width:150px;border-top:0px;"></th>
</tr>
</table>
</div>
<div class="display" style="margin-top:0px;overflow:auto;">
62
<table class="table">
<?php
if($k==1)
{
echo "<script> document.getElementById(\"fr\").value=\"$from\";
document.getElementById(\"to1\").value=\"$to\";

</script>";
$n=0;
while($row=mysqli_fetch_array($result)){
//$q="from: ".$from;
if($from==$row['st1'])
{ $q=$row['st1arri'];
//echo $q;
}
else
if($from==$row['st2'])
{ $q=$row['st2arri']; }
else if($from==$row['st3'])
{ $q=$row['st3arri']; }
else if($from==$row['st4'])
{ $q=$row['st4arri']; }
else if($from==$row['st5'])
{ $q=$row['st5arri']; }
else if($from==$row['Ori'])
{ $q=$row['Oriarri']; }
else if($from==$row['Dest'])
{ $q=$row['Destarri'];}

$p1=substr($q,0,2);
$p2=substr($q,3,2);
$p2=$p2+5;
if($p2<10)
{$p2="0".$p2;}
$d=$p1.":".$p2;
if($n%2==0)
{
?>
<tr class="text-error">
<td style="width:70px;"> <?php echo $row['Number']; ?> </td>
<td style="width:250px;"> <?php echo $row['Name']; ?>
</a></td>
<td style="width:65px;"> <?php echo $row['Ori']; ?> </td>
<td style="width:55px;"> <?php echo $row['Dest']; ?> </td>
<td style="width:60px;"> <?php echo $q; ?> </td>
<td style="width:65px;"> <?php echo $d; ?> </td>
<td style="width:200px;">
<a class="text-error" href="reser.php?tno=<?php
echo$row['Number']?>&fromstn=<?php echo $fromstn ?>&tostn=<?php echo $tostn ?>&doj=<?php
echo $doj ?>&quota=<?php echo $quota;?>&class=<?php echo "1A";?>"><b>1A</b></a>
63
<a class="text-error" href="reser.php?tno=<?php
echo$row['Number']?>&fromstn=<?php echo $fromstn ?>&tostn=<?php echo $tostn ?>&doj=<?php
echo $doj ?>&quota=<?php echo $quota;?>&class=<?php echo "2A";?>"><b>2A</b></a>
<a class="text-error" href="reser.php?tno=<?php
echo$row['Number']?>&fromstn=<?php echo $fromstn ?>&tostn=<?php echo $tostn ?>&doj=<?php
echo $doj ?>&quota=<?php echo $quota;?>&class=<?php echo "3A";?>"><b>3A</b></a>
<a class="text-error" href="reser.php?tno=<?php
echo$row['Number']?>&fromstn=<?php echo $fromstn ?>&tostn=<?php echo $tostn ?>&doj=<?php
echo $doj ?>&quota=<?php echo $quota;?>&class=<?php echo "SL";?>"><b>SL</b></a>
</td>
</tr>
<?php
}
else
{
?>
<tr class="text-info">
<td style="width:70px;"> <?php echo $row['Number']; ?> </td>
<td style="width:210px;"><?php echo $row['Name']; ?> </a>
</td>
<td style="width:65px;"> <?php echo $row['Ori']; ?> </td>
<td style="width:55px;"> <?php echo $row['Dest']; ?> </td>
<td style="width:60px;"> <?php echo $q; ?> </td>
<td style="width:65px;"> <?php echo $d; ?> </td>
<td style="width:200px;">
<a class="text-info" href="reser.php?tno=<?php
echo$row['Number']?>&fromstn=<?php echo $fromstn ?>&tostn=<?php echo $tostn ?>&doj=<?php
echo $doj ?>&quota=<?php echo $quota;?>&class=<?php echo "1A";?>"><b>1A</b> </a>
<a class="text-info" href="reser.php?tno=<?php
echo$row['Number']?>&fromstn=<?php echo $fromstn ?>&tostn=<?php echo $tostn ?>&doj=<?php
echo $doj ?>&quota=<?php echo $quota;?>&class=<?php echo "2A";?>"><b>2A</b></a>
<a class="text-info" href="reser.php?tno=<?php
echo$row['Number']?>&fromstn=<?php echo $fromstn ?>&tostn=<?php echo $tostn ?>&doj=<?php
echo $doj ?>&quota=<?php echo $quota;?>&class=<?php echo "3A";?>"><b>3A</b></a>
<a class="text-info" href="reser.php?tno=<?php
echo$row['Number']?>&fromstn=<?php echo $fromstn ?>&tostn=<?php echo $tostn ?>&doj=<?php
echo $doj ?>&quota=<?php echo $quota;?>&class=<?php echo "SL";?>"><b>SL</b></a>
</td>
</tr>
<?php
}
$n++;
}
}
else
{
echo "<div class=\"alert alert-error\" style=\"margin:100px
180px;\"> please search the train.. </div>";
}
mysqli_close($conn);
64
?>
</table>
</div>
</div>
</div>
<footer >
<div style="width:100%;">
<div style="float:left;">
<p class="text-right text-info"> &copy; bantykuar9999@gmail.com</p>
</div>
<div style="float:right;">
<p class="text-right text-info"> Desinged By : HIMANSHU</p>
</div>
</div>
</footer> </div>
</body>
</html>

TICKET BOOKING PAGE

To press the continue option user would go to the payment page.

Train ticket booking allows the travelers to seek a confirmed berth in the selected class of a train. There
are two ways of booking train tickets: through railway station ticket counters or online train ticket
booking. Unique PNR (Passenger Name Record) is generated against every ticket booked.
65
The Ministry of Railways have decided to increase the Advance Reservation Period (ARP) for booking
accomodation in trains from 60 days to 120 days (excluding the day of journey). Accordingly, w.e.f 1st
April, 2015 the booking in trains from train originating stations will open and remain available for 120
days

TICKET BOOKING PAGE

<!DOCTYPE
html>
<html>
<head>
<title> Reservation </title>
<link rel="shortcut icon" href="images/favicon.png"></link>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="css/bootstrap.min.css" rel="stylesheet" ></link>
<link href="css/bootstrap.css" rel="stylesheet" ></link>
<link href="css/Default.css" rel="stylesheet" > </link>
<script type="text/javascript" src="js/jquery.js"></script>
<script>
$(document).ready(function()
{
//alert($(window).width());
var x=(($(window).width())-1024)/2;
//alert(x);
$('.wrap').css("left",x+"px");
});
</script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/man.js"></script>
</head>
<body>
<div class="wrap">
<!-- Header -->
<div class="header">
<div style="float:left;width:150px;">
<img src="images/logo.jpg"/>
</div>
66
<div>
<div style="float:right; font-size:20px;margin-top:20px;">
Welcome,anujkumar&nbsp;&nbsp;&nbsp;<a href="logout.php" class="btn btn-
info">Logout</a>
</div>
<div id="heading">
<a href="index.html">Indian Railways</a>
</div>
</div>
</div>
<!-- Navigation bar -->
<div class="navbar navbar-inverse">
<div class="navbar-inner">
<div class="container" >
<a class="brand" href="index.php" >HOME</a>
<a class="brand" href="PNR.php" >PNR ENQUIRY</a>
<a class="brand" href="Help.php" >HELP ENQUIRY</a>
<a class="brand" href="train.php" >FIND TRAIN</a>
<a class="brand" href="reservation.php">RESERVATION</a>
<a class="brand" href="profile.php">PROFILE</a>
<a class="brand" href="booking_h.php">BOOKING HISTORY</a>
</div>
</div>
</div>
<div class="span12 well">
<div class="display" style="margin-top:0px;height:30px;">

<form method="get" action="booki.php">


<table class="table" style="border-style:ridge;">
<col width="99">
<col width="50">
<col width="50">
<col width="80">
<col width="80">
<col width="70">
<col width="70">
<col width="70">
<col width="70">
<col width="70">
<col width="90">
67
<tr>
<th style="border-top:0px;">Journey date:</th>
<th style="border-top:0px;"> Train No./Name:</th>
<th style="border-top:0px;">From Station:</th>
<th style="border-top:0px;">To Station:</th>
<th style="border-top:0px;">Quota:</th>
<th style="border-top:0px;"> 1A</th>
<th style="border-top:0px;"> 2A </th>
<th style="border-top:0px;"> 3A </th>
<th style="border-top:0px;"> SL </th>
</tr>
<tr>
<td style="border-top:0px;"> 2019-05-08 </td>
<input name="doj" style="display:none;" type="text" value="2019-05-08">
<input name="dob" style="display:none;" type="text" value="2019-05-07">
<td style="border-top:0px;"> 12009 </td>
<input name="tno" style="display:none;" type="text" value="12009"> </td>
<td style="border-top:0px;">BCT</td>
<input name="fromstn" style="display:none;" type="text" value="BCT"> </td>
<td style="border-top:0px;">ADI</td>
<input name="tostn" style="display:none;" type="text" value="ADI"> </td>
<td style="border-top:0px;">General</td>
<input name="quota" style="display:none;" type="text" value="General"> </td>
<td style="border-top:0px;"> <input type="radio" name="selct" value="1A"
onclick="return false;" checked> </td>
<td style="border-top:0px;"> <input type="radio" name="selct" value="2A"
onclick="return false;" > </td>
<td style="border-top:0px;"> <input type="radio" name="selct" value="3A"
onclick="return false;" > </td>
<td style="border-top:0px;"> <input type="radio" name="selct" value="SL"
onclick="return false;" > </td>
</tr>
</table>
</div>
<div class="display" style="height:50px;">
</div>
<br /><br />
<form method="post" action="booki.php">
<div class="display" style="margin-top:0px;height:415px;">
<h2><font color="blue">Passenger Detail</font></h2>
68
<table class="table">
<tr>
<th style="width:100px;border-top:0px;">SNo.</th>
<th style="width:200px;border-top:0px;"> Name</th>
<th style="width:100px;border-top:0px;"> Age </th>
<th style="width:100px;border-top:0px;"> Sex </th>
</tr>
<tr>
<td > 1</td>
<td ><input type="text" name="name1" ></td>
<td ><input type="text" name="age1" class="input-small"></td>
<td ><select name="sex1" class="input-small">
<option value="male">MALE</option>
<option value="female">FEMALE</option>
</select>
</td>
</tr>
<tr>
<td > 2</td>
<td ><input type="text" name="name2" ></td>
<td ><input type="text" name="age2" class="input-small"></td>
<td ><select name="sex2" class="input-small">
<option value="male">MALE</option>
<option value="female">FEMALE</option>
</select>
</td>
</tr>
<tr>
<td > 3</td>
<td ><input type="text" name="name3" ></td>
<td ><input type="text" name="age3" class="input-small"></td>
<td ><select name="sex3" class="input-small">
<option value="male">MALE</option>
<option value="female">FEMALE</option>
</select>
</td>
</tr>
<tr>
<td > 4</td>
<td ><input type="text" name="name4" ></td>
<td ><input type="text" name="age4" class="input-small"></td>
69
<td ><select name="sex4" class="input-small">
<option value="male">MALE</option>
<option value="female">FEMALE</option>
</select>
</td>
</tr>
<tr>
<td > 5</td>
<td ><input type="text" name="name5" ></td>
<td ><input type="text" name="age5" class="input-small"></td>
<td ><select name="sex5" class="input-small">
<option value="male">MALE</option>
<option value="female">FEMALE</option>
</select>
</td>
</tr>
<tr>
<td style="border-top:0px;"><button type="submit" value="Payment" id="subb"
><img src="images/wallet.png" style="height:25px"></button></td>
<td style="border-top:0px;"><input class="btn btn-info" name="bookibooki"
type="submit" value="Booking"></td>
</tr>
</table>
</form>
</div>
<div>
<br />
<p> <font color="red"> CHILDREN BELOW 5 YEAR (FOR WHOM TICKET IS
NOT TO BE ISSUED). </font> </p>
</div>
</div>
<footer >
<div style="width:100%;">
<div style="float:left;">
<p class="text-right text-info"> &copy; bantykuar9999@gmail.com</p>
</div>
<div style="float:right;">
<p class="text-right text-info"> Desinged By : HIMANSHU</p>
</div>
</div>
70
</footer>
</div>
</body>
</html>

Payment page

Here user should fill up all the necessary details of personal and card that he wants to use to book a
ticket
After filling up all the information in the payment page user press the “continue to pay” button and the
following page is coming

PAYMENT PAGE CODE

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet"


id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<style>
body { margin-top:20px; }
71
/* CSS for Credit Card Payment form */
.credit-card-box .panel-title {
display: inline;
font-weight: bold;
}
.credit-card-box .form-control.error {
border-color: red;
outline: 0;
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(255,0,0,0.6);
}
.credit-card-box label.error {
font-weight: bold;
color: red;
padding: 2px 8px;
margin-top: 2px;
}
.credit-card-box .payment-errors {
font-weight: bold;
color: red;
padding: 2px 8px;
margin-top: 2px;
}
.credit-card-box label {
display: block;
}
/* The old "center div vertically" hack */
.credit-card-box .display-table {
display: table;
}
.credit-card-box .display-tr {
display: table-row;
}
.credit-card-box .display-td {
display: table-cell;
vertical-align: middle;
width: 50%;
}
/* Just looks nicer */
.credit-card-box .panel-heading img {
min-width: 180px;

72
}
</style>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script>
/*
The MIT License (MIT)
Copyright (c) 2015 William Hilton
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var $form = $('#payment-form');
$form.find('.subscribe').on('click', payWithStripe);
/* If you're using Stripe for payments */
function payWithStripe(e) {
e.preventDefault();
/* Abort if invalid form data */
if (!validator.form()) {
return;
}
/* Visual feedback */
$form.find('.subscribe').html('Validating <i class="fa fa-spinner fa-pulse"></i>').prop('disabled', true);
var PublishableKey = 'pk_test_6pRNASCoBOKtIshFeQd4XMUh'; // Replace with your API
publishable key
Stripe.setPublishableKey(PublishableKey);
73
/* Create token */
var expiry = $form.find('[name=cardExpiry]').payment('cardExpiryVal');
var ccData = {
number: $form.find('[name=cardNumber]').val().replace(/\s/g,''),
cvc: $form.find('[name=cardCVC]').val(),
exp_month: expiry.month,
exp_year: expiry.year
};
Stripe.card.createToken(ccData, function stripeResponseHandler(status, response) {
if (response.error) {
/* Visual feedback */
$form.find('.subscribe').html('Try again').prop('disabled', false);
/* Show Stripe errors on the form */
$form.find('.payment-errors').text(response.error.message);
$form.find('.payment-errors').closest('.row').show();
} else {
/* Visual feedback */
$form.find('.subscribe').html('Processing <i class="fa fa-spinner fa-pulse"></i>');
/* Hide Stripe errors on the form */
$form.find('.payment-errors').closest('.row').hide();
$form.find('.payment-errors').text("");
// response contains id and card, which contains additional card details
console.log(response.id);
console.log(response.card);
var token = response.id;
// AJAX - you would send 'token' to your server here.
$.post('/account/stripe_card_token', {
token: token
})
// Assign handlers immediately after making the request,
.done(function(data, textStatus, jqXHR) {
$form.find('.subscribe').html('Payment successful <i class="fa fa-check"></i>');
})
.fail(function(jqXHR, textStatus, errorThrown) {
$form.find('.subscribe').html('There was a problem').removeClass('success').addClass('error');
/* Show Stripe errors on the form */
$form.find('.payment-errors').text('Try refreshing the page and trying again.');
$form.find('.payment-errors').closest('.row').show();
});
}

74
});
}
/* Fancy restrictive input formatting via jQuery.payment library*/
$('input[name=cardNumber]').payment('formatCardNumber');
$('input[name=cardCVC]').payment('formatCardCVC');
$('input[name=cardExpiry').payment('formatCardExpiry');
/* Form validation using Stripe client-side validation helpers */
jQuery.validator.addMethod("cardNumber", function(value, element) {
return this.optional(element) || Stripe.card.validateCardNumber(value);
}, "Please specify a valid credit card number.");
jQuery.validator.addMethod("cardExpiry", function(value, element) {
/* Parsing month/year uses jQuery.payment library */
value = $.payment.cardExpiryVal(value);
return this.optional(element) || Stripe.card.validateExpiry(value.month, value.year);
}, "Invalid expiration date.");
jQuery.validator.addMethod("cardCVC", function(value, element) {
return this.optional(element) || Stripe.card.validateCVC(value);
}, "Invalid CVC.");
validator = $form.validate({
rules: {
cardNumber: {
required: true,
cardNumber: true
},
cardExpiry: {
required: true,
cardExpiry: true
},
cardCVC: {
required: true,
cardCVC: true
}
},
highlight: function(element) {
$(element).closest('.form-control').removeClass('success').addClass('error');
},
unhighlight: function(element) {
$(element).closest('.form-control').removeClass('error').addClass('success');
},
errorPlacement: function(error, element) {
75
$(element).closest('.form-group').append(error);
}
});
paymentFormReady = function() {
if ($form.find('[name=cardNumber]').hasClass("success") &&
$form.find('[name=cardExpiry]').hasClass("success") &&
$form.find('[name=cardCVC]').val().length > 1) {
return true;
} else {
return false;
}
}
$form.find('.subscribe').prop('disabled', true);
var readyInterval = setInterval(function() {
if (paymentFormReady()) {
$form.find('.subscribe').prop('disabled', false);
clearInterval(readyInterval);
}
}, 250);
</script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-
awesome.min.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-
validate/1.13.1/jquery.validate.min.js"></script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/jquery.payment/1.2.3/jquery.payment.min.js"></script>
<!-- If you're using Stripe for payments -->
<script type="text/javascript" src="https://js.stripe.com/v2/"></script>
<div class="container">
<div class="row">
<!-- You can make it whatever width you want. I'm making it full width
on <= small devices and 4/12 page width on >= medium devices -->
<div class="col-xs-4 col-md-4"></div>
<div class="col-xs-4 col-md-4">
<!-- CREDIT CARD FORM STARTS HERE -->
<div class="panel panel-default credit-card-box">
<div class="panel-heading display-table" >
<div class="row display-tr" >
<h3 class="panel-title display-td" >Payment Details</h3>
<div class="display-td" >
76
<img class="img-responsive pull-right" src="http://i76.imgup.net/accepted_c22e0.png">
</div>
</div>
</div>
<div class="panel-body">
<form method="POST">
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label for="cardNumber">User Name</label>
<div class="input-group">
<input
type="tel"
class="form-control"
name="name"
value="anujkumar"
placeholder="Valid Card Number"
autocomplete="cc-number"
required autofocus
/>
<span class="input-group-addon"><i class="fa fa-credit-card"></i></span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-7 col-md-7">
<div class="form-group">
<label for="cardExpiry"><span class="hidden-xs">Mobile</span><span class="visible-xs-
inline"></span> </label>
<input
type="tel"
class="form-control"
name="mobile"
placeholder="Mobile"
autocomplete="cc-exp"
required
/>
</div>
</div>
<div class="col-xs-5 col-md-5 pull-right">
77
<div class="form-group">
<label for="cardCVC">OTP</label>
<input
type="tel"
class="form-control"
name="otp"
placeholder="4 Digit OTP"
autocomplete="cc-csc"
required
/>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label for="couponCode">Amount In $</label>
<input type="text" class="form-control" value="" name="amount" />
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<input type="submit" class="btn btn-success btn-lg btn-block" name="payment" value="Booking">
</div>
</div>
<div class="row" style="display:none;">
<div class="col-xs-12">
<p class="payment-errors"></p>
</div>
</div>
</form>
</div>
</div>
<!-- CREDIT CARD FORM ENDS HERE -->
</div>

</div>
</div>
\

78
ADMIN PAGE
An administrator has full access to all the sections within the WordPress AdminArea. Users with other
roles such as editor, contributor, or author have limited access to the admin area. Some users such as
users with the subscriber role only have access to their profile page inside the admin area.

Admin panel of any website is like a control panel of your computer. Its a area from where you can
control your website stuff, where you can create, edit, delete or update your content which directly
reflects on the website.
Method 1 Logging into Your Own Website

1. Make sure that you're trying to log into your own website. ...

2. Add different "admin" tags to the base address. ...

3. Enter your username or email address. ...

4. Enter your password. ...

79
5. Click the "Log In" button.

When you say “admin panel on a website”, are you referring to how a website hosting server is
configured, managed, and administered?
(i.e. which is used as an administration application interface by many Linux-based website hosting
service providers, but could also be etc, depending on the the type of server or web hosting service
provider)
OR
Are you referring to the Admin Panel (a.k.a. Back-end, Administrator Application, Control Panel, etc)
for a specific content management system as most of the answers to date assume you are referring to?
(i.e. the which is used to configure, manage, and administer a website using the WordPress content
management system)

I really don’t know how to answer your question until I understand if you are referring to the former
(how a website server is configured, managed, and administered) or the latter (how a specific content
management system is configured, managed, and administered).

On a typical WordPress site, all you need to do is add /login/ or /admin/ to the end of your site's URL.
Both of these URLs will take you to your login page where you can enter your username and password.
Once logged in, you will be taken directly to the admin area, or dashboard, of your site

ADMIN LOG IN PAGE

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>SB Admin 2 - Dashboard</title>
<!-- Custom fonts for this template-->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,8
00,800i,900,900i" rel="stylesheet">
<!-- Custom styles for this template-->
<link href="css/sb-admin-2.min.css" rel="stylesheet">
</head>
<body id="page-top">
<!-- Page Wrapper -->
<div id="wrapper">
80
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.php">
<div class="sidebar-brand-icon rotate-n-15">
<i class="fas fa-laugh-wink"></i>
</div>
<div class="sidebar-brand-text mx-3">ADMIN <sup></div>
</a>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<!-- Nav Item - Dashboard -->
<!-- Divider -->
<hr class="sidebar-divider">
<!--<!-- Heading
<div class="sidebar-heading">
Interface
</div>
<!-- Nav Item - Pages Collapse Menu
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo" aria-
expanded="true" aria-controls="collapseTwo">
<i class="fas fa-fw fa-cog"></i>
<span>Components</span>
</a>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-
parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<h6 class="collapse-header">Custom Components:</h6>
<a class="collapse-item" href="buttons.php">Buttons</a>
<a class="collapse-item" href="cards.php">Cards</a>
</div>
</div>
</li>
<!-- Nav Item - Utilities Collapse Menu
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseUtilities" aria-
expanded="true" aria-controls="collapseUtilities">
<i class="fas fa-fw fa-wrench"></i>

81
<span>Utilities</span>
</a>
<div id="collapseUtilities" class="collapse" aria-labelledby="headingUtilities" data-
parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<h6 class="collapse-header">Custom Utilities:</h6>
<a class="collapse-item" href="utilities-color.php">Colors</a>
<a class="collapse-item" href="utilities-border.php">Borders</a>
<a class="collapse-item" href="utilities-animation.php">Animations</a>
<a class="collapse-item" href="utilities-other.php">Other</a>
</div>
</div>
</li>
<!-- Divider
<hr class="sidebar-divider">
<!-- Heading
<div class="sidebar-heading">
Addons
</div>
<!-- Nav Item - Pages Collapse Menu
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePages" aria-
expanded="true" aria-controls="collapsePages">
<i class="fas fa-fw fa-folder"></i>
<span>Pages</span>
</a>
<div id="collapsePages" class="collapse" aria-labelledby="headingPages" data-
parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<h6 class="collapse-header">Login Screens:</h6>
<a class="collapse-item" href="login.php">Login</a>
<a class="collapse-item" href="register.php">Register</a>
<a class="collapse-item" href="forgot-password.php">Forgot Password</a>
<div class="collapse-divider"></div>
<h6 class="collapse-header">Other Pages:</h6>
<a class="collapse-item" href="404.php">404 Page</a>
<a class="collapse-item" href="blank.php">Blank Page</a>
</div>
</div>
</li>

82
Nav Item - Charts
<li class="nav-item">
<a class="nav-link" href="charts.php">
<i class="fas fa-fw fa-chart-area"></i>
<span>Charts</span></a>
</li>-->

<li class="nav-item">
<a class="nav-link" href="ticket.php">
<i class="fas fa-fw fa-chart-area"></i>
<span style="font-wight:bold">ADD TRAINS</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="tables.php">
<i class="fas fa-fw fa-chart-area"></i>
<span style="font-wight:bold">VIEW TRAINS</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="logout.php">
<i class="fas fa-fw fa-chart-area"></i>
<span style="font-wight:bold">LOGOUT</span></a>
</li>

<!-- Nav Item - Tables -->


<!-- Divider -->
<hr class="sidebar-divider d-none d-md-block">
<!-- Sidebar Toggler (Sidebar) -->
<div class="text-center d-none d-md-inline">
<button class="rounded-circle border-0" id="sidebarToggle"></button>
</div>
</ul> <!-- End of Sidebar -->
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
<!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
83
</button>
<!-- Topbar Search -->
<h2>Admin </h2>
<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">
<!-- Nav Item - Search Dropdown (Visible Only XS) -->

<!-- Nav Item - Alerts -->


<!-- Nav Item - Messages -->
<div class="topbar-divider d-none d-sm-block"></div>
<!-- Nav Item - User Information -->
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-
toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">Valerie Luna</span>
<img class="img-profile rounded-circle" src="https://source.unsplash.com/QAB-WJcbgJk/60x60">
</a>
<!-- Dropdown - User Information -->
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-
labelledby="userDropdown">
<a class="dropdown-item" href="#">
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
Profile
</a>
<a class="dropdown-item" href="#">
<i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
Settings
</a>
<a class="dropdown-item" href="#">
<i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>
Activity Log
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
Logout
</a>
</div>
</li>
</ul>
84
</nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Page Heading -->
<!-- Content Row -->
<div class="row">
</div>
<!-- Content Row -->
<div class="row">
<!-- Area Chart -->
<div class="col-xl-8 col-lg-7">
<div class="card shadow mb-4">
<!-- Card Header - Dropdown -->
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
<h6 class="m-0 font-weight-bold text-primary" style="text-align:center">Admin Login</h6>
</div>
<!-- Card Body -->
<div class="card-body">
<div class="chart-area">
<form class="user" method="post">
<div class="form-group">
<input type="email" class="form-control form-control-user" name="email" id="exampleInputEmail"
aria-describedby="emailHelp" placeholder="Enter Email Address...">
</div>
<div class="form-group">
<input type="password" class="form-control form-control-user" name="password"
id="exampleInputPassword" placeholder="Password">
</div>
<div class="form-group">
<div class="custom-control custom-checkbox small">
<input type="checkbox" class="custom-control-input" id="customCheck">
<label class="custom-control-label" for="customCheck">Remember Me</label>
</div>
</div>
<input type="submit" value="Login" name="login" class="btn btn-primary btn-user btn-block">
<hr>
</form>
</div>
85
</div>
</div>
</div>
<!-- Pie Chart -->
<div class="col-xl-4 col-lg-5">
</div>
</div>
<!-- Content Row -->
<div class="row">
<!-- Content Column -->
<div class="col-lg-6 mb-4">
<!-- Project Card Example -->
<!-- Color System -->
</div>
<div class="col-lg-6 mb-4">
<!-- Illustrations -->
<!-- Approach -->
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
<!-- Footer -->
<footer class="sticky-footer bg-white">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>Copyright &copy; Your Website 2019</span>
</div>
</div>
</footer>
<!-- End of Footer -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
86
<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>
<!-- Logout Modal-->
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-
labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
<div class="modal-footer">
<button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
<a class="btn btn-primary" href="login.php">Logout</a>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin-2.min.js"></script>
<!-- Page level plugins -->
<script src="vendor/chart.js/Chart.min.js"></script>
<!-- Page level custom scripts -->
<script src="js/demo/chart-area-demo.js"></script>
<script src="js/demo/chart-pie-demo.js"></script>
</body>
</html>

87
ADMIN DESHBOARD
Adminn can control whole the website admin can add new trains and update all the trains details
Schedule .
ADMIN DESHBOARD
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>SB Admin 2 - Dashboard</title>
<!-- Custom fonts for this template-->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,8
00,800i,900,900i" rel="stylesheet">
<!-- Custom styles for this template-->
<link href="css/sb-admin-2.min.css" rel="stylesheet">
</head>
<body id="page-top">
<!-- Page Wrapper -->
<div id="wrapper">
<!-- Sidebar -->
88
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.php">
<div class="sidebar-brand-icon rotate-n-15">
<i class="fas fa-laugh-wink"></i>
</div>
<div class="sidebar-brand-text mx-3">ADMIN <sup></div>
</a>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<!-- Nav Item - Dashboard -->
<!-- Divider -->
<hr class="sidebar-divider">
<!--<!-- Heading
<div class="sidebar-heading">
Interface
</div>
<!-- Nav Item - Pages Collapse Menu
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo" aria-
expanded="true" aria-controls="collapseTwo">
<i class="fas fa-fw fa-cog"></i>
<span>Components</span>
</a>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-
parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<h6 class="collapse-header">Custom Components:</h6>
<a class="collapse-item" href="buttons.php">Buttons</a>
<a class="collapse-item" href="cards.php">Cards</a>
</div>
</div>
</li>
<!-- Nav Item - Utilities Collapse Menu
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseUtilities" aria-
expanded="true" aria-controls="collapseUtilities">
<i class="fas fa-fw fa-wrench"></i>
<span>Utilities</span>
</a>
89
<div id="collapseUtilities" class="collapse" aria-labelledby="headingUtilities" data-
parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<h6 class="collapse-header">Custom Utilities:</h6>
<a class="collapse-item" href="utilities-color.php">Colors</a>
<a class="collapse-item" href="utilities-border.php">Borders</a>
<a class="collapse-item" href="utilities-animation.php">Animations</a>
<a class="collapse-item" href="utilities-other.php">Other</a>
</div>
</div>
</li>
<!-- Divider
<hr class="sidebar-divider">
<!-- Heading
<div class="sidebar-heading">
Addons
</div>
<!-- Nav Item - Pages Collapse Menu
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePages" aria-
expanded="true" aria-controls="collapsePages">
<i class="fas fa-fw fa-folder"></i>
<span>Pages</span>
</a>
<div id="collapsePages" class="collapse" aria-labelledby="headingPages" data-
parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<h6 class="collapse-header">Login Screens:</h6>
<a class="collapse-item" href="login.php">Login</a>
<a class="collapse-item" href="register.php">Register</a>
<a class="collapse-item" href="forgot-password.php">Forgot Password</a>
<div class="collapse-divider"></div>
<h6 class="collapse-header">Other Pages:</h6>
<a class="collapse-item" href="404.php">404 Page</a>
<a class="collapse-item" href="blank.php">Blank Page</a>
</div>
</div>
</li>
Nav Item - Charts
<li class="nav-item">

90
<a class="nav-link" href="charts.php">
<i class="fas fa-fw fa-chart-area"></i>
<span>Charts</span></a>
</li>-->

<li class="nav-item">
<a class="nav-link" href="ticket.php">
<i class="fas fa-fw fa-chart-area"></i>
<span style="font-wight:bold">ADD TRAINS</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="tables.php">
<i class="fas fa-fw fa-chart-area"></i>
<span style="font-wight:bold">VIEW TRAINS</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="logout.php">
<i class="fas fa-fw fa-chart-area"></i>
<span style="font-wight:bold">LOGOUT</span></a>
</li>

<!-- Nav Item - Tables -->


<!-- Divider -->
<hr class="sidebar-divider d-none d-md-block">
<!-- Sidebar Toggler (Sidebar) -->
<div class="text-center d-none d-md-inline">
<button class="rounded-circle border-0" id="sidebarToggle"></button>
</div>
</ul> <!-- End of Sidebar -->
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
<!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>
<!-- Topbar Search -->
91
<h2>Dashboard</h2>
<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">
<!-- Nav Item - Search Dropdown (Visible Only XS) -->
<!-- Nav Item - Alerts -->
<!-- Nav Item - Messages -->
<div class="topbar-divider d-none d-sm-block"></div>
<!-- Nav Item - User Information -->
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-
toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">Valerie Luna</span>
<img class="img-profile rounded-circle" src="https://source.unsplash.com/QAB-WJcbgJk/60x60">
</a>
<!-- Dropdown - User Information -->
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-
labelledby="userDropdown">
<a class="dropdown-item" href="#">
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
Profile
</a>
<a class="dropdown-item" href="#">
<i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
Settings
</a>
<a class="dropdown-item" href="#">
<i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>
Activity Log
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
Logout
</a>
</div>
</li>
</ul>
</nav>
<!-- End of Topbar -->

92
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Page Heading -->
<!-- Content Row -->
<div class="row">
</div>
<!-- Content Row -->
<div class="row">
<!-- Area Chart -->
<div class="col-xl-8 col-lg-7">
<div class="card shadow mb-4">
<!-- Card Header - Dropdown -->
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
<h6 class="m-0 font-weight-bold text-primary" style="text-align:center">Ticket</h6>
</div>
<!-- Card Body -->
<div class="card-body">
<div class="chart-area" style="height:600px">
<form class="user" method="post" enctype="multipart/form-data">
<div class="form-group">
<div class="form-row">
<div class="col-md-6">
<label for="firstName">Train Number</label>
<div class="form-label-group">
<input type="text" class="form-control" name="train_number" placeholder="Train Number"
required="required" autofocus="autofocus">
</div>
</div>
<div class="col-md-6">
<label for="lastName">Train Name</label>
<div class="form-label-group">
<input type="text" id="lastName" class="form-control" name="train_name" placeholder="Tender ID"
required="required">
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="form-row">
93
<div class="col-md-6">
<label for="firstName">Origin</label>
<div class="form-label-group">
<input type="text" class="form-control" name="origin" placeholder="Origin" required="required"
autofocus="autofocus">
</div>
</div>
<div class="col-md-6">
<label for="lastName"> Destination</label>
<div class="form-label-group">
<input type="text" id="lastName" class="form-control" name="destination" placeholder=" Destination"
required="required">
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="form-row">
<div class="col-md-6">
<label for="firstName">Arrival Time</label>
<div class="form-label-group">
<input type="text" class="form-control" name="arrival" placeholder="Arrival Time"
required="required" autofocus="autofocus">
</div>
</div>
<div class="col-md-6">
<label for="lastName"> Dispature Time</label>
<div class="form-label-group">
<input type="text" id="lastName" class="form-control" name="dispature" placeholder=" Dispature
Time" required="required">
</div>
</div>
</div>
</div>
<div class="form-group">
<label for="inputEmail">Day</label>
<div class="form-label-group">
<input type="Checkbox" value="Y" name="mon" >Monday&nbsp;&nbsp;
<input type="Checkbox" value="Y" name="tue" >Tuesday&nbsp;&nbsp;
<input type="Checkbox" value="Y" name="wed" >Wednusday&nbsp;&nbsp;

94
<input type="Checkbox" value="Y" name="thu" >Thuresday&nbsp;&nbsp;
<input type="Checkbox" value="Y" name="fri" >Friday&nbsp;&nbsp;
<input type="Checkbox" value="Y" name="sat" >Saturday&nbsp;&nbsp;
<input type="Checkbox" value="Y" name="sun" >Sunday&nbsp;&nbsp;
</div>
</div>
<div class="form-group">
<div class="form-row">
<div class="col-md-6">
<label for="firstName">Ticket For 1A</label>
<div class="form-label-group">
<input type="text" class="form-control" name="A1" >
</div>
</div>
<div class="col-md-6">
<label for="lastName"> Ticket For 2A</label>
<div class="form-label-group">
<input type="text" id="lastName" class="form-control" name="A2" >
</div>
</div>
</div>
</div><div class="form-group">
<div class="form-row">
<div class="col-md-6">
<label for="firstName">Ticket For 3A</label>
<div class="form-label-group">
<input type="text" class="form-control" name="A3" >
</div>
</div>
<div class="col-md-6">
<label for="lastName"> Ticket For SL</label>
<div class="form-label-group">
<input type="text" id="lastName" class="form-control" name="SL" >
</div>
</div>
</div>
</div><div class="form-group">
<div class="form-row">
<div class="col-md-6">
<label for="firstName">General Seat</label>
95
<div class="form-label-group">
<input type="text" class="form-control" name="general" >
</div>
</div>
<div class="col-md-6">
<label for="lastName"> Ladies Seat</label>
<div class="form-label-group">
<input type="text" id="lastName" class="form-control" name="ladies" >
</div>
</div>
</div>
</div>

<div class="form-label-group">Tatkal
<input type="text" id="inputEmail" class="form-control" name="tatkal" >
</div>
</br>
<input type="submit" value="Submit" name="submit" class="btn btn-primary btn-user btn-block">
<hr>
</form>
</div>
</div>
</div>
</div>
<!-- Pie Chart -->
<div class="col-xl-4 col-lg-5">
</div>
</div>
<!-- Content Row -->
<div class="row">
<!-- Content Column -->
<div class="col-lg-6 mb-4">
<!-- Project Card Example -->
<!-- Color System -->
</div>
<div class="col-lg-6 mb-4">
<!-- Illustrations -->
<!-- Approach -->
96
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
<!-- Footer -->
<footer class="sticky-footer bg-white">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>Copyright &copy; Your Website 2019</span>
</div>
</div>
</footer>
<!-- End of Footer -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>
<!-- Logout Modal-->
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-
labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
<div class="modal-footer">
<button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
<a class="btn btn-primary" href="login.php">Logout</a>
</div>
</div>
97
</div>
</div>
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin-2.min.js"></script>
<!-- Page level plugins -->
<script src="vendor/chart.js/Chart.min.js"></script>
<!-- Page level custom scripts -->
<script src="js/demo/chart-area-demo.js"></script>
<script src="js/demo/chart-pie-demo.js"></script>
</body>
</html>

98
ADMIN TRAIN DETAILS PAGE

<!DOCTYPE html>

<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>SB Admin 2 - Tables</title>
<!-- Custom fonts for this template -->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,8
00,800i,900,900i" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/sb-admin-2.min.css" rel="stylesheet">
<!-- Custom styles for this page -->
<link href="vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">
</head>
<body id="page-top">
<!-- Page Wrapper -->
<div id="wrapper">
99
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.php">
<div class="sidebar-brand-icon rotate-n-15">
<i class="fas fa-laugh-wink"></i>
</div>
<div class="sidebar-brand-text mx-3">ADMIN <sup></div>
</a>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<!-- Nav Item - Dashboard -->
<!-- Divider -->
<hr class="sidebar-divider">
<!--<!-- Heading
<div class="sidebar-heading">
Interface
</div>
<!-- Nav Item - Pages Collapse Menu
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo" aria-
expanded="true" aria-controls="collapseTwo">
<i class="fas fa-fw fa-cog"></i>
<span>Components</span>
</a>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-
parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<h6 class="collapse-header">Custom Components:</h6>
<a class="collapse-item" href="buttons.php">Buttons</a>
<a class="collapse-item" href="cards.php">Cards</a>
</div>
</div>
</li>
<!-- Nav Item - Utilities Collapse Menu
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseUtilities" aria-
expanded="true" aria-controls="collapseUtilities">
<i class="fas fa-fw fa-wrench"></i>
<span>Utilities</span>
100
</a>
<div id="collapseUtilities" class="collapse" aria-labelledby="headingUtilities" data-
parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<h6 class="collapse-header">Custom Utilities:</h6>
<a class="collapse-item" href="utilities-color.php">Colors</a>
<a class="collapse-item" href="utilities-border.php">Borders</a>
<a class="collapse-item" href="utilities-animation.php">Animations</a>
<a class="collapse-item" href="utilities-other.php">Other</a>
</div>
</div>
</li>
<!-- Divider
<hr class="sidebar-divider">
<!-- Heading
<div class="sidebar-heading">
Addons
</div>
<!-- Nav Item - Pages Collapse Menu
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePages" aria-
expanded="true" aria-controls="collapsePages">
<i class="fas fa-fw fa-folder"></i>
<span>Pages</span>
</a>
<div id="collapsePages" class="collapse" aria-labelledby="headingPages" data-
parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<h6 class="collapse-header">Login Screens:</h6>
<a class="collapse-item" href="login.php">Login</a>
<a class="collapse-item" href="register.php">Register</a>
<a class="collapse-item" href="forgot-password.php">Forgot Password</a>
<div class="collapse-divider"></div>
<h6 class="collapse-header">Other Pages:</h6>
<a class="collapse-item" href="404.php">404 Page</a>
<a class="collapse-item" href="blank.php">Blank Page</a>
</div>
</div>
</li>
Nav Item - Charts

101
<li class="nav-item">
<a class="nav-link" href="charts.php">
<i class="fas fa-fw fa-chart-area"></i>
<span>Charts</span></a>
</li>-->

<li class="nav-item">
<a class="nav-link" href="ticket.php">
<i class="fas fa-fw fa-chart-area"></i>
<span style="font-wight:bold">ADD TRAINS</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="tables.php">
<i class="fas fa-fw fa-chart-area"></i>
<span style="font-wight:bold">VIEW TRAINS</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="logout.php">
<i class="fas fa-fw fa-chart-area"></i>
<span style="font-wight:bold">LOGOUT</span></a>
</li>

<!-- Nav Item - Tables -->


<!-- Divider -->
<hr class="sidebar-divider d-none d-md-block">
<!-- Sidebar Toggler (Sidebar) -->
<div class="text-center d-none d-md-inline">
<button class="rounded-circle border-0" id="sidebarToggle"></button>
</div>
</ul> <!-- End of Sidebar -->
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
<!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>
102
<!-- Topbar Search -->
<h2> Admin Dashboard</h2>

</nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Page Heading -->
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">DataTables Example</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>Number</th>
<th>Name</th>
<th>Origin</th>
<th>Destination</th>
<th>1A</th>
<th>2A</th>
<th>3A</th>
<th>4A</th>
<th>mon</th>
<th>tue</th>
<th>wed</th>
<th>thu</th>
<th>fri</th>
<th>sat</th>
<th>sun</th>
<th>edit</th>
<th>delete</th>
</tr>
</thead>
<tbody>
<tr>
<td>12723</td>

103
<td>Andhra Pradesh Expre</td>
<td>BCT</td>
<td>ADI</td>
<td>2500/-</td>
<td>1000/-</td>
<td>500/-</td>
<td>250/-</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>N</td>
<td><a href="edit_train.php?id=12723"><button class="btn btn-success">Edit</button></a></td>
<td><a href="delete.php?id=12723"><button class="btn btn-danger">Delete</button></a></td>

</tr>
<tr>
<td>12931</td>
<td>ADI DOUBLE DECK</td>
<td>BCT</td>
<td>ADI</td>
<td>2500/-</td>
<td>1000/-</td>
<td>500/-</td>
<td>250/-</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>N</td>
<td><a href="edit_train.php?id=12931"><button class="btn btn-success">Edit</button></a></td>
<td><a href="delete.php?id=12931"><button class="btn btn-danger">Delete</button></a></td>

</tr>
<tr>
<td>12932</td>
<td>BCT DOUBLEDECKE</td>
<td>ADI</td>
104
<td>BCT</td>
<td>2500/-</td>
<td>1000/-</td>
<td>500/-</td>
<td>250/-</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>N</td>
<td><a href="edit_train.php?id=12932"><button class="btn btn-success">Edit</button></a></td>
<td><a href="delete.php?id=12932"><button class="btn btn-danger">Delete</button></a></td>

</tr>
<tr>
<td>12952</td>
<td>MUMBAI RAJDHANI</td>
<td>NDLS</td>
<td>BCT</td>
<td>2500/-</td>
<td>1000/-</td>
<td>500/-</td>
<td>250/-</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td><a href="edit_train.php?id=12952"><button class="btn btn-success">Edit</button></a></td>
<td><a href="delete.php?id=12952"><button class="btn btn-danger">Delete</button></a></td>

</tr>
<tr>
<td>19011</td>
<td>GUJARAT EXPRESS</td>
<td>ADI</td>
<td>BCT</td>
<td>2500/-</td>
105
<td>1000/-</td>
<td>500/-</td>
<td>250/-</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td><a href="edit_train.php?id=19011"><button class="btn btn-success">Edit</button></a></td>
<td><a href="delete.php?id=19011"><button class="btn btn-danger">Delete</button></a></td>

</tr>
<tr>
<td>22210</td>
<td>BCT DURONTO</td>
<td>NDLS</td>
<td>BCT</td>
<td>2500/-</td>
<td>1000/-</td>
<td>500/-</td>
<td>250/-</td>
<td>N</td>
<td>N</td>
<td>Y</td>
<td>N</td>
<td>N</td>
<td>N</td>
<td>Y</td>
<td><a href="edit_train.php?id=22210"><button class="btn btn-success">Edit</button></a></td>
<td><a href="delete.php?id=22210"><button class="btn btn-danger">Delete</button></a></td>

</tr>
<tr>
<td>22220</td>
<td>BCT DURONTO</td>
<td>NDLS</td>
<td>BCT</td>
<td>2500/-</td>
<td>1000/-</td>
<td>500/-</td>
106
<td>250/-</td>
<td>N</td>
<td>N</td>
<td>Y</td>
<td>N</td>
<td>N</td>
<td>N</td>
<td>Y</td>
<td><a href="edit_train.php?id=22220"><button class="btn btn-success">Edit</button></a></td>
<td><a href="delete.php?id=22220"><button class="btn btn-danger">Delete</button></a></td>

</tr>
<tr>
<td>22222</td>
<td>BCT DURONTO</td>
<td>NDLS</td>
<td>BCT</td>
<td>2500/-</td>
<td>1000/-</td>
<td>500/-</td>
<td>250/-</td>
<td>N</td>
<td>N</td>
<td>Y</td>
<td>N</td>
<td>N</td>
<td>N</td>
<td>Y</td>
<td><a href="edit_train.php?id=22222"><button class="btn btn-success">Edit</button></a></td>
<td><a href="delete.php?id=22222"><button class="btn btn-danger">Delete</button></a></td>

</tr>
<tr>
<td>25222</td>
<td>BCT DURONTO</td>
<td>NDLS</td>
<td>BCT</td>
<td>2500/-</td>
<td>1000/-</td>
<td>500/-</td>
<td>250/-</td>
<td>N</td>
107
<td>N</td>
<td>Y</td>
<td>N</td>
<td>N</td>
<td>N</td>
<td>Y</td>
<td><a href="edit_train.php?id=25222"><button class="btn btn-success">Edit</button></a></td>
<td><a href="delete.php?id=25222"><button class="btn btn-danger">Delete</button></a></td>

</tr>
<tr>
<td>29333</td>
<td>KARNAVATI EXP</td>
<td>AHMD</td>
<td>BCT</td>
<td>2500/-</td>
<td>1000/-</td>
<td>500/-</td>
<td>250/-</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>N</td>
<td>Y</td>
<td>N</td>
<td>Y</td>
<td><a href="edit_train.php?id=29333"><button class="btn btn-success">Edit</button></a></td>
<td><a href="delete.php?id=29333"><button class="btn btn-danger">Delete</button></a></td>

</tr>
<tr>
<td>59442</td>
<td>AHMEDABAD PASS</td>
<td>ADI</td>
<td>BCT</td>
<td>2500/-</td>
<td>1000/-</td>
<td>500/-</td>
<td>250/-</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
108
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td><a href="edit_train.php?id=59442"><button class="btn btn-success">Edit</button></a></td>
<td><a href="delete.php?id=59442"><button class="btn btn-danger">Delete</button></a></td>

</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
<!-- Footer -->
<footer class="sticky-footer bg-white">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>Copyright &copy; Your Website 2019</span>
</div>
</div>
</footer>
<!-- End of Footer -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>
<!-- Logout Modal-->
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-
labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
109
<h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
<div class="modal-footer">
<button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
<a class="btn btn-primary" href="login.php">Logout</a>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin-2.min.js"></script>
<!-- Page level plugins -->
<script src="vendor/datatables/jquery.dataTables.min.js"></script>
<script src="vendor/datatables/dataTables.bootstrap4.min.js"></script>
<!-- Page level custom scripts -->
<script src="js/demo/datatables-demo.js"></script>
</body>
</html>

110
CHAPTER-5
SCOP OF THE PROJECT

PURPOSE
The purpose of this source is to describe the railway reservation system, which provides the train timing
details, reservation, billing and cancellation on various types of reservation namely. In addition, This
Railway reservation service will not only enhance the reservation but will also help the commuters in
getting support, refunds and other real time fixes. Confirm Reservation for confirm Seat.
1 Reservation against Cancellation.
2 Waiting list Reservation.
3 Online Reservation.
4 TatkalReservation
5 TatkalReservation

SCOPE
Technology has transformed many aspects of life in the 21st century, including the way many of us
make train reservations. For example, to make ticketing more convenient for travelers, an online
reservation system helps us in booking tickets from the comfort of our homes or offices. While this is
convenient for most people, it has made things particularly easier for people residing in remote
locations. The various advantages of using the online reservation system are as follows:

Convenient – You can book or cancel your tickets sitting in the comfort of your home or office.

Saves Time and Effort - You can save the time needed to travel to the railway reservation office and
waiting in the queue for your turn.

Towards a greener planet – Instead of printing your ticket you can also
choose to travel with the soft copy of your booked ticket in your laptop or even on your mobiles

Freight Revenue enhancement


1 Passenger Revenue enhancement
2 Improved & optimized service

DEFINITIONS, ACRONYMS, AND ABBREVIATIONS


Some of the few ACRONYMS, ABBREVIATIONS used in Ticket Reservation System of Indian
Railways are as follows:
NTES – National Train Enquiry System
IVRS – Interactive Voice Response system
PRS – passenger reservation system
RAC- Reservation Against Cancellation

BIBLIOGRAPHY

111
https://www.academia.edu
www.scribd.com
downloads.intel.com
cs.swt.edu
Wikipedia.org
ques10.com

112

Potrebbero piacerti anche