0% found this document useful (0 votes)
15 views

Airline Khushi 1

Uploaded by

sumit02022003
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Airline Khushi 1

Uploaded by

sumit02022003
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 154

CIMAGE GROUP OF INSTITUTIONS PATNA

Bachelor of Computer Application


Session (2021-2024)

Project Report On

“Airline management system”

“Bachelor of computer application “

Submitted By

310 - CIMAGE PROFESSIONAL COLLEGE , PATNA

Submitted By Under Joint Guidance Of

Khushi Ranjan Er. Neeraj Kumar Singh

ID – 13322; Roll No.: 45 Computer Application

Registration No :- 21303310098 BCA - 6th, Semester

Session: 2021-2024 Collge-code :- 310


Batch: 1
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

CERTIFICATE
This is to certify that the work embodies in this project entitled,
“Ailine management system”, being submitted by Khushi
Ranjan (21303310098) in partial fulfillment of the requirement for
the award of “Bachelor of of computer applications)” to
Aryabhatta Knowledge University PATNA during the
academic year 2021-24 is a record of bonafide piece of work,
carried out by him/her under our/my supervision and guidance in
the “Department of Computer applications & information
Technology”, Cimage Professional College.

Prof. Neeraj Agrawal Prof. Amit Kumar Shukla Prof. Ravi Soni
Prof. Anjesh Kumar
Director Head of Department-IT Assistant Professor-IT

Date :-
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

Acknowledgement

We express our deepest gratitude to our guides Prof. Ravi Soni Assistant
Professor, and Prof. Anjesh Kumar, Assistant Professor, Department of
Information Science and Computer Application, for their valuable
guidance and encouragement while doing this mini project work.

We are indebted to Prof. Amit Kumar Shukla, Head of the Department and
Prof. Neeraj Agrawal, Principal, for their advice and suggestions at various
stages of the work.

We also extend our thanks to the management Cimage Group of


Institutions Patna, for providing an excellent study environment,
reference materials and laboratories facilities. We remain grateful to
the co-operation and help rendered by the teaching and non- teaching
staff of the department.

Name :- Khushi Ranjan


Roll :- 45 ; Id :- 13322
Session :- 2021-24
Course :- BCA ; College code :- 310
Batches :- BCA AKU 6th sem B1 - Section A
University registration number :- 21303310098
Collegename :- Cimage Professional College
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

Abstract

The Airline Reservation System project aims to develop a


comprehensive and efficient software system for managing
airline reservations. The project's primary objective is to design
and implement a file structure that supports the storage and
retrieval of airline reservation data. This involves creating an
organized and optimized data storage mechanism to handle
large volumes of reservation information, such as passenger
details, flight schedules, seat availability, and booking records.
To achieve this objective, the project adopts a file structure
approach, which involves structuring and organizing the data
within files and directories. The chosen file structure aims to
optimize data access, minimize storage space requirements,
and ensure efficient retrieval and modification of reservation
data.

Furthermore, the project aims to enhance the overall user


experience by implementing intuitive user interfaces and
incorporating features such as real-time seat availability
updates and secure payment processing. These enhancements
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

will enable customers to easily book flights, select preferred

Chapter 1 Introduction 1
Chapter 2 Literature Review 2
Chapter 3 Problem Statement 4
3.1 Problem statement 4
3.2 Objectives 5
3.4 DFD 5
3.4 ER-Digram 5
Chapter 4 System Design and Data Flow 6
4.1 System Design 6
4.2 Data Flow Diagram 6
Chapter 5 Requirement Specification 7
5.1 Hardware Requirements 7
5.2 Software Requirements 8
Chapter 6 Implementation 9
6.1 Functions 9
6.2 Sequence Diagram 10
Chapter 7 Results 11

FUTURE SCOPE 12

Gantt Chart (total time duration 3 months)


Chapter 8 Conclusion 15
seats, and make payments securely through the system.

Table of Contents
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

1. INTRODUCTION

The Airline Reservations System (ARS) was one of the earliest changes to improve

efficiency. ARS eventually evolved into the Computer Reservations System (CRS), and

then into Global Distribution System (GDS). The airline industry created the first GDS in

the 1960s as a way to keep track of flight schedules, availability, and prices.

Although accused of being “dinosaurs” due to their use of legacy system technology,

GDSs were actually among the first e-commerce companies in the world facilitating B-2-

B electronic commerce as early as the mid 1970s, when SABRE (owned by American

Airline) and Apollo (United) began installing their propriety internal reservations systems

in travel agencies. Prior to this, travel agents spent an inordinate amount of time manually

entering reservations. The airlines realized that by automating the reservation process for

travel agents, they could make the travel agents more productive and essentially turn into

an extension of the airline’s sales force. It is these original, legacy GDSs that today

provide the backbone to the Internet travel distribution system.

There are currently four major GDS systems:

1. Amadeus
2. Sabre
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

3. Galileo
4. Worldspan
PROBLEM DEFINITION

In 21st century the world has become a global village where every thing is available

in a single click of mouse button. Aviation sector is one of fastest mode of travel available

with us, both at domestic and international level. To maintain such a large system is a hectic

job. The present system is very time consuming and inefficient.

The definition of our problem lies in manual system and a fully automated system.

Manual system : The system is more prone to errors and some times it encounters

various problems which are unstructured.

Technical system : With the advent of latest technology if we do not update our

system then our business will suffer massive losses financially. The technical system (we

have proposed) contains the tools of latest trend i.e. computers printers, fax etc. The

systems with this technology are very fast, accurate, user-friendly and reliable.

Need of Airlines system

1. A few factors that direct us to develop a new system are given below -:

1) Faster System

2) Accuracy

3) Reliability 4) Informative

5) Reservations.
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

2. OBJECTIVES

• To develop a system to management of airlines, this will perform all the functions

with a click of mouse button’s

• To develop a system that has good management of data along with integrity and

minimizing redundancy.

• To develop a system that will be user friendly in all possible ways.

• To provide better customer support for passengers.


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

3. TOOLS & PLATFORM USED

We have a wide range of options of languages. From these options we can choose

appropriate platform/ tools and languages for development of the project. Some of these

are as follows:-

Programming Languages:- In programming language we have C, C++, C#, Microsoft

Access, Microsoft Visual Basic, and Oracle PL/SQL etc.

Relational Database: - Oracle, IBM DB2, SQL Server, MS Access and FoxPro etc.

SOFTWARE REQUIREMENTS:

Operating system : Windows 2000 or later

Front End : Visual Basic

Back End : SQL Server 2000

HARDWARE SPECIFICATIONS
Processor : Intel Pentium or more

Ram : 128 MB or more


Cache : 512 KB
Hard disk : 16 GB hard disk recommended
4. ANALYSIS
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

DFD for Airline Reservation System

Requesting
Passenger
Request for
Reservation

Airline
Reservation Seat Reserved
System
Reserved
No of Seats
Check
Availability
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

First Level of Data Flow Diagram for


System Login

Verification
SYSTEM Log In ENTER User Name VERIFIY Success
ADMINSTRATOR USERNAME USERNAME Airline
PASSWORD PASSWORD Reservation
Password
Verification System

Verification
Fail

EXIT FROM
SYSTEM
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

Second Level of Data Flow Diagram for


General Inquiry System
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

Third Level DATA FLOW DIAGRAM


OF BOOKING SECTION

Request for
Reservation
Passenger
Booking
Counter
Passenger
Check
No. of Seats Availability
Reserve
Seat

Available
Seat
Database

Reject
Request
Seats
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

E-R Diagram
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

E-R Diagram for Airline Reservation System


ER-DIAGRAM FOR PASSENGER
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

5. SOFTWARE ENGINEERING APPROACH


The field of software engineering is related to the development software in

systematic manner unlike simple programs which can be developed in isolation and there

may not be any systematic approach being followed. As there is large difference between

programming and software engineering. As it provide models that lead to the production of

well documented software in a manner that is predictable. For a mature process, it should

be possible to determine in advance how much time and effort will be required to produce

the final product. To develop successful software I have to follow some models, which act

as guidelines.

The model I have used is Waterfall Model or Classic Life Cycle. In this model

first of all the existed system is observed. Then customer requirements are taken in

consideration then planning, modeling, construction and finally deployment.

Fig.1. Waterfall Model


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

6. SYSTEM DESIGN

Introduction

Analysis collects a great deal of unstructured data through interviews,

questionnaires, on-site observations, and procedural manuals and like. It is required to

organize and convert the data through system flowcharts, data flow diagrams, structured

English, decision tables and the like which support future development of the system.

The Data flow diagrams and various processing logic techniques show how, where,

and when data are used or changed in an information system, but these techniques do not

show the definition, structure and relationships within the data.

It is a way to focus on functions rather than the physical implementation. This is

analogous to the architect’s blueprint as a starting point for system design. The design is a

solution, a “how to” approach, compared to analysis, a “what is” orientation.

System design is a highly creative process. This system design process is also

referred as data modeling. The most common formatted used the E-R notation explains the

characteristics and structure of data independent of how the data may be stored in computer

memories.

The process of system design can be divided into three stages. They are:

Structure design (already discussed)


Database design
Interface design
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

As we know that system design is a solution to “How to approach to the creation of

new system”. It provides the understudying and procedural details necessary for

implementing the system. The steps involved during system design were as follow: -

LOGICAL AND PHYSICAL DESIGN

The current physical system was thoroughly reviewed from point of view how the

data flow, what are file contents, its volumes and frequency etc.

After this input, output specifications security & control specification were

prepared. It was also decided that how physical information will flow through the system

and a physical design walkthrough.

OUTPUT DESIGN

The format of outputs is designed in such a way that it is simple to read and interpret

In the present output we have clearly labeled title it contains date and time and all the fields

are clearly mentioned (labeled).

INPUT DESIGN

.Input should be as simple as possible. It is design to reduce possibility of incorrect

data being enter and the need of system user are considered with this view of mind several

human factor is evaluated.

SCREEN DESIGN

The screen design for inputting the inputs were also panned as the format of inputs.
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

7. DATABASE DESIGN
Table: login
FIELDS DATATYPE DESCRIPTION CONSTRAINT
Username varchar (50) User Name Primary Key
Password varchar (50) User Password

Table: tblCity
FIELDS DATATYPE DESCRIPTION CONSTRAINT
CityCode int (4) Store City Code Primary Key
CityName varchar (50) Store City Name

Table: tblClass
FIELDS DATATYPE DESCRIPTION CONSTRAINT
ClassCode int (4) Store Class Code Primary Key
ClassName varchar (50) Store Class Type
FixedFare int (4) Store Fixed Fare of Class

Table: tblFair
FIELDS DATATYPE DESCRIPTION CONSTRAINT
FlightCode int (4) Store Flight Code Primary Key
ClassName varchar (50) Store Class Type Name
FixedFair int (4) Store Fixed Price Per Seat
FlightName varchar (50) Store Flight Name
CityFrom varchar (50) Store Arrival City Name
CityTo varchar (50) Store Destination City Name
NormalFair int (4) Store Normal Fair
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

BaggageFairPerKg varchar (50) Store Luggage Fair


TotalFair varchar (50) Store Total Fire of Flight

Table: tbleFlight
FIELDS DATATYPE DESCRIPTION CONSTRAINT
Flight_Code int (4) Store Flight Code Primary Key
Flight_Name varchar (50) Store Flight Name
Flight_Origin varchar (50) Store Flight Departure City
Flight_Destination varchar (50) Store Flight Destination Name
Flight_Arr_Time varchar (50) Store Flight Arrival Time
Flight_Dep_Time varchar (50) Store Flight Departure Time
No_Seats int (4) Store Number of Seats
Fare int (4) Store Fare Price

Table: tblPass
FIELDS DATATYPE DESCRIPTION CONSTRAINT
Flight_Code int (4) Store Flight Code Primary Key
Flight_Name varchar (50) Store Flight Name
Origin varchar (50) Store Flight Departure City Nam
Destination varchar (50) Store Flight Destination Name
PassengerName varchar (50) Store Passenger Name
SeatNo int (4) Store Seat No
Fare int (4) Store Faire
Date_of_Res varchar (50) Store Date of Reservation
Ticket_No varchar (50) Store Ticket No
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

8. PROGRAM CODE & INPUT-OUTPUT SCREEN

<?php include('includes/header.php'); ?>


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<div>
<div class="after-nav">
<div class="fixed-text">WELCOME EASYFLY</div>
<div id="text-transition" class="transition-text"></div>
<!--span texts from js-->
</div>
<script src="js/after-nav-script.js"></script>
</div>

<main>
<div class="bg-image"></div>
</main>

<div class="partner-airline">
<h1>Partners airline</h1>

<?php
// Include the connection.php file
include('connection.php');

// SQL query to select all airline from the airline table


$sql = "SELECT * FROM airline";

// Execute the query


$result = mysqli_query($con, $sql);

if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc($result)) {
echo '<div class="partner-airline">';
echo '<img src="' . $row['logo'] . '" alt="' .
$row['airline_name'] . '">';
echo '<p>' . $row['airline_name'] . '</p>';
echo '</div>';
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

}
} else {
echo "No records found";
}

// Close the database connection


mysqli_close($con);
?>
</div>

<?php include('includes/footer.php')?>

CUSTOMER SIGNUP PAGE CODE

<?php require_once 'includes/header.php'; ?>


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<?php require ('includes/showMessage.php'); ?>

<?php

// if user try to access the signup page by typing the

signup page url manyally while s/he is logged in,

// then we can prevent it. S/he will be logged out if s/he

try this.

//Since we didn't add an nav option to access the signup

page then why s/he should access this? So we're

restrciting him/ her.

if (isset($_SESSION['logged_in']) &&

$_SESSION['logged_in'] === true) {

header('location:logout.php');

?>

<div class="wrapper" style="background-image:

url('images/signupback.jpg');">

<div class="inner">
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<div class="image-holder">

<img src="images/signupfront.jpg" alt="">

</div>

<form action="" method="POST">

<h3>Customer Signup</h3>

<div class="form-group">

<input type="text" name="first_name"

placeholder="First Name" class="form-control"

required>

<input type="text" name="last_name"

placeholder="Last Name" class="form-control"

required>

<span id="username_message"></span>

</div>

<div class="form-wrapper">
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<input type="text" name="username"

placeholder="Username" class="form-control"

id="username" required>

</div>

<div class="form-wrapper">

<input type="email" name="email"

placeholder="Email Address" class="form-control"

required>

</div>

<div class="form-wrapper">

<input type="number" name="phone"

placeholder="Phone" class="form-control" required>

</div>

<div class="form-wrapper">

<select name="gender" class="form-control"

required>

<option value="" disabled


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

selected>Gender</option>

<option value="male">Male</option>

<option value="female">Female</option>

<option value="other">Other</option>

</select>

<i class="zmdi zmdi-caret-down" style="font-

size: 17px"></i>

</div>

<div class="form-wrapper">

<input type="password" name="password"

placeholder="Password" class="form-control"

id="password"

required>

<span toggle="#password" class="password-

toggle"

style="position: absolute; right: 10px; top:

50%; transform: translateY(-50%); cursor:


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

pointer;"> </span>

</div>

<div class="form-wrapper">

<input type="password"

name="confirm_password" placeholder="Confirm

Password" class="form-control"

id="confirm-password" required>

<span toggle="#confirm-password"

class="password-toggle"

style="position: absolute; right: 10px; top:

50%; transform: translateY(-50%); cursor:

pointer;"> </span>

</div>

<div class="password-match-container"

style="position: relative;">

<div id="password-match-message" <div

id="password-match-message"
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

style="color: red; font-size: smaller; position:

absolute; margin-top: -5%;"></div>

</div>

<script src="js/tooglePass.js"></script>

<script src="js/passwordMatching.js"></script>

<button type="submit" name="submit">Register

<i class="zmdi zmdi-arrow-right"></i></button>

</form>

</div>

</div>

<?php

if (isset($_POST['submit'])) {

include('connection.php'); // Get form

data

$first_name = $_POST['first_name'];

$last_name = $_POST['last_name'];
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

$username = $_POST['username'];

$email = $_POST['email'];

$phone = $_POST['phone'];

$gender = $_POST['gender'];

$password = $_POST['password'];

$confirm_password = $_POST['confirm_password'];

if ($password != $confirm_password) {

$messageText = "Password don't match"; echo

'<script>var jsMessageText = "' . $messageText

. '";</script>';

exit();

// Check if the email or username already exist in the

database

$check_query = "SELECT * FROM customer

WHERE email = '$email' OR customer_name =


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

'$username'";

$result = $con->query($check_query);

if ($result->num_rows > 0) {

$row = $result->fetch_assoc();

if ($row['email'] == $email) {

$messageText = "Email already registered in the

system, please login.";

} else {

$messageText = "Username is taken, Please choose

a different username.";

echo '<script>var jsMessageText = "' . $messageText

. '";</script>';

} else {

// SQL query to insert data into the customer table


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

$insert_query = "INSERT INTO customer VALUES

('$first_name', '$last_name', '$username', '$email',

$phone, '$gender', '$password')";

// Execute the insert statement

if (mysqli_query($con, $insert_query)) {

$messageText = "Congrats! Successfully

registered";

echo '<script>var jsMessageText = "' .

$messageText . '";</script>';

echo '<meta http-equiv="refresh"

content="3;url=login.php">'; // waiting for 3 seconds to

showing the success message then redirecting.

// Redirect after successful registration

// header('location: index.php');

// exit(); // Make sure to exit after the header() call

} else {
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

// Output an error message to the browser or log it

echo "Error: " . $insert_query . "<br>" .

mysqli_error($con);

// Close the connection

$con->close();

?>

<?php include('includes/footer.php'); ?>


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

AIRLINE LOGIN

<?php include('includes/header.php');

include('includes/showMessage.php');

?>

<?php

// it's not making any sense, if he currently login,

then what's the reason or any usefulness of


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

accessing the login page? if

(isset($_SESSION['logged_in']) &&

$_SESSION['logged_in'] === true) {

header('location:logout.php');

?>

<?php

// Start a session at the beginning of the page

// session_start();

// Check if the 'option' parameter is set and store it

in a session variable

if (isset($_GET['option'])) {

$_SESSION['option'] = $_GET['option'];

}
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

// else {

// // $_SESSION['option'] = 'customer';

// header('location:index.php');

// }

// echo $_SESSION['option'];

?>

<div class="wrapper" style="background-image:

url('images/signupback.jpg');">

<div class="inner">

<div class="image-holder">

<img src="images/loginfront.jpg" alt="">


</div>

<form action="login.php" method="POST">

<h3>

<?php echo $_SESSION['option']; ?>


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

Login

</h3>

<div class="form-wrapper">

<input type="text"

name="email_or_username" placeholder="Email

Address or Username" class="form-control"

required>

</div>

<div class="form-wrapper">

<input type="password"

name="password" placeholder="Password"

class="form-control" id="password"

required>

<span toggle="#password"

class="password-toggle"
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

style="position: absolute; right: 10px;

top: 50%; transform: translateY(-50%); cursor:

pointer;">

</span>

</div>

<script src="js/tooglePass.js"> </script>


<button type="submit"

name="login">Login

<i class="zmdi zmdi-arrow-right"></i>

</button>

</form>

</div>

</div>

<?php
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

if (isset($_POST['login'])) {

include('connection.php');

// Get form data

$email_or_username =

$_POST['email_or_username'];

$password = $_POST['password'];

$user_type = strtolower($_SESSION['option']);

// Check if the email or username exists in the

database

$User = "{$user_type}_name";

// echo $User;

$isEmail = "SELECT * FROM $user_type


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

WHERE (email = '$email_or_username' AND

BINARY pass = '$password')"; // using BINARY to

make the pass column case-sensitive

$isUsername = "SELECT * FROM $user_type

WHERE ($User = '$email_or_username' AND

BINARY pass = '$password')";

$qEmail = $con->query($isEmail);

$qUsername = $con->query($isUsername);

if ($qEmail->num_rows == 1 or $qUsername-

>num_rows == 1) {

// Start a new session or resume the existing

session

session_destroy();

session_start();

// Store user-related information in session


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

variables

$_SESSION['logged_in'] = true;

$_SESSION['user_type'] =

strtolower($user_type);

// echo $_SESSION['user_type'];

if ($qEmail->num_rows == 1) {

$_SESSION['email'] =

$email_or_username;

} else {

$q = "SELECT * FROM $user_type

WHERE $User = '$email_or_username'";

$result = $con->query($q);

$row = $result->fetch_assoc();

$rowValue = $row['email'];

$_SESSION['email'] = $rowValue;
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

// Redirect the user to the dashboard

header("Location:

{$user_type}dashboard.php");

} else {

$query = "select * from $user_type where

(email = '$email_or_username' or $User =

'$email_or_username')";

$result = $con->query($query); if($result-

>num_rows > 0) {

$messageText = "Password incorrect.";

} else {

$messageText = "User doesn't exist, please

register";

}
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

echo '<script>var jsMessageText = "' .

$messageText . '";</script>';

// Close the connection

$con->close();

?>

<?php include('includes/footer.php'); ?>


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

ADMIN LOGIN

<?php

// Define an array to store the navigation options

$navOptions = array(

"Home" => "index.php",

"About Us" => "aboutUs.php",

"Book Now" => "booking-form.php",


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

"Sign up" => array(

"Customer" => "signup.php",

// "Airline" => "#"

),

"Login" => array(

"Customer" => "login.php",

"Airline" => "login.php",

"Admin" => "login.php"

);

?>

<?php

// Define an array to store the navigation options

$navOptions = array(

"Home" => "index.php",


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

"About Us" => "aboutUs.php",

"Book Now" => "booking-form.php",

// "Sign up" => array(

// "Customer" => "signup.php",

// "Airline" => "#"

// ),

"Login" => array(

"Customer" => "login.php",

"Airline" => "login.php",

"Admin" => "login.php"

);

?>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

About Us

<?php include('includes/header.php'); ?>


<main>

<div class="container">

<div class="about-us">

<h1>About Us</h1>

<p>Welcome to EasyFly - Your Trusted


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

Travel Partner</p>

<p>At EasyFly, we're passionate about

connecting you to the world. With our commitment

to excellence and a customer-centric approach, we

have become a preferred choice for travelers seeking

seamless and affordable airline

solutions.</p>

<h2>Who We Are</h2>

<p>EasyFly is a leading airline service

provider, specializing in offering a wide range of

options from various airline companies. Our

dedicated team of travel experts works tirelessly to

provide you with the best travel experience

possible.</p>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<h2>Our Mission</h2>

<p>To make air travel accessible,

convenient, and enjoyable for everyone.</p>

<h2>Our Vision</h2>

<p>To become the go-to platform for

hassle-free and cost-effective air travel.</p>

<h2>Why Choose EasyFly?</h2>

<ul>

<li>Extensive Network</li>

<li>Competitive Pricing</li>

<li>Customer-Centric Approach</li>

<li>24/7 Support</li>

</ul>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<h2>Our Team</h2>

<p>Our success is driven by a team of

aviation enthusiasts who are committed to

innovation and excellence.</p>

<h3>Get in Touch</h3>

<section id = "targeting-contact">

<address>

EasyFly Headquarters<br>

123 EasyFly Avenue,<br>

Cityville, State, ZIP Code<br>

Phone: 8227030900<br>

Email: [email protected]

</address>

</section>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<div class="social-media">

<a href="#"><img

src="images/facebook.png" alt="Facebook"></a>

<a href="#"><img src="images/twitter.png"

alt="Twitter"></a>

<a href="#"><img

src="images/instagram.png"

alt="Instagram"></a>

<a href="#"><img

src="images/linkedin.png" alt="LinkedIn"></a>

</div>

</div>

<div class="developers">

<h4>Company Owners</h4>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<a href=

"https://www.linkedin.com/in/miskat141/" target =

__blank> <img src="images/mishkat.jpg"

alt="Developer 1"></a>

<a href =

"https://www.linkedin.com/in/shakib-hossian-

9ba1a628b/" target = __blank> <img

src="images/shakib.jpg" alt="Developer 2"> </a>

</div>

</div>

</main>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<?php include('includes/footer.php'); ?>

Flight Booking
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<?php

session_start();

require_once('includes/showMessage.php'); require

'includes/functions.php'; displaySessionMessage();

if (isset($_SESSION['user_type'])) {

include("navOptions/customer-dashboard-nav-

options.php");

} else {

include("navOptions/index-nav-options.php");

}
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

if (isset($_POST['source_date'])) {

unset($_SESSION['source_date']);

if (isset($_POST['source_time'])) {

unset($_SESSION['source_time']);

if (isset($_POST['dest_date'])) {

unset($_SESSION['dest_date']);

if (isset($_POST['dest_time'])) {

unset($_SESSION['dest_time']);

if (isset($_POST['dep_airport'])) {

unset($_SESSION['dep_airport']);

}
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

if (isset($_POST['arr_airport'])) {

unset($_SESSION['arr_airport']);

if (isset($_POST['flight_class'])) {

unset($_SESSION['flight_class']); }

?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-

width, initial-scale=1.0">

<link rel="stylesheet" href="css/style.css" />

<link rel="stylesheet"

href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/
c
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

ss/bootstrap.min.css">

<link rel="stylesheet"

href="https://cdnjs.cloudflare.com/ajax/libs/fontaweso

me/6.2.1/css/all.min.css" />

<link rel="stylesheet" type="text/css"

href="css/booking-form.css" />

<link rel="stylesheet" type="text/css"

href="css/general.css">

</head>

<body>

<header>

</header>

<nav>

<a class="logo" href="index.php"> <img

src="images/Easyfly.png" alt="site-logo"> </a>

<?php include('navOptions/nav.php') ?>

</nav>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<div class="container mt-5" style="margin-top:

150px;">

<div class="left-column">

<img class="booking-img"

src="images/flightbooking.jpg" alt="booking

image" width="150"

height="150">

</div>

<div class="right-column">

<h3>Flight Booking</h3>

<form method="POST" action="available-

flights.php">

<div class="form-group">

<label for="source">Departure</label>

<input type="date" name="source_date"

class="form-control" required>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<input type="time" name="source_time"

class="form-control mt-2" required>

</div>

<div class="form-group">

<label for="dest">Arrival</label>

<input type="date" name="dest_date"

class="form-control" required>

<input type="time" name="dest_time"

class="form-control mt-2" required>

</div>

<div class="form-group">

<label for="dep_airport">From</label>

<select name="dep_airport" class="form-

control" required>

<option value="" disabled selected>Select

Departure Airport</option>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<?php

include('connection.php');

// Construct the SQL query to select all

airport names

$sql = 'SELECT airport_name FROM

airport';

// Execute the SQL query

$result = mysqli_query($con, $sql);

// Check if the query was successful

if ($result) {

// Loop through the results and create an

option for each airport

while ($row =

mysqli_fetch_assoc($result)) {
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

echo '<option value="' .

$row['airport_name'] . '">' . $row['airport_name'] .

'</option>';

} else {

// Handle the case where the query fails

echo '<option value="" disabled selected>Unable to

fetch airport data</option>';

?>

</select>

</div>

<div class="form-group">

<label for="arr_airport">To</label>

<select name="arr_airport" class="form-

control" required>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<option value="" disabled selected>Select

Arrival Airport</option>

<?php

include('connection.php');

// Construct the SQL query to select all

airport names

$sql = 'SELECT airport_name FROM

airport';

// Execute the SQL query

$result = mysqli_query($con, $sql);

// Check if the query was successful

if ($result) {

// Loop through the results and create an

option for each airport


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

while ($row =

mysqli_fetch_assoc($result)) {

echo '<option value="' .

$row['airport_name'] . '">' . $row['airport_name'] .

'</option>';

} else {

// Handle the case where the query fails

echo '<option value="" disabled selected>Unable to

fetch airport data</option>';

?>

</select>

</div>

<div class="form-group">

<label for="flight_class">Flight
Class</label>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<select name="flight_class" class="form-

control" required>

<option value="" disabled selected>Select

Flight Class</option>

<option

value="Economy">Economy</option>

<option

value="Business">Business</option>

<option value="First Class">First

Class</option>

</select>

</div>

<!-- Add the airline_name Name field here -->

<div class="form-group">

<label for="airline">Airline Name</label>

<select name="airline_name" class="form-


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

control">

<option value="" selected>Select Airline

Name (Optional)</option>

<?php

include('connection.php');

// Construct the SQL query to select all

airline names

$sql = 'SELECT airline_name FROM

airline';

// Execute the SQL query

$result = mysqli_query($con, $sql);

// Check if the query was successful

if ($result) {

// Loop through the results and create an

option for each airline


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

while ($row =

mysqli_fetch_assoc($result)) {

echo '<option value="' .

$row['airline_name'] . '">' . $row['airline_name'] .

'</option>';

} else {

// Handle the case where the query fails

echo '<option value="" disabled selected>Unable to

fetch airline data</option>';

?>

</select>

</div>

<!-- End of Airline Name field -->

<!-- Add a Flight Search button -->


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<button name="search_flight" type="submit"

class="btn btn-primary">Search Flights</button>

</form>

<?php

if (!isset($_SESSION['user_type'])) {

echo '<br><h6><p>Please <a href =

"login.php"> login</a> first to book a ticket</p></h6>';

if (isset($_SESSION['user_type']) &&

($_SESSION['user_type'] == 'admin' or

$_SESSION['user_type'] == 'airline')) {

echo '<br><h6><p>Login as a customer to book

a ticket</p></h6>';

?>

</div>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

</div>

<footer>

<ul>

<li><a href="index.php">Home</a></li>

<li><a href="aboutUs.php">About Us</a></li>

<li><a

href="aboutUs.php#targetingcontact">C

ontact</a></li>

<li><a

href="bookingform.php">Services</a></li

>

</ul>

<p>&copy 2023 EASYFLY, all right reserved</p>

<script src="https://code.jquery.com/jquery-
3.5.1.js"

integrity="sha256-

QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjP

Dc=" crossorigin="anonymous"></script>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<script

src="https://cdn.jsdelivr.net/npm/[email protected]/dist/u

md/popper.min.js"

integrity="sha384-

9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFh

bGU+6BZp6G7niu735Sk7lN"

crossorigin="anonymous"></script>

<script

src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/

js/bootstrap.min.js"

integrity="sha384-

B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxof

vL8/KUEfYiJOMMV+rV"

crossorigin="anonymous"></script>

</footer> </body>

</html>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<?php

session_start(); if

(!isset($_SESSION['user_type'])) {

header('location: login.php');

require_once('includes/showMessage.php');

require 'includes/functions.php';

displaySessionMessage();

include("navOptions/customer-dashboard-

nav-
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

options.php");

// Get the user_email from the session

$user_email = $_SESSION['email'];

//fetch the name require_once

'connection.php';

$sql = "SELECT first_name, last_name FROM customer

WHERE email = '$user_email'";

$result = $con->query($sql);

if ($result->num_rows > 0) {

$row = $result->fetch_assoc();

$customer_name = $row['first_name'] . ' ' .

$row['last_name']; // Use dots for concatenation

} else {

$customer_name = "Guest"; // Default if no name

found

}
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-

width, initial-scale=1.0">

<title>Managing Bookings</title>

<link rel="stylesheet" href="css/style.css" />

<!-- Fontawesome CDN Link -->

<link rel="stylesheet"

href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.
2

/css/bootstrap.min.css">

<link rel="stylesheet"

href="https://cdnjs.cloudflare.com/ajax/libs/fontaweso

me/6.2.1/css/all.min.css" />
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<link rel="stylesheet" type="text/css"

href="css/general.css">

</head>

<body>

<header>

</header>

<nav>

<a class="logo" href="index.php"> <img

src="images/Easyfly.png" alt="site-logo"> </a>

<?php include('navOptions/nav.php') ?>

</nav>

<div class="user-info">

<p style="text-align: right; font-size: 24px;">


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<span style="font-weight: light; color: #999;

margin-bottom: 10px; margin-right: 10px"><em

style="font-style: italic;">user:</em></span>

<span style="font-size: 20pt; color: #333;

margin-right: 35px"><?php echo $customer_name;

?></span>

</p>

</div>

<div class="container mt-5">

<h2>Your Booked Flights</h2>

<table class="table table-striped">

<thead class="table-dark">

<tr>

<!-- <th>Customer Email</th> -->

<th>Airline</th>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<th>Departure Airport</th>

<th>Arrival Airport</th>

<th>Departure</th>

<th>Arrival</th>

<th>Class</th>

<th> Price</th>

<th>Actions</th>

</tr>

</thead>

<tbody>

<!-- Displaying bookings in the table with joined

data for the user_email -->

<?php

include("connection.php");

// Delete Booking Operation

if (isset($_POST["confirm_delete_booking"])) {
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

$deleteBookingId =

$_POST["delete_booking_id"];

$deleteSql = "DELETE FROM booked

WHERE id = '$deleteBookingId'";

if ($con->query($deleteSql) === TRUE) {

setSessionMessage("Booking deleted

successfully");

header('location: customer-

dashboard.php');

} else {

echo "<script>showModal('errorModal',

'Error deleting booking: " . $con->error . "');</script>";


}

// Displaying bookings in the table with joined

data for the user_email

$sqlBookings = "SELECT b.id,


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

b.customer_email, f.airline_name, a1.airport_name as

dep_airport, a2.airport_name as arr_airport,

f.source_date, f.source_time, f.dest_date,

f.dest_time, f.flight_class,

CASE

WHEN f.flight_class = 'Economy' THEN 0.6


*

f.price

WHEN f.flight_class = 'Business' THEN 0.8 *

f.price

WHEN f.flight_class = 'First Class' THEN

f.price

ELSE 0.0 -- Handle other cases if necessary

END AS price

FROM booked b

INNER JOIN flight f ON b.flight_id = f.id

INNER JOIN customer c ON b.customer_email =

c.email
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

INNER JOIN airport a1 ON f.dep_airport_id =

a1.airport_id

INNER JOIN airport a2 ON f.arr_airport_id =

a2.airport_id

WHERE c.email = '$user_email'"; // Filter by

user_email

$resultBookings = $con->query($sqlBookings);

if ($resultBookings->num_rows > 0) {

while ($rowBooking = $resultBookings-

>fetch_assoc()) {

echo "<tr>";

// echo "<td>" .

$rowBooking["customer_email"] . "</td>";

echo "<td>" .

$rowBooking["airline_name"] . "</td>";

echo "<td>" . $rowBooking["dep_airport"]


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

. "</td>";

echo "<td>" . $rowBooking["arr_airport"]

. "</td>";

echo "<td>" .
$rowBooking["source_date"]

. "</td>";

echo "<td>" . $rowBooking["dest_date"] .

"</td>";

echo "<td>" . $rowBooking["flight_class"]

. "</td>";

echo "<td>" . $rowBooking["price"] .

"</td>";

echo "<td>";

echo "<button class='btn btn-danger

btnsm delete-booking' data-id='" . $rowBooking["id"] .

"'

data-toggle='modal' data-

target='#deleteBookingModal'>Delete</button>";
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

echo "</td>";

echo "</tr>";

} else {

echo "<tr><td colspan='8'

class='textcenter'><h3>No flight booked Yet! :(

<br><a href =

'booking-form.php'> Book Now :)</a></h3></td></tr>";

?>

</tbody>

</table>

<!-- Delete Booking Form -->

<form action="" method="POST">

<input type="hidden"

name="delete_booking_id" id="delete_booking_id"

value="">
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<div class="modal fade"

id="deleteBookingModal" tabindex="-1" role="dialog"

aria-

labelledby="deleteBookingModalLabel" aria-

hidden="true">

<div class="modal-dialog"

role="document">

<div class="modal-content">

<div class="modal-header">

<h5 class="modal-title"

id="deleteBookingModalLabel">Confirm Delete</h5>

<button type="button"

class="close" data-dismiss="modal" aria-label="Close">


<span aria-

hidden="true">&times;</span>

</button>

</div>

<div class="modal-body">
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

Are you sure you want to delete this

booking?

</div>

<div class="modal-footer">

<button type="button" class="btn

btn-secondary" data-dismiss="modal">Cancel</button>

<button type="submit" class="btn

btn-danger"

name="confirm_delete_booking">Delete</button>

</div>

</div>

</div>

</div>

</form>

</div>

<!-- Bootstrap and jQuery Scripts -->


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<script src="https://code.jquery.com/jquery-

3.5.1.slim.min.js"></script>

<script

src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected].

1/dist/umd/popper.min.js"></script>

<script

src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/

js/bootstrap.min.js"></script>

<!-- JavaScript to handle modals -->

<script>

// Click event handler for delete buttons


$(document).on("click", ".delete-booking",

function () {

var deleteBookingId = $(this).data('id');

$('#delete_booking_id').val(deleteBookingId);

});

</script>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<footer>

<ul>

<li><a href="index.php">Home</a></li>

<li><a href="aboutUs.php">About Us</a></li>

<li><a

href="aboutUs.php#targetingcontact">C

ontact</a></li>

<li><a

href="bookingform.php">Services</a></li

>

</ul>

<p>&copy 2024 radhe radhe EASYFLY, all right

reserved</p>

</footer>

</body>

</html>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

Change Password

<?php include('includes/header.php');

require_once('includes/showMessage.php');

?>

<div class="container">

<h2>Change Password</h2>

<div class="form-and-image-container">
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<div class="image-container">

<img src="images/changePassword.jpg"

alt="Change Password Image">

</div>

<form action="change-password.php"

method="POST" class="password-form">

<div class="form-group">

<label for="old_password">Old

Password:</label>

<input type="password"

name="old_password" id="old_password"

required>

</div>

<div class="form-group">

<label for="new_password">New
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

Password:</label>

<input type="password"

name="new_password" id="new_password"

required>

</div>

<div class="form-group">

<label

for="confirm_password">Confirm New

Password:</label>

<input type="password"

name="confirm_password"

id="confirm_password" required>

</div>

<button type="submit"

name="change_password">Change
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

Password</button>

</form>

</div>

</div>

<?php

if (!isset($_SESSION['logged_in'])) { //
Redirect $User who are not logged in to the

login page

header('Location: index.php');

exit();

if (isset($_POST['change_password'])) {

include('connection.php');
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

// Get form data

$old_password = $_POST['old_password'];

$new_password = $_POST['new_password'];

$confirm_password =

$_POST['confirm_password'];

$email = $_SESSION['email'];

$User = $_SESSION['user_type'];

// Retrieve the user's current password from the

database

$query = "SELECT pass FROM $User WHERE

email = '$email'";

$result = $con->query($query);

if ($result->num_rows == 1) {

$row = $result->fetch_assoc();

$current_password = $row['pass'];
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

// Verify the old password if

($old_password === $current_password) {

// Check if the new password and

confirmation match

if ($new_password === $confirm_password)

// Update the password in the database

$update_query = "UPDATE $User SET

pass = '$new_password' WHERE email =

'$email'";

if ($con->query($update_query) ===

TRUE) {

$messageText = "Password changed

successfully.";
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

echo '<script>var jsMessageText = "' .

$messageText . '";</script>';

// echo '<meta http-equiv="refresh"

content="2;url=customer-dashboard.php">';

echo '<meta http-equiv="refresh"

content="2;url=' . $User . '-dashboard.php">'; //

Redirect to the appropriate dashboard

} else {

$messageText = "Error updating

password: " . $con->error;

echo '<script>var jsMessageText = "' .

$messageText . '";</script>';

} else {
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

$messageText = "New password and

confirmation do not match.";

echo '<script>var jsMessageText = "' .

$messageText . '";</script>';

} else {

$messageText = "Old password is

incorrect.";

echo '<script>var jsMessageText = "' .

$messageText . '";</script>';

} else {

$messageText = "Something went wrong";

echo '<script>var jsMessageText = "' .

$messageText . '";</script>';
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

// Close the connection

$con->close();

?>

<?php include('includes/footer.php'); ?>

Airline Home Page

<?php require_once('includes/showMessage.php')
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

?>

<?php

session_start();

if(!isset($_SESSION['user_type'])) {

header('location: login.php');

require 'includes/functions.php';

displaySessionMessage();

?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8" />


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<meta http-equiv="X-UA-Compatible"

content="IE=edge" />

<meta name="viewport"

content="width=device-width, initial-scale=1.0" />

<title>Adding Airlines Company</title>

<link rel="stylesheet" href="css/style.css" />


<!-- Fontawesome CDN Link -->

<link rel="stylesheet"

href="https://stackpath.bootstrapcdn.com/bootstra

p/4.5.2/css/bootstrap.min.css">

<link rel="stylesheet"

href="https://cdnjs.cloudflare.com/ajax/libs/fontaweso

me/6.2.1/css/all.min.css" />

</head>

<body>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<?php include('includes/admin-nav.php') ?>;

<main>

<div class="container mt-5">


<h2>Airlines</h2>

<!-- Add Airline Button -->

<div class="mb-3">

<button type="button" class="btn

btnsuccess" data-toggle="modal"

datatarget="#addAirlineModal">Add

Airline</button>

</div>

<table class="table table-striped"

style="margin-bottom:0px;">
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<thead class="table-dark">

<tr>

<th style="width: 20%;">Email</th>


<th>Password</th>

<th>Airline Name</th>

<th>Logo</th>

<th>Actions</th>

</tr>

</thead>

<tbody>

<?php

include("connection.php");

//airline add operation


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

if

($_SERVER["REQUEST_METHOD"] ==

"POST" && isset($_POST["add_airline"])) {

$newEmail =

$_POST["new_email"];

$newPassword =

$_POST["new_password"];

$newAirlineName =

$_POST["new_airline_name"];

// Handle uploaded logo image

$targetDir = "uploads/";

$targetFile = $targetDir .

basename($_FILES["new_logo"]["name"]);

// Check if the directory exists, if not,


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

create it

if (!file_exists($targetDir)) {

mkdir($targetDir, 0777, true);

if

(move_uploaded_file($_FILES["new_logo"]["tmp_

name"], $targetFile)) {

$newLogoPath = $targetFile;

// Check if the email already exists

in the table

$emailCheckSql = "SELECT *

FROM airline WHERE email = '$newEmail'";


$emailCheckResult = $con-

>query($emailCheckSql);
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

// Check if the airline name

already exists in the table

$nameCheckSql = "SELECT *

FROM airline WHERE airline_name =

'$newAirlineName'";

$nameCheckResult = $con-

>query($nameCheckSql);

if ($emailCheckResult->num_rows

> 0) {

// An airline with the same email

already exists

setSessionMessage("Airline with

this email is already registered");

} elseif ($nameCheckResult-
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

>num_rows > 0) {

// An airline with the same name

already exists

setSessionMessage("The airline

name is already taken");

} else {

// No duplicate records found,

proceed with the INSERT query

$insertSql = "INSERT INTO

airline VALUES ('$newEmail', '$newPassword',

'$newAirlineName', '$newLogoPath')";

if ($con->query($insertSql) ===

TRUE) {

setSessionMessage("Airline

added successfully");
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

} else {

setSessionMessage("An error

occurred while adding the record");

header('location:airlines.php');

} else {

setSessionMessage("Error

uploading logo");

header('location:airlines.php');

// Update Operation if

(isset($_POST["edit_airline"])) {
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

$editEmail = $_POST["edit_email"];

$updateSql = "UPDATE airline SET

";

$updateValues = array(); // An array

to store the fields to update

// Check if a new password was

provided

if

(!empty($_POST["edit_password"])) {

$editPassword =

$_POST["edit_password"];

$updateValues[] =

"pass='$editPassword'";

}
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

// Check if a new airline name was

provided

$editAirlineName =

$_POST["edit_airline_name"];

if

(!empty($_POST["edit_airline_name"])) {
$nameCheckSql = "SELECT *

FROM airline WHERE airline_name =

'$editAirlineName'";

$nameCheckResult = $con-

>query($nameCheckSql);

if ($nameCheckResult->num_rows

> 0) {

// An airline with the same name

already exists
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

setSessionMessage("The airline

name is already taken");

header('location: airlines.php');

exit();

$updateValues[] =

"airline_name='$editAirlineName'";

// Check if a new logo image was

uploaded

if

(!empty($_FILES["edit_logo"]["name"])) {

// Handle uploaded logo image

$targetDir = "uploads/";
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

$targetFile = $targetDir .

basename($_FILES["edit_logo"]["name"]);

// Check if the directory exists, if

not, create it

if (!file_exists($targetDir)) {

mkdir($targetDir, 0777, true);

if

(move_uploaded_file($_FILES["edit_logo"]["tmp_

name"], $targetFile)) {

$editLogoPath = $targetFile;

$updateValues[] =

"logo='$editLogoPath'";

} else {
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

setSessionMessage("Error

updating logo");

exit;

// Combine the update values into the

SQL query

$updateSql .= implode(", ",

$updateValues);

$updateSql .= " WHERE

email='$editEmail'";

// Check if any values were provided

for update
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

if (empty($updateValues)) {

setSessionMessage("No values provided for

update");

header('location: airlines.php');

exit();

if ($con->query($updateSql) ===

TRUE) {

setSessionMessage("Record

updated successfully");

header('location: airlines.php');

} else {

echo

"<script>showModal('errorModal', 'Error

updating record: " . $con->error . "');</script>";


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

header('location: airlines.php');

if ($con->connect_error) {

die("connection failed: " . $con-

>connect_error);

// Delete Operation

if (isset($_GET["delete"])) {

$deleteEmail = $_GET["delete"];

// Delete the record with the specified


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

email

$deleteSql = "DELETE FROM

airline WHERE email = '$deleteEmail'";

if ($con->query($deleteSql) ===

TRUE) {

setSessionMessage("Airline

deleted successfully");

} else {

echo 'Error deleting record: ' .

$con->error;

header('location: airlines.php');

}
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

// Displaying airlines in the table

$sqlAirlines = "SELECT * FROM

airline";

$resultAirlines = $con-

>query($sqlAirlines);

?>

<?php

while ($rowAirline = $resultAirlines-

>fetch_assoc()) {

echo "<tr>";

echo "<td>" .

$rowAirline["email"] . "</td>";

echo "<td>" .

$rowAirline["pass"] . "</td>";

echo "<td>" .
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

$rowAirline["airline_name"] . "</td>";

echo "<td><img src='" .

$rowAirline["logo"] . "' alt='Airline Logo'

height='50'></td>";

echo "<td>";

echo "<button class='btn

btnprimary btn-sm edit-record' data-id='" .

$rowAirline["email"] . "' data-toggle='modal'

data-target='#editAirlineModal'>Edit</button>";

echo "<button class='btn

btndanger btn-sm delete-record' data-id='" .

$rowAirline["email"] . "' data-toggle='modal'


data-

target='#deleteAirlineModal'>Delete</button>";

echo "</td>";

echo "</tr>";
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

?>

</tbody>

</table>

<?php

// Close the database connection

$con->close();

?>

<!-- Add Airline Modal -->

<div class="modal fade"

id="addAirlineModal" tabindex="-1"

role="dialog"

aria-

labelledby="addAirlineModalLabel" aria-
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

hidden="true">

<div class="modal-dialog"

role="document">

<div class="modal-content">

<div class="modal-header">

<h5 class="modal-title"

id="addAirlineModalLabel">Add Airline</h5>

<button type="button"

class="close" data-dismiss="modal" aria-

label="Close">

<span aria-

hidden="true">&times;</span>

</button>

</div>

<div class="modal-body">
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<form action="airlines.php"

method="POST" enctype="multipart/form-

data">

<div class="form-group">

<label

for="new_email">Email</label>

<input type="email"

class="form-control" id="new_email"

name="new_email"

required>

</div>

<div class="form-group">

<label

for="new_password">Password</label>

<input type="password"
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

class="form-control" id="new_password"

name="new_password" required>

</div>

<div class="form-group">

<label

for="new_airline_name">Airline Name</label>

<input type="text"

class="form-control" id="new_airline_name"
name="new_airline_name" required>

</div>

<div class="form-group">

<label

for="new_logo">Logo Image</label>

<input type="file"
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

class="form-control-file" id="new_logo"

name="new_logo"

accept="image/*"

required>

</div>

<div class="modal-footer">

<button type="button"

class="btn btn-secondary"

data-

dismiss="modal">Cancel</button>

<button type="submit"

class="btn btn-primary"

name="add_airline">Save</button>

</div>

</form>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

</div>

</div>

</div>

</div>

<!-- Edit Airline Modal -->

<div class="modal fade"

id="editAirlineModal" tabindex="-1"

role="dialog"

aria-

labelledby="editAirlineModalLabel" aria-

hidden="true">

<div class="modal-dialog"

role="document">

<div class="modal-content">
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<div class="modal-header">

<h5 class="modal-title"

id="editAirlineModalLabel">Edit Airline</h5>

<button type="button"

class="close" data-dismiss="modal" aria-

label="Close">

<span aria-

hidden="true">&times;</span>

</button>

</div>

<div class="modal-body">

<form action="airlines.php"

method="POST" enctype="multipart/form-

data">

<input type="hidden"
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

name="edit_email" id="edit_email_hidden">

<div class="form-group">

<label

for="edit_password">Password</label>

<input type="password"

class="form-control" id="edit_password"
name="edit_password">

</div>

<div class="form-group">

<label

for="edit_airline_name">Airline Name</label>

<input type="text"

class="form-control" id="edit_airline_name"

name="edit_airline_name">

</div>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<div class="form-group">

<label

for="edit_logo">Logo Image</label>

<input type="file"

class="form-control-file" id="edit_logo"

name="edit_logo"

accept="image/*">

</div>

<div class="modal-footer">

<button type="button"

class="btn btn-secondary"

data-

dismiss="modal">Cancel</button>

<button type="submit"
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

class="btn btn-primary"

name="edit_airline">Save

Changes</button>

</div>

</form>

</div>

</div>

</div>

</div>

<!-- Delete Airline Modal -->

<div class="modal fade"

id="deleteAirlineModal" tabindex="-1"

role="dialog"

aria-
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

labelledby="deleteAirlineModalLabel" aria-

hidden="true">

<div class="modal-dialog"

role="document">

<div class="modal-content">

<div class="modal-header">

<h5 class="modal-title"

id="deleteAirlineModalLabel">Confirm

Delete</h5>

<button type="button"

class="close" data-dismiss="modal" aria-

label="Close">

<span aria-

hidden="true">&times;</span>

</button>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

</div>

<div class="modal-body">
Are you sure you want to

delete this airline?

</div>

<div class="modal-footer">

<button type="button"

class="btn btn-secondary"

datadismiss="modal">Cancel</button>

<button type="button"

class="btn btn-danger"

id="confirmDelete">Delete</button>

</div>

</div>

</div>

</div>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<!-- //Success Modal

<div class="modal fade" id="successModal"

tabindex="-1" role="dialog"

arialabelledby="successModalLabel"

ariahidden="true">

<div class="modal-dialog"

role="document">

<div class="modal-content">

<div class="modal-header">

<h5 class="modal-title"

id="successModalLabel">Success</h5>

<button type="button" class="close" data-

dismiss="modal" aria-label="Close">
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<span aria-

hidden="true">&times;</span>

</button>

</div>

<div class="modal-body"

id="successModalBody">

Record operation was successful.

</div>

<div class="modal-footer">

<button type="button" class="btn

btn-primary"

datadismiss="modal">Close</button>

</div>

</div>

</div>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

</div>

// Error Modal

<div class="modal fade" id="errorModal"

tabindex="-1" role="dialog"

arialabelledby="errorModalLabel"

ariahidden="true">

<div class="modal-dialog"

role="document">

<div class="modal-content">

<div class="modal-header">

<h5 class="modal-title"

id="errorModalLabel">Error</h5>

<button type="button" class="close"

data-dismiss="modal" aria-label="Close">

<span aria-
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

hidden="true">&times;</span>

</button>

</div>

<div class="modal-body"

id="errorModalBody">

An error occurred during the

operation.

</div>

<div class="modal-footer">

<button type="button" class="btn

btn-danger"

datadismiss="modal">Close</button>

</div>

</div>

</div>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

</div>

</div> -->

<!-- Bootstrap and jQuery Scripts -->

<script

src="https://code.jquery.com/jquery-

3.5.1.slim.min.js"></script>

<script

src="https://cdn.jsdelivr.net/npm/[email protected].

1/dist/umd/popper.min.js"></script>

<script

src="https://stackpath.bootstrapcdn.com/bootstrap

/4.5.2/js/bootstrap.min.js"></script>

<!-- JavaScript to handle modals and


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

delete operation -->

<script>

// function

showSuccessModal(message) {

//

$('#successModalBody').text(message);

//

$('#successModal').modal('show');

// }

// function

showErrorModal(message) {

//

$('#errorModalBody').text(message);

// $('#errorModal').modal('show');

// }
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

// Function to set the email of the

record to be edited in the edit modal

function setEditEmail(editEmail) {

$('#edit_email_hidden').val(editEmail);

// Click event handler for edit

buttons

$(document).on("click", ".edit-

record", function () {

var editEmail = $(this).data('id');

setEditEmail(editEmail);

});

// Function to set the ID of the record


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

to be deleted in the modal

$(document).on("click", ".delete-

record", function () {

var email = $(this).data('id');


$("#confirmDelete").data('id',

email);

});

$(document).on("click",

"#confirmDelete", function () {

var email = $(this).data('id');

window.location.href = "?delete="

+ email;

});
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

</script>

</body>

</html>

Airline Admin Home Page


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<?php

// Define an array to store the navigation options

$navOptions = array(

"Home" => "index.php",

"About Us" => "aboutUs.php",

"Book Now" => "booking-form.php",

"Sign up" => array(

"Customer" => "signup.php",

// "Airline" => "#"

),

"Login" => array(

"Customer" => "login.php",

"Airline" => "login.php",

"Admin" => "login.php"


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

);

?>

<?php

session_start(); if

(!isset($_SESSION['user_type'])) {

header('location: login.php');

require_once('includes/showMessage.php'); require

'includes/functions.php';

displaySessionMessage();

include("navOptions/airline-dashboard-nav-options.php");

// Get the user_email from the session

$user_email = $_SESSION['email'];

//fetch the name require_once

'connection.php';

$sql = "SELECT airline_name FROM airline WHERE email =

'$user_email'";

$result = $con->query($sql);

if ($result->num_rows > 0) {

$row = $result->fetch_assoc();
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

$customer_name = $row['airline_name'];

} else {

$customer_name = "Guest"; // Default if no name found

?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-

scale=1.0">

<title>Managing Bookings</title>

<link rel="stylesheet" href="css/style.css" />

<!-- Fontawesome CDN Link -->

<link rel="stylesheet"

href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.

css">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-

awesome/6.2.1/css/all.min.css" />

<link rel="stylesheet" type="text/css" href="css/general.css">

</head>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<body>

<header>

</header>

<nav>

<a class="logo" href="index.php"> <img src="images/Easyfly.png"

alt="site-logo"> </a>

<?php include('navOptions/nav.php') ?>

</nav>

<div class="user-info">

<p style="text-align: right; font-size: 24px;">

<span style="font-weight: light; color: #999; margin-bottom: 10px;

margin-right: 10px"><em style="font-style: italic;">user:</em></span>

<span style="font-size: 20pt; color: #333; margin-right:

35px"><?php echo $customer_name; ?></span>

</p>

</div>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<div class="container mt-5">

<h2>Booked Flight List</h2>

<table class="table table-striped">

<thead class="table-dark">

<tr>

<th>Booking ID</th> <!-- Include this line for the ID field -->

<th>Customer Email</th>

<th>Flight ID</th>

<th>Departure Airport</th>

<th>Arrival Airport</th>

<th>Departure</th>

<th>Arrival</th>

<th>Class</th>

<th>Actions</th>

</tr>

</thead>

<tbody>

<!-- Displaying bookings in the table with joined data for the

user_email -->

<?php
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

include("connection.php");

// Delete Booking Operation

if (isset($_POST["confirm_delete_booking"])) {

$deleteBookingId = $_POST["delete_booking_id"];

$deleteSql = "DELETE FROM booked WHERE id =

'$deleteBookingId'";

if ($con->query($deleteSql) === TRUE) {

setSessionMessage("Booking deleted successfully");

header('location: airline-dashboard.php');

} else {

echo "<script>showModal('errorModal', 'Error deleting

booking: " . $con->error . "');</script>";

$sqlBookings = "SELECT b.id, b.customer_email, b.flight_id,

a1.airport_name as dep_airport, a2.airport_name as arr_airport,

f.source_date, f.source_time, f.dest_date, f.dest_time, f.flight_class

FROM booked b

INNER JOIN flight f ON b.flight_id = f.id

INNER JOIN airline a ON f.airline_email = a.email

INNER JOIN airport a1 ON f.dep_airport_id = a1.airport_id


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

INNER JOIN airport a2 ON f.arr_airport_id = a2.airport_id

WHERE a.email = '$user_email'"; // Filter by airline_email

$resultBookings = $con->query($sqlBookings);

if ($resultBookings->num_rows > 0) {

while ($rowBooking = $resultBookings->fetch_assoc()) {

echo "<tr>";

echo "<td>" . $rowBooking["id"] . "</td>"; // Include this line

for the ID field

echo "<td>" . $rowBooking["customer_email"] . "</td>";

echo "<td>" . $rowBooking["flight_id"] . "</td>"; echo

"<td>" . $rowBooking["dep_airport"] . "</td>"; echo

"<td>" . $rowBooking["arr_airport"] . "</td>"; echo

"<td>" . $rowBooking["source_date"] . "</td>"; echo

"<td>" . $rowBooking["dest_date"] . "</td>"; echo

"<td>" . $rowBooking["flight_class"] . "</td>";

echo "<td>";

echo "<button class='btn btn-danger btn-sm delete-booking' data-

id='" . $rowBooking["id"] . "' data-toggle='modal'

datatarget='#deleteBookingModal'>Delete</button>";
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

echo "</td>";

echo "</tr>";

} else {

echo "<tr><td colspan='8' class='text-center'><h3>No one have

chosen your airline!</h3><br><h5>Please do some

Marketing</h5></td></tr>";

?>

</tbody>

</table>

<!-- Delete Booking Form -->

<form action="" method="POST">

<input type="hidden" name="delete_booking_id"

id="delete_booking_id" value="">

<div class="modal fade" id="deleteBookingModal" tabindex="-

1" role="dialog"

aria-labelledby="deleteBookingModalLabel" aria-

hidden="true">

<div class="modal-dialog" role="document">

<div class="modal-content">

<div class="modal-header">
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<h5 class="modal-title"

id="deleteBookingModalLabel">Confirm Delete</h5>

<button type="button" class="close" data-

dismiss="modal" aria-label="Close">

<span aria-hidden="true">&times;</span>

</button>

</div>

<div class="modal-body">

Are you sure you want to delete this booking?

</div>

<div class="modal-footer">

<button type="button" class="btn btn-secondary"

data-dismiss="modal">Cancel</button>

<button type="submit" class="btn btn-danger"

name="confirm_delete_booking">Delete</button>

</div>

</div>

</div>

</div>

</form>

</div>

<!-- Bootstrap and jQuery Scripts -->

<script src="https://code.jquery.com/jquery-
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

3.5.1.slim.min.js"></script>

<script

src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.

min.js"></script>

<script

src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js

"></script>

<!-- JavaScript to handle modals -->

<script>

// Click event handler for delete buttons

$(document).on("click", ".delete-booking", function () {

var deleteBookingId = $(this).data('id');

$('#delete_booking_id').val(deleteBookingId);

});

</script>

<footer>

<ul>

<li><a href="index.php">Home</a></li>

<li><a href="aboutUs.php">About Us</a></li>

<li><a href="aboutUs.php#targeting-contact">Contact</a></li>

<li><a href="booking-form.php">Services</a></li>

</ul>
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

<p>&copy 2024 Radhe Radhe EASYFLY, all right reserved</p>

</footer>

</body>

</html>

9. TESTING

Software Testing

Software testing is a process of verifying and validating that a software application

or program. Software testing

1. Meets the business and technical requirements that guided its design and

development, and

2. Works as expected.
Software testing also identifies important defects, flaws, or errors in the application

code that must be fixed. The modifier “important” in the previous sentence is, well,

important because defects must be categorized by severity.

During test planning we decide what an important defect is by reviewing the

requirements and design documents with an eye towards answering the question
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

“Important to whom?” Generally speaking, an important defect is one that from the

customer’s perspective affects the usability or functionality of the application. Using colors

for a traffic lighting scheme in a desktop dashboard may be a no-brainer during

requirements definition and easily implemented during development but in fact may not be

entirely workable if during testing we discover that the primary business sponsor is color

blind. Suddenly, it becomes an important defect. (About 8% of men and .4% of women

have some form of color blindness.)

The quality assurance aspect of software development—documenting the degree to

which the developers followed corporate standard processes or best practices—is not

addressed in this paper because assuring quality is not a responsibility of the testing team.

The testing team cannot improve quality; they can only measure it, although it can be

argued that doing things like designing tests before coding begins will improve quality

because the coders can then use that information while thinking about their designs and

during coding and debugging.

Software testing has three main purposes: verification, validation, and defect

finding.

• The verification process confirms that the software meets its technical

specifications. A “specification” is a description of a function in terms of a

measurable output value given a specific input value under specific

preconditions. A simple specification may be along the line of “a SQL query

retrieving data for a single account against the multi-month account-summary


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

table must return these eight fields <list> ordered by month within 3 seconds of

submission.”

• The validation process confirms that the software meets the business

requirements. A simple example of a business requirement is “After choosing a

branch office name, information about the branch’s customer account managers

will appear in a new window. The window will present manager identification

and summary information about each manager’s customer base:

<list of data elements>.” Other requirements provide details on how the data

will be summarized, formatted and displayed.

• A defect is a variance between the expected and actual result. The defect’s

ultimate source may be traced to a fault introduced in the specification, design,

or development (coding) phases.

Testing methods

Software testing methods are traditionally divided into black box testing and white

box testing. These two approaches are used to describe the point of view that a test engineer

takes when designing test cases.

Black box testing

Black box testing treats the software as a "black box"—without any knowledge of

internal implementation. Black box testing methods include: equivalence partitioning,

boundary value analysis, all-pairs testing, fuzz testing, model-based testing, traceability

matrix, exploratory testing and specification-based testing.


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

Specification-based testing: Specification-based testing aims to test the

functionality of software according to the applicable requirements. Thus, the tester inputs

data into, and only sees the output from, the test object. This level of testing usually requires

thorough test cases to be provided to the tester, who then can simply verify that for a given

input, the output value (or behavior), either "is" or "is not" the same as the expected value

specified in the test case.

Specification-based testing is necessary, but it is insufficient to guard against certain

risks.

Advantages and disadvantages: The black box tester has no "bonds" with the

code, and a tester's perception is very simple: a code must have bugs. Using the principle,

"Ask and you shall receive," black box testers find bugs where programmers do not. But,

on the other hand, black box testing has been said to be "like a walk in a dark labyrinth

without a flashlight," because the tester doesn't know how the software being tested was

actually constructed. As a result, there are situations when (1) a tester writes many test

cases to check something that could have been tested by only one test case, and/or (2) some

parts of the back-end are not tested at all.

Therefore, black box testing has the advantage of "an unaffiliated opinion," on the one

hand, and the disadvantage of "blind exploring," on the other.

White box testing


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

White box testing is when the tester has access to the internal data structures and

algorithms including the code that implement these.

Types of white box testing

• API testing (application programming interface) - Testing of the application

using Public and Private APIs

• Code coverage - creating tests to satisfy some criteria of code coverage (e.g.,

the test designer can create tests to cause all statements in the program to be

executed at least once)

• Fault injection methods - improving the coverage of a test by introducing

faults to test code paths

• Mutation testing methods

• Static testing - White box testing includes all static testing

A sample testing cycle

Although variations exist between organizations, there is a typical cycle for testing:

• Requirements analysis: Testing should begin in the requirements phase of

the software development life cycle. During the design phase, testers work

with developers in determining what aspects of a design are testable and with

what parameters those tests work.

• Test planning: Test strategy, test plan, tested creation. Since many activities

will be carried out during testing, a plan is needed.


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

• Test development: Test procedures, test scenarios, test cases, test datasets,

test scripts to use in testing software.

• Test execution: Testers execute the software based on the plans and tests and

report any errors found to the development team.

• Test reporting: Once testing is completed, testers generate metrics and make

final reports on their test effort and whether or not the software tested is ready

for release.

• Test result analysis: Or Defect Analysis, is done by the development team

usually along with the client, in order to decide what defects should be treated,

fixed, rejected (i.e. found software working properly) or deferred to be dealt

with later.

• Defect Retesting: Once a defect has been dealt with by the development

team, it is retested by the testing team.

• Regression testing: It is common to have a small test program built of a

subset of tests, for each integration of new, modified, or fixed software, in

order to ensure that the latest delivery has not ruined anything, and that the

software product as a whole is still working correctly.

• Test Closure: Once the test meets the exit criteria, the activities such as

capturing the key outputs, lessons learned, results, logs, documents related to

the project are archived and used as a reference for future projects.
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

10. FUTURE SCOPE

 This system can be updated as online system.

 Multi-user Interface can be added to this system.

 As a Aviaries prepared for future growth it determine, it would

replace open skies airline reservation system.


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

Gantt Chart (total time duration 3 months)


CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

A Gantt chart illustrates how the project


will run. It communicates with the client
and shows them the expected date of
project completion. It helps you assess
how long a project should take,
determine the resources needed, and
plan the order in which you'll complete
task.
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

BIBLIOGRAPHY

Websites

• http://www.google.com
• http://www.microsoft.com
• http://www.codeproject.com
• http://www.msdn.com.
• http://www.vb123.com
• http://www.vbcode.com
• http://www.sqltuner.com

Books

• Mastering Visual Basic 6 (Paperback)


• Visual Basic Black Book (Paperback)
• SQL Bible, 2nd Edition (Paperback)
• Database Development in Visual Basic

Conclusion
CIMAGE GROUP OF INSTITUTIONS PATNA
Bachelor of Computer Application
Session (2021-2024)

The current state of the airline reservation system presents various


challenges that hinder its efficiency and fail to meet the evolving needs of
airlines and passengers. Limited accessibility, slow processing times,
inadequate integration with other systems, complex user interfaces, and a
lack of personalization are among the key issues faced by the system.
However, by implementing an enhanced solution, these challenges can be
overcome. An effective problem solution for the airline reservation system
includes the implementation of a user-friendly online booking platform,
improved processing efficiency, seamless integration with other systems,
intuitive user interfaces, and personalized services. These solutions will
enhance accessibility, streamline processes, improve communication,
reduce errors, and provide tailored experiences to passengers. By
addressing these challenges and implementing the proposed solutions,
the airline industry can significantly improve the reservation system. This
will lead to enhanced customer satisfaction, increased revenue
opportunities, streamlined operations, and a more seamless and
personalized experience for passengers. Ultimately, an upgraded airline
reservation system will contribute to the overall growth and success of the
airline industry.

You might also like