Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Rohit Swami Final Internship

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 41

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

JNANA SANGAMA, BELAGAVI – 590014

An Internship Report on

“FULL STACK WEB DEVELOPMENT-


“BUS TICKET BOOKING SYSTEM”

Submitted in partial fulfilment of the requirements for the award of degree of

BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE AND ENGINEERING

Submitted by:
ROHIT
SWAMI
(2AG20CS057)

Internship carried out from 11/8/2023 to 11/9/2023 at


Tequed Labs, Bangalore

Internal Guide: External Guide:


Prof. Avanti Patil Mr. Supreeth Y S
Assistant Professor CEO &
Developer Dept of CSE, AITM Tequed Labs

ANGADI INSTITUTE OF TECHNOLOGY & MANAGEMENT


BELAGAVI-590009
2023-2024
ANGADI INSTITUTE OF TECHNOLOGY &

MANAGEMENT, BELAGAVI -590009

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Certificate
This is to certify that the internship work entitled “FULL STACK WEB DEVELOPMENT –
BUS TICKET BOOKING SYSTEM” is bonafide work carried out by Rohit swami
(2AG20CS057), in partial fulfilment of the requirements for the award of the degree of Bachelor
of Computer Science & Engineering under Visvesvaraya Technological University, Belagavi
during the year 2023-2024. It is certified that all the correction/suggestion indicated for internal
assessment have been incorporated in the report. The Final Year internship report has been
approved as it satisfies the academic requirements in respect of major project work prescribed for
the Bachelor of Engineering degree.

Signature of Guide Signature of Co-Ordinator Signature of HOD Signature of Principal


Prof. Avanti Patil Prof. Vidyadhar Hanji Dr. Dhanashree Dr. Anand Deshpande
Kulkarni
Assistant Professor, Assistant Professor, Professor and Head, Principal and Director,
Dept. of CSE, AITM Dept. of CSE, AITM Dept. of CSE, AITM AITM, Belagavi

Name of the Examiner: Signature with date:

1. .…………………… ……………………..

2. …………………….. ......…………………
INTERNSHIP COMPLETION CERTIFICATE
DECLARATION

I Rohit Swami (2AG20CS057), studying in the 8th semester of Bachelor of Engineering in


Computer Science and Engineering at Angadi Institute of Technology and Management, Belagavi,
hereby declare that this Project work entitled “FULL STACK WEB DEVELOPMENT- BUS
TICKET BOOKING SYSTEM” which is being submitted by me in the partial fulfilment for the
award of the degree of Bachelor of Engineering in Computer Science and Engineering from
Visvesvaraya Technological University, Belagavi is an authentic record of us carried out during the
academic year 2023-2024 under the guidance of Prof. Avanti Patil, Department of Computer
Science and Engineering, Angadi Institute of Technology and Management, Belagavi.

I further undertake that the matter embodied in the dissertation has not been submitted
previously for the award of any degree or diploma by me to any other university or institution.

Place: Belagavi ROHIT SWAMI

Date: (2AG20CS057)
ACKNOWLEDGEMENT
The internship opportunity I had was a great chance for learning and professional development. I
am grateful for having a chance to meet so many wonderful people and professionals who led me
through this internship period.

I would like to thank Mr. Supreeth Y S, CEO & Developer of Tequed Labs, Belagavi for giving
me the opportunity to do an internship within the organization. It was a unique experience for me to
study and to have new plans for my career.

I would like to express my gratitude towards our beloved Principal and Director Dr. Anand
Deshpande, Angadi Institute of Technology and Management, Belagavi. It is an honor to thank him
for providing directions in all my endeavours.

I express my gratitude to Dr. Dhanashree Kulkarni, Head of Department of Computer Science &
Engineering, Angadi Institute of Technology and Management, Belagavi, for her cordial support,
valuable information and guidance which helped me in completing this internship through various
stages.

I am grateful to our management for cooperation and inspiration and also special thanks to teaching
and non-teaching staff for their kind support.
SUMMARY
I have done my internship in Tequed Labs, one of the leading code development firms in
India - internship is in FULL STACK WEB DEVELOPMENT. Throughout my internship, I had
been learning different aspects of FULL STACK WEB DEVELOPMENT across India. This report
was written after getting first-hand experience from FSWD. This report explains the importance of
FSWD in the present era and this report will help the reader to get an idea about the various uses of
FSWD, its importance and most importantly its day-to-day applications. After reading the whole
report the reader will be able to understand the reason behind growing FSWD applications.

Objectives of the internship are to understand the requirements of clients, formulating


strategies for clients, executing those strategies to achieve their product objectives and understand
the change in consumer buying behavior in the FSWD era. The design process is also demonstrated
in detail.
Internship has also helped me to understand how the customer will tell the requirements and
how the designer should design the product. The internship has helped me to understand the
behavior in the corporate world and the interactions in the corporate world.
ABSTRACT

This project presents the design and implementation of a full stack web-based bus ticket
booking system, aiming to simplify the ticket booking process for passengers and streamline service
management for bus operators. Beginning with a comprehensive requirements analysis, the system's
architecture is outlined, featuring a modular design for scalability. Implemented using modern web
technologies such as HTML, CSS, JavaScript, Node.js, PHP and MongoDB, the system offers
functionalities including user authentication, route management, seat availability tracking, and secure
payment processing. Security measures such as data encryption and protection against web
vulnerabilities are integrated. Through testing and user feedback, the system's performance, usability,
and reliability are evaluated, with suggestions for future enhancements provided. Overall, this report
elucidates the development of an efficient and user-friendly bus ticket booking system, addressing the
needs of both passengers and bus operators.
TABLE OF CONTENTS

CONTENT PAGE NUMBER

1. INTRODUCTION 1
1.1. COMPANY PROFILE 1
1.2. SERVICES 2

2. INTRODUCTION TO FULL STACK WEB DEVELOPMENT 5


2.1. INTRODUCTION 5
2.2. CHARACTERISTICS 5

3. TASK PERRFORMED 7
3.1. PROJECT DESCRIPTION 7

4. SYSTEM DESIGN 8
4.1. THEME DESIGN LAYOUT 8

5. SNAPSHOTS 10
5.1. LOGIN PAGE 10
5.2. DASHBOARD 10
5.3. ADD BUS STATUS 11
5.4. ROUTES STATUS 11
5.5. CUSTOMER STATUS 12
5.6. BOOKING STATUS 12
5.7. SEATS STATUS 13
5.8. ADD NEW ADMIN 13
5.9. PNR ENQUIRY PAGE 14
5.10. BOOKING CONFIRMATION STATUS 14
5.11. DATABSE BOOKING DATA 15
5.12. DATABASE BUS DATA 15
5.13. DATABASE CUSTOMERS DATA 16
5.14. DATABASE ROUTES DATA 16
5.15. DATABASE SEATS DATA 17
5.16 DATABASE USER DATA 17

6. IMPLEMENTATION OF CODE 18
7. INTERNSHIP OUTCOME 30
6.1. OUTCOMES OF INTERNSHIP 30
6.2. EXPERIENCE AND ASSESSMENT 30
6.3. TECHNICAL ASSESSMENT 31

8. CONCLUSION 32

REFERENCES 33
Bus Ticket Booking System

CHAPTER 1

INTRODUCTION
1.1 Company
Profile Commitment
Our approach focuses on new ways of business, thereby combining IT innovations and adoption
while They are a reliable organization engaged in providing a qualitative range of industrial products.
They are also one of the leading companies of this highly commendable range of products. Their
Team of experts maintains a vigil on the quality of the products Every single piece of work is ensured
with proper quality assurance. It also focuses on creating innovative products to the society and also
mentors’ various potential start-ups and ideas. Leveraging an organization’s current assets. Our team
is committed to provide IT Services with:

▪ Quality.

▪ Technology, Innovation & Support.

Quality

Our main emphasis is to deliver the best quality in every project we undertake. With our time-tested
business methodology and structured solution building approach, we ensure to maintain our global
business standards.

Technology, Innovation & Support

Technology leadership is the most successful strategy to challenge competitors and consolidate our
position since business and technology work hand in hand. Our firm’s belief in this synthesis has
motivated and enabled us to deliver solutions with a decisive competitive advantage. Tequed Labs,
today, is a new generation framework of technology innovators to accelerate growth. In each project,
we emphasize innovation. Our structured team works with a methodology and knowledge to innovate
and deliver excellent services. We aim to be the best at what we do. Tequed Labs has a dream of
evolving into a Global IT Company, ensuring that the solutions being delivered include best practice
in IT.

DEPT OF CSE, AITM BELAGAVI 1


Bus Ticket Booking System

Mission

Our mission is to be a leading mca provider providing superior quality products and services at
competitive prices. We are continually improving our quality to serve our clients better.

Vision

We focus on providing quality education on the latest technologies and develop products which are of
great need to society.

1.2 Services

1. Internet of Things.

2. Research and Development.

3. Skill and Development.

4. Machine Learning.

5. Artificial Intelligence.

Software Solutions

Tequed Labs has developed a number of customized products and MIS applications for its clients in
this service. Our mature software development processes, combined with excellent infrastructure
have significantly increased the “on-time and on-budget” delivery of software in the offshore mode.
We use a highly effective IMPACT Methodology for offshore and distributed software development.
Our services begin from analysis, moving through designing, development, testing and
implementation to maintenance. Our applications come in all sizes, be it a one-table database, or a
massive client-server application. The creation of complete database applications is yet another field
that we specialize in. We offer:

Application Development.

▪ Interactive Application Development.

▪ Custom Application Development/Maintenance.

DEPT OF CSE, AITM BELAGAVI 2


Bus Ticket Booking System

▪ MIS and ERP Solution & Support.

Web Solutions

Tequed Labs provides web solutions & services to help customers reach to a wider customer base.
The web is a new and different medium for communication and requires a different viewpoint and
skill set to use it in the most effective way. You need web consulting to get more return on your
investment in your web site. We can help you get the most effective solution through:

▪ Website Development.

▪ Web Multimedia.
▪ Intranet Development.

▪ Web Promotion.

▪ Web hosting.

Website Development

Websites can enhance awareness of your brand, leading to more sales. Build relationships with
customers, vendors and shareholders through your online identity, get more traffic from the search
engines, fast loading web pages with excellent navigation and designing, and communicate more
effectively. Either you are looking for a dynamic site or a static site is your solution we can help you
acquire both. We offer web sites on flash, asp, php which are tailor made to target your customers and
make your presence live on the web.

Web Multimedia

Add video on your web site or have a complete flash web site and see your popularity ranking high.

Web Promotion

We can promote your site to acquire more traffic, more enquiries, more leads and more value. Web
Promotion is a three-phase process and we are your companion to see you through all the phases and
that too very well. We get your site listed at the most popular Internet directories because they can
send you substantial amounts of traffic and affect your ranking in various search engines. Email
marketing

DEPT OF CSE, AITM BELAGAVI 3


Bus Ticket Booking System

is a great way to promote your electronic shop to buyers including those who are interested in your
shop but have not purchased items from you in the past.

Outsourcing

Tequed Labs not only provides industry-specific solutions but also deputes personnel to organizations
with technical skills to manage back-office transaction processing. Viewing it from client’s
perspective this cuts off cost on acquiring and maintaining technical staff and enables them focus on
their core competencies. The key element of service delivery is an integrated approach towards
providing increasing value over the entire course of our client relationships.

Technology used in Tequed Labs

Tequed Labs has expertise in the latest technology, as our developers are full stack developers.

We use below technologies for development of application (Based on requirements)

1. C++, Java, JSP, Swings, Hibernate, Spring.

2. PHP (CodeIgniter, Zend).

3. Python (Django/Machine Learning).

4. HTML5, CSS3.
5. Angular JS, Angular2 /4, WOW JS.

6. Apache.

7. MySQL, Oracle, SQL Server, Post grade.

8. Android

DEPT OF CSE, AITM BELAGAVI 4


Bus Ticket Booking System

CHAPTER 2
INTRODUCTION TO FULL STACK WEB DEVELOPMENT

2.1 Introduction

Full stack development: It refers to the development of both front end(client side) and back
end(server side) portions of web application.

Full stack web Developers: Full stack web developers have the ability to design complete web
applications and websites. They work on the frontend, backend, database and debugging of web
applications or websites.

Full-stack developers are experts in both the frontend and backend; so, the full-stack of technology
that makes up a website. They are proficient in both frontend and backend languages and
frameworks, as well as in server, network and hosting environments.

2.2 Characteristics

Front end: It is the visible part of website or web application which is responsible for user
experience. The user directly interacts with the front-end portion of the web application or website.

1. HTML: HTML stands for Hyper Text Markup Language. It is used to design the front-end portion of web
pages using markup language. HTML is the combination of Hypertext and Markup language. Hypertext
defines the link between the web pages. The markup language is used to define the text documentation within
tag which defines the structure of web pages.

2. CSS: Cascading Style Sheets, fondly referred to as CSS, is a simply designed language intended
to simplify the process of making web pages presentable. CSS allows you to apply styles to web
pages. More importantly, CSS enables you to do this independent of the HTML that makes up each
web page.

3. JavaScript: JavaScript is a famous scripting language used to create the magic on the sites to
make the site interactive for the user. It is used to enhancing the functionality of a website to running
cool games and web-based software.

DEPT OF CSE, AITM BELAGAVI 5


Bus Ticket Booking System

Back end: It refers to the server-side development of web application or website with a primary
focus on how the website works. It is responsible for managing the database through queries and
APIs by client-side commands. This type of website mainly consists of three parts front end, back
end, and database.

1. PHP: PHP is a server-side scripting language designed specifically for web development. Since,
PHP code executed on server side so it is called server-side scripting language.

2. Java: Java is one of the most popular and widely used programming language and platform. It is
highly scalable. Java components are easily available.

3. Python: Python is a programming language that lets you work quickly and integrate systems more
efficiently.

4. JavaScript: JavaScript can be used as both (front end and back end) programming languages.

5. Node.js: Node.js is an open source and cross-platform runtime environment for executing
JavaScript code outside of a browser. You need to remember that NodeJS is not a framework and
it’s not a programming language. Most of the people are confused and understand it’s a framework
or a programming language.

DEPT OF CSE, AITM BELAGAVI 6


Bus Ticket Booking System

CHAPTER 3

TASK PERFORMED
3.1 Project Description

The website must be evaluated from the technical aspect first. The valuation of this feasibility must
be based on an outline design of the website requirement having identified an outline system, the
investigation must go on to suggest the type of equipment, required method developing the system, of
running the system once it has been designed.

The theme was designed and developed such that the necessary functions and performances can be
achieved using customization. Therefore, the project is feasible and may still be used even with the
newer version of same software supporting older versions.

DEPT OF CSE, AITM BELAGAVI 7


Bus Ticket Booking System

CHAPTER 4
SYSTEM DESIGN

Theme Design Layout


The theme used for our project is trending theme which have good layout format. The theme was
developed on our own referring some of the websites.

Fig 4.1: Layout of Theme Design

Navigation Bar

Navigation bar is the place where users can go through all the items that are selected from website
back-end. It is a page type of the site. We can create menus. This will bring to the edit menus screen
which is divided into two columns. The column on our left has our pages, categories, and custom
links tab. The column on the right is where we can add and adjust menu items

DEPT OF CSE, AITM BELAGAVI 8


Bus Ticket Booking System

Slider
Slider is the part of website that contains image that continuously changes. In this theme, Slider
Revolution plugin is used to define slider with proper front- end and back-end tools. Sliders can run
slideshows automatically without user input by moving slides on pre-defined time interval. Sliders
can also respond to user interaction like click or swipe to view next or previous slides. Additionally,
sliders can also have buttons or thumbnails which users can click to view a particular slide in the
slider.

Sidebar
Sidebar is the section where recently viewed products, search filter etc. are placed as a shortcut for
the content of the site especially for product shop pages. themes to display information that is not a
part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle
below or above the content area, footer, header, or anywhere in the file.

Footer
The footer area of a website is usually defined in the template file footer.html. In some themes, the
area may also contain a widget zed area with multiple columns that you can use.

DEPT OF CSE, AITM BELAGAVI 9


Bus Ticket Booking System

CHAPTER 5
SNAPSHOTS

Fig 5.1 : Displays the main Admin login page.

Fig 5.2 : Dashboard page.

DEPT OF CSE, AITM BELAGAVI 10


Bus Ticket Booking System

Fig 5.3 : Add Bus status

Fig 5.4 : Routes status page.

DEPT OF CSE, AITM BELAGAVI 11


Bus Ticket Booking System

Fig 5.5 : Customer status page.

Fig 5.6 : Booking status page.

DEPT OF CSE, AITM BELAGAVI 12


Bus Ticket Booking System

Fig 5.7 : Seats Status

Fig 5.8 : Add New Admin

DEPT OF CSE, AITM BELAGAVI 13


Bus Ticket Booking System

Fig 5.9 : PNR Enquiry page

Fig 5.10 : Booking Confirmation status

DEPT OF CSE, AITM BELAGAVI 14


Bus Ticket Booking System

Database admin data

Fig 5.11 :Database Booking data

Fig 5.12 :Database bus data

DEPT OF CSE, AITM BELAGAVI 15


Bus Ticket Booking System

Fig 5.13 :Database customers data

Fig 5.14 :Database routes data

DEPT OF CSE, AITM BELAGAVI 16


Bus Ticket Booking System

Fig 5.15 :Database seats data

Fig 5.16 :Database user data

DEPT OF CSE, AITM BELAGAVI 17


Bus Ticket Booking System

CHAPTER 6

IMPLEMENTATION OF CODE

<!-- Show these admin pages only when the admin is logged in -->
<?php require '../assets/partials/_admin-check.php'; ?>

<!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.0">
<title>Bookings</title>
<!-- google fonts -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500&display=swap"
rel="stylesheet">
<!-- Font Awesome -->
<script src="https://kit.fontawesome.com/d8cfbe84b9.js" crossorigin="anonymous"></script>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x"
crossorigin="anonymous">
<!-- External CSS -->
<?php
require '../assets/styles/admin.php';
require '../assets/styles/admin-options.php';
$page="booking";
?>
</head>
<body>
<!-- Requiring the admin header files -->
<?php require '../assets/partials/_admin-header.php';?>
<!-- Add, Edit and Delete Bookings -->
<?php
/*
1. Check if an admin is logged in
2. Check if the request method is POST
*/
if($loggedIn && $_SERVER["REQUEST_METHOD"] == "POST")
{
if(isset($_POST["submit"]))
{
/*
ADDING Bookings
Check if the $_POST key 'submit' exists
*/

DEPT OF CSE, AITM BELAGAVI 18


Bus Ticket Booking System

// Should be validated client-side


// echo "<pre>";
// var_export($_POST);
// echo "</pre>";
// die;
$customer_id = $_POST["cid"];
$customer_name = $_POST["cname"];
$customer_phone = $_POST["cphone"];
$route_id = $_POST["route_id"];
$route_source = $_POST["sourceSearch"];
$route_destination = $_POST["destinationSearch"];
$route = $route_source . " &rarr; " . $route_destination;
$booked_seat = $_POST["seatInput"];
$amount = $_POST["bookAmount"];
// $dep_timing = $_POST["dep_timing"];

$booking_exists = exist_booking($conn,$customer_id,$route_id);
$booking_added = false;

if(!$booking_exists)
{
// Route is unique, proceed
$sql = "INSERT INTO `bookings` (`customer_id`, `route_id`, `customer_route`, `booked_amount`, `booked_seat`,
`booking_created`) VALUES ('$customer_id', '$route_id','$route', '$amount', '$booked_seat', current_timestamp());";

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


// Gives back the Auto Increment id
$autoInc_id = mysqli_insert_id($conn);
// If the id exists then,
if($autoInc_id)
{
$key = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$code = "";
for($i = 0; $i < 5; ++$i)
$code .= $key[rand(0,strlen($key) - 1)];

// Generates the unique bookingid


$booking_id = $code.$autoInc_id;

$query = "UPDATE `bookings` SET `booking_id` = '$booking_id' WHERE `bookings`.`id` = $autoInc_id;";


$queryResult = mysqli_query($conn, $query);

if(!$queryResult)
echo "Not Working";
}

if($result)
$booking_added = true;
}

DEPT OF CSE, AITM BELAGAVI 19


Bus Ticket Booking System

if($booking_added)
{
// Show success alert
echo '<div class="my-0 alert alert-success alert-dismissible fade show" role="alert">
<strong>Successful!</strong> Booking Added
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';

// Update the Seats table


$bus_no = get_from_table($conn, "routes", "route_id", $route_id, "bus_no");
$seats = get_from_table($conn, "seats", "bus_no", $bus_no, "seat_booked");
if($seats)
{
$seats .= "," . $booked_seat;
}
else
$seats = $booked_seat;

$updateSeatSql = "UPDATE `seats` SET `seat_booked` = '$seats' WHERE `seats`.`bus_no` = '$bus_no';";


mysqli_query($conn, $updateSeatSql);
}
else{
// Show error alert
echo '<div class="my-0 alert alert-danger alert-dismissible fade show" role="alert">
<strong>Error!</strong> Booking already exists
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
}
}
if(isset($_POST["edit"]))
{
// EDIT BOOKING
// echo "<pre>";
// var_export($_POST);
// echo "</pre>";die;
$cname = $_POST["cname"];
$cphone = $_POST["cphone"];
$id = $_POST["id"];
$customer_id = $_POST["customer_id"];
$id_if_customer_exists = exist_customers($conn,$cname,$cphone);

if(!$id_if_customer_exists || $customer_id == $id_if_customer_exists)


{
$updateSql = "UPDATE `customers` SET
`customer_name` = '$cname',
`customer_phone` = '$cphone' WHERE `customers`.`customer_id` = '$customer_id';";

$updateResult = mysqli_query($conn, $updateSql);


$rowsAffected = mysqli_affected_rows($conn);

DEPT OF CSE, AITM BELAGAVI 20


Bus Ticket Booking System

$messageStatus = "danger";
$messageInfo = "";
$messageHeading = "Error!";

if(!$rowsAffected)
{
$messageInfo = "No Edits Administered!";
}

elseif($updateResult)
{
// Show success alert
$messageStatus = "success";
$messageHeading = "Successfull!";
$messageInfo = "Customer details Edited";
}
else{
// Show error alert
$messageInfo = "Your request could not be processed due to technical Issues from our part. We regret the
inconvenience caused";
}

// MESSAGE
echo '<div class="my-0 alert alert-'.$messageStatus.' alert-dismissible fade show" role="alert">
<strong>'.$messageHeading.'</strong> '.$messageInfo.'
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
}
else{
// If customer details already exists
echo '<div class="my-0 alert alert-danger alert-dismissible fade show" role="alert">
<strong>Error!</strong> Customer already exists
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
}

}
if(isset($_POST["delete"]))
{
// DELETE BOOKING
$id = $_POST["id"];
$route_id = $_POST["route_id"];
// Delete the booking with id => id
$deleteSql = "DELETE FROM `bookings` WHERE `bookings`.`id` = $id";

$deleteResult = mysqli_query($conn, $deleteSql);


$rowsAffected = mysqli_affected_rows($conn);
$messageStatus = "danger";
$messageInfo = "";
$messageHeading = "Error!";

DEPT OF CSE, AITM BELAGAVI 21


Bus Ticket Booking System

if(!$rowsAffected)
{
$messageInfo = "Record Doesn't Exist";
}

elseif($deleteResult)
{
$messageStatus = "success";
$messageInfo = "Booking Details deleted";
$messageHeading = "Successfull!";

// Update the Seats table


$bus_no = get_from_table($conn, "routes", "route_id", $route_id, "bus_no");
$seats = get_from_table($conn, "seats", "bus_no", $bus_no, "seat_booked");

// Extract the seat no. that needs to be deleted


$booked_seat = $_POST["booked_seat"];

$seats = explode(",", $seats);


$idx = array_search($booked_seat, $seats);
array_splice($seats,$idx,1);
$seats = implode(",", $seats);

$updateSeatSql = "UPDATE `seats` SET `seat_booked` = '$seats' WHERE `seats`.`bus_no` = '$bus_no';";


mysqli_query($conn, $updateSeatSql);
}
else{

$messageInfo = "Your request could not be processed due to technical Issues from our part. We regret the
inconvenience caused";
}

// Message
echo '<div class="my-0 alert alert-'.$messageStatus.' alert-dismissible fade show" role="alert">
<strong>'.$messageHeading.'</strong> '.$messageInfo.'
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
}
}
?>
<?php
$resultSql = "SELECT * FROM `bookings` ORDER BY booking_created DESC";

$resultSqlResult = mysqli_query($conn, $resultSql);

if(!mysqli_num_rows($resultSqlResult)){ ?>
<!-- Bookings are not present -->
<div class="container mt-4">
<div id="noCustomers" class="alert alert-dark " role="alert">

DEPT OF CSE, AITM BELAGAVI 22


Bus Ticket Booking System

<h1 class="alert-heading">No Bookings Found!!</h1>


<p class="fw-light">Be the first person to add one!</p>
<hr>
<div id="addCustomerAlert" class="alert alert-success" role="alert">
Click on <button id="add-button" class="button btn-sm"type="button"data-bs-toggle="modal" data-bs-
target="#addModal">ADD <i class="fas fa-plus"></i></button> to add a booking!
</div>
</div>
</div>
<?php }
else { ?>
<section id="booking">
<div id="head">
<h4>Booking Status</h4>
</div>
<div id="booking-results">
<div>
<button id="add-button" class="button btn-sm"type="button"data-bs-toggle="modal" data-bs-
target="#addModal">Add Bookings<i class="fas fa-plus"></i></button>
</div>
<table class="table table-hover table-bordered">
<thead>
<th>PNR</th>
<th>Name</th>
<th>Contact</th>
<th>Bus</th>
<th>Route</th>
<th>Seat</th>
<th>Amount</th>
<th>Departure</th>
<th>Booked</th>
<th>Actions</th>
</thead>
<?php
while($row = mysqli_fetch_assoc($resultSqlResult))
{
// echo "<pre>";
// var_export($row);
// echo "</pre>";
$id = $row["id"];
$customer_id = $row["customer_id"];
$route_id = $row["route_id"];

$pnr = $row["booking_id"];

$customer_name = get_from_table($conn, "customers","customer_id", $customer_id, "customer_name");

$customer_phone = get_from_table($conn,"customers","customer_id", $customer_id, "customer_phone");

$bus_no = get_from_table($conn, "routes", "route_id", $route_id, "bus_no");

DEPT OF CSE, AITM BELAGAVI 23


Bus Ticket Booking System

$route = $row["customer_route"];

$booked_seat = $row["booked_seat"];

$booked_amount = $row["booked_amount"];

$dep_date = get_from_table($conn, "routes", "route_id", $route_id, "route_dep_date");

$dep_time = get_from_table($conn, "routes", "route_id", $route_id, "route_dep_time");

$booked_timing = $row["booking_created"];
?>
<tr>
<td>
<?php
echo $pnr;
?>
</td>
<td>
<?php
echo $customer_name;
?>
</td>
<td>
<?php
echo $customer_phone;
?>
</td>
<td>
<?php
echo $bus_no;
?>
</td>
<td>
<?php
echo $route;
?>
</td>
<td>
<?php
echo $booked_seat;
?>
</td>
<td>
<?php
echo '$'.$booked_amount;
?>
</td>
<td>

DEPT OF CSE, AITM BELAGAVI 24


Bus Ticket Booking System

<?php
echo $dep_date . " , ". $dep_time;
?>
</td>
<td>
<?php
echo $booked_timing;
?>
</td>
<td>
<button class="button btn-sm edit-button" data-link="<?php echo $_SERVER['REQUEST_URI']; ?>" data-
customerid="<?php
echo $customer_id;?>" data-id="<?php
echo $id;?>" data-name="<?php
echo $customer_name;?>" data-phone="<?php
echo $customer_phone;?>" >Edit</button>
<button class="button delete-button btn-sm" data-bs-toggle="modal" data-bs-target="#deleteModal"
data-id="<?php
echo $id;?>" data-bookedseat="<?php
echo $booked_seat;
?>" data-routeid="<?php
echo $route_id;
?>"> Delete</button>
</td>
</tr>
<?php
}
?>
</table>
</div>
</section>
<?php } ?>
</div>
</main>
<!-- Requiring _getJSON.php-->
<!-- Will have access to variables
1. routeJson
2. customerJson
3. seatJson
4. busJson
5. adminJson
6. bookingJSON
-->
<?php require '../assets/partials/_getJSON.php';?>

<!-- All Modals Here -->


<!-- Add Booking Modal -->
<div class="modal fade" id="addModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content">

DEPT OF CSE, AITM BELAGAVI 25


Bus Ticket Booking System

<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Make Bookings</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="addBookingForm" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="POST">
<!-- Passing Route JSON -->
<input type="hidden" id="routeJson" name="routeJson" value='<?php echo $routeJson; ?>'>
<!-- Passing Customer JSON -->
<input type="hidden" id="customerJson" name="customerJson" value='<?php echo $customerJson; ?>'>
<!-- Passing Seat JSON -->
<input type="hidden" id="seatJson" name="seatJson" value='<?php echo $seatJson; ?>'>

<div class="mb-3">
<label for="cid" class="form-label">Customer ID</label>
<!-- Search Functionality -->
<div class="searchQuery">
<input type="text" class="form-control searchInput" id="cid" name="cid">
<div class="sugg">

</div>
</div>
</div>
<div class="mb-3">
<label for="cname" class="form-label">Customer Name</label>
<input type="text" class="form-control" id="cname" name="cname" readonly>
</div>
<div class="mb-3">
<label for="cphone" class="form-label">Contact Number</label>
<input type="tel" class="form-control" id="cphone" name="cphone" readonly>
</div>
<div class="mb-3">
<label for="routeSearch" class="form-label">Route</label>
<!-- Search Functionality -->
<div class="searchQuery">
<input type="text" class="form-control searchInput" id="routeSearch" name="routeSearch">
<div class="sugg">
</div>
</div>
</div>
<!-- Send the route_id -->
<input type="hidden" name="route_id" id="route_id">
<!-- Send the departure timing too -->
<input type="hidden" name="dep_timing" id="dep_timing">

<div class="mb-3">
<label for="sourceSearch" class="form-label">Source</label>
<!-- Search Functionality -->
<div class="searchQuery">
<input type="text" class="form-control searchInput" id="sourceSearch" name="sourceSearch">

DEPT OF CSE, AITM BELAGAVI 26


Bus Ticket Booking System

<div class="sugg">
</div>
</div>
</div>
<div class="mb-3">
<label for="destinationSearch" class="form-label">Destination</label>
<!-- Search Functionality -->
<div class="searchQuery">
<input type="text" class="form-control searchInput" id="destinationSearch" name="destinationSearch">
<div class="sugg">
</div>
</div>
</div>
<!-- Seats Diagram -->
<div class="mb-3">
<table id="seatsDiagram">
<tr>
<td id="seat-1" data-name="1">1</td>
<td id="seat-2" data-name="2">2</td>
<td id="seat-3" data-name="3">3</td>
<td id="seat-4" data-name="4">4</td>
<td id="seat-5" data-name="5">5</td>
<td id="seat-6" data-name="6">6</td>
<td id="seat-7" data-name="7">7</td>
<td id="seat-8" data-name="8">8</td>
<td id="seat-9" data-name="9">9</td>
<td id="seat-10" data-name="10">10</td>
</tr>
<tr>
<td id="seat-11" data-name="11">11</td>
<td id="seat-12" data-name="12">12</td>
<td id="seat-131" data-name="13">13</td>
<td id="seat-14" data-name="14">14</td>
<td id="seat-15" data-name="15">15</td>
<td id="seat-16" data-name="16">16</td>
<td id="seat-17" data-name="17">17</td>
<td id="seat-18" data-name="18">18</td>
<td id="seat-19" data-name="19">19</td>
<td id="seat-20" data-name="20">20</td>
</tr>
<tr>
<td class="space">&nbsp;</td>
<td class="space">&nbsp;</td>
<td class="space">&nbsp;</td>
<td class="space">&nbsp;</td>
<td class="space">&nbsp;</td>
<td class="space">&nbsp;</td>
<td class="space">&nbsp;</td>
<td class="space">&nbsp;</td>
<td class="space">&nbsp;</td>

DEPT OF CSE, AITM BELAGAVI 27


Bus Ticket Booking System

<td class="space">&nbsp;</td>
</tr>
<tr>
<td id="seat-21" data-name="21">21</td>
<td id="seat-22" data-name="22">22</td>
<td id="seat-23" data-name="23">23</td>
<td id="seat-24" data-name="24">24</td>
<td id="seat-25" data-name="25">25</td>
<td id="seat-26" data-name="26">26</td>
<td id="seat-27" data-name="27">27</td>
<td class="space">&nbsp;</td>
<td id="seat-28" data-name="28">28</td>
<td id="seat-29" data-name="29">29</td>
</tr>
<tr>
<td id="seat-30" data-name="30">30</td>
<td id="seat-31" data-name="31">31</td>
<td id="seat-32" data-name="32">32</td>
<td id="seat-33" data-name="33">33</td>
<td id="seat-34" data-name="34">34</td>
<td id="seat-35" data-name="35">35</td>
<td id="seat-36" data-name="36">36</td>
<td class="space">&nbsp;</td>
<td id="seat-37" data-name="37">37</td>
<td id="seat-38" data-name="38">38</td>
</tr>
</table>
</div>
<div class="row g-3 align-items-center mb-3">
<div class="col-auto">
<label for="seatInput" class="col-form-label">Seat Number</label>
</div>
<div class="col-auto">
<input type="text" id="seatInput" class="form-control" name="seatInput" readonly>
</div>
<div class="col-auto">
<span id="seatInfo" class="form-text">
Select from the above figure, Maximum 1 seat.
</span>
</div>
</div>
<div class="mb-3">
<label for="bookAmount" class="form-label">Total Amount</label>
<input type="text" class="form-control" id="bookAmount" name="bookAmount" readonly>
</div>
<button type="submit" class="btn btn-success" name="submit">Submit</button>
</form>
</div>
<div class="modal-footer">
<!-- Add Anything -->

DEPT OF CSE, AITM BELAGAVI 28


Bus Ticket Booking System

</div>
</div>
</div>
</div>
<!-- Delete Modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-
hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel"><i class="fas fa-exclamation-circle"></i></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<h2 class="text-center pb-4">
Are you sure?
</h2>
<p>
Do you really want to delete this booking? <strong>This process cannot be undone.</strong>
</p>
<!-- Needed to pass id -->
<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" id="delete-form" method="POST">
<input id="delete-id" type="hidden" name="id">
<input id="delete-booked-seat" type="hidden" name="booked_seat">
<input id="delete-route-id" type="hidden" name="route_id">
</form>
</div>
<div class="modal-footer d-flex justify-content-center">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<button type="submit" form="delete-form" name="delete" class="btn btn-danger">Delete</button>
</div>
</div>
</div>
</div>
<script src="../assets/scripts/admin_booking.js"></script>
<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4"
crossorigin="anonymous"></script>
</body>
</html>

DEPT OF CSE, AITM BELAGAVI 29


Bus Ticket Booking System

CHAPTER 7
INTERNSHIP OUTCOME

6.1 Outcomes of Internship


Internships offer students a hands-on opportunity to work in desired field. To learn how course of
study applies to the real world and build valuable experience that makes students stronger candidates
for jobs after graduation. An internship can be an excellent way to “try out” a certain career.
Internship provides an opportunity to gain valuable experience in a career field. It is a great way to
gain specific skills and knowledge as well as make contacts and build confidence. More and more,
employers are using work experiences as screening devices to assess the skills and abilities of
prospective employees. Employers like to see that candidate had some type of related experience
before they consider for a position. Having additional work experience before applying for job gives
an edge over other candidates in a competitive job market. Internship for professional careers is
similar in some ways but not as rigorous to apprenticeships for professions, trade and vocational jobs,
but the lack of standardization and oversight leaves the term open to broad interpretation. Interns may
be college or university students, high school students, or postgraduate adults. These positions may be
paid or unpaid and are usually temporary. Generally, an internship consists of an exchange of services
for experience between the student and an organization. Students can also use an internship as an
experience in particular career, to create a network of contact. Some interns find permanent, paid
employment with the organizations for which they worked upon completion of the internship. This
can be a significant benefit to the employer as experienced interns often need little or training when
they begin regular employment. Unlike a trainee program, employment at the completion of an
internship is not guaranteed.

6.2 Experience and Assessments of internship


Although internship vary greatly from one organization to the next, the term world work experiences
in which students fulfil short term positions within a company or organization in order to gain hands-
on experience and develop career specific skills. Sponsoring agencies generally work with the student
to meet specific learning goals and provide special mentoring or networking opportunities. In
exchange, the intern helps the employer in meeting overall work goals for the company. The
internship program conducted by the renowned organization Tequed Labs, done between sixth and

DEPT OF CSE, AITM BELAGAVI 30


Bus Ticket Booking System
seventh semesters of

DEPT OF CSE, AITM BELAGAVI 31


Bus Ticket Booking System

BE helped me to get the training in an essential way. Initially I approached Tequed Labs for this
purpose and got opportunity to undergo one-month internship program from the experienced
employees in that organization. Once the needed software was installed, they explained how to create
web project using HTML CSS and JavaScript . I was also assigned a task after the basic training
which helped me improve my technical skills and real-life experience. Initially I have collected
various information about the latest topics in the domain FSWD from the Internet. The mentor and
the trainers who were allotted to me were very supportive and helped me with their valuable guidance
in their busy schedule.

6.3 Technical outcomes


The internship program was very useful to get technical knowledge about. I have got basic knowledge
about the concepts of FULL STACK WEB DEVELOPMENT through which I can code using
HTML, CSS, SQL, JavaScript and programming. I have tried to develop various languages codes
using different methods, so that all the programming concepts could be covered. There were many
challenges which I had faced while programming, I came to know about how to develop a code which
is smaller in size and how different python libraries and methods can be used to get faster results.
Apart from technical skills, I also learnt non-technical skills by living in such a new environment My
largest challenge was to work independently. In office environment everyone works on his/her own
space. I had to make self-decisions which gave me strength to think independently. By doing this
internship, I have a better outlook on how to work in an organization.

DEPT OF CSE, AITM BELAGAVI 32


Bus Ticket Booking System

CHAPTER 8
CONCLUSION

I have learned various types of technologies required for theme, product, and layout design. My
focus had been on front-end designing and back-end development which leads to a Full Stack Web
Development. With the help of this internship, I have gained significant amount of knowledge I hope
it will be helpful for my future carrier. Making this project was sometime difficult but solving those
difficulties gave very valuable knowledge. Throughout my time of internship, I have acquired lots of
new experiences. I got chances to use different development tools, research on them and use them.
Overall, in this period of internship all my theoretical knowledge gained from college had gained a
practical experience.

DEPT OF CSE, AITM BELAGAVI 33

You might also like