KEMBAR78
Minor Project Report On and Car Rental-System - Mayank | PDF | Software Testing | Bootstrap (Front End Framework)
0% found this document useful (0 votes)
49 views129 pages

Minor Project Report On and Car Rental-System - Mayank

Uploaded by

shubham sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views129 pages

Minor Project Report On and Car Rental-System - Mayank

Uploaded by

shubham sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 129

A MINOR PROJECT REPORT ON

CAR RENTAL SYSTEM

Submitted in partial fulfillment of the requirements


for the award of the degree of

BACHELOR OF COMPUTER APPLICATIONS


to

Guru Gobind Singh Indraprastha University, Delhi

Under the Guidance


of Ms. Upasana Singh Submitted by
BCA Department PIYUSH
02324002018
Mayank
01824002018
BCA 5th Semester(2nd Shift)

Session 2020 – 2021

TRINITY INSTITUTE OF PROFESSIONAL STUDIES


(Affiliated to Guru Gobind Singh Indraprastha University, Delhi)
Ranked “A+” Institution by SFRC, Govt. of NCT of India
Recognized under section 2(f) of the UGC Act, 1956
NAAC Accredited “B++” Grade Institution
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
(Affiliated to Guru Gobind Singh Indraprastha University, Delhi)
Ranked “A+” Institution by SFRC, Govt. of NCT of India
Recognized under section 2(f) of the UGC Act, 1956
NAAC Accredited “B++” Grade Institution

To Whom It May Concern

I PIYUSH / MAYANK, Enrolment No. 02324002018 / 01824002018 from BCA-V Sem of the Trinity
Institute of Professional Studies, Delhi hereby declare that the Minor Project Report entitled CAR
RENTAL SYSTEM
at is an original work and the same has not been
submitted to any other Institute for the award of any other degree.

Date: Signature of the Student

Certified that the Project Report submitted in partial fulfillment of Bachelor of Computer Applications
(BCA) to be awarded by G.G.S.I.P. University, Delhi by , Enrolment No.
has been completed under my guidance and is Satisfactory

Date: Signature of the Guide


Name of the Guide:
Designation:
ABSTRACT

We developed this project to book a car on rent at the fare charges. In present system all booking work done manually and it takes very hard work
to maintain the information of booking and cars. If you want to find which vehicle is available for booking then it takes a lot of time. It only makes
the process more difficult and harder. This aim of the project is to automate the work performed in the car rental management system like
generation daily bookings, records of car or cab available for booking, record of routes available, rental charges for cars for every rout, store
record of the customer. Car rental management system is a car booking software that provides a complete solution to all your day-to-day car
booking office running needs. This system helps you to keep the information of Customer online. You can check your customer information any
time by using the system. Cab rental management system is a unique and innovative product. Using this this you can also keep the information
of number of bookings in current month or in last 6 month or in last year. This helps you to track your business and you earning in particular
month or in a year. Based on this information you can take decision regarding your business development.

In this framework we can procure and car rents. For travelling for more than 1-month you can hire a or car on rent. Seller will put the bicycles and
s/cars on lease, the clients can choose the s/cars according to the accessibility, after choosing /car of their choice they can book and pay online. This
rental system has three modules namely Admin, User and Vendor. Admin can login, can add, update and delete vendor information and also s list.
He/she can view bookings, user and feedbacks given by users. Users can register on the website and then login, can check of availability of s and
book the of his/her choice and pay accordingly. Vendor’s can login, update and delete the s/car list and also can view bookings.

Page | 3
INDEX

S.No. Index

Chapter 1 INTRODUCTION 6-12

1.1 Introduction 6

1.2 Aim 6

1.3 Existing System 7

1.4 Proposed System 7

1.5 Feasibility Study 8 – 10

1.6 Project Work Schedule 11

1.7 Organization of Report 12

Chapter 2 SOFTWARE REQUIREMENTS SPECIFICATION 13

2.1 Hardware Requirement 13

2.2 Software Requirement 13

Chapter 3 DESIGN & PLANNING 14

3.1 Software Development Life Cycle Model 16

3.2 GENERAL OVERVIEW 17

3.3 User Flow Diagram 18

3.4 ER Diagram 19

3.5 DFD Diagram 20-22

Chapter 4 IMPLEMENTATION DETAILS 23

4.1 FRONT END 23-26

4.2 BACK END 27 - 28

Chapter 5 TESTING 29-39

5.1 UNIT TESTING 29 - 31

5.2 INTEGRATION TESTING 32 - 34

Page | 4
5.3 SOFTWARE VERIFICATION AND VALIDATION 35 –36

5.4 Black-Box Testing 37

5.5 White-Box Testing 37-38

5.6 SYSTEM TESTING 39

Chapter 6 RESULTS 40-101

Chapter 7 ADVANTAGES 102

Chapter 8 CONCLUSION 103

BIBLIOGRAPHY 104

Page | 5
CHAPTER 1:
INTRODUCTION

1.1 INTRODUCTION

This system is named as or Car on Rent Management System. This system is designed to help the

customers to take s or Cars on rent. When we go on any trip outside the town or country, we want

to be free of time so instead of going through metros and taxis we prefer to have our own vehicle

for rent. Using this system vehicle owner can register as customers who want to take or car on

rent can register themselves as renters and can take any or car on rent. This has one admin account

who verifies the registering user and two types of the user account. This system has only one

admin account and cannot have more than one admin account.

1.2 AIM

We developed this project to book a car on rent at the fare charges. In

present system all booking work done manually and it takes very hard

Page | 6
work to maintain the information of booking and cars. If you want to

find which vehicle is available for booking then it takes a lot of time. It

only makes the process more difficult and harder. This aim of the

project is to automate the work performed in the car rental management

system like generating daily bookings, records of car or cab available

for booking, record of routes available, rental charges for cars for every

rout, store record of the customer. Car rental management system is a

car booking software that provides a complete solution to all your day-

to- day car booking office running needs. This system helps you to

keep the information of Customer online. You can check your

customer information any time by using this system. Cab rental

management system is a unique and innovative product. Using this this

you can also keep the information of number of bookings in current

month or in last 6 month or in last year. This helps you to track your

business and you earning in particular month or in any year. Based on

this information you can take decision regarding your business

development.

Page | 7
1.3 EXISTING SYSTEM

In this system user (or) client will directly interact with the car owner and owner will decide whether

the car is available or not. Then if it is available, he will give rent a car to the customer. The main

drawback of this system is customer need to meet the car owner. this is time waste process.

1.4 PROPOSED SYSTEM

In this car rental system, we are going to introduce online booking of car rent will be available. So,

the Burdon of the customer will be reduced. Our Aim is to design and create a data management

System for a car rental company. This enables admin can rent a vehicle that can be used by a

customer. By paying the money during a Specified Period of time. This system increases customer

retention and simplify vehicle and staff Management in an efficient way.

Page | 8
1.5 FEASIBILITY STUDY

A feasibility study is a high-level capsule version of the entire System analysis and Design Process.
The study begins by classifying the problem definition. Feasibility is to determine if it’s worth
doing. Once an acceptance problem definition has been generated, the analyst develops a logical
model of the system. A search for alternatives is analyzed carefully. There are 3 parts in feasibility
study.

1) Operational Feasibility

2) Technical Feasibility

3) Economic Feasibility

1.5.1 OPERATIONAL FEASIBILITY

Operational feasibility is the measure of how well a proposed system solves the problems, and takes
advantage of the opportunities identified during scope definition and how it satisfies the
requirements identified in the requirements analysis phase of system development. The operational
feasibility assessment focuses on the degree to which the proposed development projects fits in with
the existing business environment and objectives with regard to development schedule, delivery
date, corporate culture and existing business processes. To ensure success, desired operational
outcomes must be imparted during design and development. These include such design-dependent
parameters as reliability, maintainability, supportability, usability, producibility, disposability,
sustainability, affordability and others. These parameters are required to be considered at the early
stages of design if desired operational behaviors are to be realized. A system design and
development require appropriate and timely application of engineering and management efforts to
meet the previously mentioned parameters. A system may serve its intended purpose most
effectively when its technical and operating characteristics are engineered into the design. Therefore,
operational feasibility is a critical aspect of systems engineering that needs to be an integral part of
the early design phases.

Page | 9
1.5.2 TECHNICAL FEASIBILITY

This involves questions such as whether the technology needed for the system exists, how difficult it
will be to build, and whether the firm has enough experience using that technology. The assessment
is based on outline design of system requirements in terms of input, processes, output, fields,
programs and procedures. This can be qualified in terms of volume of data, trends, frequency of
updating in order to give an introduction to the technical system. The application is the fact that it
has been developed on windows XP platform and a high configuration of 1GB RAM on Intel
Pentium Dual core processor. This is technically feasible. The technical feasibility assessment is
focused on gaining an understanding of the present technical resources of the organization and their
applicability to the expected needs of the proposed system. It is an evaluation of the hardware and
software and how it meets the need of the proposed system.

1.5.3 ECONOMICAL FEASIBILITY

Establishing the cost-effectiveness of the proposed system i.e., if the benefits do not outweigh the
costs then it is not worth going ahead. In the fast-paced world today there is a great need of online
social networking facilities. Thus, the benefits of this project in the current scenario make it
economically feasible. The purpose of the economic feasibility assessment is to determine the
positive economic benefits to the organization that the proposed system will provide. It includes
quantification and identification of all the benefits expected. This assessment typically involves a
cost/benefits analysis.

Page | 10
1.6 ORGANISATION OF THE REPORT

1.6.1 INTRODUCTION

This section includes the overall view of the project i.e., the basic problem definition and the general
overview of the problem which describes the problem in layman terms. It also specifies the software
used and the proposed solution strategy.

1.6.2 SOFTWARE REQUIREMENTS SPECIFICATION

This section includes the Software and hardware requirements for the smooth running of the
application.

1.6.3 DESIGN & PLANNING

This section consists of the Software Development Life Cycle model. It also contains technical
diagrams like the Data Flow Diagram and the Entity Relationship diagram.

1.6.4 IMPLEMENTATION DETAILS

This section describes the different technologies used for the entire development process of the
Front- end as well as the Back-end development of the application.

1.6.5 RESULTS AND DISCUSSION

This section has screenshots of all the implementation i.e., user interface and their description.

1.6.6 SUMMARY AND CONCLUSION

This section has screenshots of all the implementation i.e., user interface and their description.

Page | 11
CHAPTER 2: SOFTWARE REQUIREMENTS SPECIFICATION
And Module

2.1 Hardware Requirements

Number Description

1 PC with 250 GB or more Hard disk.

2 PC with 4 GB RAM.

3 PC with i3 5th gen Processor or above

2.2 Software Requirements

Number Description Type

1 Operating System Windows 8.1 / Windows 10

2 Language PHP

3 Database MySQL

4 IDE Visual Code

5 Browser Google Chrome

2.3 Module
 User
 Admin
 Cars Module
 Car booking Module
 Passenger information module

Page | 12
CHAPTER 3: DESIGN & PLANNING

3.1 Software Development Life Cycle Model

3.1.1 WATERFALL MODEL

The waterfall model was selected as the SDLC model due to the following

reasons: Requirements were very well documented, clear and fixed.


Technology was adequately understood.
Simple and easy to understand and use.
There were no ambiguous
requirements.
Easy to manage due to the rigidity of the model. Each phase has specific deliverables and a
review process.
Clearly defined stages.
Well understood milestones. Easy to arrange tasks.

Page | 13
3.2 GENERAL OVERVIEW

Page | 14
3.3 Use Case Diagram

10

Page | 15
3.4 ER Diagram

Page | 16
3.5 DFD Diagram

3.5.1 Zero-Level DFD Diagram

Page | 17
3.5.2 First-Level DFD Diagram

Page | 18
CHAPTER 4: IMPLEMENTATION DETAILS

In this Section we will do Analysis of Technologies to use for implementing the project.

4.1 : FRONT END

4.1.1 HTML

Hypertext Markup Language (HTML) is the standard markup language for documents designed to
be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets
(CSS) and scripting languages such as JavaScript. Web browsers receive HTML documents from a
web server or from local storage and render the documents into multimedia web pages. HTML
describes the structure of a web page semantically and originally included cues for the appearance of
the document.

HTML elements are the building blocks of HTML pages. With HTML constructs, images and other
objects such as interactive forms may be embedded into the rendered page. HTML provides a means
to create structured documents by denoting structural semantics for text such as headings,
paragraphs, lists, links, quotes and other items. HTML elements are delineated by tags, written using
angle brackets. Tags such as <img /> and <input /> directly introduce content into the page. Other
tags such as <p> surround and provide information about document text and may include other tags
as sub- elements. Browsers do not display the HTML tags, but use them to interpret the content of
the page.

HTML can embed programs written in a scripting language such as JavaScript, which affects the
behavior and content of web pages. Inclusion of CSS defines the look and layout of content. The
World Wide Web Consortium (W3C), former maintainer of the HTML and current maintainer of the
CSS standards, has encouraged the use of CSS over explicit presentational HTML since 1997.

Page | 19
4.1.2 JavaScript

JavaScript s a high-level, interpreted scripting language that conforms to the ECMAScript


specification. JavaScript has curly-bracket syntax, dynamic typing, prototype-based object-
orientation, and first-class functions. Alongside HTML and CSS, JavaScript is one of the core
technologies of the World Wide Web. JavaScript enables interactive web pages and is an essential
part of web applications. The vast majority of websites use it, and major web browsers have a
dedicated JavaScript engine to execute it. As a multi-paradigm language, JavaScript supports event-
driven, functional, and imperative (including object-oriented and prototype-based) programming
styles. It has APIs for working with text, arrays, dates, regular expressions, and the DOM, but the
language itself does not include any I/O, such as networking, storage, or graphics facilities. It relies
upon the host environment in which it is embedded to provide these features.

Initially only implemented client-side in web browsers, JavaScript engines are now embedded in
many other types of host software, including server-side in web servers and databases, and in non-
web programs such as word processors and PDF software, and in runtime environments that make
JavaScript available for writing mobile and desktop applications, including desktop widgets.

The terms Vanilla JavaScript and Vanilla JS refer to JavaScript not extended by any frameworks or
additional libraries. Scripts written in Vanilla JS are plain JavaScript code. Google's Chrome
extensions, Opera's extensions, Apple's Safari 5 extensions, Apple's Dashboard Widgets, Microsoft's
Gadgets, Yahoo! Widgets, Google Desktop Gadgets, and Serene Klipfolio are implemented using
JavaScript.

Page | 20
4.1.3 CSS

Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a
document written in a markup language like HTML.CSS is a cornerstone technology of the World
Wide Web, alongside HTML and JavaScript.CSS is designed to enable the separation of
presentation and content, including layout, colors, and fonts. This separation can improve content
accessibility, provide more flexibility and control in the specification of presentation characteristics,
enable multiple web pages to share formatting by specifying the relevant CSS in a separate .CSS file,
and reduce complexity and repetition in the structural content.

CSS information can be provided from various sources. These sources can be the web browser, the
user and the author. The information from the author can be further classified into inline, media type,
importance, selector specificity, rule order, inheritance and property definition. CSS style
information can be in a separate document or it can be embedded into an HTML document. Multiple
style sheets can be imported. Different styles can be applied depending on the output device being
used; for example, the screen version can be quite different from the printed version, so that authors
can tailor the presentation appropriately for each medium. The style sheet with the highest priority
controls the content display. Declarations not set in the highest priority source are passed on to a
source of lower priority, such as the user agent style. The process is called cascading.

One of the goals of CSS is to allow users greater control over presentation. Someone who finds red
italic headings difficult to read may apply a different style sheet. Depending on the browser and the
web site, a user may choose from various style sheets provided by the designers, or may remove all
added styles and view the site using the browser's default styling, or may override just the red italic
heading style without altering other attributes.

Page | 21
4.1.4 Bootstrap

Bootstrap is a free and open-source CSS framework directed at responsive, mobile-first front-end
web development. It contains CSS- and (optionally) JavaScript-based design templates for
typography, forms, buttons, navigation and other interface components. Bootstrap is the third-most-
starred project on GitHub, with more than 135,000 stars, behind only freeCodeCamp (almost
305,000 stars) and marginally behind Vue.js framework. According to Alexa Rank, Bootstrap
getbootstrap.com is in the top-2000 in US while vuejs.org is in top-7000 in US.

Bootstrap is a web framework that focuses on simplifying the development of informative web
pages (as opposed to web apps). The primary purpose of adding it to a web project is to apply
Bootstrap's choices of color, size, font and layout to that project. As such, the primary factor is
whether the developers in charge find those choices to their liking. Once added to a project,
Bootstrap provides basic style definitions for all HTML elements. The result is a uniform
appearance for prose, tables and form elements across web browsers. In addition, developers can
take advantage of CSS classes defined in Bootstrap to further customize the appearance of their
contents. For example, Bootstrap has provisioned for light- and dark-colored tables, page headings,
more prominent pull quotes, and text with a highlight.

Bootstrap is a web framework that focuses on simplifying the development of informative web
pages (as opposed to web apps). The primary purpose of adding it to a web project is to apply
Bootstrap's choices of color, size, font and layout to that project. As such, the primary factor is
whether the developers in charge find those choices to their liking. Once added to a project,
Bootstrap provides basic style definitions for all HTML elements. The result is a uniform
appearance for prose, tables and form elements across web browsers. In addition, developers can
take advantage of CSS classes defined in Bootstrap to further customize the appearance of their
contents. For example, Bootstrap has provisioned for light- and dark-colored tables, page headings,
more prominent pull quotes, and text with a highlight.

Page | 22
4.2 : BACK END

4.2.1 PHP

PHP is a server-side scripting language that is used to develop Static websites or Dynamic websites
or Web applications. PHP stands for Hypertext Pre-processor, that earlier stood for Personal Home
Pages. PHP scripts can only be interpreted on a server that has PHP installed. The client computers
accessing the PHP scripts require a web browser only. A PHP file contains PHP tags and ends with
the extension ".php".

The term PHP is an acronym for PHP: Hypertext Preprocessor. PHP is a server-side scripting
language designed specifically for web development. PHP can be easily embedded in HTML files
and HTML codes can also be written in a PHP file. The thing that differentiates PHP with client-
side language like HTML is, PHP codes are executed on the server whereas HTML codes are
directly rendered on the browser.

PHP: Hypertext Preprocessor (or simply PHP) is a general-purpose programming language


originally designed for web development. It was originally created by Rasmus Leadoff in 1994.PHP
code may be executed with a command line interface (CLI), embedded into HTML code, or used in
combination with various web template systems, web content management systems, and web
frameworks. PHP code is usually processed by a PHP interpreter implemented as a module in a web
server or as a Common Gateway Interface (CGI) executable. The web server outputs the results of
the interpreted and executed PHP code, which may be any type of data, such as generated HTML
code or binary image data. PHP can be used for many programming tasks outside of the web
context, such as standalone graphical applications and robotic drone control.

Page | 23
4.2.2 MySQL

MySQL is an open-source relational database management system (RDBMS) based on Structured


Query Language (SQL). Its name is a combination of "My", the name of co-founder Michael
Wideness’s daughter, and "SQL", the abbreviation for Structured Query Language. A relational
database organizes data into one or more data tables in which data types may be related to each
other; these relations help structure the data. SQL is a language programmer use to create, modify
and extract data from the relational database, as well as control user access to the database. In
addition to relational databases and SQL, an RDBMS like MySQL works with an operating system
to implement a relational database in a computer's storage system, manages users, allows for
network access and facilitates testing database integrity and creation of backups.

Page | 24
CHAPTER 5: TESTING

5.1 : UNIT TESTING

5.1.1 Introduction

In computer programming, unit testing is a software testing method by which individual units of
source code, sets of one or more computer program modules together with associated control data,
usage procedures, and operating procedures, are tested to determine whether they are fit for use.
Intuitively, one can view a unit as the smallest testable part of an application. In procedural
programming, a unit could be an entire module, but it is more commonly an individual function or
procedure. In object-oriented programming, a unit is often an entire interface, such as a class, but
could be an individual method. Unit tests are short code fragments created by programmers or
occasionally by white box testers during the development process. It forms the basis for component
testing. Ideally, each test case is independent from the others. Substitutes such as method stubs,
mock objects, fakes, and test harnesses can be used to assist testing a module in isolation. Unit tests
are typically written and run by software developers to ensure that code meets its design and behaves
as intended.

Page | 25
5.1.2 Benefits

The goal of unit testing is to isolate each part of the program and show that the individual parts are
correct. A unit test provides a strict, written contract that the piece of code must satisfy. As a result,
it affords several benefits.

1) Find problems early : Unit testing finds problems early in the development cycle. In test-driven
development (TDD), which is frequently used in both extreme programming and scrum, unit tests
are created before the code itself is written. When the tests pass, that code is considered complete.
The same unit tests are run against that function frequently as the larger code base is developed
either as the code is changed or via an automated process with the build. If the unit tests fail, it is
considered to be a bug either in the changed code or the tests themselves. The unit tests then allow
the location of the fault or failure to be easily traced. Since the unit tests alert the development team
of the problem before handing the code off to testers or clients, it is still early in the development
process.

2 ) Facilitates Change : Unit testing allows the programmer to refactor code or upgrade system
libraries at a later date, and make sure the module still works correctly (e.g., in regression testing).
The procedure is to write test cases for all functions and methods so that whenever a change causes a
fault, it can be quickly identified. Unit tests detect changes which may break a design contract.

3 ) Simplifies Integration : Unit testing may reduce uncertainty in the units themselves and can be
used in a bottom-up testing style approach. By testing the parts of a program first and then testing
the sum of its parts, integration testing becomes much easier.

4 ) Documentation : Unit testing provides a sort of living documentation of the system. Developers
looking to learn what functionality is provided by a unit, and how to use it, can look at the unit tests
to gain a basic understanding of the unit's interface (API).Unit test cases embody characteristics that
are critical to the success of the unit. These characteristics can indicate appropriate/inappropriate use
of a unit as well as negative behaviors that are to be trapped by the unit.

Page | 26
5.2 : INTEGRATION TESTING

Integration testing (sometimes called integration and testing, abbreviated I&T) is the phase in
software testing in which individual software modules are combined and tested as a group. It occurs
after unit testing and before validation testing. Integration testing takes as its input modules
that have been unit tested, groups them in larger aggregates, applies tests defined in an integration
test plan to those aggregates, and delivers as its output the integrated system ready for system
testing.

5.2.1 Purpose

The purpose of integration testing is to verify functional, performance, and reliability


requirements placed on major design items. These "design items", i.e., assemblages (or groups of
units), are exercised through their interfaces using black-box testing, success and error cases being
simulated via appropriate parameter and data inputs. Simulated usage of shared data areas and inter-
process communication is tested and individual subsystems are exercised through their input
interface. Test cases are constructed to test whether all the components within assemblages interact
correctly, for example across procedure calls or process activations, and this is done after testing
individual modules, i.e., unit testing. The overall idea is a "building block" approach, in which
verified assemblages are added to a verified base which is then used to support the integration
testing of further assemblages. Software integration testing is performed according to the software
development life cycle (SDLC) after module and functional tests. The cross- dependencies for
software integration testing are: schedule for integration testing, strategy and selection of the tools
used for integration, define the cyclomatic complexity of the software and software architecture,
reusability of modules and life-cycle and versioning management. Some different types of
integration testing are big-bang, top-down, and bottom-up, mixed (sandwich) and risky-hardest.
Other Integration Patterns[2] are: collaboration integration, backbone integration, layer integration,
client-server integration, distributed services integration and high-frequency integration.

Page | 27
5.2.1.1 Big Bang

In the big-bang approach, most of the developed modules are coupled together to form a complete
software system or major part of the system and then used for integration testing. This method is
very effective for saving time in the integration testing process. However, if the test cases and their
results are not recorded properly, the entire integration process will be more complicated and may
prevent the testing team from achieving the goal of integration testing. A type of big-bang
integration testing is called "usage model testing" which can be used in both software and hardware
integration testing. The basis behind this type of integration testing is to run user-like workloads in
integrated user-like environments. In doing the testing in this manner, the environment is proofed,
while the individual components are proofed indirectly through their use. Usage Model testing takes
an optimistic approach to testing, because it expects to have few problems with the individual
components. The strategy relies heavily on the component developers to do the isolated unit testing
for their product. The goal of the strategy is to avoid redoing the testing done by the developers, and
instead flesh-out problems caused by the interaction of the components in the environment.

5.2.1.2 Top-down And Bottom-up

Bottom-up testing is an approach to integrated testing where the lowest level components are tested
first, then used to facilitate the testing of higher level components. The process is repeated until the
component at the top of the hierarchy is tested. All the bottom or low-level modules, procedures or
functions are integrated and then tested. After the integration testing of lower level integrated
modules, the next level of modules will be formed and can be used for integration testing. This
approach is helpful only when all or most of the modules of the same development level are ready.
This method also helps to determine the levels of software developed and makes it easier to report
testing progress in the form of a percentage. Top-down testing is an approach to integrated testing
where the top integrated modules are tested and the branch of the module is tested step by step until
the end of the related module. Sandwich testing is an approach to combine top down testing with
bottom up testing.

Page | 28
5.3 : SOFTWARE VERIFICATION AND VALIDATION

5.3.1 Introduction

In software project management, software testing, and software engineering, verification and
validation (V&V) is the process of checking that a software system meets specifications and that it
fulfills its intended purpose. It may also be referred to as software quality control. It is normally the
responsibility of software testers as part of the software development lifecycle. Validation checks that
the product design satisfies or fits the intended use (high-level checking), i.e., the software meets the
user requirements. This is done through dynamic testing and other forms of review. Verification and
validation are not the same thing, although they are often confused. Boehm succinctly
expressed the difference between

Validation : Are we building the right product?


Verification : Are we building the product
right?

According to the Capability Maturity Model (CMMI-SW v1.1)

Software Verification: The process of evaluating software to determine whether the products of a
given development phase satisfy the conditions imposed at the start of that phase.

Software Validation: The process of evaluating software during or at the end of the development
process to determine whether it satisfies specified requirements.

In other words, software verification is ensuring that the product has been built according to the
requirements and design specifications, while software validation ensures that the product meets the
user's needs, and that the specifications were correct in the first place. Software verification ensures
that "you built it right". Software validation ensures that "you built the right thing". Software
validation confirms that the product, as provided, will fulfill its intended use.

Page | 29
From Testing Perspective

Fault – wrong or missing function in the code.


Failure – the manifestation of a fault during execution.
Malfunction – according to its specification the system does not meet its specified functionality

Both verification and validation are related to the concepts of quality and of software quality
assurance. By themselves, verification and validation do not guarantee software quality; planning,
traceability, configuration management and other aspects of software engineering are required.
Within the modeling and simulation (M&S) community, the definitions of verification, validation
and accreditation are similar:

M&S Verification is the process of determining that a ⦁ computer model, simulation, or


federation of models and simulations implementations and their associated data accurately
represent the developer's conceptual description and specifications.
M&S Validation is the process of determining the degree to which a model, simulation, or
federation of models and simulations, and their associated data are accurate representations of
the real world from the perspective of the intended use(s).

Page | 30
5.3.2 Classification of Methods

In mission-critical software systems, where flawless performance is absolutely necessary, formal


methods may be used to ensure the correct operation of a system. However, often for non-mission-
critical software systems, formal methods prove to be very costly and an alternative method of
software V&V must be sought out. In such cases, syntactic methods are often used.

5.3.3 Test Cases

A test case is a tool used in the process. Test cases may be prepared for software verification and
software validation to determine if the product was built according to the requirements of the user.
Other methods, such as reviews, may be used early in the life cycle to provide for software
validation.

27

Page | 31
5.4 : Black-Box Testing

Black-box testing is a method of software testing that examines the functionality of an application
without peering into its internal structures or workings. This method of test can be applied virtually
to every level of software testing: unit, integration, system and acceptance. It typically comprises
most if not all higher level testing, but can also dominate unit testing as well.

5.4.1 Test Procedures

Specific knowledge of the application's code/internal structure and programming knowledge in


general is not required. The tester is aware of what the software is supposed to do but is not aware of
how it does it. For instance, the tester is aware that a particular input returns a certain, invariable
output but is not aware of how the software produces the output in the first place.

5.4.2 Test Cases

Test cases are built around specifications and requirements, i.e., what the application is supposed to
do. Test cases are generally derived from external descriptions of the software, including
specifications, requirements and design parameters. Although the tests used are primarily
functional in nature, non-functional tests may also be used. The test designer selects both valid and
invalid inputs and determines the correct output, often with the help of an oracle or a previous result
that is known to be good, without any knowledge of the test object's internal structure.

28

Page | 32
5.5 : White-Box Testing

White-box testing (also known as clear box testing, glass box testing, transparent box testing, and
structural testing) is a method of testing software that tests internal structures or workings of an
application, as opposed to its functionality (i.e. black-box testing). In white-box testing an internal
perspective of the system, as well as programming skills, are used to design test cases. The tester
chooses inputs to exercise paths through the code and determine the appropriate outputs. This is
analogous to testing nodes in a circuit, e.g. in-circuit testing (ICT). White-box testing can be applied
at the unit, integration and system levels of the software testing process. Although traditional testers
tended to think of white-box testing as being done at the unit level, it is used for integration and
system testing more frequently today. It can test paths within a unit, paths between units during
integration, and between subsystems during a system–level test. Though this method of test design
can uncover many errors or problems, it has the potential to miss unimplemented parts of the
specification or missing requirements.

5.5.1 Levels

1 ) Unit testing : White-box testing is done during unit testing to ensure that the code is working as
intended, before any integration happens with previously tested code. White-box testing during unit
testing catches any defects early on and aids in any defects that happen later on after the code is
integrated with the rest of the application and therefore prevents any type of errors later on.

2 ) Integration testing : White-box testing at this level are written to test the interactions of each
interface with each other. The Unit level testing made sure that each code was tested and working
accordingly in an isolated environment and integration examines the correctness of the behaviour in
an open environment through the use of white-box testing for any interactions of interfaces that are
known to the programmer.

3 ) Regression testing : White-box testing during regression testing is the use of recycled white-box
test cases at the unit and integration testing levels.

Page | 33
5.5.2 Procedures

White-box testing's basic procedures involves the tester having a deep level of understanding of the
source code being tested. The programmer must have a deep understanding of the application to
know what kinds of test cases to create so that every visible path is exercised for testing. Once the
source code is understood then the source code can be analyzed for test cases to be created. These
are the three basic steps that white-box testing takes in order to create test cases:

Input involves different types of requirements, functional specifications, detailed designing of


documents, proper source code, security specifications. This is the preparation stage of white-
box testing to layout all of the basic information.
Processing involves performing risk analysis to guide whole testing process, proper test plan,
execute test cases and communicate results. This is the phase of building test cases to make sure
they thoroughly test the application the given results are recorded accordingly.
Output involves preparing final report that encompasses all of the above preparations and results.

Page | 34
5.6 : SYSTEM TESTING

System testing of software or hardware is testing conducted on a complete, integrated system to


evaluate the system's compliance with its specified requirements. System testing falls within the
scope of black-box testing, and as such, should require no knowledge of the inner design of the code
or logic. As a rule, system testing takes, as its input, all of the "integrated" software components that
have passed integration testing and also the software system itself integrated with any applicable
hardware system(s). The purpose of integration testing is to detect any inconsistencies between the
software units that are integrated together (called assemblages) or between any of the
assemblages and the hardware. System testing is a more limited type of testing; it seeks to detect
defects both within the "inter-assemblages" and also within the system as a whole.

System testing is performed on the entire system in the context of a Functional Requirement
Specification(s) (FRS) and/or a System Requirement Specification (SRS). System testing tests not
only the design, but also the behavior and even the believed expectations of the customer. It is also
intended to test up to and beyond the bounds defined in the software/hardware requirements
specification(s).

Page | 35
CHAPTER 6 : RESULTS

6.1 Code
1. Index.php
<?php
session_start()
;
include('includes/config.php');
error_reporting(0);

?>

<!DOCTYPE HTML>
<html lang="en">
<head>

<title>Car Rental Portal</title>


<!--Bootstrap -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
<link rel="stylesheet" href="assets/css/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/css/owl.transitions.css" type="text/css">
<link href="assets/css/slick.css" rel="stylesheet">
<link href="assets/css/bootstrap-slider.min.css" rel="stylesheet">
<link href="assets/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" id="switcher-css" type="text/css" href="assets/switcher/css/switcher.css" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/red.css" title="red" media="all" data-default-color="true" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/orange.css" title="orange" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/blue.css" title="blue" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/pink.css" title="pink" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/green.css" title="green" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/purple.css" title="purple" media="all" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-touch-icon-114-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
</head>
<body>

<!-- Start Switcher -->


<?php include('includes/colorswitcher.php');?>
<!-- /Switcher -->

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

<!-- Banners -->


<section id="banner" class="banner-section">
<div class="container">
<div class="div_zindex">
<div class="row">
<div class="col-md-5 col-md-push-7">
<div class="banner_content">
<h1>&nbsp;</h1>
<p>&nbsp; </p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- /Banners -->

<!-- Resent Cat-->


<section class="section-padding gray-bg">
<div class="container">
<div class="section-header text-center">
<h2>Find the Best <span>CarForYou</span></h2>
<p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words
which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle
of text.</p>
</div>
Page | 36
<div class="row">

Page | 37
<!-- Nav tabs -->
<div class="recent-tab">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#resentnewcar" role="tab" data-toggle="tab">New Car</a></li>
</ul>
</div>
<!-- Recently Listed New Cars -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="resentnewcar">

<?php $sql = "SELECT


tblvehicles.VehiclesTitle,tblbrands.BrandName,tblvehicles.PricePerDay,tblvehicles.FuelType,tblvehicles.ModelYear,tblvehicles.id,tblvehicles.SeatingCapacity,tblvehicle
s.VehiclesOverview,tblvehicles.Vimage1 from tblvehicles join tblbrands on tblbrands.id=tblvehicles.VehiclesBrand limit 9";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{
?>

<div class="col-list-3">
<div class="recent-car-list">
<div class="car-info-box"> <a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"><img src="admin/img/vehicleimages/<?php echo htmlentities($result-
>Vimage1);?>" class="img-responsive" alt="image"></a>
<ul>
<li><i class="fa fa-car" aria-hidden="true"></i><?php echo htmlentities($result->FuelType);?></li>
<li><i class="fa fa-calendar" aria-hidden="true"></i><?php echo htmlentities($result->ModelYear);?> Model</li>
<li><i class="fa fa-user" aria-hidden="true"></i><?php echo htmlentities($result->SeatingCapacity);?> seats</li>
</ul>
</div>
<div class="car-title-m">
<h6><a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"> <?php echo htmlentities($result->VehiclesTitle);?></a></h6>
<span class="price">Rs. <?php echo htmlentities($result->PricePerDay);?> /Day</span>
</div>
<div class="inventory_info_m">
<p><?php echo substr($result->VehiclesOverview,0,70);?></p>
</div>
</div>
</div>
<?php }}?>

</div>
</div>
</div>
</section>
<!-- /Resent Cat -->

<!-- Fun Facts-->


<section class="fun-facts-section">
<div class="container div_zindex">
<div class="row">
<div class="col-lg-3 col-xs-6 col-sm-3">
<div class="fun-facts-m">
<div class="cell">
<h2><i class="fa fa-calendar" aria-hidden="true"></i>40+</h2>
<p>Years In Business</p>
</div>
</div>
</div>
<div class="col-lg-3 col-xs-6 col-sm-3">
<div class="fun-facts-m">
<div class="cell">
<h2><i class="fa fa-car" aria-hidden="true"></i>1200+</h2>
<p>New Cars For Sale</p>
</div>
</div>
</div>
<div class="col-lg-3 col-xs-6 col-sm-3">
<div class="fun-facts-m">
<div class="cell">
<h2><i class="fa fa-car" aria-hidden="true"></i>1000+</h2>
<p>Used Cars For Sale</p>
</div>
</div>
</div>
<div class="col-lg-3 col-xs-6 col-sm-3">
<div class="fun-facts-m">
<div class="cell">
<h2><i class="fa fa-user-circle-o" aria-hidden="true"></i>600+</h2>
<p>Satisfied Customers</p>
</div>
</div>

Page | 38
</div>
</div>
</div>
<!-- Dark Overlay-->
<div class="dark-overlay"></div>
</section>
<!-- /Fun Facts-->

<!--Testimonial -->
<section class="section-padding testimonial-section parallex-bg">
<div class="container div_zindex">
<div class="section-header white-text text-center">
<h2>Our Satisfied <span>Customers</span></h2>
</div>
<div class="row">
<div id="testimonial-slider">
<?php
$tid=1;
$sql = "SELECT tbltestimonial.Testimonial,tblusers.FullName from tbltestimonial join tblusers on tbltestimonial.UserEmail=tblusers.EmailId where tbltestimonial.status=:tid
limit 4";
$query = $dbh -> prepare($sql);
$query->bindParam(':tid',$tid, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>

<div class="testimonial-m">

<div class="testimonial-content">
<div class="testimonial-heading">
<h5><?php echo htmlentities($result->FullName);?></h5>
<p><?php echo htmlentities($result->Testimonial);?></p>
</div>
</div>
</div>
<?php }} ?>

</div>
</div>
</div>
<!-- Dark Overlay-->
<div class="dark-overlay"></div>
</section>
<!-- /Testimonial-->

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

<!--Back to top-->
<div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i> </a> </div>
<!--/Back to top-->

<!--Login-Form -->
<?php include('includes/login.php');?>
<!--/Login-Form -->

<!--Register-Form -->
<?php include('includes/registration.php');?>

<!--/Register-Form -->

<!--Forgot-password-Form -->
<?php include('includes/forgotpassword.php');?>
<!--/Forgot-password-Form -->

<!-- Scripts -->


<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/interface.js"></script>
<!--Switcher-->
<script src="assets/switcher/js/switcher.js"></script>
<!--bootstrap-slider-JS-->
<script src="assets/js/bootstrap-slider.min.js"></script>
<!--Slider-JS-->
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>

Page | 39
</body>

<!-- Mirrored from themes.webmasterdriver.net/carforyou/demo/index.html by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 16 Jun 2017 07:22:11 GMT -->

</html>
2. Vehicle-details.php
<?php
session_start()
;
include('includes/config.php');
error_reporting(0);
if(isset($_POST['submit']))
{
$fromdate=$_POST['fromdate'];
$todate=$_POST['todate'];
$message=$_POST['message'];
$useremail=$_SESSION['login'];
$status=0;
$vhid=$_GET['vhid'];
$bookingno=mt_rand(100000000, 999999999);
$ret="SELECT * FROM tblbooking where (:fromdate BETWEEN date(FromDate) and date(ToDate) || :todate BETWEEN date(FromDate) and date(ToDate) || date(FromDate)
BETWEEN :fromdate and :todate) and VehicleId=:vhid";
$query1 = $dbh -> prepare($ret);
$query1->bindParam(':vhid',$vhid, PDO::PARAM_STR);
$query1->bindParam(':fromdate',$fromdate,PDO::PARAM_STR);
$query1->bindParam(':todate',$todate,PDO::PARAM_STR);
$query1->execute();
$results1=$query1->fetchAll(PDO::FETCH_OBJ);

if($query1->rowCount()==0)
{

$sql="INSERT INTO tblbooking(userEmail,VehicleId,FromDate,ToDate,message,Status) VALUES(:useremail,:vhid,:fromdate,:todate,:message,:status)";


$query = $dbh->prepare($sql);
$query->bindParam(':useremail',$useremail,PDO::PARAM_STR);
$query->bindParam(':vhid',$vhid,PDO::PARAM_STR);
$query->bindParam(':fromdate',$fromdate,PDO::PARAM_STR);
$query->bindParam(':todate',$todate,PDO::PARAM_STR);
$query->bindParam(':message',$message,PDO::PARAM_STR);
$query->bindParam(':status',$status,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh-
>lastInsertId(); if($lastInsertId)
{
echo "<script>alert('Booking successfull.');</script>";
echo "<script type='text/javascript'> document.location = 'my-booking.php'; </script>";
}
else
{
echo "<script>alert('Something went wrong. Please try again');</script>";
echo "<script type='text/javascript'> document.location = 'car-listing.php'; </script>";
} } else{
echo "<script>alert('Car already booked for these days');</script>";
echo "<script type='text/javascript'> document.location = 'car-listing.php'; </script>";
}

?>

<!DOCTYPE HTML>
<html lang="en">
<head>

<title>Car Rental | Vehicle Details</title>


<!--Bootstrap -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<!--Custome Style -->
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
<!--OWL Carousel slider-->
<link rel="stylesheet" href="assets/css/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/css/owl.transitions.css" type="text/css">
<!--slick-slider -->
<link href="assets/css/slick.css" rel="stylesheet">
<!--bootstrap-slider -->
<link href="assets/css/bootstrap-slider.min.css" rel="stylesheet">
<!--FontAwesome Font Style -->
<link href="assets/css/font-awesome.min.css" rel="stylesheet">

<!-- SWITCHER -->


<link rel="stylesheet" id="switcher-css" type="text/css" href="assets/switcher/css/switcher.css" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/red.css" title="red" media="all" data-default-color="true" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/orange.css" title="orange" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/blue.css" title="blue" media="all" />

Page | 40
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/pink.css" title="pink" media="all" />

Page | 41
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/green.css" title="green" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/purple.css" title="purple" media="all" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-touch-icon-114-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
</head>
<body>

<!-- Start Switcher -->


<?php include('includes/colorswitcher.php');?>
<!-- /Switcher -->

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

<!--Listing-Image-Slider-->

<?php
$vhid=intval($_GET['vhid']);
$sql = "SELECT tblvehicles.*,tblbrands.BrandName,tblbrands.id as bid from tblvehicles join tblbrands on tblbrands.id=tblvehicles.VehiclesBrand where tblvehicles.id=:vhid";
$query = $dbh -> prepare($sql);
$query->bindParam(':vhid',$vhid, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{
$_SESSION['brndid']=$result->bid;
?>

<section id="listing_img_slider">
<div><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage1);?>" class="img-responsive" alt="image" width="900" height="560"></div>
<div><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage2);?>" class="img-responsive" alt="image" width="900" height="560"></div>
<div><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage3);?>" class="img-responsive" alt="image" width="900" height="560"></div>
<div><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage4);?>" class="img-responsive" alt="image" width="900" height="560"></div>
<?php if($result->Vimage5=="")
{

} else {
?>
<div><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage5);?>" class="img-responsive" alt="image" width="900" height="560"></div>
<?php } ?>
</section>
<!--/Listing-Image-Slider-->

<!--Listing-detail-->
<section class="listing-detail">
<div class="container">
<div class="listing_detail_head row">
<div class="col-md-9">
<h2><?php echo htmlentities($result->BrandName);?> , <?php echo htmlentities($result->VehiclesTitle);?></h2>
</div>
<div class="col-md-3">
<div class="price_info">
<p>Rs. <?php echo htmlentities($result->PricePerDay);?> </p>Per Day

</div>
</div>
</div>
<div class="row">
<div class="col-md-9">
<div class="main_features">
<ul>

<li> <i class="fa fa-calendar" aria-hidden="true"></i>


<h5><?php echo htmlentities($result->ModelYear);?></h5>
<p>Reg.Year</p>
</li>
<li> <i class="fa fa-cogs" aria-hidden="true"></i>
<h5><?php echo htmlentities($result->FuelType);?></h5>
<p>Fuel Type</p>
</li>

<li> <i class="fa fa-user-plus" aria-hidden="true"></i>


<h5><?php echo htmlentities($result->SeatingCapacity);?></h5>
<p>Seats</p>
</li>
</ul>
</div>

Page | 42
<div class="listing_more_info">
<div class="listing_detail_wrap">
<!-- Nav tabs -->
<ul class="nav nav-tabs gray-bg" role="tablist">
<li role="presentation" class="active"><a href="#vehicle-overview " aria-controls="vehicle-overview" role="tab" data-toggle="tab">Vehicle Overview </a></li>

<li role="presentation"><a href="#accessories" aria-controls="accessories" role="tab" data-toggle="tab">Accessories</a></li>


</ul>

<!-- Tab panes -->


<div class="tab-content">
<!-- vehicle-overview -->
<div role="tabpanel" class="tab-pane active" id="vehicle-overview">

<p><?php echo htmlentities($result->VehiclesOverview);?></p>


</div>

<!-- Accessories -->


<div role="tabpanel" class="tab-pane" id="accessories">
<!--Accessories-->
<table>
<thead>
<tr>
<th colspan="2">Accessories</th>
</tr>
</thead>
<tbody>
<tr>
<td>Air Conditioner</td>
<?php if($result->AirConditioner==1)
{
?>
<td><i class="fa fa-check" aria-hidden="true"></i></td>
<?php } else { ?>
<td><i class="fa fa-close" aria-hidden="true"></i></td>
<?php } ?> </tr>

<tr>
<td>AntiLock Braking System</td>
<?php if($result->AntiLockBrakingSystem==1)
{
?>
<td><i class="fa fa-check" aria-hidden="true"></i></td>
<?php } else {?>
<td><i class="fa fa-close" aria-hidden="true"></i></td>
<?php } ?>
</tr>

<tr>
<td>Power Steering</td>
<?php if($result->PowerSteering==1)
{
?>
<td><i class="fa fa-check" aria-hidden="true"></i></td>
<?php } else { ?>
<td><i class="fa fa-close" aria-hidden="true"></i></td>
<?php } ?>
</tr>

<tr>

<td>Power Windows</td>

<?php if($result->PowerWindows==1)
{
?>
<td><i class="fa fa-check" aria-hidden="true"></i></td>
<?php } else { ?>
<td><i class="fa fa-close" aria-hidden="true"></i></td>
<?php } ?>
</tr>

<tr>
<td>CD Player</td>
<?php if($result->CDPlayer==1)
{
?>
<td><i class="fa fa-check" aria-hidden="true"></i></td>
<?php } else { ?>
<td><i class="fa fa-close" aria-hidden="true"></i></td>
<?php } ?>
</tr>

<tr>

Page | 43
<td>Leather Seats</td>
<?php if($result->LeatherSeats==1)
{
?>
<td><i class="fa fa-check" aria-hidden="true"></i></td>
<?php } else { ?>
<td><i class="fa fa-close" aria-hidden="true"></i></td>
<?php } ?>
</tr>

<tr>
<td>Central Locking</td>
<?php if($result->CentralLocking==1)
{
?>
<td><i class="fa fa-check" aria-hidden="true"></i></td>
<?php } else { ?>
<td><i class="fa fa-close" aria-hidden="true"></i></td>
<?php } ?>
</tr>

<tr>
<td>Power Door Locks</td>
<?php if($result->PowerDoorLocks==1)
{
?>
<td><i class="fa fa-check" aria-hidden="true"></i></td>
<?php } else { ?>
<td><i class="fa fa-close" aria-hidden="true"></i></td>
<?php } ?>
</tr>
<tr>
<td>Brake Assist</td>
<?php if($result->BrakeAssist==1)
{
?>
<td><i class="fa fa-check" aria-hidden="true"></i></td>
<?php } else { ?>
<td><i class="fa fa-close" aria-hidden="true"></i></td>
<?php } ?>
</tr>

<tr>
<td>Driver Airbag</td>
<?php if($result->DriverAirbag==1)
{
?>
<td><i class="fa fa-check" aria-hidden="true"></i></td>
<?php } else { ?>
<td><i class="fa fa-close" aria-hidden="true"></i></td>
<?php } ?>
</tr>

<tr>
<td>Passenger Airbag</td>
<?php if($result->PassengerAirbag==1)
{
?>
<td><i class="fa fa-check" aria-hidden="true"></i></td>
<?php } else {?>
<td><i class="fa fa-close" aria-hidden="true"></i></td>
<?php } ?>
</tr>

<tr>
<td>Crash Sensor</td>
<?php if($result->CrashSensor==1)
{
?>
<td><i class="fa fa-check" aria-hidden="true"></i></td>
<?php } else { ?>
<td><i class="fa fa-close" aria-hidden="true"></i></td>
<?php } ?>
</tr>

</tbody>
</table>
</div>
</div>
</div>

</div>
<?php }} ?>

</div>

Page | 44
<!--Side-Bar-->
<aside class="col-md-3">

<div class="share_vehicle">
<p>Share: <a href="#"><i class="fa fa-facebook-square" aria-hidden="true"></i></a> <a href="#"><i class="fa fa-twitter-square" aria-hidden="true"></i></a> <a
href="#"><i class="fa fa-linkedin-square" aria-hidden="true"></i></a> <a href="#"><i class="fa fa-google-plus-square" aria-hidden="true"></i></a> </p>
</div>
<div class="sidebar_widget">
<div class="widget_heading">
<h5><i class="fa fa-envelope" aria-hidden="true"></i>Book Now</h5>
</div>
<form method="post">
<div class="form-group">
<label>From Date:</label>
<input type="date" class="form-control" name="fromdate" placeholder="From Date" required>
</div>
<div class="form-group">
<label>To Date:</label>
<input type="date" class="form-control" name="todate" placeholder="To Date" required>
</div>
<div class="form-group">
<textarea rows="4" class="form-control" name="message" placeholder="Message" required></textarea>
</div>
<?php if($_SESSION['login'])
{?>
<div class="form-group">
<input type="submit" class="btn" name="submit" value="Book Now">
</div>
<?php } else { ?>
<a href="#loginform" class="btn btn-xs uppercase" data-toggle="modal" data-dismiss="modal">Login For Book</a>

<?php } ?>
</form>
</div>
</aside>
<!--/Side-Bar-->
</div>

<div class="space-20"></div>
<div class="divider"></div>

<!--Similar-Cars-->
<div class="similar_cars">
<h3>Similar Cars</h3>
<div class="row">
<?php
$bid=$_SESSION['brndid'];
$sql="SELECT
tblvehicles.VehiclesTitle,tblbrands.BrandName,tblvehicles.PricePerDay,tblvehicles.FuelType,tblvehicles.ModelYear,tblvehicles.id,tblvehicles.SeatingCapacity,tblvehicle
s.VehiclesOverview,tblvehicles.Vimage1 from tblvehicles join tblbrands on tblbrands.id=tblvehicles.VehiclesBrand where tblvehicles.VehiclesBrand=:bid";
$query = $dbh -> prepare($sql);
$query->bindParam(':bid',$bid, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<div class="col-md-3 grid_listing">
<div class="product-listing-m gray-bg">
<div class="product-listing-img"> <a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"><img src="admin/img/vehicleimages/<?php
echo htmlentities($result->Vimage1);?>" class="img-responsive" alt="image" /> </a>
</div>
<div class="product-listing-content">
<h5><a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"><?php echo htmlentities($result->BrandName);?> , <?php echo htmlentities($result-
>VehiclesTitle);?></a></h5>
<p class="list-price">Rs. <?php echo htmlentities($result->PricePerDay);?></p>

<ul class="features_list">

<li><i class="fa fa-user" aria-hidden="true"></i><?php echo htmlentities($result->SeatingCapacity);?> seats</li>


<li><i class="fa fa-calendar" aria-hidden="true"></i><?php echo htmlentities($result->ModelYear);?> model</li>
<li><i class="fa fa-car" aria-hidden="true"></i><?php echo htmlentities($result->FuelType);?></li>
</ul>
</div>
</div>
</div>
<?php }} ?>

</div>
</div>
<!--/Similar-Cars-->

</div>
</section>

Page | 45
<!--/Listing-detail-->

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

<!--Back to top-->
<div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i> </a> </div>
<!--/Back to top-->

<!--Login-Form -->
<?php include('includes/login.php');?>
<!--/Login-Form -->

<!--Register-Form -->
<?php include('includes/registration.php');?>

<!--/Register-Form -->

<!--Forgot-password-Form -->
<?php include('includes/forgotpassword.php');?>

<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/interface.js"></script>
<script src="assets/switcher/js/switcher.js"></script>
<script src="assets/js/bootstrap-slider.min.js"></script>
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>

</body>

</html>
3. Update-password.php

<?php
session_start();
error_reporting(0)
;
include('includes/config.php');
if(strlen($_SESSION['login'])==0)
{
header('location:index.php');
}
else{ if(isset($_POST['updatep
ass']))
{
$password=md5($_POST['password']);
$newpassword=md5($_POST['newpassword']);
$email=$_SESSION['login'];
$sql ="SELECT Password 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)
{
$con="update tblusers set Password=:newpassword where EmailId=:email";
$chngpwd1 = $dbh->prepare($con);
$chngpwd1-> bindParam(':email', $email, PDO::PARAM_STR);
$chngpwd1-> bindParam(':newpassword', $newpassword, PDO::PARAM_STR);
$chngpwd1->execute();
$msg="Your Password succesfully changed";
}
else {
$error="Your current password is wrong";
}
}

?>
<!DOCTYPE HTML>
<html lang="en">
<head>

<title>Car Rental Portal - Update Password</title>


<!--Bootstrap -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<!--Custome Style -->
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
<!--OWL Carousel slider-->
<link rel="stylesheet" href="assets/css/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/css/owl.transitions.css" type="text/css">
<!--slick-slider -->
<link href="assets/css/slick.css" rel="stylesheet">
<!--bootstrap-slider -->

Page | 46
<link href="assets/css/bootstrap-slider.min.css" rel="stylesheet">

Page | 47
<!--FontAwesome Font Style -->
<link href="assets/css/font-awesome.min.css" rel="stylesheet">

<!-- SWITCHER -->


<link rel="stylesheet" id="switcher-css" type="text/css" href="assets/switcher/css/switcher.css" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/red.css" title="red" media="all" data-default-color="true" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/orange.css" title="orange" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/blue.css" title="blue" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/pink.css" title="pink" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/green.css" title="green" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/purple.css" title="purple" media="all" />

<!-- Fav and touch icons -->


<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-touch-icon-114-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png">
<!-- Google-Font-->
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
<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{ padd
ing: 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>

<!-- Start Switcher -->


<?php include('includes/colorswitcher.php');?>
<!-- /Switcher -->

<!--Header-->
<?php include('includes/header.php');?>
<!-- /Header -->
<!--Page Header-->
<section class="page-header profile_page">
<div class="container">
<div class="page-header_wrap">
<div class="page-heading">
<h1>Update Password</h1>
</div>
<ul class="coustom-breadcrumb">
<li><a href="#">Home</a></li>
<li>Update Password</li>
</ul>
</div>
</div>
<!-- Dark Overlay-->
<div class="dark-overlay"></div>
</section>
<!-- /Page Header-->

<?php
$useremail=$_SESSION['login'];
$sql = "SELECT * from tblusers where EmailId=:useremail";
$query = $dbh -> prepare($sql);
$query -> bindParam(':useremail',$useremail, PDO::PARAM_STR);
$query->execute();
Page | 48
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;

Page | 49
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<section class="user_profile inner_pages">
<div class="container">
<div class="user_profile_info gray-bg padding_4x4_40">
<div class="upload_user_logo"> <img src="assets/images/dealer-logo.jpg" alt="image">
</div>

<div class="dealer_info">
<h5><?php echo htmlentities($result->FullName);?></h5>
<p><?php echo htmlentities($result->Address);?><br>
<?php echo htmlentities($result->City);?>&nbsp;<?php echo htmlentities($result->Country);}}?></p>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-3">
<?php include('includes/sidebar.php');?>
<div class="col-md-6 col-sm-8">
<div class="profile_wrap">
<form name="chngpwd" method="post" onSubmit="return valid();">

<div class="gray-bg field-title">


<h6>Update password</h6>
</div>
<?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 }?>
<div class="form-group">
<label class="control-label">Current Password</label>
<input class="form-control white_bg" id="password" name="password" type="password" required>
</div>
<div cl
<div class="form-group">
<label class="control-label">Password</label>
<input class="form-control white_bg" id="newpassword" type="password" name="newpassword" required>
</div>
<div class="form-group">
<label class="control-label">Confirm Password</label>
<input class="form-control white_bg" id="confirmpassword" type="password" name="confirmpassword" required>
</div>

<div class="form-group">
<input type="submit" value="Update" name="updatepass" id="submit" class="btn btn-block">
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<!--/Profile-setting-->

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

<!--Back to top-->
<div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i> </a> </div>
<!--/Back to top-->

<!--Login-Form -->
<?php include('includes/login.php');?>
<!--/Login-Form -->

<!--Register-Form -->
<?php include('includes/registration.php');?>

<!--/Register-Form -->

<!--Forgot-password-Form -->
<?php include('includes/forgotpassword.php');?>
<!--/Forgot-password-Form -->

<!-- Scripts -->


<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/interface.js"></script>
<!--Switcher-->
<script src="assets/switcher/js/switcher.js"></script>
<!--bootstrap-slider-JS-->
<script src="assets/js/bootstrap-slider.min.js"></script>
<!--Slider-JS-->
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>

Page | 50
</body>
</html>

<?php } ?>
4. Search-carresult.php
<?php
session_start()
;
include('includes/config.php');
error_reporting(0);
?>

<!DOCTYPE HTML>
<html lang="en">
<head>

<title>Car Rental Portal | Car Listing</title>


<!--Bootstrap -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<!--Custome Style -->
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
<!--OWL Carousel slider-->
<link rel="stylesheet" href="assets/css/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/css/owl.transitions.css" type="text/css">
<!--slick-slider -->
<link href="assets/css/slick.css" rel="stylesheet">
<!--bootstrap-slider -->
<link href="assets/css/bootstrap-slider.min.css" rel="stylesheet">
<!--FontAwesome Font Style -->
<link href="assets/css/font-awesome.min.css" rel="stylesheet">

<!-- SWITCHER -->


<link rel="stylesheet" id="switcher-css" type="text/css" href="assets/switcher/css/switcher.css" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/red.css" title="red" media="all" data-default-color="true" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/orange.css" title="orange" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/blue.css" title="blue" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/pink.css" title="pink" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/green.css" title="green" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/purple.css" title="purple" media="all" />

<!-- Fav and touch icons -->


<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-touch-icon-114-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
</head>
<body>

<!-- Start Switcher -->


<?php include('includes/colorswitcher.php');?>
<!-- /Switcher -->

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

<!--Page Header-->
<section class="page-header listing_page">
<div class="container">
<div class="page-header_wrap">
<div class="page-heading">
<h1>Car Listing</h1>
</div>
<ul class="coustom-breadcrumb">
<li><a href="#">Home</a></li>
<li>Car Listing</li>
</ul>
</div>
</div>
<!-- Dark Overlay-->
<div class="dark-overlay"></div>
</section>
<!-- /Page Header-->

<!--Listing-->
<section class="listing-page">
<div class="container">
<div class="row">
<div class="col-md-9 col-md-push-3">
<div class="result-sorting-wrapper">
<div class="sorting-count">
<?php
//Query for Listing count
$brand=$_POST['brand'];

Page | 51
$fueltype=$_POST['fueltype'];

Page | 52
$sql = "SELECT id from tblvehicles where tblvehicles.VehiclesBrand=:brand and tblvehicles.FuelType=:fueltype";
$query = $dbh -> prepare($sql);
$query -> bindParam(':brand',$brand, PDO::PARAM_STR);
$query -> bindParam(':fueltype',$fueltype, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=$query->rowCount();
?>
<p><span><?php echo htmlentities($cnt);?> Listings</span></p>
</div>
</div>

<?php

$sql = "SELECT tblvehicles.*,tblbrands.BrandName,tblbrands.id as bid from tblvehicles join tblbrands on tblbrands.id=tblvehicles.VehiclesBrand


where tblvehicles.VehiclesBrand=:brand and tblvehicles.FuelType=:fueltype";
$query = $dbh -> prepare($sql);
$query -> bindParam(':brand',$brand, PDO::PARAM_STR);
$query -> bindParam(':fueltype',$fueltype, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<div class="product-listing-m gray-bg">
<div class="product-listing-img"><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage1);?>" class="img-responsive" alt="Image" /> </a>
</div>
<div class="product-listing-content">
<h5><a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"><?php echo htmlentities($result->BrandName);?> , <?php echo htmlentities($result-
>VehiclesTitle);?></a></h5>
<p class="list-price">Rs. <?php echo htmlentities($result->PricePerDay);?> Per Day</p>
<ul>
<li><i class="fa fa-user" aria-hidden="true"></i><?php echo htmlentities($result->SeatingCapacity);?> seats</li>
<li><i class="fa fa-calendar" aria-hidden="true"></i><?php echo htmlentities($result->ModelYear);?> model</li>
<li><i class="fa fa-car" aria-hidden="true"></i><?php echo htmlentities($result->FuelType);?></li>
</ul>
<a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>" class="btn">View Details <span class="angle_arrow"><i class="fa fa-angle-right" aria-
hidden="true"></i></span></a>
</div>
</div>
<?php }} ?>
</div>

<!--Side-Bar-->
<aside class="col-md-3 col-md-pull-9">
<div class="sidebar_widget">
<div class="widget_heading">
<h5><i class="fa fa-filter" aria-hidden="true"></i> Find Your Car </h5>
</div>
<div class="sidebar_filter">
<form action="#" method="get">
<div class="form-group select">
<select class="form-control">
<option>Select Brand</option>

<?php $sql = "SELECT * from tblbrands ";


$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<option value="<?php echo htmlentities($result->id);?>"><?php echo htmlentities($result->BrandName);?></option>
<?php }} ?>

</select>
</div>
<div class="form-group select">
<select class="form-control">
<option>Select Fuel Type</option>
<option value="Petrol">Petrol</option>
<option value="Diesel">Diesel</option>
<option value="CNG">CNG</option>
</select>
</div>

<div class="form-group">
<button type="submit" class="btn btn-block"><i class="fa fa-search" aria-hidden="true"></i> Search Car</button>
</div>
</form>
</div>
</div>

Page | 53
<div class="sidebar_widget">
<div class="widget_heading">
<h5><i class="fa fa-car" aria-hidden="true"></i> Recently Listed Cars</h5>
</div>
<div class="recent_addedcars">
<ul>
<?php $sql = "SELECT tblvehicles.*,tblbrands.BrandName,tblbrands.id as bid from tblvehicles join tblbrands on tblbrands.id=tblvehicles.VehiclesBrand order by id desc limit
4";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>

<li class="gray-bg">
<div class="recent_post_img"> <a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"><img src="admin/img/vehicleimages/<?php
echo htmlentities($result->Vimage1);?>" alt="image"></a> </div>
<div class="recent_post_title"> <a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"><?php echo htmlentities($result->BrandName);?> , <?
php echo htmlentities($result->VehiclesTitle);?></a>
<p class="widget_price">Rs. <?php echo htmlentities($result->PricePerDay);?> Per Day</p>
</div>
</li>
<?php }} ?>

</ul>
</div>
</div>
</aside>
<!--/Side-Bar-->
</div>
</div>
</section>
<!-- /Listing-->

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

<!--Back to top-->
<div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i> </a> </div>
<!--/Back to top-->

<!--Login-Form -->
<?php include('includes/login.php');?>
<!--/Login-Form -->

<!--Register-Form -->
<?php include('includes/registration.php');?>

<!--/Register-Form -->

<!--Forgot-password-Form -->
<?php include('includes/forgotpassword.php');?>

<!-- Scripts -->


<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/interface.js"></script>
<!--Switcher-->
<script src="assets/switcher/js/switcher.js"></script>
<!--bootstrap-slider-JS-->
<script src="assets/js/bootstrap-slider.min.js"></script>
<!--Slider-JS-->
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>

</body>

</html>
5. Search.php
<?php
session_start()
;
include('includes/config.php');
error_reporting(0);
?>

<!DOCTYPE HTML>
<html lang="en">
<head>

<title>Car Rental Portal | Car Listing</title>

Page | 54
<!--Bootstrap -->

Page | 55
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<!--Custome Style -->
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
<!--OWL Carousel slider-->
<link rel="stylesheet" href="assets/css/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/css/owl.transitions.css" type="text/css">
<!--slick-slider -->
<link href="assets/css/slick.css" rel="stylesheet">
<!--bootstrap-slider -->
<link href="assets/css/bootstrap-slider.min.css" rel="stylesheet">
<!--FontAwesome Font Style -->
<link href="assets/css/font-awesome.min.css" rel="stylesheet">

<!-- SWITCHER -->


<link rel="stylesheet" id="switcher-css" type="text/css" href="assets/switcher/css/switcher.css" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/red.css" title="red" media="all" data-default-color="true" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/orange.css" title="orange" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/blue.css" title="blue" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/pink.css" title="pink" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/green.css" title="green" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/purple.css" title="purple" media="all" />

<!-- Fav and touch icons -->


<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-touch-icon-114-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
</head>
<body>

<!-- Start Switcher -->


<?php include('includes/colorswitcher.php');?>
<!-- /Switcher -->

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

<!--Page Header-->
<section class="page-header listing_page">
<div class="container">
<div class="page-header_wrap">
<div class="page-heading">
<h1>Search Result of keyword "<?php echo $_POST['searchdata'];?>"</h1>
</div>
<ul class="coustom-breadcrumb">
<li><a href="#">Home</a></li>
<li>Car Listing</li>
</ul>
</div>
</div>
<!-- Dark Overlay-->
<div class="dark-overlay"></div>
</section>
<!-- /Page Header-->

<!--Listing-->
<section class="listing-page">
<div class="container">
<div class="row">
<div class="col-md-9 col-md-push-3">
<div class="result-sorting-wrapper">
<div class="sorting-count">
<?php
//Query for Listing count
$searchdata=$_POST['searchdata'];
$sql = "SELECT tblvehicles.id from tblvehicles
join tblbrands on tblbrands.id=tblvehicles.VehiclesBrand
where tblvehicles.VehiclesTitle=:search || tblvehicles.FuelType=:search || tblbrands.BrandName=:search || tblvehicles.ModelYear=:search";
$query = $dbh -> prepare($sql);
$query -> bindParam(':search',$searchdata, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=$query->rowCount();
?>
<p><span><?php echo htmlentities($cnt);?> Listings found againt search</span></p>
</div>
</div>

<?php
$sql = "SELECT tblvehicles.*,tblbrands.BrandName,tblbrands.id as bid from
tblvehicles join tblbrands on tblbrands.id=tblvehicles.VehiclesBrand
where tblvehicles.VehiclesTitle=:search || tblvehicles.FuelType=:search || tblbrands.BrandName=:search || tblvehicles.ModelYear=:search";
$query = $dbh -> prepare($sql);

Page | 56
$query -> bindParam(':search',$searchdata, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<div class="product-listing-m gray-bg">
<div class="product-listing-img"><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage1);?>" class="img-responsive" alt="Image" /> </a>
</div>
<div class="product-listing-content">
<h5><a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"><?php echo htmlentities($result->BrandName);?> , <?php echo htmlentities($result-
>VehiclesTitle);?></a></h5>
<p class="list-price">Rs. <?php echo htmlentities($result->PricePerDay);?> Per Day</p>
<ul>
<li><i class="fa fa-user" aria-hidden="true"></i><?php echo htmlentities($result->SeatingCapacity);?> seats</li>
<li><i class="fa fa-calendar" aria-hidden="true"></i><?php echo htmlentities($result->ModelYear);?> model</li>
<li><i class="fa fa-car" aria-hidden="true"></i><?php echo htmlentities($result->FuelType);?></li>
</ul>
<a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>" class="btn">View Details <span class="angle_arrow"><i class="fa fa-angle-right" aria-
hidden="true"></i></span></a>
</div>
</div>
<?php }} ?>
</div>

<!--Side-Bar-->
<aside class="col-md-3 col-md-pull-9">
<div class="sidebar_widget">
<div class="widget_heading">
<h5><i class="fa fa-filter" aria-hidden="true"></i> Find Your Car </h5>
</div>
<div class="sidebar_filter">
<form action="#" method="get">
<div class="form-group select">
<select class="form-control">
<option>Select Brand</option>

<?php $sql = "SELECT * from tblbrands ";


$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<option value="<?php echo htmlentities($result->id);?>"><?php echo htmlentities($result->BrandName);?></option>
<?php }} ?>

</select>
</div>
<div class="form-group select">
<select class="form-control">
<option>Select Fuel Type</option>
<option value="Petrol">Petrol</option>
<option value="Diesel">Diesel</option>
<option value="CNG">CNG</option>
</select>
</div>

<div class="form-group">
<button type="submit" class="btn btn-block"><i class="fa fa-search" aria-hidden="true"></i> Search Car</button>
</div>
</form>
</div>
</div>

<div class="sidebar_widget">
<div class="widget_heading">
<h5><i class="fa fa-car" aria-hidden="true"></i> Recently Listed Cars</h5>
</div>
<div class="recent_addedcars">
<ul>
<?php $sql = "SELECT tblvehicles.*,tblbrands.BrandName,tblbrands.id as bid from tblvehicles join tblbrands on tblbrands.id=tblvehicles.VehiclesBrand order by id desc limit
4";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>

Page | 57
<li class="gray-bg">
<div class="recent_post_img"> <a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"><img src="admin/img/vehicleimages/<?php
echo htmlentities($result->Vimage1);?>" alt="image"></a> </div>
<div class="recent_post_title"> <a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"><?php echo htmlentities($result->BrandName);?> , <?
php echo htmlentities($result->VehiclesTitle);?></a>
<p class="widget_price">Rs. <?php echo htmlentities($result->PricePerDay);?> Per Day</p>
</div>
</li>
<?php }} ?>

</ul>
</div>
</div>
</aside>
<!--/Side-Bar-->
</div>
</div>
</section>
<!-- /Listing-->

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

<!--Back to top-->
<div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i> </a> </div>
<!--/Back to top-->

<!--Login-Form -->
<?php include('includes/login.php');?>
<!--/Login-Form -->

<!--Register-Form -->
<?php include('includes/registration.php');?>

<!--/Register-Form -->

<!--Forgot-password-Form -->
<?php include('includes/forgotpassword.php');?>

<!-- Scripts -->


<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/interface.js"></script>
<!--Switcher-->
<script src="assets/switcher/js/switcher.js"></script>
<!--bootstrap-slider-JS-->
<script src="assets/js/bootstrap-slider.min.js"></script>
<!--Slider-JS-->
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>

</body>

</html>
6. Profile.php
<?php
session_start();
error_reporting(0)
;
include('includes/config.php');
if(strlen($_SESSION['login'])==0)
{
header('location:index.php');
}
else{ if(isset($_POST['updateprofil
e']))
{
$name=$_POST['fullname'];
$mobileno=$_POST['mobilenumber'];
$dob=$_POST['dob'];
$adress=$_POST['address'];
$city=$_POST['city'];
$country=$_POST['country'];
$email=$_SESSION['login'];
$sql="update tblusers set FullName=:name,ContactNo=:mobileno,dob=:dob,Address=:adress,City=:city,Country=:country where EmailId=:email";
$query = $dbh->prepare($sql);
$query->bindParam(':name',$name,PDO::PARAM_STR);
$query->bindParam(':mobileno',$mobileno,PDO::PARAM_STR);
$query->bindParam(':dob',$dob,PDO::PARAM_STR);
$query->bindParam(':adress',$adress,PDO::PARAM_STR);
$query->bindParam(':city',$city,PDO::PARAM_STR);
$query->bindParam(':country',$country,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->execute();
$msg="Profile Updated Successfully";

Page | 58
}

Page | 59
?>
<!DOCTYPE HTML>
<html lang="en">
<head>

<title>Car Rental Portal | My Profile</title>


<!--Bootstrap -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<!--Custome Style -->
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
<!--OWL Carousel slider-->
<link rel="stylesheet" href="assets/css/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/css/owl.transitions.css" type="text/css">
<!--slick-slider -->
<link href="assets/css/slick.css" rel="stylesheet">
<!--bootstrap-slider -->
<link href="assets/css/bootstrap-slider.min.css" rel="stylesheet">
<!--FontAwesome Font Style -->
<link href="assets/css/font-awesome.min.css" rel="stylesheet">

<!-- SWITCHER -->


<link rel="stylesheet" id="switcher-css" type="text/css" href="assets/switcher/css/switcher.css" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/red.css" title="red" media="all" data-default-color="true" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/orange.css" title="orange" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/blue.css" title="blue" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/pink.css" title="pink" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/green.css" title="green" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/purple.css" title="purple" media="all" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-touch-icon-114-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
<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{ padd
ing: 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>

<!-- Start Switcher -->


<?php include('includes/colorswitcher.php');?>
<!-- /Switcher -->

<!--Header-->
<?php include('includes/header.php');?>
<!-- /Header -->
<!--Page Header-->
<section class="page-header profile_page">
<div class="container">
<div class="page-header_wrap">
<div class="page-heading">
<h1>Your Profile</h1>
</div>
<ul class="coustom-breadcrumb">
<li><a href="#">Home</a></li>
<li>Profile</li>
</ul>
</div>
</div>
<!-- Dark Overlay-->
<div class="dark-overlay"></div>
</section>
<!-- /Page Header-->

<?php
$useremail=$_SESSION['login'];
$sql = "SELECT * from tblusers where EmailId=:useremail";
Page | 60
$query = $dbh -> prepare($sql);

Page | 61
$query -> bindParam(':useremail',$useremail, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<section class="user_profile inner_pages">
<div class="container">
<div class="user_profile_info gray-bg padding_4x4_40">
<div class="upload_user_logo"> <img src="assets/images/dealer-logo.jpg" alt="image">
</div>

<div class="dealer_info">
<h5><?php echo htmlentities($result->FullName);?></h5>
<p><?php echo htmlentities($result->Address);?><br>
<?php echo htmlentities($result->City);?>&nbsp;<?php echo htmlentities($result->Country);?></p>
</div>
</div>

<div class="row">
<div class="col-md-3 col-sm-3">
<?php include('includes/sidebar.php');?>
<div class="col-md-6 col-sm-8">
<div class="profile_wrap">
<h5 class="uppercase underline">Genral Settings</h5>
<?php
if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?> </div><?php }?>
<form method="post">
<div class="form-group">
<label class="control-label">Reg Date -</label>
<?php echo htmlentities($result->RegDate);?>
</div>
<?php if($result->UpdationDate!=""){?>
<div class="form-group">
<label class="control-label">Last Update at -</label>
<?php echo htmlentities($result->UpdationDate);?>
</div>
<?php } ?>
<div class="form-group">
<label class="control-label">Full Name</label>
<input class="form-control white_bg" name="fullname" value="<?php echo htmlentities($result->FullName);?>" id="fullname" type="text" required>
</div>
<div class="form-group">
<label class="control-label">Email Address</label>
<input class="form-control white_bg" value="<?php echo htmlentities($result->EmailId);?>" name="emailid" id="email" type="email" required readonly>
</div>
<div class="form-group">
<label class="control-label">Phone Number</label>
<input class="form-control white_bg" name="mobilenumber" value="<?php echo htmlentities($result->ContactNo);?>" id="phone-number" type="text" required>
</div>
<div class="form-group">
<label class="control-label">Date of Birth&nbsp;(dd/mm/yyyy)</label>
<input class="form-control white_bg" value="<?php echo htmlentities($result->dob);?>" name="dob" placeholder="dd/mm/yyyy" id="birth-date" type="text" >
</div>
<div class="form-group">
<label class="control-label">Your Address</label>
<textarea class="form-control white_bg" name="address" rows="4" ><?php echo htmlentities($result->Address);?></textarea>
</div>
<div class="form-group">
<label class="control-label">Country</label>
<input class="form-control white_bg" id="country" name="country" value="<?php echo htmlentities($result->City);?>" type="text">
</div>
<div class="form-group">
<label class="control-label">City</label>
<input class="form-control white_bg" id="city" name="city" value="<?php echo htmlentities($result->City);?>" type="text">
</div>
<?php }} ?>

<div class="form-group">
<button type="submit" name="updateprofile" class="btn">Save Changes <span class="angle_arrow"><i class="fa fa-angle-right"
aria- hidden="true"></i></span></button>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<!--/Profile-setting-->

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

Page | 62
<!--Back to top-->
<div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i> </a> </div>
<!--/Back to top-->

<!--Login-Form -->
<?php include('includes/login.php');?>
<!--/Login-Form -->

<!--Register-Form -->
<?php include('includes/registration.php');?>

<!--/Register-Form -->

<!--Forgot-password-Form -->
<?php include('includes/forgotpassword.php');?>
<!--/Forgot-password-Form -->

<!-- Scripts -->


<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/interface.js"></script>
<!--Switcher-->
<script src="assets/switcher/js/switcher.js"></script>
<!--bootstrap-slider-JS-->
<script src="assets/js/bootstrap-slider.min.js"></script>
<!--Slider-JS-->
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>

</body>
</html>

<?php } ?>
7. Post-testimonial.php
<?php
session_start();
error_reporting(0)
;
include('includes/config.php');
if(strlen($_SESSION['login'])==0)
{
header('location:index.php');
}
else{ if(isset($_POST['submit']
))
{
$testimonoial=$_POST['testimonial'];
$email=$_SESSION['login'];
$sql="INSERT INTO tbltestimonial(UserEmail,Testimonial) VALUES(:email,:testimonoial)";
$query = $dbh->prepare($sql);
$query->bindParam(':testimonoial',$testimonoial,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);

$query->execute();
$lastInsertId = $dbh-
>lastInsertId(); if($lastInsertId)
{
$msg="Testimonail submitted successfully";
}
else
{
$error="Something went wrong. Please try again";
}

}
?>
<!DOCTYPE HTML>
<html lang="en">
<head>

<title>Car Rental Portal |Post testimonial</title>


<!--Bootstrap -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<!--Custome Style -->
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
<!--OWL Carousel slider-->
<link rel="stylesheet" href="assets/css/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/css/owl.transitions.css" type="text/css">
<!--slick-slider -->
<link href="assets/css/slick.css" rel="stylesheet">
<!--bootstrap-slider -->
<link href="assets/css/bootstrap-slider.min.css" rel="stylesheet">
<!--FontAwesome Font Style -->
<link href="assets/css/font-awesome.min.css" rel="stylesheet">

<!-- SWITCHER -->

Page | 63
<link rel="stylesheet" id="switcher-css" type="text/css" href="assets/switcher/css/switcher.css" media="all" />

Page | 64
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/red.css" title="red" media="all" data-default-color="true" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/orange.css" title="orange" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/blue.css" title="blue" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/pink.css" title="pink" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/green.css" title="green" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/purple.css" title="purple" media="all" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-touch-icon-114-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
<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{ padd
ing: 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>

<!-- Start Switcher -->


<?php include('includes/colorswitcher.php');?>
<!-- /Switcher -->

<!--Header-->
<?php include('includes/header.php');?>
<!-- /Header -->
<!--Page Header-->
<section class="page-header profile_page">
<div class="container">
<div class="page-header_wrap">
<div class="page-heading">
<h1>Post Testimonial</h1>
</div>
<ul class="coustom-breadcrumb">
<li><a href="#">Home</a></li>
<li>Post Testimonial</li>
</ul>
</div>
</div>
<!-- Dark Overlay-->
<div class="dark-overlay"></div>
</section>
<!-- /Page Header-->

<?php
$useremail=$_SESSION['login'];
$sql = "SELECT * from tblusers where EmailId=:useremail";
$query = $dbh -> prepare($sql);
$query -> bindParam(':useremail',$useremail, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<section class="user_profile inner_pages">
<div class="container">
<div class="user_profile_info gray-bg padding_4x4_40">
<div class="upload_user_logo"> <img src="assets/images/dealer-logo.jpg" alt="image">
</div>

<div class="dealer_info">
<h5><?php echo htmlentities($result->FullName);?></h5>
<p><?php echo htmlentities($result->Address);?><br>
<?php echo htmlentities($result->City);?>&nbsp;<?php echo htmlentities($result->Country); }}?></p>
</div>
</div>

<div class="row">
<div class="col-md-3 col-sm-3">
Page | 65
<?php include('includes/sidebar.php');?>

Page | 66
<div class="col-md-6 col-sm-8">
<div class="profile_wrap">
<h5 class="uppercase underline">Post a Testimonial</h5>
<?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 }?>
<form method="post">

<div class="form-group">
<label class="control-label">Testimonail</label>
<textarea class="form-control white_bg" name="testimonial" rows="4" required=""></textarea>
</div>

<div class="form-group">
<button type="submit" name="submit" class="btn">Save <span class="angle_arrow"><i class="fa fa-angle-right" aria-hidden="true"></i></span></button>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<!--/Profile-setting-->

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

<!--Back to top-->
<div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i> </a> </div>
<!--/Back to top-->

<!--Login-Form -->
<?php include('includes/login.php');?>
<!--/Login-Form -->

<!--Register-Form -->
<?php include('includes/registration.php');?>

<!--/Register-Form -->

<!--Forgot-password-Form -->
<?php include('includes/forgotpassword.php');?>
<!--/Forgot-password-Form -->

<!-- Scripts -->


<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/interface.js"></script>
<!--Switcher-->
<script src="assets/switcher/js/switcher.js"></script>
<!--bootstrap-slider-JS-->
<script src="assets/js/bootstrap-slider.min.js"></script>
<!--Slider-JS-->
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>

</body>
</html>

<?php } ?>
8. Page.php
<?php
session_start();
error_reporting(0)
;
include('includes/config.php');
?>

<!DOCTYPE HTML>
<html lang="en">
<head>

<title>Car Rental Portal | Page details</title>


<!--Bootstrap -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<!--Custome Style -->
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
<!--OWL Carousel slider-->
<link rel="stylesheet" href="assets/css/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/css/owl.transitions.css" type="text/css">
<!--slick-slider -->
<link href="assets/css/slick.css" rel="stylesheet">
<!--bootstrap-slider -->
<link href="assets/css/bootstrap-slider.min.css" rel="stylesheet">

Page | 67
<!--FontAwesome Font Style -->

Page | 68
<link href="assets/css/font-awesome.min.css" rel="stylesheet">

<!-- SWITCHER -->


<link rel="stylesheet" id="switcher-css" type="text/css" href="assets/switcher/css/switcher.css" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/red.css" title="red" media="all" data-default-color="true" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/orange.css" title="orange" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/blue.css" title="blue" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/pink.css" title="pink" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/green.css" title="green" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/purple.css" title="purple" media="all" />

<!-- Fav and touch icons -->


<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-touch-icon-114-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
</head>
<body>
<<!-- Start Switcher -->
<?php include('includes/colorswitcher.php');?>
<!-- /Switcher -->

<!--Header-->
<?php include('includes/header.php');?>
<?php
$pagetype=$_GET['type'];
$sql = "SELECT type,detail,PageName from tblpages where type=:pagetype";
$query = $dbh -> prepare($sql);
$query->bindParam(':pagetype',$pagetype,PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<section class="page-header aboutus_page">
<div class="container">
<div class="page-header_wrap">
<div class="page-heading">
<h1><?php echo htmlentities($result->PageName); ?></h1>
</div>
<ul class="coustom-breadcrumb">
<li><a href="#">Home</a></li>
<li><?php echo htmlentities($result->PageName); ?></li>
</ul>
</div>
</div>
<!-- Dark Overlay-->
<div class="dark-overlay"></div>
</section>
<section class="about_us section-padding">
<div class="container">
<div class="section-header text-center">

<h2><?php echo htmlentities($result->PageName); ?></h2>


<p><?php echo $result->detail; ?> </p>
</div>
<?php } }?>
</div>
</section>
<!-- /About-us-->

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

<!--Back to top-->
<div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i> </a> </div>
<!--/Back to top-->

<!--Login-Form -->
<?php include('includes/login.php');?>
<!--/Login-Form -->

<!--Register-Form -->
<?php include('includes/registration.php');?>

<!--/Register-Form -->

Page | 69
<!--Forgot-password-Form -->
<?php include('includes/forgotpassword.php');?>
<!--/Forgot-password-Form -->

<!-- Scripts -->


<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/interface.js"></script>
<!--Switcher-->
<script src="assets/switcher/js/switcher.js"></script>
<!--bootstrap-slider-JS-->
<script src="assets/js/bootstrap-slider.min.js"></script>
<!--Slider-JS-->
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>

</body>

<!-- Mirrored from themes.webmasterdriver.net/carforyou/demo/about-us.html by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 16 Jun 2017 07:26:12 GMT -->

</html>
9. My-testimonials.php

<?php
session_start();
error_reporting(0)
;
include('includes/config.php');
if(strlen($_SESSION['login'])==0)
{
header('location:index.php');
}
else{
?>
<!DOCTYPE HTML>
<html lang="en">
<head>

<title>Car Rental Portal | My Testimonials </title>


<!--Bootstrap -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<!--Custome Style -->
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
<!--OWL Carousel slider-->
<link rel="stylesheet" href="assets/css/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/css/owl.transitions.css" type="text/css">
<!--slick-slider -->
<link href="assets/css/slick.css" rel="stylesheet">
<!--bootstrap-slider -->
<link href="assets/css/bootstrap-slider.min.css" rel="stylesheet">
<!--FontAwesome Font Style -->
<link href="assets/css/font-awesome.min.css" rel="stylesheet">

<!-- SWITCHER -->


<link rel="stylesheet" id="switcher-css" type="text/css" href="assets/switcher/css/switcher.css" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/red.css" title="red" media="all" data-default-color="true" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/orange.css" title="orange" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/blue.css" title="blue" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/pink.css" title="pink" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/green.css" title="green" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/purple.css" title="purple" media="all" />

<!-- Fav and touch icons -->


<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-touch-icon-114-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png">
<!-- Google-Font-->
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
</head>
<body>
<?php include('includes/colorswitcher.php');?>
<!-- /Switcher -->

<!--Header-->
<?php include('includes/header.php');?>
<!--Page Header-->
<section class="page-header profile_page">
<div class="container">
<div class="page-header_wrap">
<div class="page-heading">
<h1>My Testimonials</h1>
</div>
<ul class="coustom-breadcrumb">

Page | 70
<li><a href="#">Home</a></li>

Page | 71
<li>My Testimonials</li>
</ul>
</div>
</div>
<!-- Dark Overlay-->
<div class="dark-overlay"></div>
</section>
<!-- /Page Header-->

<?php
$useremail=$_SESSION['login'];
$sql = "SELECT * from tblusers where EmailId=:useremail";
$query = $dbh -> prepare($sql);
$query -> bindParam(':useremail',$useremail, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<section class="user_profile inner_pages">
<div class="container">
<div class="user_profile_info gray-bg padding_4x4_40">
<div class="upload_user_logo"> <img src="assets/images/dealer-logo.jpg" alt="image">
</div>

<div class="dealer_info">
<h5><?php echo htmlentities($result->FullName);?></h5>
<p><?php echo htmlentities($result->Address);?><br>
<?php echo htmlentities($result->City);?>&nbsp;<?php echo htmlentities($result->Country); }}?></p>
</div>
</div>

<div class="row">
<div class="col-md-3 col-sm-3">
<?php include('includes/sidebar.php');?>
<div class="col-md-8 col-sm-8">

<div class="profile_wrap">
<h5 class="uppercase underline">My Testimonials </h5>
<div class="my_vehicles_list">
<ul class="vehicle_listing">
<?php
$useremail=$_SESSION['login'];
$sql = "SELECT * from tbltestimonial where UserEmail=:useremail";
$query = $dbh -> prepare($sql);
$query -> bindParam(':useremail',$useremail, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);

if($cnt=$query->rowCount() > 0)
{
foreach($results as $result)
{ ?>

<li>

<div>
<p><?php echo htmlentities($result->Testimonial);?> </p>
<p><b>Posting Date:</b><?php echo htmlentities($result->PostingDate);?> </p>
</div>
<?php if($result->status==1){ ?>
<div class="vehicle_status"> <a class="btn outline btn-xs active-btn">Active</a>

<div class="clearfix"></div>
</div>
<?php } else {?>
<div class="vehicle_status"> <a href="#" class="btn outline btn-xs">Waiting for approval</a>
<div class="clearfix"></div>
</div>
<?php } ?>
</li>
<?php } } ?>

</ul>

</div>
</div>
</div>
</div>
</div>
</section>
<!--/my-vehicles-->

Page | 72
<<!--Footer -->
<?php include('includes/footer.php');?>
<!-- /Footer-->

<!--Back to top-->
<div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i> </a> </div>

<!-- Scripts -->


<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/interface.js"></script>
<!--Switcher-->
<script src="assets/switcher/js/switcher.js"></script>
<!--bootstrap-slider-JS-->
<script src="assets/js/bootstrap-slider.min.js"></script>
<!--Slider-JS-->
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>

</body>
</html>

<?php } ?>
10. Mybooking.php
<?php
session_start();
error_reporting(0)
;
include('includes/config.php');
if(strlen($_SESSION['login'])==0)
{
header('location:index.php');
}
else{
?><!DOCTYPE HTML>
<html lang="en">
<head>

<title>Car Rental Portal - My Booking</title>


<!--Bootstrap -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<!--Custome Style -->
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
<!--OWL Carousel slider-->
<link rel="stylesheet" href="assets/css/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/css/owl.transitions.css" type="text/css">
<!--slick-slider -->
<link href="assets/css/slick.css" rel="stylesheet">
<!--bootstrap-slider -->
<link href="assets/css/bootstrap-slider.min.css" rel="stylesheet">
<!--FontAwesome Font Style -->
<link href="assets/css/font-awesome.min.css" rel="stylesheet">

<!-- SWITCHER -->


<link rel="stylesheet" id="switcher-css" type="text/css" href="assets/switcher/css/switcher.css" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/red.css" title="red" media="all" data-default-color="true" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/orange.css" title="orange" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/blue.css" title="blue" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/pink.css" title="pink" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/green.css" title="green" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/purple.css" title="purple" media="all" />

<!-- Fav and touch icons -->


<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-touch-icon-114-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png">
<!-- Google-Font-->
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

<!-- Start Switcher -->


<?php include('includes/colorswitcher.php');?>
<!-- /Switcher -->

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

Page | 73
<!--Page Header-->

Page | 74
<!-- /Header -->

<!--Page Header-->
<section class="page-header profile_page">
<div class="container">
<div class="page-header_wrap">
<div class="page-heading">
<h1>My Booking</h1>
</div>
<ul class="coustom-breadcrumb">
<li><a href="#">Home</a></li>
<li>My Booking</li>
</ul>
</div>
</div>
<!-- Dark Overlay-->
<div class="dark-overlay"></div>
</section>
<!-- /Page Header-->

<?php
$useremail=$_SESSION['login'];
$sql = "SELECT * from tblusers where EmailId=:useremail";
$query = $dbh -> prepare($sql);
$query -> bindParam(':useremail',$useremail, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<section class="user_profile inner_pages">
<div class="container">
<div class="user_profile_info gray-bg padding_4x4_40">
<div class="upload_user_logo"> <img src="assets/images/dealer-logo.jpg" alt="image">
</div>

<div class="dealer_info">
<h5><?php echo htmlentities($result->FullName);?></h5>
<p><?php echo htmlentities($result->Address);?><br>
<?php echo htmlentities($result->City);?>&nbsp;<?php echo htmlentities($result->Country); }}?></p>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-3">
<?php include('includes/sidebar.php');?>

<div class="col-md-8 col-sm-8">


<div class="profile_wrap">
<h5 class="uppercase underline">My Booikngs </h5>
<div class="my_vehicles_list">
<ul class="vehicle_listing">
<?php
$useremail=$_SESSION['login'];
$sql = "SELECT tblvehicles.Vimage1 as Vimage1,tblvehicles.VehiclesTitle,tblvehicles.id as
vid,tblbrands.BrandName,tblbooking.FromDate,tblbooking.ToDate,tblbooking.message,tblbooking.Status,tblvehicles.PricePerDay,DATEDIFF(tblbooking.ToDate,tblboo
king.FromDate) as totaldays,tblbooking.BookingNumber from tblbooking join tblvehicles on tblbooking.VehicleId=tblvehicles.id join tblbrands on
tblbrands.id=tblvehicles.VehiclesBrand where tblbooking.userEmail=:useremail";
$query = $dbh -> prepare($sql);
$query-> bindParam(':useremail', $useremail, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>

<li>
<h4 style="color:red">Booking No #<?php echo htmlentities($result->BookingNumber);?></h4>
<div class="vehicle_img"> <a href="vehical-details.php?vhid=<?php echo htmlentities($result->vid);?>"><img src="admin/img/vehicleimages/<?php
echo htmlentities($result->Vimage1);?>" alt="image"></a> </div>
<div class="vehicle_title">

<h6><a href="vehical-details.php?vhid=<?php echo htmlentities($result->vid);?>"> <?php echo htmlentities($result->BrandName);?> , <?php


echo htmlentities($result->VehiclesTitle);?></a></h6>
<p><b>From </b> <?php echo htmlentities($result->FromDate);?> <b>To </b> <?php echo htmlentities($result->ToDate);?></p>
<div style="float: left"><p><b>Message:</b> <?php echo htmlentities($result->message);?> </p></div>
</div>
<?php if($result->Status==1)
{ ?>
<div class="vehicle_status"> <a href="#" class="btn outline btn-xs active-btn">Confirmed</a>
<div class="clearfix"></div>
</div>

Page | 75
<?php } else if($result->Status==2) { ?>
<div class="vehicle_status"> <a href="#" class="btn outline btn-xs">Cancelled</a>
<div class="clearfix"></div>
</div>

<?php } else { ?>


<div class="vehicle_status"> <a href="#" class="btn outline btn-xs">Not Confirm yet</a>
<div class="clearfix"></div>
</div>
<?php } ?>

</li>

<h5 style="color:blue">Invoice</h5>
<table>
<tr>
<th>Car Name</th>
<th>From Date</th>
<th>To Date</th>
<th>Total Days</th>
<th>Rent / Day</th>
</tr>
<tr>
<td><?php echo htmlentities($result->VehiclesTitle);?>, <?php echo htmlentities($result->BrandName);?></td>
<td><?php echo htmlentities($result->FromDate);?></td>
<td> <?php echo htmlentities($result->ToDate);?></td>
<td><?php echo htmlentities($tds=$result->totaldays);?></td>
<td> <?php echo htmlentities($ppd=$result->PricePerDay);?></td>
</tr>
<tr>
<th colspan="4" style="text-align:center;"> Grand Total</th>
<th><?php echo htmlentities($tds*$ppd);?></th>
</tr>
</table>
<hr />
<?php }} else { ?>
<h5 align="center" style="color:red">No booking yet</h5>
<?php } ?>

</ul>
</div>
</div>
</div>
</div>
</div>
</section>
<!--/my-vehicles-->
<?php include('includes/footer.php');?>

<!-- Scripts -->


<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/interface.js"></script>
<!--Switcher-->
<script src="assets/switcher/js/switcher.js"></script>
<!--bootstrap-slider-JS-->
<script src="assets/js/bootstrap-slider.min.js"></script>
<!--Slider-JS-->
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>
</body>
</html>

<?php } ?>
11. Logout.php
<?php
session_start()
;
$_SESSION = array();
if (ini_get("session.use_cookies")) {
$params = session_get_cookie_params();
setcookie(session_name(), '', time() - 60*60,
$params["path"], $params["domain"],
$params["secure"], $params["httponly"]
);
}
unset($_SESSION['login']);
session_destroy(); // destroy
session
header("location:index.php");
?>

Page | 76
12. Contactus.php
<?php
session_start();
error_reporting(0)
;
include('includes/config.php');
if(isset($_POST['send']))
{
$name=$_POST['fullname'];
$email=$_POST['email'];
$contactno=$_POST['contactno'];
$message=$_POST['message'];
$sql="INSERT INTO tblcontactusquery(name,EmailId,ContactNumber,Message) VALUES(:name,:email,:contactno,:message)";
$query = $dbh->prepare($sql);
$query->bindParam(':name',$name,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':contactno',$contactno,PDO::PARAM_STR);
$query->bindParam(':message',$message,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh-
>lastInsertId(); if($lastInsertId)
{
$msg="Query Sent. We will contact you shortly";
}
else
{
$error="Something went wrong. Please try again";
}

}
?>
<!DOCTYPE HTML>
<html lang="en">
<head>

<title>Car Rental|| Contact Us Page</title>


<!--Bootstrap -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<!--Custome Style -->
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
<!--OWL Carousel slider-->
<link rel="stylesheet" href="assets/css/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/css/owl.transitions.css" type="text/css">
<!--slick-slider -->
<link href="assets/css/slick.css" rel="stylesheet">
<!--bootstrap-slider -->
<link href="assets/css/bootstrap-slider.min.css" rel="stylesheet">
<!--FontAwesome Font Style -->
<link href="assets/css/font-awesome.min.css" rel="stylesheet">

<!-- SWITCHER -->


<link rel="stylesheet" id="switcher-css" type="text/css" href="assets/switcher/css/switcher.css" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/red.css" title="red" media="all" data-default-color="true" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/orange.css" title="orange" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/blue.css" title="blue" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/pink.css" title="pink" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/green.css" title="green" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/purple.css" title="purple" media="all" />

<!-- Fav and touch icons -->


<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-touch-icon-114-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
<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{ padd
ing: 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>

Page | 77
</head>
<body>

Page | 78
<<!-- Start Switcher -->
<?php include('includes/colorswitcher.php');?>
<!-- /Switcher -->

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

<!--Page Header-->
<section class="page-header contactus_page">
<div class="container">
<div class="page-header_wrap">
<div class="page-heading">
<h1>Contact Us</h1>
</div>
<ul class="coustom-breadcrumb">
<li><a href="#">Home</a></li>
<li>Contact Us</li>
</ul>
</div>
</div>
<!-- Dark Overlay-->
<div class="dark-overlay"></div>
</section>
<!-- /Page Header-->

<!--Contact-us-->
<section class="contact_us section-padding">
<div class="container">
<div class="row">
<div class="col-md-6">
<h3>Get in touch using the form below</h3>
<?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 }?>
<div class="contact_form gray-bg">
<form method="post">
<div class="form-group">
<label class="control-label">Full Name <span>*</span></label>
<input type="text" name="fullname" class="form-control white_bg" id="fullname" required>
</div>
<div class="form-group">
<label class="control-label">Email Address <span>*</span></label>
<input type="email" name="email" class="form-control white_bg" id="emailaddress" required>
</div>
<div class="form-group">
<label class="control-label">Phone Number <span>*</span></label>
<input type="text" name="contactno" class="form-control white_bg" id="phonenumber" required maxlength="10" pattern="[0-9]+">
</div>
<div class="form-group">
<label class="control-label">Message <span>*</span></label>
<textarea class="form-control white_bg" name="message" rows="4" required></textarea>
</div>
<div class="form-group">
<button class="btn" type="submit" name="send" type="submit">Send Message <span class="angle_arrow"><i class="fa fa-angle-right"
aria- hidden="true"></i></span></button>
</div>
</form>
</div>
</div>
<div class="col-md-6">
<h3>Contact Info</h3>
<div class="contact_detail">
<?php
$pagetype=$_GET['type'];
$sql = "SELECT Address,EmailId,ContactNo from tblcontactusinfo";
$query = $dbh -> prepare($sql);
$query->bindParam(':pagetype',$pagetype,PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<ul>
<li>
<div class="icon_wrap"><i class="fa fa-map-marker" aria-hidden="true"></i></div>
<div class="contact_info_m"><?php echo htmlentities($result->Address);?></div>
</li>
<li>
<div class="icon_wrap"><i class="fa fa-phone" aria-hidden="true"></i></div>
<div class="contact_info_m"><a href="tel:61-1234-567-90"><?php echo htmlentities($result->EmailId); ?></a></div>
</li>
<li>
<div class="icon_wrap"><i class="fa fa-envelope-o" aria-hidden="true"></i></div>
<div class="contact_info_m"><a href="mailto:contact@exampleurl.com"><?php echo htmlentities($result->ContactNo); ?></a></div>

Page | 79
</li>
</ul>
<?php }} ?>
</div>
</div>
</div>
</div>
</section>
<!-- /Contact-us-->

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

<!--Back to top-->
<div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i> </a> </div>
<!--/Back to top-->

<!--Login-Form -->
<?php include('includes/login.php');?>
<!--/Login-Form -->

<!--Register-Form -->
<?php include('includes/registration.php');?>

<!--/Register-Form -->

<!--Forgot-password-Form -->
<?php include('includes/forgotpassword.php');?>
<!--/Forgot-password-Form -->

<!-- Scripts -->


<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/interface.js"></script>
<!--Switcher-->
<script src="assets/switcher/js/switcher.js"></script>
<!--bootstrap-slider-JS-->
<script src="assets/js/bootstrap-slider.min.js"></script>
<!--Slider-JS-->
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>

</body>

<!-- Mirrored from themes.webmasterdriver.net/carforyou/demo/contact-us.html by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 16 Jun 2017 07:26:55 GMT -->

</html>
13. Check-avaialability.php
<?php
require_once("includes/config.php");
// code user email availablity if(!
empty($_POST["emailid"])) {
$email= $_POST["emailid"];
if (filter_var($email, FILTER_VALIDATE_EMAIL)===false) {

echo "error : You did not enter a valid email.";


}
else
{ $sql ="SELECT EmailId FROM tblusers WHERE EmailId=:email";
$query= $dbh -> prepare($sql);
$query-> bindParam(':email', $email, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query -> rowCount() > 0)
{
echo "<span style='color:red'> Email already exists .</span>";
echo "<script>$('#submit').prop('disabled',true);</script>";
} else{

echo "<span style='color:green'> Email available for Registration


.</span>"; echo "<script>$('#submit').prop('disabled',false);</script>";
}
}
}

?>
14. Car-listing.php
<?php
session_start()
;
include('includes/config.php');
Page | 80
error_reporting(0);

Page | 81
?>

<!DOCTYPE HTML>
<html lang="en">
<head>

<title>Car Rental Portal | Car Listing</title>


<!--Bootstrap -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<!--Custome Style -->
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
<!--OWL Carousel slider-->
<link rel="stylesheet" href="assets/css/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/css/owl.transitions.css" type="text/css">
<!--slick-slider -->
<link href="assets/css/slick.css" rel="stylesheet">
<!--bootstrap-slider -->
<link href="assets/css/bootstrap-slider.min.css" rel="stylesheet">
<!--FontAwesome Font Style -->
<link href="assets/css/font-awesome.min.css" rel="stylesheet">

<!-- SWITCHER -->


<link rel="stylesheet" id="switcher-css" type="text/css" href="assets/switcher/css/switcher.css" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/red.css" title="red" media="all" data-default-color="true" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/orange.css" title="orange" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/blue.css" title="blue" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/pink.css" title="pink" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/green.css" title="green" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/purple.css" title="purple" media="all" />

<!-- Fav and touch icons -->


<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-touch-icon-114-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
</head>
<body>

<!-- Start Switcher -->


<?php include('includes/colorswitcher.php');?>
<!-- /Switcher -->

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

<!--Page Header-->
<section class="page-header listing_page">
<div class="container">
<div class="page-header_wrap">
<div class="page-heading">
<h1>Car Listing</h1>
</div>
<ul class="coustom-breadcrumb">
<li><a href="#">Home</a></li>
<li>Car Listing</li>
</ul>
</div>
</div>
<!-- Dark Overlay-->
<div class="dark-overlay"></div>
</section>
<!-- /Page Header-->

<!--Listing-->
<section class="listing-page">
<div class="container">
<div class="row">
<div class="col-md-9 col-md-push-3">
<div class="result-sorting-wrapper">
<div class="sorting-count">
<?php
//Query for Listing count
$sql = "SELECT id from tblvehicles";
$query = $dbh -> prepare($sql);
$query->bindParam(':vhid',$vhid, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=$query->rowCount();
?>
<p><span><?php echo htmlentities($cnt);?> Listings</span></p>
</div>
</div>

Page | 82
<?php $sql = "SELECT tblvehicles.*,tblbrands.BrandName,tblbrands.id as bid from tblvehicles join tblbrands 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)
{ ?>
<div class="product-listing-m gray-bg">
<div class="product-listing-img"><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage1);?>" class="img-responsive" alt="Image" /> </a>
</div>
<div class="product-listing-content">
<h5><a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"><?php echo htmlentities($result->BrandName);?> , <?php echo htmlentities($result-
>VehiclesTitle);?></a></h5>
<p class="list-price">Rs. <?php echo htmlentities($result->PricePerDay);?> Per Day</p>
<ul>
<li><i class="fa fa-user" aria-hidden="true"></i><?php echo htmlentities($result->SeatingCapacity);?> seats</li>
<li><i class="fa fa-calendar" aria-hidden="true"></i><?php echo htmlentities($result->ModelYear);?> model</li>
<li><i class="fa fa-car" aria-hidden="true"></i><?php echo htmlentities($result->FuelType);?></li>
</ul>
<a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>" class="btn">View Details <span class="angle_arrow"><i class="fa fa-angle-right" aria-
hidden="true"></i></span></a>
</div>
</div>
<?php }} ?>
</div>

<!--Side-Bar-->
<aside class="col-md-3 col-md-pull-9">
<div class="sidebar_widget">
<div class="widget_heading">
<h5><i class="fa fa-filter" aria-hidden="true"></i> Find Your Car </h5>
</div>
<div class="sidebar_filter">
<form action="search-carresult.php" method="post">
<div class="form-group select">
<select class="form-control" name="brand">
<option>Select Brand</option>

<?php $sql = "SELECT * from tblbrands ";


$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<option value="<?php echo htmlentities($result->id);?>"><?php echo htmlentities($result->BrandName);?></option>
<?php }} ?>

</select>
</div>
<div class="form-group select">
<select class="form-control" name="fueltype">
<option>Select Fuel Type</option>
<option value="Petrol">Petrol</option>
<option value="Diesel">Diesel</option>
<option value="CNG">CNG</option>
</select>
</div>

<div class="form-group">
<button type="submit" class="btn btn-block"><i class="fa fa-search" aria-hidden="true"></i> Search Car</button>
</div>
</form>
</div>
</div>

<div class="sidebar_widget">
<div class="widget_heading">
<h5><i class="fa fa-car" aria-hidden="true"></i> Recently Listed Cars</h5>
</div>
<div class="recent_addedcars">
<ul>
<?php $sql = "SELECT tblvehicles.*,tblbrands.BrandName,tblbrands.id as bid from tblvehicles join tblbrands on tblbrands.id=tblvehicles.VehiclesBrand order by id desc limit
4";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>

Page | 83
<li class="gray-bg">
<div class="recent_post_img"> <a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"><img src="admin/img/vehicleimages/<?php
echo htmlentities($result->Vimage1);?>" alt="image"></a> </div>
<div class="recent_post_title"> <a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"><?php echo htmlentities($result->BrandName);?> , <?
php echo htmlentities($result->VehiclesTitle);?></a>
<p class="widget_price">Rs. <?php echo htmlentities($result->PricePerDay);?> Per Day</p>
</div>
</li>
<?php }} ?>

</ul>
</div>
</div>
</aside>
<!--/Side-Bar-->
</div>
</div>
</section>
<!-- /Listing-->

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

<!--Back to top-->
<div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i> </a> </div>
<!--/Back to top-->

<!--Login-Form -->
<?php include('includes/login.php');?>
<!--/Login-Form -->

<!--Register-Form -->
<?php include('includes/registration.php');?>

<!--/Register-Form -->

<!--Forgot-password-Form -->
<?php include('includes/forgotpassword.php');?>

<!-- Scripts -->


<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/interface.js"></script>
<!--Switcher-->
<script src="assets/switcher/js/switcher.js"></script>
<!--bootstrap-slider-JS-->
<script src="assets/js/bootstrap-slider.min.js"></script>
<!--Slider-JS-->
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>

</body>

</html>

Page | 84
Admin
1. Index.php
<?php
session_start()
;
include('includes/config.php');
if(isset($_POST['login']))
{
$email=$_POST['username'];
$password=md5($_POST['password']);
$sql ="SELECT UserName,Password FROM admin WHERE UserName=: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['alogin']=$_POST['username'];
echo "<script type='text/javascript'> document.location = 'dashboard.php'; </script>";
} else{

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

?>
<!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="">

<title>Car Rental Portal | Admin Login</title>


<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-social.css">
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/style.css">
</head>

<body>

<div class="login-page bk-img" style="background-image: url(img/login-bg.jpg);">


<div class="form-content">
<div class="container">

Page | 85
<div
class=
"row"
>
<div
class="col-
md-6
offset-3">

Page | 86
<h1 class="text-center text-bold mt-4x" style="color:#fff">Admin | Sign in</h1>
<div class="well row pt-2x pb-3x bk-light">
<div class="col-md-8 col-md-offset-2">
<form method="post">

<label for="" class="text-uppercase text-sm">Your Username </label>


<input type="text" placeholder="Username" name="username" class="form-control mb">

<label for="" class="text-uppercase text-sm">Password</label>


<input type="password" placeholder="Password" name="password" class="form-control mb">

<button class="btn btn-primary btn-block" name="login" type="submit">LOGIN</button>

</form>

<p style="margin-top: 4%" align="center"><a href="../index.php">Back to Home</a> </p>


</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>

2. 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> </head>

Page | 87
rel="stylesheet" href="css/fileinput.min.css">
<meta <!-- Awesome Bootstrap checkbox -->
charset="UTF <link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
-8"> <!-- Admin Stye -->
<meta http- <link rel="stylesheet" href="css/style.css">
equiv="X-
UA-
Compatible"
content="IE=
edge">
<meta
name="viewp
ort"
content="widt
h=device-
width, initial-
scale=1,
minimum-
scale=1,
maximum-
scale=1">
<meta
name="descri
ption"
content="">
<meta
name="author
" content="">
<meta
name="theme
-color"
content="#3e
454c">

<title>Car
Rental Portal |
Admin
Dashboard</ti
tle>

<!-- Font
awesome -->
<link
rel="styleshee
t"
href="css/font
-
awesome.min.
css">
<!--
Sandstone
Bootstrap
CSS -->
<link
rel="styleshee
t"
href="css/boo
tstrap.min.css
">
<!-- Bootstrap
Datatables -->
<link
rel="styleshee
t"
href="css/data
Tables.bootstr
ap.min.css">
<!-- Bootstrap
social button
library -->
<link
rel="styleshee
t"
href="css/boo
tstrap-
social.css">
<!-- Bootstrap
select -->
<link
rel="styleshee
t"
href="css/boo
tstrap-
select.css">
<!-- Bootstrap
file input -->
<link
Page | 88
<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">
<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();
?>
<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>
$query3->execute();
$results3=$query3->fetchAll(PDO::FETCH_OBJ);

<?php
$sql3 ="SELECT id from tblbrands ";
$query3= $dbh -> prepare($sql3);

Page | 89
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-
warning text-light">
<div class="stat-panel
text-center">

Page | 90
$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">
<?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>
</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>
&nbsp ; <i class="fa fa-arrow-right"></i></a>
Page | 91
<a
href="testimonials.p
</div> hp" class="block-
anchor panel-footer
text-center">Full
Detail

Page | 92
</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>

<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 } ?>
3. Logout.php
<?php
session_start()
;
$_SESSION = array();
if (ini_get("session.use_cookies")) {
$params = session_get_cookie_params();
setcookie(session_name(), '', time() - 60*60,
$params["path"], $params["domain"],
$params["secure"], $params["httponly"]
);
}
unset($_SESSION['login']);
session_destroy(); // destroy session
header("location:index.php");
?>

4. Edit-vehicle.php
<?php
session_start();
error_reporting(0)
;
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
Page | 93
}
else{

Page | 94
if(isset($_POST['submit']))
{
$vehicletitle=$_POST['vehicletitle'];
$brand=$_POST['brandname'];
$vehicleoverview=$_POST['vehicalorcview'];
$priceperday=$_POST['priceperday'];
$fueltype=$_POST['fueltype'];
$modelyear=$_POST['modelyear'];
$seatingcapacity=$_POST['seatingcapacity'];
$airconditioner=$_POST['airconditioner'];
$powerdoorlocks=$_POST['powerdoorlocks'];
$antilockbrakingsys=$_POST['antilockbrakingsys'];
$brakeassist=$_POST['brakeassist'];
$powersteering=$_POST['powersteering'];
$driverairbag=$_POST['driverairbag'];
$passengerairbag=$_POST['passengerairbag'];
$powerwindow=$_POST['powerwindow'];
$cdplayer=$_POST['cdplayer'];
$centrallocking=$_POST['centrallocking'];
$crashcensor=$_POST['crashcensor'];
$leatherseats=$_POST['leatherseats'];
$id=intval($_GET['id']);

$sql="update tblvehicles set


VehiclesTitle=:vehicletitle,VehiclesBrand=:brand,VehiclesOverview=:vehicleoverview,PricePerDay=:priceperday,FuelType=:fueltype,ModelYear=:modelyear,Seatin
gCapacity=:seatingcapacity,AirConditioner=:airconditioner,PowerDoorLocks=:powerdoorlocks,AntiLockBrakingSystem=:antilockbrakingsys,BrakeAssist=:brakeassi
st,PowerSteering=:powersteering,DriverAirbag=:driverairbag,PassengerAirbag=:passengerairbag,PowerWindows=:powerwindow,CDPlayer=:cdplayer,CentralLockin
g=:centrallocking,CrashSensor=:crashcensor,LeatherSeats=:leatherseats where id=:id ";
$query = $dbh->prepare($sql);
$query->bindParam(':vehicletitle',$vehicletitle,PDO::PARAM_STR);
$query->bindParam(':brand',$brand,PDO::PARAM_STR);
$query->bindParam(':vehicleoverview',$vehicleoverview,PDO::PARAM_STR);
$query->bindParam(':priceperday',$priceperday,PDO::PARAM_STR);
$query->bindParam(':fueltype',$fueltype,PDO::PARAM_STR);
$query->bindParam(':modelyear',$modelyear,PDO::PARAM_STR);
$query->bindParam(':seatingcapacity',$seatingcapacity,PDO::PARAM_STR);
$query->bindParam(':airconditioner',$airconditioner,PDO::PARAM_STR);
$query->bindParam(':powerdoorlocks',$powerdoorlocks,PDO::PARAM_STR);
$query->bindParam(':antilockbrakingsys',$antilockbrakingsys,PDO::PARAM_STR);
$query->bindParam(':brakeassist',$brakeassist,PDO::PARAM_STR);
$query->bindParam(':powersteering',$powersteering,PDO::PARAM_STR);
$query->bindParam(':driverairbag',$driverairbag,PDO::PARAM_STR);
$query->bindParam(':passengerairbag',$passengerairbag,PDO::PARAM_STR);
$query->bindParam(':powerwindow',$powerwindow,PDO::PARAM_STR);
$query->bindParam(':cdplayer',$cdplayer,PDO::PARAM_STR);
$query->bindParam(':centrallocking',$centrallocking,PDO::PARAM_STR);
$query->bindParam(':crashcensor',$crashcensor,PDO::PARAM_STR);
$query->bindParam(':leatherseats',$leatherseats,PDO::PARAM_STR);
$query->bindParam(':id',$id,PDO::PARAM_STR);
$query->execute();

$msg="Data updated 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">

<title>Car Rental Portal | Admin Edit Vehicle Info</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 -->
Page | 95
<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{ padd
ing: 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">Edit Vehicle</h2>

<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">Basic Info</div>
<div class="panel-body">
<?php if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?> </div><?php } ?>
<?php
$id=intval($_GET['id']);
$sql ="SELECT tblvehicles.*,tblbrands.BrandName,tblbrands.id as bid from tblvehicles join tblbrands on tblbrands.id=tblvehicles.VehiclesBrand where tblvehicles.id=:id";
$query = $dbh -> prepare($sql);
$query-> bindParam(':id', $id, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>

<form method="post" class="form-horizontal" enctype="multipart/form-data">


<div class="form-group">
<label class="col-sm-2 control-label">Vehicle Title<span style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="vehicletitle" class="form-control" value="<?php echo htmlentities($result->VehiclesTitle)?>" required>
</div>
<label class="col-sm-2 control-label">Select Brand<span style="color:red">*</span></label>
<div class="col-sm-4">
<select class="selectpicker" name="brandname" required>
<option value="<?php echo htmlentities($result->bid);?>"><?php echo htmlentities($bdname=$result->BrandName); ?> </option>
<?php $ret="select id,BrandName from tblbrands";
$query= $dbh -> prepare($ret);
//$query->bindParam(':id',$id, PDO::PARAM_STR);
$query-> execute();
$resultss = $query -> fetchAll(PDO::FETCH_OBJ);
if($query -> rowCount() > 0)
{
foreach($resultss as $results)
{
if($results->BrandName==$bdname)
{
continue;
} else{
?>
<option value="<?php echo htmlentities($results->id);?>"><?php echo htmlentities($results->BrandName);?></option>
<?php }}} ?>

</select>
</div>
</div>

<div class="hr-dashed"></div>
<div class="form-group">
<label class="col-sm-2 control-label">Vehical Overview<span style="color:red">*</span></label>
Page | 96
<div class="col-sm-10">
<textarea class="form-control" name="vehicalorcview" rows="3" required><?php echo htmlentities($result->VehiclesOverview);?></textarea>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Price Per Day(in INR)<span style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="priceperday" class="form-control" value="<?php echo htmlentities($result->PricePerDay);?>" required>
</div>
<label class="col-sm-2 control-label">Select Fuel Type<span style="color:red">*</span></label>
<div class="col-sm-4">
<select class="selectpicker" name="fueltype" required>
<option value="<?php echo htmlentities($result->FuelType);?>"> <?php echo htmlentities($result->FuelType);?> </option>

<option value="Petrol">Petrol</option>
<option value="Diesel">Diesel</option>
<option value="CNG">CNG</option>
</select>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Model Year<span style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="modelyear" class="form-control" value="<?php echo htmlentities($result->ModelYear);?>" required>
</div>
<label class="col-sm-2 control-label">Seating Capacity<span style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="seatingcapacity" class="form-control" value="<?php echo htmlentities($result->SeatingCapacity);?>" required>
</div>
</div>
<div class="hr-dashed"></div>
<div class="form-group">
<div class="col-sm-12">
<h4><b>Vehicle Images</b></h4>
</div>
</div>

<div class="form-group">
<div class="col-sm-4">
Image 1 <img src="img/vehicleimages/<?php echo htmlentities($result->Vimage1);?>" width="300" height="200" style="border:solid 1px #000">
<a href="changeimage1.php?imgid=<?php echo htmlentities($result->id)?>">Change Image 1</a>
</div>
<div class="col-sm-4">
Image 2<img src="img/vehicleimages/<?php echo htmlentities($result->Vimage2);?>" width="300" height="200" style="border:solid 1px #000">
<a href="changeimage2.php?imgid=<?php echo htmlentities($result->id)?>">Change Image 2</a>
</div>
<div class="col-sm-4">
Image 3<img src="img/vehicleimages/<?php echo htmlentities($result->Vimage3);?>" width="300" height="200" style="border:solid 1px #000">
<a href="changeimage3.php?imgid=<?php echo htmlentities($result->id)?>">Change Image 3</a>
</div>
</div>

<div class="form-group">
<div class="col-sm-4">
Image 4<img src="img/vehicleimages/<?php echo htmlentities($result->Vimage4);?>" width="300" height="200" style="border:solid 1px #000">
<a href="changeimage4.php?imgid=<?php echo htmlentities($result->id)?>">Change Image 4</a>
</div>
<div class="col-sm-
4"> Image 5
<?php if($result->Vimage5=="")
{
echo htmlentities("File not available");
} else {?>
<img src="img/vehicleimages/<?php echo htmlentities($result->Vimage5);?>" width="300" height="200" style="border:solid 1px #000">
<a href="changeimage5.php?imgid=<?php echo htmlentities($result->id)?>">Change Image 5</a>
<?php } ?>
</div>

</div>
<div class="hr-dashed"></div>
</div>
</div>
</div>
</div>

<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">Accessories</div>

Page | 97
<div class="panel-body">

<div class="form-group">
<div class="col-sm-3">
<?php if($result->AirConditioner==1)
{?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="airconditioner" checked value="1">
<label for="inlineCheckbox1"> Air Conditioner </label>
</div>
<?php } else { ?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="airconditioner" value="1">
<label for="inlineCheckbox1"> Air Conditioner </label>
</div>
<?php } ?>
</div>
<div class="col-sm-3">
<?php if($result->PowerDoorLocks==1)
{?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="powerdoorlocks" checked value="1">
<label for="inlineCheckbox2"> Power Door Locks </label>
</div>
<?php } else {?>
<div class="checkbox checkbox-success checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="powerdoorlocks" value="1">
<label for="inlineCheckbox2"> Power Door Locks </label>
</div>
<?php }?>
</div>
<div class="col-sm-3">
<?php if($result->AntiLockBrakingSystem==1)
{?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="antilockbrakingsys" checked value="1">
<label for="inlineCheckbox3"> AntiLock Braking System </label>
</div>
<?php } else {?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="antilockbrakingsys" value="1">
<label for="inlineCheckbox3"> AntiLock Braking System </label>
</div>
<?php } ?>
</div>
<div class="col-sm-3">
<?php if($result->BrakeAssist==1)
{
?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="brakeassist" checked value="1">
<label for="inlineCheckbox3"> Brake Assist </label>
</div>
<?php } else {?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="brakeassist" value="1">
<label for="inlineCheckbox3"> Brake Assist </label>
</div>
<?php } ?>
</div>

<div class="form-group">
<?php if($result->PowerSteering==1)
{
?>
<div class="col-sm-3">
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="powersteering" checked value="1">
<label for="inlineCheckbox1"> Power Steering </label>
</div>
<?php } else {?>
<div class="col-sm-3">
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="powersteering" value="1">
<label for="inlineCheckbox1"> Power Steering </label>
</div>
<?php } ?>
</div>
<div class="col-sm-3">
<?php if($result->DriverAirbag==1)
{
?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="driverairbag" checked value="1">
<label for="inlineCheckbox2">Driver Airbag</label>

Page | 98
</div>
<?php } else { ?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="driverairbag" value="1">
<label for="inlineCheckbox2">Driver Airbag</label>
<?php } ?>
</div>
<div class="col-sm-3">
<?php if($result->DriverAirbag==1)
{
?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="passengerairbag" checked value="1">
<label for="inlineCheckbox3"> Passenger Airbag </label>
</div>
<?php } else { ?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="passengerairbag" value="1">
<label for="inlineCheckbox3"> Passenger Airbag </label>
</div>
<?php } ?>
</div>
<div class="col-sm-3">
<?php if($result->PowerWindows==1)
{
?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="powerwindow" checked value="1">
<label for="inlineCheckbox3"> Power Windows </label>
</div>
<?php } else { ?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="powerwindow" value="1">
<label for="inlineCheckbox3"> Power Windows </label>
</div>
<?php } ?>
</div>

<div class="form-group">
<div class="col-sm-3">
<?php if($result->CDPlayer==1)
{
?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="cdplayer" checked value="1">
<label for="inlineCheckbox1"> CD Player </label>
</div>
<?php } else {?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="cdplayer" value="1">
<label for="inlineCheckbox1"> CD Player </label>
</div>
<?php } ?>
</div>
<div class="col-sm-3">
<?php if($result->CentralLocking==1)
{
?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="centrallocking" checked value="1">
<label for="inlineCheckbox2">Central Locking</label>
</div>
<?php } else { ?>
<div class="checkbox checkbox-success checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="centrallocking" value="1">
<label for="inlineCheckbox2">Central Locking</label>
</div>
<?php } ?>
</div>
<div class="col-sm-3">
<?php if($result->CrashSensor==1)
{
?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="crashcensor" checked value="1">
<label for="inlineCheckbox3"> Crash Sensor </label>
</div>
<?php } else {?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="crashcensor" value="1">
<label for="inlineCheckbox3"> Crash Sensor </label>
</div>
<?php } ?>
</div>
<div class="col-sm-3">

Page | 99
<?php if($result->CrashSensor==1)
{
?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="leatherseats" checked value="1">
<label for="inlineCheckbox3"> Leather Seats </label>
</div>
<?php } else { ?>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" name="leatherseats" value="1">
<label for="inlineCheckbox3"> Leather Seats </label>
</div>
<?php } ?>
</div>
</div>

<?php }} ?>

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

<button class="btn btn-primary" name="submit" type="submit" style="margin-top:4%">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 } ?>
5. Edit-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'];
$id=$_GET['id'];
$sql="update tblbrands set BrandName=:brand where id=:id";
$query = $dbh->prepare($sql);
$query->bindParam(':brand',$brand,PDO::PARAM_STR);
$query->bindParam(':id',$id,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();

$msg="Brand Update successfully";

}
?>

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

Page | 101
<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>Car Rental Portal | Admin Update 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 -->
<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{ padd
ing: 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">Update Brand</h2>

<div class="row">
<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">Update Brand</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 echo htmlentities($error); ?> </div><?php }


else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?> </div><?php }?>

<?php
$id=$_GET['id'];
$ret="select * from tblbrands where id=:id";
$query= $dbh -> prepare($ret);
$query->bindParam(':id',$id, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query -> rowCount() > 0)
{
foreach($results as $result)
{
?>
Page | 102
<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" value="<?php echo
htmlentities($result->BrandName);?>" name="brand" id="brand"
required>
</div>
</div>
<div class="hr-dashed"></div>

<?php }} ?>

<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> 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 } ?>
6. 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";
}

Page | 103
?>

<!doctype html>

Page | 104
<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>Car 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 -->
<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{ padd
ing: 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">Create Brand</h2>

<div class="row">
<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">Create Brand</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 echo 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">
Page | 105
<div class="col-sm-8 col-sm-offset-4">

Page | 106
<button class="btn btn-primary" name="submit"
type="submit">Submit</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 } ?>
7. Confirmed-booking.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>Car Rental Portal | Confirmed Bookings </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;
Page | 107
margin: 0 0 20px 0;

Page | 108
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{ padd
ing: 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">Confirmed Bookings</h2>

<!-- Zero Configuration Table -->


<div class="panel panel-default">
<div class="panel-heading">Bookings Info</div>
<div class="panel-body">

<table id="zctb" class="display table table-striped table-bordered table-hover" cellspacing="0" width="100%">


<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Booking No.</th>
<th>Vehicle</th>
<th>From Date</th>
<th>To Date</th>
<th>Status</th>
<th>Posting date</th>
<th>Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>#</th>
<th>Name</th>
<th>Booking No.</th>
<th>Vehicle</th>
<th>From Date</th>
<th>To Date</th>
<th>Status</th>
<th>Posting date</th>
<th>Action</th>
</tr>
</tfoot>
<tbody>

<?php

$status=1;
$sql = "SELECT
tblusers.FullName,tblbrands.BrandName,tblvehicles.VehiclesTitle,tblbooking.FromDate,tblbooking.ToDate,tblbooking.message,tblbooking.VehicleId as
vid,tblbooking.Status,tblbooking.PostingDate,tblbooking.id,tblbooking.BookingNumber from tblbooking join tblvehicles on tblvehicles.id=tblbooking.VehicleId
join tblusers on tblusers.EmailId=tblbooking.userEmail join tblbrands on tblvehicles.VehiclesBrand=tblbrands.id where tblbooking.Status=:status";
$query = $dbh -> prepare($sql);
$query -> bindParam(':status',$status, PDO::PARAM_STR);
$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><?php echo htmlentities($result->BookingNumber);?></td>
<td><a href="edit-vehicle.php?id=<?php echo htmlentities($result->vid);?>"><?php
Page | 109
echo htmlentities($result->BrandName);?> , <?php echo htmlentities($result->VehiclesTitle);?></td>

Page | 110
<td><?php echo htmlentities($result->FromDate);?></td>
<td><?php echo htmlentities($result->ToDate);?></td>
<td><?php
if($result->Status==0)
{
echo htmlentities('Not Confirmed yet');
} else if ($result->Status==1) {
echo htmlentities('Confirmed');
}
else{
echo htmlentities('Cancelled');
}
?></
td> <td><?php echo htmlentities($result->PostingDate);?></td>

<td>

<a href="bookig-details.php?bid=<?php echo htmlentities($result->id);?>"> View</a>


</td>

</tr>
<?php $cnt=$cnt+1; }} ?>

</tbody>
</table>

</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 } ?>
8. 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=:password";
$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);
$chngpwd1-> bindParam(':username', $username, PDO::PARAM_STR);
$chngpwd1-> bindParam(':newpassword', $newpassword, PDO::PARAM_STR);
$chngpwd1->execute();

Page | 111
$msg="Your Password succesfully changed";
}
else {

Page | 112
$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>Car 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 -->
<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{ padd
ing: 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>
Page | 113
<div
<form
horizontal"

Page | 114
<?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 }?>
<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">

<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 } ?>
9. Change-image.php
<?php
session_start();
error_reporting(0)
;
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{

Page | 115
// Code for change password

Page | 116
if(isset($_POST['update']))
{
$vimage=$_FILES["img5"]["name"];
$id=intval($_GET['imgid']); move_uploaded_file($_FILES["img5"]["tmp_name"],"img/vehicleimages/".$_FILES["img5"]
["name"]);
$sql="update tblvehicles set Vimage5=:vimage where id=:id";
$query = $dbh->prepare($sql);
$query->bindParam(':vimage',$vimage,PDO::PARAM_STR);
$query->bindParam(':id',$id,PDO::PARAM_STR);
$query->execute();

$msg="Image updated 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">

<title>Car Rental Portal | Admin Update Image 5</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{ padd
ing: 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">Vehicle Image 5 </h2>

<div class="row">
<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">Vehicle Image 5 Details</div>
Page | 117
<div

Page | 118
<form method="post" class="form-horizontal" enctype="multipart/form-data">

<?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 }?>

<div class="form-group">
<label class="col-sm-4 control-label">Current Image5</label>
<?php
$id=intval($_GET['imgid']);
$sql ="SELECT Vimage5 from tblvehicles where tblvehicles.id=:id";
$query = $dbh -> prepare($sql);
$query-> bindParam(':id', $id, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>

<div class="col-sm-8">
<img src="img/vehicleimages/<?php echo htmlentities($result->Vimage5);?>" width="300" height="200" style="border:solid 1px #000">
</div>
<?php }}?>
</div>

<div class="form-group">
<label class="col-sm-4 control-label">Upload New Image 5<span
style="color:red">*</span></label>
<div class="col-sm-8">
<input type="file" name="img5" 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="update"


type="submit">Update</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 } ?
> Footer
<?php
if(isset($_POST['emailsubscibe']))

Page | 119
{
$subscriberemail=$_POST['subscriberemail'];
$sql ="SELECT SubscriberEmail FROM tblsubscribers WHERE SubscriberEmail=:subscriberemail";
$query= $dbh -> prepare($sql);
$query-> bindParam(':subscriberemail', $subscriberemail, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query -> rowCount() > 0)
{
echo "<script>alert('Already Subscribed.');</script>";
}
else{
$sql="INSERT INTO tblsubscribers(SubscriberEmail) VALUES(:subscriberemail)";
$query = $dbh->prepare($sql);
$query->bindParam(':subscriberemail',$subscriberemail,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh-
>lastInsertId(); if($lastInsertId)
{
echo "<script>alert('Subscribed successfully.');</script>";
}
else
{
echo "<script>alert('Something went wrong. Please try again');</script>";
}
}
}
?>

<footer>
<div class="footer-top">
<div class="container">
<div class="row">

<div class="col-md-6">
<h6>About Us</h6>
<ul>

<li><a href="page.php?type=aboutus">About Us</a></li>


<li><a href="page.php?type=faqs">FAQs</a></li>
<li><a href="page.php?type=privacy">Privacy</a></li>
<li><a href="page.php?type=terms">Terms of use</a></li>
<li><a href="admin/">Admin Login</a></li>
</ul>
</div>

<div class="col-md-3 col-sm-6">


<h6>Subscribe Newsletter</h6>
<div class="newsletter-form">
<form method="post">
<div class="form-group">
<input type="email" name="subscriberemail" class="form-control newsletter-input" required placeholder="Enter Email Address" />
</div>
<button type="submit" name="emailsubscibe" class="btn btn-block">Subscribe <span class="angle_arrow"><i class="fa fa-angle-right"
aria- hidden="true"></i></span></button>
</form>
<p class="subscribed-text">*We send great deals and latest auto news to our subscribed users very week.</p>
</div>
</div>
</div>
</div>
</div>
<div class="footer-bottom">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-push-6 text-right">
<div class="footer_widget">
<p>Connect with Us:</p>
<ul>
<li><a href="#"><i class="fa fa-facebook-square" aria-hidden="true"></i></a></li>
<li><a href="#"><i class="fa fa-twitter-square" aria-hidden="true"></i></a></li>
<li><a href="#"><i class="fa fa-linkedin-square" aria-hidden="true"></i></a></li>
<li><a href="#"><i class="fa fa-google-plus-square" aria-hidden="true"></i></a></li>
<li><a href="#"><i class="fa fa-instagram" aria-hidden="true"></i></a></li>
</ul>
</div>
</div>
<div class="col-md-6 col-md-pull-6">
<p class="copy-right">Copyright &copy; 2020 Car Rental Portal. All Rights Reserved</p>
</div>
</div>
</div>
</div>
</footer>

Page | 120
Page | 121
Page | 122
6.2 User interface

Page | 123
6.3 User Car Booking

Page | 124
6.4 Testetimonials

6.5 car booking by user

6.6 Contact form

Page | 125
6.7 Post of testimonial

Page | 126
CHAPTER 7 : ADVANTAGES

Convenient To Use.
Billing and Invoicing.
Vehicle
Management.
Reliability.

Page | 127
CHAPTER 8 : CONCLUSION

Car rental business has emerged with a new goodies compared to the past experience where every
activity concerning /car rental business is limited to a physical location only. Even though the
physical location has not been totally eradicated; the nature of functions and how these functions are
achieved has been reshaped by the power of internet. Nowadays, customers can reserve cars online,
rent car online, and have the car brought to their door step once the customer is a registered member
or go to the office to pick the car.

Page | 128
BIBLIOGRAPHY

https://www.tutorialspoint.com/index.htm
https://www.javatpoint.com
https://www.w3schools.com
https://html.com

Page | 129

You might also like