Car Rental System Project Report
Car Rental System Project Report
SESSION - [2023-2024]
Project Report
On
Car Rental System
This is to certify that the Project Report entitled Car Rental System (CRS)
University, Lucknow, Uttar Pradesh for the award of the Degree of Master of
We would like to extend gratefulness to all those who have made this work
possible. We thank our Director General Sir (Dr. Amresh Kumar), for giving
us this wonderful opportunity to use all that we have learnt in years and make
something which could be proved beneficial to this society.
We also thank our Head of the Deptt. (Mr. Deepak Awasthi Sir) and our
project guide (Mrs. Shivani Rastogi) for their immense support and guidance
throughout the development of the concept and idea.
We are also thankful to the faculty members of our department for giving us
support and guidance at all the times we needed without their support the project
and report would not have been possible. We have made possible efforts to
make the report to the best of our abilities.
We are even grateful to various websites who helped us to get acquainted with
some useful facts and data about the topic.
Group :
Ajay Gangwar &
Ajay Kumar
CONTENT
Table of content: -
• INTRODUCTION
• OBJECTIVE
• MODULES OF PROJECT
• FEASIBILITY STUDY
• FUTURE ENHANCEMENT
• FLOWCHART
• SNAPSHOTS OF WEBPAGE
• CONCLUSION
• REFERENCE
INTRODUCTION
Background:
In today's fast-paced world, convenience and flexibility are paramount, especially when it
comes to transportation. The emergence of online '' car rental systems '' has
revolutionized the way people access vehicles for their travel needs. This report aims to
explore the landscape of online car rental systems, examining their functionalities,
advantages, challenges, and the overall impact they have on the automotive industry and
consumer behavior.
Purpose:
The purpose of an online car rental system is to provide a convenient and efficient platform
for users to rent vehicles. It aims to simplify the process of booking, payment, and vehicle
selection, allowing travelers and commuters to access cars when needed without the hassle
of traditional paperwork and queues.
Scope:
This project traverses a lot of areas ranging from business concept to computing field,and
required to perform several researches to be able to achieve the project objectives.
• Car rental industry: This includes study on how the car rental business is being done,
• General customers as well as the company’s staff will be able to use the system effectively.
• Web-platform means that the system will be available for access 24/7 except when
Our "Car Rental System" project aims to achieve the following objectives:
5.Safety:
i. Safety is non-negotiable. We verify car owners, conduct regular maintenance checks, and
ensure that each vehicle meets safety standards.
ii. Your peace of mind is our priority.
Our objectives are strategically aligned with the needs of the Tourister, including
Professional, security personnel, and Employe, to create a comprehensive and effective Car
Rental System.
Software and Hardware Tools:
1. Software Tools:
2.Hardware Components:
i. Processor : intel core i3 2GHz and Above.
ii. RAM : 4GB RAM.
iii. Monitor : 15” Color Monitor.keyboard and Mouse.
iv. Server: Hosted on Hostinger for web application deployment.
FUNCTIONAL AND NON-FUNCTIONAL
REQUIREMENTS
Functional Requirements:-
Requirement analysis is a software engineering technique that is composed of the various.
tasks that determine the needs or conditions that are to be met for a new or altered
product, taking into consideration the possible conflicting requirements of the various
users.
Functional requirements are those requirements that are used to illustrate the internal
working nature of the system, the description of the system, and explanation of each
subsystem. It consists of what task the system should perform, the processes involved,
which data should the system holds and the interfaces with the user. The functional
requirements identified are:
a. Customer’s registration: The system should allow new users to register online and
generate membership card.
b. Online reservation of cars: Customers should be able to use the system to make
booking and online reservation.
a. Security: The subsystem should provide a high level of security and integrity of the
data held by the system, only authorized personnel of the company can gain access to
the company’s secured page on the system; and only users with valid password and
username can login to view user’s page.
b. Performance and Response time: The system should have high performance rate
when executing user’s input and should be able to provide feedback or response
within a short time span usually 50 seconds for highly complicated task and 20 to 25
seconds for less complicated task.
d. Availability: This system should always be available for access at 24 hours, 7 days a
week. Also in the occurrence of any major system malfunctioning, the system should
be available in 1 to 2 working days, so that the business process is not severely
affected.
Modules of the Project:
• Oversaw the overall planning, execution, and delivery of the Car Rental System.
2.Developers:
• Front-end Developer:
• Back-end Developer.
3.Database Administrator:
4.System Analyst:
• Gathered and analyzed user requirements for the Car Rental System.
5.Tester/QA Analyst:
1.Technical Feasibility:
• The technical feasibility of the Car Rental System is high, utilizing a well-established
technology stack, including the PHP, CSS, HTML stack.
• Development tools are readily available, and the team possesses thenecessary technical
expertise.
2. Operational Feasibility:
• The Car Rental System seamlessly integrates with existing college operations, enhancing
theefficiency of the entry process.
•User-friendly interfaces for both Employe and customer contribute to the ease of
system adoption.
3. Economic Feasibility:
• The implementation of the Car Rental System is expected to result in cost savings
associatedwith improved operational efficiency.
• The Car Rental System complies with all relevant legal and regulatory requirements,
including data protection and privacy laws.
• Security measures are in place to safeguard sensitive information and ensure ethical
data management practices.
Future Enhancement
5.Real-Time Vehicle Tracking: Implementing real-time GPS tracking for rental vehicles,
allowing customers to track their vehicle's location and estimated arrival time, enhancing
safety and peace of mind during the rental period.
These future enhancements aim to further improve the online car rental experience by
leveraging emerging technologies, promoting sustainability, and offering innovative solutions
to meet the evolving needs of customers and the industry.
FLOWCHART
Database and
Tables
Database :
carrentalp
Table:1 -(Cars)
Table:2-(Clientcars)
Table:3-(Clients)
Table:4-(Customers)
Table:5-(Driver)
Code of the Project
Index.php
<!DOCTYPE html>
<html>
<?php
session_start();
require 'connection.php';
$conn = Connect();
?>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>Car Rentals</title>
<link rel="shortcut icon" type="image/png"
href="assets/img/P.png">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet"
href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/fonts/font-
awesome.min.css">
<link rel="stylesheet" href="assets/css/user.css">
<link rel="stylesheet" href="assets/w3css/w3.css">
<link
href="http://fonts.googleapis.com/css?family=Open+Sans:300,40
0,700,400italic,700italic" rel="stylesheet" type="text/css">
<link
href="http://fonts.googleapis.com/css?family=Montserrat:400,7
00" rel="stylesheet" type="text/css">
</head>
<?php
if(isset($_SESSION['login_client'])){
?>
<div class="collapse navbar-collapse navbar-right
navbar-main-collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="#"><span class="glyphicon
glyphicon-user"></span> Welcome <?php echo
$_SESSION['login_client']; ?></a>
</li>
<li>
<ul class="nav navbar-nav navbar-right">
<li><a href="#" class="dropdown-toggle active"
data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false"><span class="glyphicon glyphicon-
user"></span> Control Panel <span class="caret"></span> </a>
<ul class="dropdown-menu">
<li> <a href="entercar.php">Add Car</a></li>
<li> <a href="enterdriver.php"> Add
Driver</a></li>
<li> <a href="clientview.php">View</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="logout.php"><span
class="glyphicon glyphicon-log-out"></span> Logout</a>
</li>
</ul>
</div>
<?php
}
else if (isset($_SESSION['login_customer'])){
?>
<div class="collapse navbar-collapse navbar-right
navbar-main-collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="#"><span class="glyphicon
glyphicon-user"></span> Welcome <?php echo
$_SESSION['login_customer']; ?></a>
</li>
<ul class="nav navbar-nav">
<li><a href="#" class="dropdown-toggle active"
data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false"> Garagge <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li> <a href="prereturncar.php">Return
Now</a></li>
<li> <a href="mybookings.php"> My
Bookings</a></li>
</ul>
</li>
</ul>
<li>
<a href="logout.php"><span
class="glyphicon glyphicon-log-out"></span> Logout</a>
</li>
</ul>
</div>
<?php
}
else {
?>
if(mysqli_num_rows($result1) > 0) {
while($row1 = mysqli_fetch_assoc($result1)){
$car_id = $row1["car_id"];
$car_name = $row1["car_name"];
$ac_price = $row1["ac_price"];
$ac_price_per_day =
$row1["ac_price_per_day"];
$non_ac_price = $row1["non_ac_price"];
$non_ac_price_per_day =
$row1["non_ac_price_per_day"];
$car_img = $row1["car_img"];
?>
<a href="booking.php?id=<?php echo($car_id) ?>">
<div class="sub-menu">
<img class="card-img-top" src="<?php echo
$car_img; ?>" alt="Card image cap">
<h5><b> <?php echo $car_name; ?> </b></h5>
<h6> AC Fare: <?php echo ("Rs. " . $ac_price .
"/km & Rs." . $ac_price_per_day . "/day"); ?></h6>
<h6> Non-AC Fare: <?php echo ("Rs. " .
$non_ac_price . "/km & Rs." . $non_ac_price_per_day .
"/day"); ?></h6>
</div>
</a>
<?php }}
else {
?>
<h1> No cars available :( </h1>
<?php
}
?>
</section>
</div>
<div class="bgimg-2">
<div class="caption">
<span class="border" style="background-
color:transparent;font-size:25px;color: #f7f7f7;"></span>
</div>
</div>
</div>
</div>
</footer>
<script>
function myMap() {
myCenter = new google.maps.LatLng(25.614744,
85.128489);
var mapOptions = {
center: myCenter,
zoom: 12,
scrollwheel: true,
draggable: true,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new
google.maps.Map(document.getElementById("googleMap"),
mapOptions);
</html>
Login_process.php
<?php
include('login_client.php'); // Includes Login Script
if(isset($_SESSION['login_client'])){
header("location: index.php"); //Redirecting
}
?>
<!DOCTYPE html>
<html>
<head>
<title> Employee Login | Car Rental </title>
<link rel="shortcut icon" type="image/png"
href="assets/img/P.png.png">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet"
href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/fonts/font-
awesome.min.css">
<link rel="stylesheet" href="assets/w3css/w3.css">
<script type="text/javascript"
src="assets/js/jquery.min.js"></script>
<script type="text/javascript"
src="assets/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="assets/css/clientlogin.css">
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-custom navbar-fixed-top"
role="navigation" style="color: black">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle"
data-toggle="collapse" data-target=".navbar-main-collapse">
<i class="fa fa-bars"></i>
</button>
<a class="navbar-brand page-scroll"
href="index.php">
Car Rentals </a>
</div>
<!-- Collect the nav links, forms, and other
content for toggling -->
<?php
if(isset($_SESSION['login_client'])){
?>
<div class="collapse navbar-collapse navbar-
right navbar-main-collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="#"><span
class="glyphicon glyphicon-user"></span> Welcome <?php echo
$_SESSION['login_client']; ?></a>
</li>
<li>
<ul class="nav navbar-nav navbar-
right">
<li><a href="#"
class="dropdown-toggle active" data-toggle="dropdown"
role="button" aria-haspopup="true" aria-
expanded="false"><span class="glyphicon glyphicon-
user"></span> Control Panel <span class="caret"></span> </a>
<ul class="dropdown-
menu">
<li> <a
href="entercar.php">Add Car</a></li>
<li> <a
href="enterdriver.php"> Add Driver</a></li>
<li> <a
href="clientview.php">View</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="logout.php"><span
class="glyphicon glyphicon-log-out"></span> Logout</a>
</li>
</ul>
</div>
<?php
}
else if (isset($_SESSION['login_customer'])){
?>
<div class="collapse navbar-collapse
navbar-right navbar-main-collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="#"><span
class="glyphicon glyphicon-user"></span> Welcome <?php echo
$_SESSION['login_customer']; ?></a>
</li>
<li>
<a href="#">History</a>
</li>
<li>
<a href="logout.php"><span
class="glyphicon glyphicon-log-out"></span> Logout</a>
</li>
</ul>
</div>
<?php
}
else {
?>
<div class="row">
<div class="form-group col-
xs-12">
<label
for="client_username"><span class="text-danger"
style="margin-right: 5px;">*</span> Username: </label>
<div class="input-group">
<input class="form-
control" id="client_username" type="text"
name="client_username" placeholder="Username" required=""
autofocus="">
<span class="input-
group-btn">
<label class="btn btn-primary"><span
class="glyphicon glyphicon-user" aria-hidden="true"></label>
</span>
</span>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-
xs-12">
<label
for="client_password"><span class="text-danger"
style="margin-right: 5px;">*</span> Password: </label>
<div class="input-group">
<input class="form-
control" id="client_password" type="password"
name="client_password" placeholder="Password" required="">
<span class="input-
group-btn">
<label class="btn btn-primary"><span
class="glyphicon glyphicon-lock" aria-
hidden="true"></span></label>
</span>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-
xs-4">
<button class="btn btn-
primary" name="submit" type="submit" value=" Login
">Submit</button>
</div>
</div>
<label style="margin-left:
5px;">or</label> <br>
<label style="margin-left:
5px;"><a href="clientsignup.php">Create a new
account.</a></label>
</form>
</div>
</div>
</div>
</div>
</body>
<footer class="site-footer">
<div class="container">
<hr>
<div class="row">
<div class="col-sm-6">
<h5>© <?php echo date("Y"); ?> Car
Rentals</h5>
</div>
</div>
</div>
</footer>
</html>
Logout.php
<?php
session_start();
if(session_destroy())
// Destroying All Sessions{
header("Location: index.php");
}?>
connection.php
<?php
function Connect()
{
$dbhost = "localhost";
$dbuser = "root";
$dbpass = "";
$dbname = "carrentalp";
//Create Connection
$conn = new mysqli($dbhost, $dbuser, $dbpass, $dbname) or
die($conn->connect_error);
return $conn;
}
?>
Addcar.php
<div class="container" style="margin-top: 65px;" >
<div class="col-md-7" style="float: none; margin: 0
auto;">
<div class="form-area">
<form role="form" action="entercar1.php"
enctype="multipart/form-data" method="POST">
<br style="clear: both">
<h3 style="margin-bottom: 25px; text-align: center;
font-size: 30px;"> Please Provide Your Car Details. </h3>
<div class="form-group">
<input type="text" class="form-control"
id="car_name" name="car_name" placeholder="Car Name "
required autofocus="">
</div>
<div class="form-group">
<input type="text" class="form-control"
id="car_nameplate" name="car_nameplate" placeholder="Vehicle
Number Plate" required>
</div>
<div class="form-group">
<input type="text" class="form-control"
id="ac_price" name="ac_price" placeholder="AC Fare per KM
(Rs)" required>
</div>
<div class="form-group">
<input type="text" class="form-control"
id="non_ac_price" name="non_ac_price" placeholder="Non-AC
Fare per KM (Rs)" required>
</div>
<div class="form-group">
<input type="text" class="form-control"
id="ac_price_per_day" name="ac_price_per_day" placeholder="AC
Fare per day (Rs)" required>
</div>
<div class="form-group">
<input type="text" class="form-control"
id="non_ac_price_per_day" name="non_ac_price_per_day"
placeholder="Non-AC Fare per day (Rs)" required>
</div>
<div class="form-group">
<input name="uploadedimage" type="file">
</div>
<button type="submit" id="submit" name="submit"
class="btn btn-success pull-right"> Submit for
Rental</button>
</form>
</div>
</div>
if (mysqli_num_rows($result) > 0) {
?>
<div style="overflow-x:auto;">
<table class="table table-striped">
<thead class="thead-dark">
<tr>
<th></th>
<th width="24%"> Name</th>
<th width="15%"> Nameplate </th>
<th width="13%"> AC Fare (/km) </th>
<th width="17%"> Non-AC Fare (/km)</th>
<th width="13%"> AC Fare (/day)</th>
<th width="17%"> Non-AC Fare (/day)</th>
<th width="1%"> Availability </th>
</tr>
</thead>
<?PHP
//OUTPUT DATA OF EACH ROW
while($row = mysqli_fetch_assoc($result)){
?>
<tbody>
<tr>
<td> <span class="glyphicon glyphicon-menu-
right"></span> </td>
<td><?php echo $row["car_name"]; ?></td>
<td><?php echo $row["car_nameplate"]; ?></td>
<td><?php echo $row["ac_price"]; ?></td>
<td><?php echo $row["non_ac_price"]; ?></td>
<td><?php echo $row["ac_price_per_day"]; ?></td>
<td><?php echo $row["non_ac_price_per_day"]; ?></td>
<td><?php echo $row["car_availability"]; ?></td>
</tr>
</tbody>
<?php } ?>
</table>
</div>
EmployeeDashboard.php
<!DOCTYPE html>
<html>
<?php
session_start();
require 'connection.php';
$conn = Connect();
?>
<head>
<link rel="shortcut icon" type="image/png"
href="assets/img/P.png.png">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet"
href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/fonts/font-
awesome.min.css">
<link rel="stylesheet" href="assets/w3css/w3.css">
<link rel="stylesheet" type="text/css"
href="assets/css/customerlogin.css">
<script type="text/javascript"
src="assets/js/jquery.min.js"></script>
<script type="text/javascript"
src="assets/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" media="screen"
href="assets/css/clientpage.css" />
</head>
<body id="page-top" data-spy="scroll" data-target=".navbar-
fixed-top">
<!-- Navigation -->
<nav class="navbar navbar-custom navbar-fixed-top"
role="navigation" style="color: black">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle"
data-toggle="collapse" data-target=".navbar-main-collapse">
<i class="fa fa-bars"></i>
</button>
<a class="navbar-brand page-scroll"
href="index.php">
Car Rentals </a>
</div>
<!-- Collect the nav links, forms, and other
content for toggling -->
<?php
if(isset($_SESSION['login_client'])){
?>
<div class="collapse navbar-collapse navbar-right
navbar-main-collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="#"><span class="glyphicon
glyphicon-user"></span> Welcome <?php echo
$_SESSION['login_client']; ?></a>
</li>
<li>
<ul class="nav navbar-nav navbar-right">
<li><a href="#" class="dropdown-toggle active"
data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false"><span class="glyphicon glyphicon-
user"></span> Control Panel <span class="caret"></span> </a>
<ul class="dropdown-menu">
<li> <a href="entercar.php">Add Car</a></li>
<li> <a href="enterdriver.php"> Add
Driver</a></li>
<li> <a href="clientview.php">View</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="logout.php"><span
class="glyphicon glyphicon-log-out"></span> Logout</a>
</li>
</ul>
</div>
<?php
}
else if (isset($_SESSION['login_customer'])){
?>
<div class="collapse navbar-collapse navbar-right
navbar-main-collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="#"><span class="glyphicon
glyphicon-user"></span> Welcome <?php echo
$_SESSION['login_customer']; ?></a>
</li>
<ul class="nav navbar-nav">
<li><a href="#" class="dropdown-toggle active"
data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false"> Garagge <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li> <a href="prereturncar.php">Return
Now</a></li>
<li> <a href="mybookings.php"> My
Bookings</a></li>
</ul>
</li>
</ul>
<li>
<a href="logout.php"><span
class="glyphicon glyphicon-log-out"></span> Logout</a>
</li>
</ul>
</div>
<?php
}
else {
?>
$result1 = $conn->query($sql1);
if (mysqli_num_rows($result1) > 0) {
?>
<div class="container">
<div class="jumbotron">
<h1 class="text-center">Your Bookings</h1>
<p class="text-center"> Hope you enjoyed our service
</p>
</div>
</div>
<div class="table-responsive" style="padding-left: 100px;
padding-right: 100px;" >
<table class="table table-striped">
<thead class="thead-dark">
<tr>
<th width="20%">Car</th>
<th width="15%">Customer Name</th>
<th width="20%">Rent Start Date</th>
<th width="20%">Rent End Date</th>
<th width="10%">Distance</th>
<th width="15%">Total Amount</th>
</tr>
</thead>
<?php
while($row = mysqli_fetch_assoc($result1)) {
?>
<tr>
<td><?php echo $row["car_name"]; ?></td>
<td><?php echo $row["customer_name"]; ?></td>
<td><?php echo $row["rent_start_date"] ?></td>
<td><?php echo $row["rent_end_date"]; ?></td>
<td><?php echo $row["distance"]; ?></td>
<td>Rs. <?php echo $row["total_amount"]; ?></td>
</tr>
<?php } ?>
</table>
</div>
<?php } else {
?>
<div class="container">
<div class="jumbotron">
<h1>No booked cars</h1>
<p> Rent some cars now <?php echo $conn->error; ?>
</p>
</div>
</div>
<?php
} ?>
</body>
<footer class="site-footer">
<div class="container">
<hr>
<div class="row">
<div class="col-sm-6">
<h5>© <?php echo date("Y"); ?> Car
Rentals</h5>
</div>
</div>
</div>
</footer>
</html>
AddDriver.php
<!DOCTYPE html>
<html>
<?php
include('session_client.php'); ?>
<head>
<link rel="shortcut icon" type="image/png"
href="assets/img/P.png.png">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet"
href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/fonts/font-
awesome.min.css">
<link rel="stylesheet" href="assets/w3css/w3.css">
<link rel="stylesheet" type="text/css"
href="assets/css/customerlogin.css">
<script type="text/javascript"
src="assets/js/jquery.min.js"></script>
<script type="text/javascript"
src="assets/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" media="screen"
href="assets/css/clientpage.css" />
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-custom navbar-fixed-top"
role="navigation" style="color: black">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle"
data-toggle="collapse" data-target=".navbar-main-collapse">
<i class="fa fa-bars"></i>
</button>
<a class="navbar-brand page-scroll"
href="index.php">
Car Rentals </a>
</div>
<!-- Collect the nav links, forms, and other
content for toggling -->
<?php
if(isset($_SESSION['login_client'])){
?>
<div class="collapse navbar-collapse navbar-right
navbar-main-collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="#"><span class="glyphicon
glyphicon-user"></span> Welcome <?php echo
$_SESSION['login_client']; ?></a>
</li>
<li>
<ul class="nav navbar-nav navbar-right">
<li><a href="#" class="dropdown-toggle active"
data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false"><span class="glyphicon glyphicon-
user"></span> Control Panel <span class="caret"></span> </a>
<ul class="dropdown-menu">
<li> <a href="entercar.php">Add Car</a></li>
<li> <a href="enterdriver.php"> Add
Driver</a></li>
<li> <a href="clientview.php">View</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="logout.php"><span
class="glyphicon glyphicon-log-out"></span> Logout</a>
</li>
</ul>
</div>
<?php
}
else if (isset($_SESSION['login_customer'])){
?>
<div class="collapse navbar-collapse navbar-right
navbar-main-collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="#"><span class="glyphicon
glyphicon-user"></span> Welcome <?php echo
$_SESSION['login_customer']; ?></a>
</li>
<li>
<a href="#">History</a>
</li>
<li>
<a href="logout.php"><span
class="glyphicon glyphicon-log-out"></span> Logout</a>
</li>
</ul>
</div>
<?php
}
else {
?>
<div class="form-group">
<input type="text" class="form-control"
id="driver_name" name="driver_name" placeholder="Driver Name
" required autofocus="">
</div>
<div class="form-group">
<input type="text" class="form-control"
id="dl_number" name="dl_number" placeholder="Driving License
Number" required>
</div>
<div class="form-group">
<input type="text" class="form-control"
id="driver_phone" name="driver_phone" placeholder="Contact"
required>
</div>
<div class="form-group">
<input type="text" class="form-control"
id="driver_address" name="driver_address"
placeholder="Address" required>
</div>
<div class="form-group">
<input type="text" class="form-control"
id="driver_gender" name="driver_gender" placeholder="Gender"
required>
</div>
if (mysqli_num_rows($result) > 0) {
?>
<?PHP
//OUTPUT DATA OF EACH ROW
while($row = mysqli_fetch_assoc($result)){
?>
<tbody>
<tr>
<td> <span class="glyphicon glyphicon-menu-
right"></span> </td>
<td><?php echo $row["driver_name"]; ?></td>
<td><?php echo $row["driver_gender"]; ?></td>
<td><?php echo $row["dl_number"]; ?></td>
<td><?php echo $row["driver_phone"]; ?></td>
<td><?php echo $row["driver_address"]; ?></td>
<td><?php echo $row["driver_availability"]; ?></td>
</tr>
</tbody>
<?php } ?>
</table>
<br>
<?php } ?>
</form>
</div>
</div>
</div>
</body>
<footer class="site-footer">
<div class="container">
<hr>
<div class="row">
<div class="col-sm-6">
<h5>© <?php echo date("Y"); ?> Car
Rentals</h5>
</div>
</div>
</div>
</footer>
</html>
BookingConfirm.php
<div class="container">
<div class="jumbotron">
<h1 class="text-center" style="color:
green;"><span class="glyphicon glyphicon-ok-circle"></span>
Booking Confirmed.</h1>
</div>
</div>
<br>
<div class="container">
<h5 class="text-center">Please read the following
information about your order.</h5>
<div class="box">
<div class="col-md-10" style="float: none;
margin: 0 auto; text-align: center;">
<h3 style="color: orange;">Your booking has
been received and placed into out order processing
system.</h3>
<br>
<h4>Please make a note of your <strong>order
number</strong> now and keep in the event you need to
communicate with us about your order.</h4>
<br>
<h3 style="color: orange;">Invoice</h3>
<br>
</div>
<div class="col-md-10" style="float: none;
margin: 0 auto; ">
<h4> <strong>Vehicle Name: </strong> <?php
echo $car_name; ?></h4>
<br>
<h4> <strong>Vehicle Number:</strong> <?php
echo $car_nameplate; ?></h4>
<br>
<?php
if($charge_type == "days"){
?>
<h4> <strong>Fare:</strong> Rs. <?php
echo $fare; ?>/day</h4>
<?php } else {
?>
<h4> <strong>Fare:</strong> Rs. <?php
echo $fare; ?>/km</h4>
<?php } ?>
<br>
<h4> <strong>Booking Date: </strong> <?php
echo date("Y-m-d"); ?> </h4>
<br>
<h4> <strong>Start Date: </strong> <?php echo
$rent_start_date; ?></h4>
<br>
<h4> <strong>Return Date: </strong> <?php
echo $rent_end_date; ?></h4>
<br>
<h4> <strong>Driver Name: </strong> <?php
echo $driver_name; ?> </h4>
<br>
<h4> <strong>Driver Gender: </strong> <?php
echo $driver_gender; ?> </h4>
<br>
<h4> <strong>Driver License number: </strong>
<?php echo $dl_number; ?> </h4>
<br>
<h4> <strong>Driver Contact:</strong> <?php
echo $driver_phone; ?></h4>
<br>
<h4> <strong>Employee Name:</strong> <?php
echo $client_name; ?></h4>
<br>
<h4> <strong>Employee Contact: </strong>
<?php echo $client_phone; ?></h4>
<br>
</div>
</div>
<div class="col-md-12" style="float: none; margin: 0
auto; text-align: center;">
<h6>Warning! <strong>Do not reload this
page</strong> or the above display will be lost. If you want
a hardcopy of this page, please print it now.</h6>
</div>
</div>
</body>
<?php } else { ?>
<!-- Navigation -->
<nav class="navbar navbar-custom navbar-fixed-top"
role="navigation" style="color: black">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle"
data-toggle="collapse" data-target=".navbar-main-collapse">
<i class="fa fa-bars"></i>
</button>
<a class="navbar-brand page-scroll"
href="index.php">
Car Rentals </a>
</div>
<!-- Collect the nav links, forms, and other
content for toggling -->
<?php
if(isset($_SESSION['login_client'])){
?>
<div class="collapse navbar-collapse navbar-right
navbar-main-collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="#"><span class="glyphicon
glyphicon-user"></span> Welcome <?php echo
$_SESSION['login_client']; ?></a>
</li>
<li>
<ul class="nav navbar-nav navbar-right">
<li><a href="#" class="dropdown-toggle active"
data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false"><span class="glyphicon glyphicon-
user"></span> Control Panel <span class="caret"></span> </a>
<ul class="dropdown-menu">
<li> <a href="entercar.php">Add Car</a></li>
<li> <a href="enterdriver.php"> Add
Driver</a></li>
<li> <a href="clientview.php">View</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="logout.php"><span
class="glyphicon glyphicon-log-out"></span> Logout</a>
</li>
</ul>
</div>
<?php
}
else if (isset($_SESSION['login_customer'])){
?>
<div class="collapse navbar-collapse navbar-right
navbar-main-collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="#"><span class="glyphicon
glyphicon-user"></span> Welcome <?php echo
$_SESSION['login_customer']; ?></a>
</li>
<ul class="nav navbar-nav">
<li><a href="#" class="dropdown-toggle active"
data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false"> Garagge <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li> <a href="prereturncar.php">Return
Now</a></li>
<li> <a href="mybookings.php"> My
Bookings</a></li>
</ul>
</li>
</ul>
<li>
<a href="logout.php"><span
class="glyphicon glyphicon-log-out"></span> Logout</a>
</li>
</ul>
</div>
<?php
}
else {
?>
PrintBill.php
<?php
$id = $_GET["id"];
$distance = NULL;
$distance_or_days = $conn-
>real_escape_string($_POST['distance_or_days']);
$fare = $conn->real_escape_string($_POST['hid_fare']);
$total_amount = $distance_or_days * $fare;
$car_return_date = date('Y-m-d');
$return_status = "R";
$login_customer = $_SESSION['login_customer'];
if(mysqli_num_rows($result0) > 0) {
while($row0 = mysqli_fetch_assoc($result0)){
$rent_end_date = $row0["rent_end_date"];
$rent_start_date = $row0["rent_start_date"];
$car_name = $row0["car_name"];
$car_nameplate = $row0["car_nameplate"];
$charge_type = $row0["charge_type"];
}
}
function dateDiff($start, $end) {
$start_ts = strtotime($start);
$end_ts = strtotime($end);
$diff = $end_ts - $start_ts;
return round($diff / 86400);
}
$extra_days = dateDiff("$rent_end_date", "$car_return_date");
$total_fine = $extra_days*200;
$duration = dateDiff("$rent_start_date","$rent_end_date");
if($extra_days>0) {
$total_amount = $total_amount + $total_fine;
}
if($charge_type == "days"){
$no_of_days = $distance_or_days;
$sql1 = "UPDATE rentedcars SET
car_return_date='$car_return_date', no_of_days='$no_of_days',
total_amount='$total_amount', return_status='$return_status'
WHERE id = '$id' ";
} else {
$distance = $distance_or_days;
$sql1 = "UPDATE rentedcars SET
car_return_date='$car_return_date', distance='$distance',
no_of_days='$duration', total_amount='$total_amount',
return_status='$return_status' WHERE id = '$id' ";
}
$result1 = $conn->query($sql1);
if ($result1){
$sql2 = "UPDATE cars c, driver d, rentedcars rc SET
c.car_availability='yes', d.driver_availability='yes'
WHERE rc.car_id=c.car_id AND rc.driver_id=d.driver_id
AND rc.customer_username = '$login_customer' AND rc.id =
'$id'";
$result2 = $conn->query($sql2);
}
else {
echo $conn->error;
}
?>
<div class="container">
<div class="jumbotron">
<h1 class="text-center" style="color:
green;"><span class="glyphicon glyphicon-ok-circle"></span>
Car Returned</h1>
</div>
</div>
<br>
<h2 class="text-center"> Thank you for visiting Car
Rentals! We wish you have a safe ride. </h2>
?>
<h4> <strong>Total Fine:</strong> <label
class="text-danger"> Rs. <?php echo $total_fine; ?>/-
</label> for <?php echo $extra_days;?> extra days.</h4>
<br>
<?php } ?>
MyBooking.php
Style.css
Primary style
-------------------------------- */
*, *::after, *::before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*::after, *::before {
content: '';
}
body {
font-size: 100%;
font-family: "Open Sans", sans-serif;
color: #4e5359;
background-color: #f3f3f5;
}
body::after {
/* overlay layer visible on small devices when the right
panel slides in */
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(78, 83, 89, 0.8);
visibility: hidden;
opacity: 0;
-webkit-transition: opacity .3s 0s, visibility 0s .3s;
-moz-transition: opacity .3s 0s, visibility 0s .3s;
transition: opacity .3s 0s, visibility 0s .3s;
}
body.cd-overlay::after {
visibility: visible;
opacity: 1;
-webkit-transition: opacity .3s 0s, visibility 0s 0s;
-moz-transition: opacity .3s 0s, visibility 0s 0s;
transition: opacity .3s 0s, visibility 0s 0s;
}
@media only screen and (min-width: 768px) {
body::after {
display: none;
}
}
a {
color: #a9c056;
text-decoration: none;
}
/* --------------------------------
Main components
-------------------------------- */
header {
position: relative;
height: 180px;
line-height: 180px;
text-align: center;
background-color: #a9c056;
}
header h1 {
color: #ffffff;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-size: 20px;
font-size: 1.25rem;
}
@media only screen and (min-width: 1024px) {
header {
height: 240px;
line-height: 240px;
}
header h1 {
font-size: 36px;
font-size: 2.25rem;
font-weight: 300;
}
}
.cd-faq {
width: 90%;
max-width: 1024px;
margin: 2em auto;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}
.cd-faq:after {
content: "";
display: table;
clear: both;
}
@media only screen and (min-width: 768px) {
.cd-faq {
position: relative;
margin: 4em auto;
box-shadow: none;
}
}
.cd-faq-categories a {
position: relative;
display: block;
overflow: hidden;
height: 50px;
line-height: 50px;
padding: 0 28px 0 16px;
background-color: #4e5359;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #ffffff;
white-space: nowrap;
border-bottom: 1px solid #555b61;
text-overflow: ellipsis;
}
.cd-faq-categories a::before, .cd-faq-categories a::after {
/* plus icon on the right */
position: absolute;
top: 50%;
right: 16px;
display: inline-block;
height: 1px;
width: 10px;
background-color: #7f868e;
}
.cd-faq-categories a::after {
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg);
}
.cd-faq-categories li:last-child a {
border-bottom: none;
}
@media only screen and (min-width: 768px) {
.cd-faq-categories {
width: 20%;
float: left;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
Some glimpses of Webpages
Login Page
Employee Dashboard Page
Customer Login Page
Add Car Page
Add Driver Page
Available Car Page
Conclusion
The online car rental system stands as a beacon of convenience and efficiency
in the realm of transportation, revolutionizing the way individuals and
businesses access vehicles for their travel needs. Through its seamless booking
process, diverse fleet options, and personalized services, it has transcended
traditional rental models, offering unparalleled flexibility and convenience to
customers worldwide.
As technology continues to advance, the future of online car rental holds even
greater promise. With the integration of autonomous vehicles, predictive
maintenance algorithms, and augmented reality assistance, the rental
experience is poised to become more intuitive, safer, and tailored to individual
preferences. Subscription-based models, carbon offset programs, and
blockchain-based identity verification further underscore the industry's
commitment to sustainability, security, and customer-centricity.
• HTML (HTML 5)
• CSS (CSS 3)
3.Datasets:
•Excel Sheets are used for generating reports.