You are on page 1of 91

BIKE RENTAL PORTAL

A Project Report on
“Bike Rental Portal”
Submitted in Partial Fulfillment of the Requirements for the award of the degree

Bachelor of Computer Applications OF

BENGALURU CITY UNIVERSITY

SUBMITTED BY

HARSH KUMAR SINGH R1811658

PRESIDENCY COLLEGE
Kempapura, Hebbal, Bengaluru – 24
Re-accredited by NAAC with ‘A+’

DEPARTMENT OF COMPUTER APPLICATIONS

1|Page
BIKE RENTAL PORTAL

PRESIDENCY COLLEGE
Kempapura, Hebbal, Bengaluru – 24
Re-accredited by NAAC with ‘A+’

DEPARTMENT OF COMPUTER APPLICATIONS

CERTIFICATE

This is to certify that HARSH KUMAR SINGH with Register No. R1811658 has
satisfactorily completed the Sixth Semester BCA Project titled “BIKE RENTAL
PORTAL”, as a partial fulfilment of the requirements for the award of the Degree in
Bachelor of Computer Applications, awarded by Bengaluru city University, during
the Academic Year 2021.

Project Guide: J Vijay Fidelis Head of Department


(Department of Computer Application)

Examiners: Reg No: ----------------------------------------

1. -------------------------------- Examination Centre: ----------------------

2. -------------------------------- Date of the exam: ----------------------------

2|Page
BIKE RENTAL PORTAL

Declaration

The project titled “Bike Rental Portal” developed by me in the partial fulfilment
of Bengaluru city University. It is a systematic work carried by me under the
guidance of J Vijay Fidelis (Associate Professor) in Department of Computer
Applications, Presidency College.

I, declare that this same project has not been submitted to any degree or
diploma to the Bangalore University or any other Universities.

Name of the student: -Harsh Kumar Singh

Date: -

Signature

3|Page
BIKE RENTAL PORTAL

Acknowledgment

The development of software is generally bit complex and time consuming task. The goal of
developing the project “Bike Rental Portal” could not be archived without the
encouragements of kindly helpful and supportive people. Here by I convey my sincere thanks
for all of them.

I take this opportunity to express my gratitude to people who had been instrumental in the
successful completion of this project.

I am thankful to our management trustee for providing us an opportunity to work and complete
the project successfully.

I wish to express my thanks to our Principal for his support to the project work. I would like to
acknowledge my gratitude to our HOD of Computer Applications Dr.Alli A for his
encouragement and support. Without his encouragement and guidance this project would not
have materialized.

The guidance and support received from my Internal J Vijay Fidelis contributed to this project,

was vital for the success of the project. I am grateful for their constant support and help.

4|Page
BIKE RENTAL PORTAL

INDEX

Page
Sl.No. Particulars
No.

1 Synopsis 6

2 Introduction 9

3 Objectives 11
Requirement Specification:
13
4 4.1 Software Specification
4.2 Hardware Specification 13
5 Requirement Analysis 14
System Analysis
6 25
System Design :
28
9.1 ER Diagram
7 9.2 DFD 31
9.3 SCHEMA 35
Implementation
8 39
10.1 Source Code
9 System Testing 76

10 Snapshots 80

11 Future Enhancements 86

12 Conclusion 88

13 Bibliography 90

5|Page
BIKE RENTAL PORTAL

6|Page
BIKE RENTAL PORTAL

SYNOPSIS

Title: Bike Rental Portal

OBJECTIVE:

The main aim of this Bike Rental Portal project is to make Bike Rental Process easier for
customer information dissemination much easier in online community as the people tends to
rent bike online as I have choose it as project.
The main aim of this Bike Rental project is make information dissemination much
easier way that people can rental commodities online hassle free as its very trending
nowadays in the market to hire bike online for their convince in this project there’s
plenty of options to add and remove bikes.

In this generally we are providing tracking device with will easier the work of us and
riders too. They can interact with us anytime they want and we can assist them.
These systems can be helpful for us to trace and time of misadventure and stealing
bikes part. It will also tell us if any crash or such things happened.

 The purpose of this project is to provide hassle free booking of rented bikes and using
them for their purpose. As seeing the growing trend in market of using rented bikes so
an idea came into mind for making this real time project to solve the problem.

My similar websites/portals are present in the market but this project includes more
functionality from them and works on 2 modules which are
1. User module
2. Admin model

7|Page
BIKE RENTAL PORTAL

List of Modules:

Admin:

Admin is the person who controls, monitors and keeps the whole flow of the
system running smoothly.

User:
User are able to book and perform related queries and testimonials and wait for
admin to approve it.

FUNCTIONALITIES OF MODULES:

Admin can perform the following operations:

 Approval of booking
 Modification of information
 Monitoring of information
 Full authority over each people account
 Manage testimonials
 Manage letterheads

User have the following privileges:

 Register into the system


 Log into the system
 View information
 Book bike
 Changing own password
 Check availability and price

8|Page
BIKE RENTAL PORTAL

Introduction

9|Page
BIKE RENTAL PORTAL

INTRODUCTION

Introduction:

Bike rental Portal is intended for people who wants to book bike online for their use. This
will be helpful for them and very convenient for the people using it and all support will be
given by the admin and real time project working. This project is inspired by real life
problem which Is been reflected in rental portals and I tried to fix in my project.
This project gives pleasure of adding bikes and new vehicles in the portal and gives you full
admin control where he can perform multiple operations where he has control to confirm or
reject any booking so this gives no rejection time of taking bike.
In my project bikes are been updated in real time and no false information is depleted on the
website.
There can be multiple admin for performing various operation at same time this can be
possible in my project. Where different modules is been used in it and this to interact with
public and a public friendly user interface is used to make more easy for customers. For now
me have only one mode of payment but in future enhancement will be introducing customer
chat and multiple payment modes.

10 | P a g e
BIKE RENTAL PORTAL

Objective

11 | P a g e
BIKE RENTAL PORTAL

OBJECTIVE:

The main aim of this Bike Rental Portal project is to make Bike Rental Process easier for
customer information dissemination much easier in online community as the people tends to
rent bike online as I have choose it as project.
The main aim of this Bike Rental project is make information dissemination much
easier way that people can rental commodities online hassle free as its very trending
nowadays in the market to hire bike online for their convince in this project there’s
plenty of options to add and remove bikes.

In this generally we are providing tracking device with will easier the work of us and
riders too. They can interact with us anytime they want and we can assist them.
These systems can be helpful for us to trace and time of misadventure and stealing
bikes part. It will also tell us if any crash or such things happened.

 The purpose of this project is to provide hassle free booking of rented bikes and using
them for their purpose. As seeing the growing trend in market of using rented bikes so
an idea came into mind for making this real time project to solve the problem.

My similar websites/portals are present in the market but this project includes more
functionality from them and works on 2 modules which are
3. User module
4. Admin model
Admin can perform the following operations:

 Approval of booking
 Modification of information
 Monitoring of information
 Full authority over each people account
 Manage testimonials
 Manage letterheads

User have the following privileges:

 Register into the system


 Log into the system
 View information
 Book bike
 Changing own password

12 | P a g e
BIKE RENTAL PORTAL

REQUIREMENTS SPECIFICATION

Hardware Requirements:
 Processor : Intel Core i3 or higher
 RAM : 4 GB RAM or higher
 Hard disk : 20 GB (Minimum)
 Monitor : 1024x768(Resolution)
 Keyboard
 Mouse
 Broadband : 1 mpbs or higher 

Software requirements:
 Operating system : Windows 10
 Front end : HTML, CSS, JavaScript
 Back end : MySQL, PHP

13 | P a g e
BIKE RENTAL PORTAL

Requirement
Analysis

14 | P a g e
BIKE RENTAL PORTAL

Software Requirements are a statement of service that the software should provide or
constraints on the system. They reflect the need of the users for a system that helps
in storing data.

In general, there are three types of requirements:

i. User Requirements
ii. System Requirements
iii. Software Specifications

A software requirements specification (SRS) is a comprehensive description of the


intended purpose and environment for software under development. The SRS fully
describes what the software will do and how it will be expected to perform.

An SRS minimizes the time and effort required by developers to achieve desired goals
and also minimizes the development cost. A good SRS defines how an application
will interact with system hardware, other programs and human users in a wide variety
of real-world situations. Parameters such as operating speed, response time,
availability, portability, maintainability, footprint, security and speed of recovery
from adverse events are evaluated.

The requirements of this web application (Digital Notice Board) developed by me is


very well understood and documented initially when the process started. Accordingly,
the hardware and software requirements are chosen. The same can be referred in the
next section of this report. This web application runs in the Apache Tomcat Server,
which can be accessed by web clients through the Internet from anywhere in the
world. The SRS parameters are adopted in this system, with the detailed feasibility
study. While developing, this system tested as the localhost, through the Microsoft
chrome. Also, few other popular web browsers are tested.

15 | P a g e
BIKE RENTAL PORTAL

HTML (Hyper Text Mark-up Language)


HTML was created by Tim Berners-Lee at European Laboratory for Particle
Physics (CERN) in late 1980’s. Developed by the World Wide Web Consortium;
HTML or the Hyper Text Mark-up Language, as its name suggests, is a mark-up
language for Web pages. Today, the most important component of any web page is
the text-based information that it contains. The mark-up tags of HTML define the
structure of the text-based information of a web page. HTML tags are used to denote
various text-based information of a webpage as paragraphs, headings, links, bullet
points etc. Various HTML tags can also be used to supplement the text with images,
forms and other objects. HTML tags are for browsing; they are meant for interactions
between humans and computers.

HTML draft

version timeline

October 1991

HTML Tags an informal CERN document listing eighteen HTML tags, was first
mentioned in public.

June 1992

First informal draft of the HTML DTD with seven subsequent revisions (July 15,
August 6, August 18, November 17, November 19, November 20, November 22)

November 1992

HTML DTD 1.1 (the first with a version number, based on RCS revisions, which start
with 1.1 rather than 1.0), an informal draft.

June 1993

Hypertext Mark-up Language was published by the IETF IIIR Working Group as an
Internet- Draft (a rough proposal for a standard). It was replaced by a second version
one month later, followed by six further drafts published by IETF itself that finally
led to HTML 2.0 in RFC1866

November 1993

16 | P a g e
BIKE RENTAL PORTAL

HTML+ was published by the IETF as an Internet-Draft and was a competing proposal to
the Hypertext Markup Language draft. It expired in May 1994.

April 1995 (authored March 1995)


HTML 3.0 was proposed as a standard to the IETF, but the proposal expired five
months later without further action. It included many of the capabilities that were in
Raggett's HTML+ proposal, such as support for tables, text flow around figures and
the display of

January 2008

HTML5 was published as a Working Draft by the W3C.

Although its syntax closely resembles that of SGML, HTML5 has abandoned any
attempt to be an SGML application and has explicitly defined its own "html"
serialization, in addition to an alternative XML-based XHTML5 serialization.

Characteristics: -

It is the language which can be easily understood and can be modified.

Effective presentations can be made with the HTML with the help of its all

formatting tags. It provides the more flexible way to deign web pages along with

the text.

Links can also be added to the web pages so it helps the readers to browse the
information of their interest.

You can display HTML documents on any platforms such as Macintosh, Windows
and Linux etc.

Graphics, videos and sounds can also be added to the web pages which give an extra
attractive look to your web pages. Allows database integration with wide variety of
applications.

Additional internet capabilities.

17 | P a g e
BIKE RENTAL PORTAL

XHTML Versions: -

XHTML is a separate language that began as a reformulation of HTML 4.01 using


XML 1.0. It continues to be developed:

XHTML 1.0, published January 26, 2000, as a W3C Recommendation, later revised
and republished August 1, 2002. It offers the same three variations as HTML 4.0 and
4.01, reformulated in XML, with minor restrictions.

XHTML 1.1 published May 31, 2001, as a W3C Recommendation. It is based on


XHTML 1.0 Strict, but includes minor changes, can be customized, is reformulated
using modules from Modularization of XHTML, which was published April 10, 2001,
as a W3C Recommendation.

XHTML 2.0 There is no XHTML 2.0 standard. XHTML 2.0 is only a draft document
and it is inappropriate to cite this document as other than work in progress. XHTML
2.0 is incompatible with XHTML 1.x and, therefore, would be more accurately
characterized as an XHTML- inspired new language than an update to XHTML 1.x.

XHTML5, which is an update to XHTML 1.x, is being defined alongside HTML5 in


the HTML5 draft.

18 | P a g e
BIKE RENTAL PORTAL

APACHE TOMCAT

Apache Tomcat, often referred to as Tomcat Server, is an open-source Java


Servlet Container developed by the Apache Software Foundation (ASF). Tomcat
implements several Java EE specifications including Java Servlet, JavaServer
Pages(JSP), Java EL, and WebSocket, and provides a "pure Java" HTTP web
server environment in which Java code can run.

Tomcat is developed and maintained by an open community of developers under the


auspices of the Apache Software Foundation, released under the Apache License 2.0
license, and is open-source software.

Tomcat started off as a servlet reference implementation by James Duncan Davidson,


a software architect at Sun Microsystems. He later helped make the project open
source and played a key role in its donation by Sun Microsystems to the Apache
Software Foundation. The Apache Ant software build automation tool was developed
as a side-effect of the creation of Tomcat as an open source project.

Davidson had initially hoped that the project would become open sourced and, since
many open source projects had O'Reilly books associated with them featuring an
animal on the cover, he wanted to name the project after an animal. He came up with
Tomcat since he reasoned the animal represented something that could fend for itself.
Although the tomcat was already in use for another O'Reilly title, his wish to see an
animal cover eventually came true when O'Reilly published their Tomcat book with
a snow leopard on the cover in 2003.

19 | P a g e
BIKE RENTAL PORTAL

Apache software is built as part of a community process that involves both user and
developer mailing lists. The developer list is where discussion on building and testing
the next release takes place, while the user list is where users can discuss their
problems with the developers and other users.

Some of the free Apache Tomcat resources and communities


include Tomcatexpert.com (a Spring Source sponsored community for developers
and operators who are running Apache Tomcat in large-scale production
environments) and MuleSoft's Apache Tomcat Resource Centre (which has
instructional guides on installing, updating, configuring, monitoring, troubleshooting
and securing various versions of Tomcat).

20 | P a g e
BIKE RENTAL PORTAL

MySQL

MySQL (is an open-source relational database management


system(RDBMS). Its name is a combination of "My", the name of co-founder
Michael Widenius's daughter, and "SQL", the abbreviation for Structured Query
Language. The MySQL development project has made its source code available under
the terms of the GNU General Public License, as well as under a variety of
proprietary agreements. MySQL was owned and sponsored by a single for- profit
firm, the Swedish company MySQL AB, now owned by Oracle Corporation. For
proprietary use, several paid editions are available, and offer additional functionality.

MySQL is a central component of the LAMP open-source web application software


stack (and other "AMP" stacks). LAMP is an acronym for "Linux, Apache, MySQL,
Perl/PHP/Python".
Applications that use the MySQL databa
se include: TYPO3, MODx, Joomla, WordPress, Simple Machines Forum, phpBB,
MyBB, and Drupal. MySQL is also used in many high-profile, large-scale websites,
including Google (though not for searches), Facebook, Twitter, Flickr, and YouTube.

MySQL is written in C and C++. Its SQL parser is written in yacc, but it uses a home-
brewed lexical analyser. MySQL works on many system platforms,
including AIX, BSDi, FreeBSD, HP-X, eComStation, i5/OS, IRIX, Linux, macOS,
Microsoft Windows, NetBSD, Novell NetWare, OpenBSD, OpenSolaris, OS/2
Warp, QNX, Oracle Solaris, Symbian, SunOS, SCO OpenServer, SCO UnixWare,
Sanos and Tru64. A port of MySQL to OpenVMS also exists.

The MySQL server software itself and the client libraries use dual-licensing
distribution. They are offered under GPL version 2, beginning from 28 June 2000
(which in 2009 has been extended with a FLOSS License Exception) or to use a
proprietary license.

Support can be obtained from the official manual. Free support additionally is
available in different IRC channels and forums. Oracle offers paid support via its
MySQL Enterprise products. They differ in the scope of services and in price.
Additionally, a number of third party organisations exist to provide support and
services, including MariaDB and Percona.

21 | P a g e
BIKE RENTAL PORTAL

MySQL has received positive reviews, and reviewers noticed it "performs extremely
well in the average case" and that the "developer interfaces are there, and the
documentation (not to mention feedback in the real world via Web sites and the like)
is very, very good". It has also been tested to be a "fast, stable and true multi-user,
multi-threaded sql database server".

JavaScript

JavaScript is a cross-platform, object-oriented scripting language used to


make webpages interactive (e.g., having complex animations, clickable buttons,
popup menus, etc.). There are also more advanced server side versions of JavaScript
such as Node.js, which allow you to add more functionality to a website than simply
downloading files (such as real- time collaboration between multiple computers).
Inside a host environment (for example, a web browser), JavaScript can be connected
to the objects of its environment to provide programmatic control over them.

JavaScript contains a standard library of objects, such as Array, Date, and Math, and
a core set of language elements such as operators, control structures, and statements.
Core JavaScript can be extended for a variety of purposes by supplementing it with
additional objects; for example:
 Client-side JavaScript extends the core language by supplying objects to
control a browser and its Document Object Model (DOM). For example,
client-side extensions allow an application to place elements on an HTML
form and respond to user events such as mouse clicks, form input, and page
navigation.
 Server-side JavaScript extends the core language by supplying objects relevant
to running JavaScript on a server. For example, server-side extensions allow
an application to communicate with a database, provide continuity of
information from one invocation to another of the application, or perform
file manipulations on a server.
This means that in the browser, JavaScript can change the way the webpage (DOM)
looks. And, likewise, Node.js JavaScript on the server can respond to custom requests
from code written in the browser.

Features:

 JavaScript is an object-based scripting language.

 Giving the user more control over the browser.

 It Handling dates and time.

22 | P a g e
BIKE RENTAL PORTAL

 It Detecting the user's browser and OS,

 It is light weighted.

 JavaScript is a scripting language and it is not java.

 JavaScript is interpreter based scripting language.

 JavaScript is case sensitive.

 JavaScript is object based language as it provides predefined objects.

 Every statement in Javascript must be terminated with semicolon (;).

 Most of the Javascript control statements syntax is same as syntax of control


statements in C language.
 An important part of JavaScript is the ability to create new functions within
scripts. Declare a function in JavaScript using function keyword.

Limitations:

 Client-side JavaScript does not allow the reading or writing of files.

 It cannot be used for networking applications because there is no such support available.

 It doesn't have any multithreading or multiprocessor capabilities.

XAMPP:
XAMPP stands for Cross-Platform (X), Apache (A), MariaDB (M), PHP (P)
and Perl (P). Since XAMPP is simple, lightweight Apache distribution it is extremely
easy for developers to create a local web server for testing and deployment purposes.
Everything you needed is to set up a web server – server application (Apache),
database (MariaDB), and scripting language (PHP). XAMPP works equally well on
Linux, Mac, and Windows.

CSS:
Cascading Style Sheets, fondly referred to as CSS, is a simple design language
intended to simplify the process of making web pages presentable.
CSS handles the look and feel part of a web page. Using CSS, you can control the
color of the text, the style of fonts, the spacing between paragraphs, how columns

23 | P a g e
BIKE RENTAL PORTAL

are sized and laid out, what background images or colors are used, layout designs,
variations in display for different devices and screen sizes as well as a variety of
other effects.
CSS is easy to learn and understand but it provides powerful control over the
presentation of an HTML document. Most commonly, CSS is combined with the
markup languages HTML or XHTML.

Advantages:

 CSS saves time − you can write CSS once and then reuse same sheet in
multiple HTML pages. You can define a style for each HTML element and
apply it to as many Web pages as you want.
 Pages load faster − If you are using CSS, you do not need to write HTML tag
attributes every time. Just write one CSS rule of a tag and apply it to all the
occurrences of that tag. So less code means faster download times.
 Easymaintenance − To make a global change, simply change the style,
and all elements in all the web pages will be updated automatically.
 Superiorstyles to HTML − CSS has a much wider array of attributes than
HTML, so you can give a far better look to your HTML page in
comparison to HTML attributes.

 Multiple Device Compatibility − Style sheets allow content to be optimized


for more than one type of device. By using the same HTML document,
different versions of a website can be presented for handheld devices such
as PDAs and cell phones or for printing.
 Global web standards − Now HTML attributes are being deprecated and it is
being recommended to use CSS. So it’s a good idea to start using CSS in all
the HTML pages to make them compatible to future browsers.

24 | P a g e
BIKE RENTAL PORTAL

System Analysis

25 | P a g e
BIKE RENTAL PORTAL

Feasibility Study:

Feasibility study is the measure of how beneficial or practical the development of an


information system will be to an organization. The Feasibility analysis is a cross life
cycle activity and should be continuously performed throughout the system life cycle.
Feasibility study lets the developer foresee the future of the project and the
usefulness. The study on feasibility is done on the basis of a few factors. They are:

Operational feasibility:

No doubt the proposed system is fully GUI based that is very user friendly and
all inputs to be taken all self-explanatory even to a layman. Besides, a proper training
has been conducted to let know the essence of the system to the users so that they feel
comfortable with new system.

As far our study is concerned the clients are comfortable and happy as the system has
cut down their loads and doing all the complex activities itself Considering all these
factors we can conclude that all the users and end users will be satisfied by the system.

Technical feasibility:

The system must be evaluated from the technical point of view. The
assessment of this feasibility must be based on an outline design of the
system requirement in terms of input, output, programs and procedures.

For the design and development of the system, several software


products have been accommodated.

Database design – MySQLi

Interface design – HTML, CSS, JavaScript

This software has enough efficiency in producing the system.


Therefore, the project is technically feasible.

26 | P a g e
BIKE RENTAL PORTAL

Schedule feasibility:

The duration of time required for the project has been planned appropriately and it is
the same as the duration of time expected by the customer. Therefore the product can
be delivered to the customer within the expected time duration, satisfying the
customer. Hence the project is feasible in scheduling.

Economic feasibility:

According to the resources available and the project scheduling process it is estimated
that the expenses allocated for the software to be developed, by the customer is
sufficient enough. Hence the economical factor has been considered feasible.

Behavioural Feasibility:

This includes the following questions:

 Is there sufficient support for the users?


 Will the proposed system cause harm?
This project would be beneficial because it satisfies the objectives when
developed and installed. All behavioural aspects are considered carefully and
conclude that the project is behaviourally feasible.

27 | P a g e
BIKE RENTAL PORTAL

SYSTEM DESIGN

E-R diagram

28 | P a g e
BIKE RENTAL PORTAL

E-R Diagram

29 | P a g e
BIKE RENTAL PORTAL

Data flow diagram

30 | P a g e
BIKE RENTAL PORTAL

DATA FLOW DIAGRAM

Data Flow diagram:

A data-flow diagram (DFD) is a graphical representation of the "flow" of data


through an information system. DFDs can also be used for the visualization of data
processing (structured design).

On a DFD, data items flow from an external data source or an internal data store to
an internal data store or an external data sink, via an internal process.

A DFD provides no information about the timing or ordering of processes, or about


whether processes will operate in sequence or in parallel. It is therefore quite different
from a flowchart, which shows the flow of control through an algorithm, allowing a
reader to determine what operations will be performed, in what order, and under what
circumstances, but not what kinds of data will be input to and output from the system,
nor where the data will come from and go to, nor where the data will be stored (all of
which are shown on a DFD)

The idea behind the explosion of a process into more process is that understanding at
one level of details is exploded into greater detailed at the next level. This is done until
further explosion is necessary and an adequate amount of detail is described for analyst
to understand the process.

Larry Constantine first developed the DFD as a way of expressing system


requirements in a graphical form, this lead to modular design.

A DFD is known as a “bubble chart” has the purpose of clarifying system


requirements and identifying major transformation they will become program in
system design. So it is the starting point of the design to lowest level of details. A DFD
consists of series of bubbles joined by data flows in the system.

31 | P a g e
BIKE RENTAL PORTAL

DFD Symbols
In DFD, there are four Symbols

1. A square-defines a source or destination system data

2. An arrow identified data flow. It’s is the pipeline through which the information
flow

3. A circle or a bubble represents a process that transforms

4. Incoming data flow into outgoing data flows

5. An open rectangle is a data source, data at rest or a temporary of data

Process that transforms data flow

Source or destination of the data

Data flow

Process for data store.

32 | P a g e
BIKE RENTAL PORTAL

CONTEXT LEVEL:

LEVEL 1:

33 | P a g e
BIKE RENTAL PORTAL

LEVEL 2:

34 | P a g e
BIKE RENTAL PORTAL

Schema

35 | P a g e
BIKE RENTAL PORTAL

Structure of Tables:

Admin Login:

Booking Table:

Brands Table:

Contact Us Info Table:

36 | P a g e
BIKE RENTAL PORTAL

Contact Us Query Table:

Pages Table:

Subscribers Table:

Testimonial Table:

37 | P a g e
BIKE RENTAL PORTAL

User Table:

Vehicles Table:

38 | P a g e
BIKE RENTAL PORTAL

Source code

39 | P a g e
BIKE RENTAL PORTAL

SOURCE CODE

Change-Password.php
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{
// Code for change password
if(isset($_POST['submit']))
{

$password=md5($_POST['password']);
$newpassword=md5($_POST['newpassword']);
$username=$_SESSION['alogin'];
$sql ="SELECT Password FROM admin WHERE UserName=:username and Password=:pas
sword";
$query= $dbh -> prepare($sql);
$query-> bindParam(':username', $username, PDO::PARAM_STR);
$query-> bindParam(':password', $password, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
if($query -> rowCount() > 0)
{
$con="update admin set Password=:newpassword where UserName=:username";
$chngpwd1 = $dbh->prepare($con);

40 | P a g e
BIKE RENTAL PORTAL

$chngpwd1-> bindParam(':username', $username, PDO::PARAM_STR);


$chngpwd1-> bindParam(':newpassword', $newpassword, PDO::PARAM_STR);
$chngpwd1->execute();
$msg="Your Password succesfully changed";
}
else {
$error="Your current password is not valid.";
}
}
?>

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-
scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">
<title>Bike Rental Portal | Admin Change Password</title>
<!-- Font awesome -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->

41 | P a g e
BIKE RENTAL PORTAL

<link rel="stylesheet" href="css/bootstrap-select.css">


<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript">
function valid()
{
if(document.chngpwd.newpassword.value!= document.chngpwd.confirmpassword.value)
{
alert("New Password and Confirm Password Field do not match !!");
document.chngpwd.confirmpassword.focus();
return false;
}
return true;
}
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;

background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{

42 | P a g e
BIKE RENTAL PORTAL

padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;

-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);


box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>
</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>

<div class="content-wrapper">
<div class="container-fluid">
<div class="row">

<div class="col-md-12">
<h2 class="page-title">Change Password</h2>
<div class="row">
<div class="col-md-10">

<div class="panel panel-default">


<div class="panel-heading">Form fields</div>
<div class="panel-body">
<form method="post" name="chngpwd" class="form-
horizontal" onSubmit="return valid();">

43 | P a g e
BIKE RENTAL PORTAL

<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php ec


ho htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo
htmlentities($msg); ?> </div><?php }?>
<div class="form-group">
<label class="col-sm-4 control-
label">Current Password</label>
<div class="col-sm-8">
<input type="password" class="form-
control" name="password" id="password" required>
</div>
</div>
<div class="hr-dashed"></div>
<div class="form-group">
<label class="col-sm-4 control-label">New Password</label>
<div class="col-sm-8">
<input type="password" class="form-
control" name="newpassword" id="newpassword" required>
</div>
</div>
<div class="hr-dashed"></div>
<div class="form-group">
<label class="col-sm-4 control-
label">Confirm Password</label>
<div class="col-sm-8">
<input type="password" class="form-
control" name="confirmpassword" id="confirmpassword" required>
</div>
</div>
<div class="hr-dashed"></div>
<div class="form-group">
<div class="col-sm-8 col-sm-offset-4">

44 | P a g e
BIKE RENTAL PORTAL

<button class="btn btn-


primary" name="submit" type="submit">Save changes</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?

45 | P a g e
BIKE RENTAL PORTAL

Create-brand.php

?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{
// Code for change password
if(isset($_POST['submit']))
{
$brand=$_POST['brand'];
$sql="INSERT INTO tblbrands(BrandName) VALUES(:brand)";
$query = $dbh->prepare($sql);
$query->bindParam(':brand',$brand,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
$msg="Brand Created successfully";
}
else
{
$error="Something went wrong. Please try again";
}

46 | P a g e
BIKE RENTAL PORTAL

?>

<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-
scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>Bike Rental Portal | Admin Create Brand</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->

47 | P a g e
BIKE RENTAL PORTAL

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


<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>

</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">

48 | P a g e
BIKE RENTAL PORTAL

<div class="col-md-12">

<h2 class="page-title">Create Brand</h2>

<div class="row">
<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">Form fields</div>
<div class="panel-body">
<form method="post" name="chngpwd" class="form-
horizontal" onSubmit="return valid();">

<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php ec


ho htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo
htmlentities($msg); ?> </div><?php }?>
<div class="form-group">
<label class="col-sm-4 control-label">Brand Name</label>
<div class="col-sm-8">
<input type="text" class="form-
control" name="brand" id="brand" required>
</div>
</div>
<div class="hr-dashed"></div>

<div class="form-group">
<div class="col-sm-8 col-sm-offset-4">

<button class="btn btn-


primary" name="submit" type="submit">Submit</button>
</div>

49 | P a g e
BIKE RENTAL PORTAL

</div>

</form>
</div>
</div>
</div>
</div>
</div>
</div>

</div>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>

</html>
<?php } ?>

50 | P a g e
BIKE RENTAL PORTAL

DashBoard.php
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{
?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-
scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>Bike Rental Portal | Admin Dashboard</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->

51 | P a g e
BIKE RENTAL PORTAL

<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">


<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
</head>

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

<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">Dashboard</h2>

<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">

52 | P a g e
BIKE RENTAL PORTAL

<div class="panel panel-default">


<div class="panel-body bk-primary text-light">
<div class="stat-panel text-center">
<?php
$sql ="SELECT id from tblusers ";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$regusers=$query->rowCount();
?>
<div class="stat-panel-
number h1 "><?php echo htmlentities($regusers);?></div>
<div class="stat-panel-title text-
uppercase">Reg Users</div>
</div>
</div>
<a href="reg-users.php" class="block-anchor panel-
footer">Full Detail <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-success text-light">
<div class="stat-panel text-center">
<?php
$sql1 ="SELECT id from tblvehicles ";
$query1 = $dbh -> prepare($sql1);;
$query1->execute();
$results1=$query1->fetchAll(PDO::FETCH_OBJ);
$totalvehicle=$query1->rowCount();
?>

53 | P a g e
BIKE RENTAL PORTAL

<div class="stat-panel-
number h1 "><?php echo htmlentities($totalvehicle);?></div>
<div class="stat-panel-title text-
uppercase">Listed Vehicles</div>
</div>
</div>
<a href="manage-vehicles.php" class="block-anchor panel-
footer text-center">Full Detail &nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-info text-light">
<div class="stat-panel text-center">
<?php
$sql2 ="SELECT id from tblbooking ";
$query2= $dbh -> prepare($sql2);
$query2->execute();
$results2=$query2->fetchAll(PDO::FETCH_OBJ);
$bookings=$query2->rowCount();
?>
<div class="stat-panel-
number h1 "><?php echo htmlentities($bookings);?></div>
<div class="stat-panel-title text-
uppercase">Total Bookings</div>
</div>
</div>
<a href="manage-bookings.php" class="block-anchor panel-
footer text-center">Full Detail &nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">

54 | P a g e
BIKE RENTAL PORTAL

<div class="panel panel-default">


<div class="panel-body bk-warning text-light">
<div class="stat-panel text-center">
<?php
$sql3 ="SELECT id from tblbrands ";
$query3= $dbh -> prepare($sql3);
$query3->execute();
$results3=$query3->fetchAll(PDO::FETCH_OBJ);
$brands=$query3->rowCount();
?>
<div class="stat-panel-
number h1 "><?php echo htmlentities($brands);?></div>
<div class="stat-panel-title text-
uppercase">Listed Brands</div>
</div>
</div>
<a href="manage-brands.php" class="block-anchor panel-
footer text-center">Full Detail &nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-primary text-light">
<div class="stat-panel text-center">

55 | P a g e
BIKE RENTAL PORTAL

<?php
$sql4 ="SELECT id from tblsubscribers ";
$query4 = $dbh -> prepare($sql4);
$query4->execute();
$results4=$query4->fetchAll(PDO::FETCH_OBJ);
$subscribers=$query4->rowCount();
?>
<div class="stat-panel-
number h1 "><?php echo htmlentities($subscribers);?></div>
<div class="stat-panel-title text-
uppercase">Subscibers</div>
</div>
</div>
<a href="manage-subscribers.php" class="block-anchor panel-
footer">Full Detail <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-success text-light">
<div class="stat-panel text-center">
<?php
$sql6 ="SELECT id from tblcontactusquery ";
$query6 = $dbh -> prepare($sql6);;
$query6->execute();
$results6=$query6->fetchAll(PDO::FETCH_OBJ);
$query=$query6->rowCount();
?>
<div class="stat-panel-
number h1 "><?php echo htmlentities($query);?></div>
<div class="stat-panel-title text-uppercase">Queries</div>
</div>

56 | P a g e
BIKE RENTAL PORTAL

</div>
<a href="manage-conactusquery.php" class="block-anchor panel-
footer text-center">Full Detail &nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-info text-light">
<div class="stat-panel text-center">
<?php
$sql5 ="SELECT id from tbltestimonial ";
$query5= $dbh -> prepare($sql5);
$query5->execute();
$results5=$query5->fetchAll(PDO::FETCH_OBJ);
$testimonials=$query5->rowCount();
?>
<div class="stat-panel-
number h1 "><?php echo htmlentities($testimonials);?></div>
<div class="stat-panel-title text-
uppercase">Testimonials</div>
</div>
</div>
<a href="testimonials.php" class="block-anchor panel-footer text-
center">Full Detail &nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>
</div> </div>
</div>
</div>
</div>
</div>

57 | P a g e
BIKE RENTAL PORTAL

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
<script>
window.onload = function(){
// Line chart from swirlData for dashReport
var ctx = document.getElementById("dashReport").getContext("2d");
window.myLine = new Chart(ctx).Line(swirlData, {
responsive: true,
scaleShowVerticalLines: false,
scaleBeginAtZero : true,
multiTooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",
});
// Pie Chart from doughutData
var doctx = document.getElementById("chart-area3").getContext("2d");
window.myDoughnut = new Chart(doctx).Pie(doughnutData, {responsive : true});
// Dougnut Chart from doughnutData
var doctx = document.getElementById("chart-area4").getContext("2d");
window.myDoughnut = new Chart(doctx).Doughnut(doughnutData, {responsive : true};
</script>
</body>
</html><?php } ?>

58 | P a g e
BIKE RENTAL PORTAL

Manage-bookings.php
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{
if(isset($_REQUEST['eid']))
{
$eid=intval($_GET['eid']);
$status="2";
$sql = "UPDATE tblbooking SET Status=:status WHERE id=:eid";
$query = $dbh->prepare($sql);
$query -> bindParam(':status',$status, PDO::PARAM_STR);
$query-> bindParam(':eid',$eid, PDO::PARAM_STR);
$query -> execute();
$msg="Booking Successfully Cancelled";
}
if(isset($_REQUEST['aeid']))
{
$aeid=intval($_GET['aeid']);
$status=1;
$sql = "UPDATE tblbooking SET Status=:status WHERE id=:aeid";
$query = $dbh->prepare($sql);
$query -> bindParam(':status',$status, PDO::PARAM_STR);
$query-> bindParam(':aeid',$aeid, PDO::PARAM_STR);
$query -> execute();

59 | P a g e
BIKE RENTAL PORTAL

$msg="Booking Successfully Confirmed";


?>
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-
scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">
<title>Bike Rental Portal |Admin Manage testimonials </title>
<!-- Font awesome -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>

60 | P a g e
BIKE RENTAL PORTAL

.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>
</head>
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h2 class="page-title">Manage Bookings</h2>
<!-- Zero Configuration Table -->
<div class="panel panel-default">
<div class="panel-heading">Bookings Info</div>

61 | P a g e
BIKE RENTAL PORTAL

<div class="panel-body">
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?
php echo htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo
htmlentities($msg); ?> </div><?php }?>
<table id="zctb" class="display table table-striped table-bordered table-
hover" cellspacing="0" width="100%">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Vehicle</th>
<th>From Date</th>
<th>To Date</th>
<th>Message</th>
<th>Status</th>
<th>Posting date</th>
<th>Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>#</th>
<th>Name</th>
<th>Vehicle</th>
<th>From Date</th>
<th>To Date</th>
<th>Message</th>
<th>Status</th>
<th>Posting date</th>
<th>Action</th>

62 | P a g e
BIKE RENTAL PORTAL

</tr>
</tfoot>
<tbody>
<?php $sql = "SELECT tblusers.FullName,tblbrands.BrandName,tblve
hicles.VehiclesTitle,tblbooking.FromDate,tblbooking.ToDate,tblbooking.message,tblbooking
.VehicleId as vid,tblbooking.Status,tblbooking.PostingDate,tblbooking.id from tblbooking jo
in tblvehicles on tblvehicles.id=tblbooking.VehicleId join tblusers on tblusers.EmailId=tblbo
oking.userEmail join tblbrands on tblvehicles.VehiclesBrand=tblbrands.id ";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<tr>
<td><?php echo htmlentities($cnt);?></td>
<td><?php echo htmlentities($result->FullName);?></td>
<td><a href="edit-
vehicle.php?id=<?php echo htmlentities($result->vid);?>"><?php echo htmlentities($result-
>BrandName);?> , <?php echo htmlentities($result->VehiclesTitle);?></td>
<td><?php echo htmlentities($result->FromDate);?></td>
<td><?php echo htmlentities($result->ToDate);?></td>
<td><?php echo htmlentities($result->message);?></td>
<td><?php
if($result->Status==0)
{
echo htmlentities('Not Confirmed yet');
} else if ($result->Status==1) {
echo htmlentities('Confirmed');
}

63 | P a g e
BIKE RENTAL PORTAL

else{
echo htmlentities('Cancelled');
?></td>
<td><?php echo htmlentities($result->PostingDate);?></td>
<td><a href="manage-
bookings.php?aeid=<?php echo htmlentities($result-
>id);?>" onclick="return confirm('Do you really want to Confirm this booking')"> Confirm</
a> /
<a href="manage-bookings.php?eid=<?php echo htmlentities($result-
>id);?>" onclick="return confirm('Do you really want to Cancel this Booking')"> Cancel</a>
</td>
</tr>
<?php $cnt=$cnt+1; }} ?>
</tbody>
</table>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

64 | P a g e
BIKE RENTAL PORTAL

Manage-vehicles.php
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{
if(isset($_REQUEST['del']))
{
$delid=intval($_GET['del']);
$sql = "delete from tblvehicles SET id=:status WHERE id=:delid";
$query = $dbh->prepare($sql);
$query -> bindParam(':delid',$delid, PDO::PARAM_STR);
$query -> execute();
$msg="Vehicle record deleted successfully";
}
?>
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-
scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

65 | P a g e
BIKE RENTAL PORTAL

<title>Bike Rental Portal |Admin Manage Vehicles </title>


<!-- Font awesome -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;

66 | P a g e
BIKE RENTAL PORTAL

background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>
</head>
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h2 class="page-title">Manage Vehicles</h2>
<!-- Zero Configuration Table -->
<div class="panel panel-default">
<div class="panel-heading">Vehicle Details</div>
<div class="panel-body">
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?
php echo htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo
htmlentities($msg); ?> </div><?php }?>
<table id="zctb" class="display table table-striped table-bordered table-
hover" cellspacing="0" width="100%">
<thead>
<tr>
<th>#</th>
<th>Vehicle Title</th>
<th>Brand </th>

67 | P a g e
BIKE RENTAL PORTAL

<th>Price Per day</th>


<th>Fuel Type</th>
<th>Model Year</th>
<th>Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>#</th>
<th>Vehicle Title</th>
<th>Brand </th>
<th>Price Per day</th>
<th>Fuel Type</th>
<th>Model Year</th>
<th>Action</th>
</tr>
</tr>
</tfoot>
<tbody>
<?php $sql = "SELECT tblvehicles.VehiclesTitle,tblbrands.BrandName,tblvehicles.PricePer
Day,tblvehicles.FuelType,tblvehicles.ModelYear,tblvehicles.id from tblvehicles join tblbrand
s on tblbrands.id=tblvehicles.VehiclesBrand";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<tr>

68 | P a g e
BIKE RENTAL PORTAL

<td><?php echo htmlentities($cnt);?></td>


<td><?php echo htmlentities($result->VehiclesTitle);?></td>
<td><?php echo htmlentities($result->BrandName);?></td>
<td><?php echo htmlentities($result->PricePerDay);?></td>
<td><?php echo htmlentities($result->FuelType);?></td>
<td><?php echo htmlentities($result->ModelYear);?></td>
<td><a href="edit-vehicle.php?id=<?php echo $result->id;?>"><i class="fa fa-
edit"></i></a>&nbsp;&nbsp;
<a href="manage-vehicles.php?del=<?php echo $result-
>id;?>" onclick="return confirm('Do you want to delete');"><i class="fa fa-
close"></i></a></td>
</tr>
<?php $cnt=$cnt+1; }} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html><?php } ?>

69 | P a g e
BIKE RENTAL PORTAL

Login.php
<?php
if(isset($_POST['login']))
{
$email=$_POST['email'];
$password=md5($_POST['password']);
$sql ="SELECT EmailId,Password,FullName FROM tblusers WHERE EmailId=:email and
Password=:password";
$query= $dbh -> prepare($sql);
$query-> bindParam(':email', $email, PDO::PARAM_STR);
$query-> bindParam(':password', $password, PDO::PARAM_STR);
$query-> execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
{
$_SESSION['login']=$_POST['email'];
$_SESSION['fname']=$results->FullName;
$currentpage=$_SERVER['REQUEST_URI'];
echo "<script type='text/javascript'> document.location = '$currentpage'; </script>";
} else{

echo "<script>alert('Invalid Details');</script>";

?>

<div class="modal fade" id="loginform">

70 | P a g e
BIKE RENTAL PORTAL

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


<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-
label="Close"><span aria-hidden="true">&times;</span></button>
<h3 class="modal-title">Login</h3>
</div>
<div class="modal-body">
<div class="row">
<div class="login_wrap">
<div class="col-md-12 col-sm-6">
<form method="post">
<div class="form-group">
<input type="email" class="form-
control" name="email" placeholder="Email address*">
</div>
<div class="form-group">
<input type="password" class="form-
control" name="password" placeholder="Password*">
</div>
<div class="form-group checkbox">
<input type="checkbox" id="remember">

</div>
<div class="form-group">
<input type="submit" name="login" value="Login" class="btn btn-block">
</div>
</form>
</div>
</div>
</div>

71 | P a g e
BIKE RENTAL PORTAL

</div>
<div class="modal-footer text-center">
<p>Don't have an account? <a href="#signupform" data-toggle="modal" data-
dismiss="modal">Signup Here</a></p>
<p><a href="#forgotpassword" data-toggle="modal" data-
dismiss="modal">Forgot Password ?</a></p>
</div>
</div>
</div>
</div>

Registration.php
<?php
//error_reporting(0);
if(isset($_POST['signup']))
{
$fname=$_POST['fullname'];
$email=$_POST['emailid'];
$mobile=$_POST['mobileno'];
$password=md5($_POST['password']);
$sql="INSERT INTO tblusers(FullName,EmailId,ContactNo,Password) VALUES(:fname,:e
mail,:mobile,:password)";
$query = $dbh->prepare($sql);
$query->bindParam(':fname',$fname,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':mobile',$mobile,PDO::PARAM_STR);
$query->bindParam(':password',$password,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{

72 | P a g e
BIKE RENTAL PORTAL

echo "<script>alert('Registration successfull. Now you can login');</script>";


}
else
{
echo "<script>alert('Something went wrong. Please try again');</script>";
}
}
?>
<script>
function checkAvailability() {
$("#loaderIcon").show();
jQuery.ajax({
url: "check_availability.php",
data:'emailid='+$("#emailid").val(),
type: "POST",
success:function(data){
$("#user-availability-status").html(data);
$("#loaderIcon").hide();
},
error:function (){}
});
}
</script>
<script type="text/javascript">
function valid()
{
if(document.signup.password.value!= document.signup.confirmpassword.value)
{
alert("Password and Confirm Password Field do not match !!");
document.signup.confirmpassword.focus();

73 | P a g e
BIKE RENTAL PORTAL

return false;
}
return true;
}
</script>
<div class="modal fade" id="signupform">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-
label="Close"><span aria-hidden="true">&times;</span></button>
<h3 class="modal-title">Sign Up</h3>
</div>
<div class="modal-body">
<div class="row">
<div class="signup_wrap">
<div class="col-md-12 col-sm-6">
<form method="post" name="signup" onSubmit="return valid();">
<div class="form-group">
<input type="text" class="form-
control" name="fullname" placeholder="Full Name" required="required">
</div>
<div class="form-group">
<input type="text" class="form-
control" name="mobileno" placeholder="Mobile Number" maxlength="10" required="requir
ed">
</div>
<div class="form-group">
<input type="email" class="form-
control" name="emailid" id="emailid" onBlur="checkAvailability()" placeholder="Email Ad
dress" required="required">
<span id="user-availability-status" style="font-size:12px;"></span>

74 | P a g e
BIKE RENTAL PORTAL

</div>
<div class="form-group">
<input type="password" class="form-
control" name="password" placeholder="Password" required="required">
</div>
<div class="form-group">
<input type="password" class="form-
control" name="confirmpassword" placeholder="Confirm Password" required="required">
</div>
<div class="form-group checkbox">
<input type="checkbox" id="terms_agree" required="required" checked="">
<label for="terms_agree">I Agree with <a href="#">Terms and Conditions</a></
label>
</div>
<div class="form-group">
<input type="submit" value="Sign Up" name="signup" id="submit" class="btn bt
n-block">
</div>
</form>
</div>
</div>
</div>
</div>
<div class="modal-footer text-center">
<p>Already got an account? <a href="#loginform" data-toggle="modal" data-
dismiss="modal">Login Here</a></p>
</div>
</div>
</div>
</div>

75 | P a g e
BIKE RENTAL PORTAL

Testing

76 | P a g e
BIKE RENTAL PORTAL

TESTING

SYSTEM TESTING

TESTING
Testing goes through the various stages, during testing the program to be tested has
to be executed with a set of test cases, and ha the output of the program for the test
case is evaluated to determine if the program is performing as expected. Due to its
approach dynamic testing only ascertains the presence of error in the program. The
exact nature of error is not usually decided by testing. Testing form is the first in
determining error in the program.

Once the programs are tested individually then the system as a whole needs to be
tested. During testing, the system is used experimentally to ensure that the software
does not fail i.e. it will run according to its specification. The programs executed to
check for any syntax or logical error. The error is corrected and test is made to
determine whether the program is doing what it is supposed to do.

Various types of testing

Unit testing
Each component of the system is tested individually. The programmer does the
testing. Testing is restrictive in nature i.e. programmer should try to test all individual
conditions and see if the program breaks under any circumstance.

System testing
This is an integrated form of testing, which focuses on functionality and interface
between units and team in a controlled environment does it.

Acceptance Testing
This is system testing done by the user of the application the only emphasis is
functionally testing as the user is not aware of the technical aspect of the system. The

77 | P a g e
BIKE RENTAL PORTAL

testing is also done in

a controlled environment with logging o all error based on the error found in the
system, the user has to accept or reject the system.

Module Testing
This is an optional form of testing, which is done only for large system, which has a
large number of modules.

Security Testing
Security testing will be done as a specialized form of testing if there is a high risk
exposure in that area. If the risk exposure is not very high, then it can be done as part
of the system testing. Typically, security testing would involve trying to break in to
the system, trying to execute transactions not allowed to person; to access areas on
disk were the user is not allowed.
Testing is vital the success of the system. If it on. This done successfully, this shows
that the parts of the system are working correctly and all the goals are achieved.

IMPLEMENTATION
Implementation is used here to mean the process of converting a new or revised
system design in operational one; conversion is one aspect of implementation. The
other aspect is post implementation review and software and maintenance.
There are three types f implementation:
1. Implementation of a computer system
2. Implementation of a new computer system
3. Implementation of a modified application.

MAINTAINANCE
After the system has successfully been implemented maintenance activity may
require continuous involvement of the developers. Provision must be made for
environmental changes, which may affect either the computer, or other parts of the
computer based system: such activity is normally called maintenance. It includes both
the improvement of the system functions and the correction of faults that arise during
the operation of a system.
Maintenance activity may require the continuing involvement of a large proportion of
computer department resources. Maintenance works may arise due to two reasons:
1. Errors that creep up during normal running

78 | P a g e
BIKE RENTAL PORTAL

2. Request for changes by the service providers. As part of the normal running
of the system when errors are found.

This maintenance work will help to ensure that the system works smoothly as
predicted in the open environment. Whenever a maintenance work arises, the work
has to be properly carried out with proper documentation. This is to avoid any form
of changes in the structure of the system.
For every maintenance work an amendment notification is to be issued. This
notification will have required changes and also authenticated. On the receipt of the
amendment notification the amendment
Log is prepared which records these courses of action that has been planned to be
taken. It also records the estimated and the actual completion of each activity.

Sample Test Cases:


 Invalid Login credentials are tested and appropriate error
messages are displayed.
 The data capture part is thoroughly tested for entry of
correct data in acceptable type and size.
 Validations for each component is taken care of to make the
interface more user friendly.
 Appropriate interfaces are created to link various modules.

79 | P a g e
BIKE RENTAL PORTAL

Snapshots

80 | P a g e
BIKE RENTAL PORTAL

Home Page:

Bike Display Page:

81 | P a g e
BIKE RENTAL PORTAL

User Login:

Booking Page:

82 | P a g e
BIKE RENTAL PORTAL

Admin Login Page:

Admin Dashboard:

83 | P a g e
BIKE RENTAL PORTAL

Admin change Password:

Manage Booking Page:

84 | P a g e
BIKE RENTAL PORTAL

Registered Users Page:

Manage Vehicle Page:

85 | P a g e
BIKE RENTAL PORTAL

Future
Enhancements

86 | P a g e
BIKE RENTAL PORTAL

FUTURE ENHANCEMENTS

 Add Online Payment Options.

 Add more vehicles and adding cars.

 Add online support system.

 Add Registration Number and Phone Number Verification

 More user friendly interface.

 Online accident support team.

MERITS

 More Growth for the organization and application.

 Increase in efficiency of information dissemination within public.

 It provides safety and security.

 Hassle free checkout for public with the help of online payment.

 We have provided user-friendly interface to help the user to operate the


system.
 Online support system for and query or problem.

87 | P a g e
BIKE RENTAL PORTAL

Conclusion

88 | P a g e
BIKE RENTAL PORTAL

CONCLUSION

The system is flexible and dynamic. This real-time web application provides all the
necessary service for easy function. The project work was a great learning experience
and increased my knowledge bank. The division of modules and tasks of the project
was the first stage of work towards the project. The job and schedules like the project
specification, analyzing the available data, planning for the development, data
collection, data arrangement and rearrangement of future reference during the
development of the project was completed a month before the actual development
and the coding of the project.

The final stage of the project was the testing and debugging with reference to
customization and validation tests, then the project was grouped together and was
kept in a directory for the combined access of the project at a single reference.

89 | P a g e
BIKE RENTAL PORTAL

Bibliography

90 | P a g e
BIKE RENTAL PORTAL

BIBLIOGRAPHY

 https://www.w3schools.com/html/
 https://www.w3schools.com/css/default.asp
 https://www.w3schools.com/js/default.asp
 https://www.w3schools.com/php/default.asp
 https://www.apachefriends.org/index.html
 https://code.visualstudio.com/
 HTML & CSS: Design and Build Web Sites by Jon Duckett
 Learning PHP, MySQL, JavaScript, CSS & HTML5: A Step-
by-Step Guide to Creating Dynamic Websites by Robin Nixon

91 | P a g e

You might also like