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

1

PROJECT TITLE

By

NAME
Register No: 15601344

MINI ROJECT REPORT

Submitted to the

FACULTY OF INFROMATION AND COMMUNICATION


ENGINEERING

In partial fulfillment of the requirements


for the award of the degree
of

MASTER OF COMPUTER APPLICATIONS


IN

PAAVAI ENGINEERING COLLEGE


(Autonomous)

ANNA UNIVERSITY
CHENNAI 600 025

Jan, 2022
2

BONAFIDE CERTIFICATE

Certified that this mini project report titled PRJECT TITLE is the bonafide work

of NAME (Reg. No. 15601344) who carried out the project work under my supervision.

Certified further, that to the best of my knowledge the work reported herein does not form

part of any other project report or dissertation on the basis of which a degree or award was

conferred on an earlier occasion on this or any other candidate.

_______________________________ __________________________________

Supervisor Head of the Department

Submitted for the Mini Project Viva-Voce examination held on ____________________

____________________ _____________________

Internal Examiner External Examiner


3

DECLARATION

I affirm that the project work titled PROJECT TITLE being submitted in partial
fulfillment for the award of Master of Computer Application is the original work carried
out by me. It has not formed the part of any other project work submitted for award of any
degree or diploma, either in this or any other University.

Signature of the Candidate,


Student Name,
Register No. 15601344

I certify that the declaration made above by the candidate is true.

Signature of the Guide,


GUIDE NAME
Professor / MCA
4

ABSTRACT

With the increasing number of vehicles finding a parking space in most


metropolitan areas, especially during the rush hours, is difficult for drivers. The idea
behind our web based application is to help the user analyses area’s where parking is
available and number of slots free in that area. Additionally, prior to his expected arrival,
the user can pre-book a slot in the area he desires if it is available this will help the user to
search the parking slot through web based application reservation system where students
can view various parking spaces and select nearby or specific area of their choice to view
whether space is available or not. If the booking space is available, then customer can book
it for specific time slot. The booked space will be marked and will not be available for
anyone else for the specified time. This system provides an additional feature of cancelling
the bookings. Customer can cancel their reserved space anytime. Customer can also view
previous parking booking details using the web portal.
5

ACKNOWLEDGEMENT

First, I would like to thank God almighty for all the blessing he has endowed
upon me and molded me what I am now. I thank my parents Mr.Father Name and
Mrs.Mother Name for their immense love and support.

I really express my sincere thanks to our respected Chairman


Shri.CA.N.V.NATARAJAN, B.Com., FCA., and our beloved correspondent
Smt.N.MANGAI NATARAJAN, M.Sc., for providing all the facilities in our institution.

I am very grateful to Dr. K. K. RAMASAMY, M.E., Ph.D., Director-


Administration, Paavai Engineering College for his continuous support throughout my
course of study.

I am very grateful to Dr. M. PREMKUMAR, M.E., Ph.D., Principal, Paavai


Engineering College for his continuous support throughout my course of study.

I really thank to our Head of Master of Computer Application,


Mr.S.SENTHILVELAN, MCA., ME., Professor, Department of MCA, for his constant
encouragement to do my project well.

I truly thank my internal guide GUIDE NAME Professor, Department of


MCA, for his constant encouragement to do my project well.

I extend my thanks to all my friends for their timely help rendered throughout
the project.
6

TABLE OF CONTENTS

CHAPTER NO. TITLE PAGE NO.

ABSTRACT iv
LIST OF TABLES viii
LIST OF FIGURES ix
LIST OF ABBREVIATIONS x
1 INTRODUCTION 01
1.1 OBJECTIVE 01
2 SYSTEM ANALYSIS 03
2.1 EXISTING SYSTEM 03
2.1.1 Disadvantage 03
2.2 PROPOSED SYSTEM 03
2.2.1 Advantages 03
2.3 FEASIBILITY STUDY 04
2.3.1 Economical Feasibility 04
2.3.2 Technical Feasibility 04
2.3.3 Social Feasibility 04
3 SYSTEM SPECIFICATION 05
3.1 HARDWARE REQUIREMENTS 05
3.2 SOFTWARE REQUIREMENTS 05
4 SOFTWARE DESCRIPTION 06
4.1 FRONT END 06
4.1.1 Feature of PHP 06
4.1.2. Accessing an HTML page 07
4.1.3 Accessing a PHP page 07
4.1.4 Security 09
4.1.5 Benefit of PHP 10
4.2 BACK END 12
4.2.1 What is Data Base? 12
4.2.2 Features of MYSQL 12
7

5 PROJECT DESCRIPTION 14
5.1 PROBLEM DEFINITION 14
5.2 OVERVIEW OF THE PROJECT 14
5.3 MODULE DESCRIPTION 15
5.3.1 Admin Module 15
5.3.2 Staff Module 16
5.3.3 Student Module 16
5.4 USE CASE DIAGRAM 17
5.5 CLASS DIAGRAM 17
5.6 STATE DIAGRAM 18
5.7 DATABASE DESIGN 20
5.8 INPUT DESIGN 24
5.9 OUTPUT DESIGN 24
6 SYSTEM TESTING 25
6.1 WHITE BOX TESTING 25
6.2 BLACK BOX TESTING 26
6.3 UNIT TESTING 26
6.4 ACCEPTANCE TESTING 27
6.5 TEST CASE REPORT 27
7 SYSTEM IMPLEMENTATION 28
8 CONCLUSION AND FUTURE ENHANCEMENT 29
8.1 CONCLUSION 29
8.2 FUTURE ENHANCEMENT 29
APPENDICES 30
APPENDIX I SAMPLE SOURCE CODE 30
APPENDIX II SAMPLE SCREEN SHOTS 36
REFERENCES 50
8

LIST OF TABLE

TABLE NO. TABLE NAME PAGE NO

5.1 Login Table 22

5.2 Department Table 22

5.3 Result Table 22

5.4 Exam Table 23

5.5 Staff Table 23

5.6 Student Table 23


9

LIST OF FIGURES

FIGURE NO. TITLE PAGE NO.

4.1 Accessing an HTML Page 7

4.2 Accessing a PHP Page 7

5.1 Use Case 17

5.2 Class Diagram 17

5.3 State Diagram 18

5.4 Activity Diagram 19

5.5 Deployment Diagram 20


10

LIST OF ABBREVIATION

S.NO. ABBREVIATION EXPANSION

1 XHTML Extensible Hyper Text Markup Language


2 RDBMS Relational Database Management System
3 API Application Programming Interface

4 HTML Hyper Text Markup Language

5 CGI Common Gateway Interface

6 PHP PHP Hypertext Preprocessor

7 XML Extensible Markup Language

8 CSS Cascading Style Sheet

9 SQL Structured Query Language

10 GUI Graphical User Interfaces


11

CHAPTER 1

INTRODUCTION

1.1 OBJECTIVE

We developed this project to book a car on parking 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 hard. This aim of
the project is to automate the work performed in the car parking management system like
generating daily bookings, records of car or cab available for booking, record of routes
available, parking slot for cars for every rout, store record of the customer. Car parking
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.
12

CHAPTER 2

SYSTEM ANALYSIS

2.1 EXISTING SYSTEM

Car parking System will help users to book a car slot for some fee specified. Till
now there was no clear web based UI to help the users to parking the vehicle. They had to
manually rent the vehicle through their offices. It was a difficult task to manage parking
vehicles. Keeping track of all the parking cars was a problem.

2.1.1 Disadvantages

 Gas is in constant price changes, so can be very costly.


 There is traffic congestion on the busiest routes due to the large number of cars..
 In public transportation there is less risk of an accident, technical failure or breakdown
than in car.
 Car parking to very difficult to maintain.

2.2 PROPOSED SYSTEM

Forecasting in Open Car Parks.Web and mobile application the innovative


advantages over other charging stations are the web and mobile application. When a
user registers, all the functions of the system can be managed through the application.
With the application, charging of EV becomes reliable, and the trip less stressful, as the
application allows the user:
 find the nearest parking,
 reserve parking time,
 navigation to the location,
 Easy charging activation,
 Flexible payment system (payment cards, PayPal system…);
 live monitoring of parking during other activities (meeting, shopping, viewing the
show...)
13

2.2.1 Advantages
 Avoided Carbon Emissions
 Improved Public Health
 Complete electrification of public transport system
 Displacing petroleum
 Dynamic pricing
 Better and more efficient Parking

2.3 FEASIBILITY STUDY

The feasibility of the project is analyzed in this phase and business proposal is put
forth with a very general plan for the project and some cost estimates. During system
analysis the feasibility study of the proposed system is to be carried out.

Economical Feasibility, Technical Feasibility, Social Feasibility

2.3.1 Economical Feasibility

This study is carried out to check the economic impact that the system will have on
the organization. The amount of fund that the company can pour into the research and
development of the system is limited. The expenditures must be justified. Thus the
developed system as well within the budget and this was achieved because most of the
technologies used are freely available.

2.3.2 Technical Feasibility

This study is carried out to check the technical feasibility, that is, the technical
requirements of the system. Any system developed must not have a high demand on the
available technical resources. This will lead to high demands on the available technical
resources. This will lead to high demands being placed on the client. The developed system
14

must have a modest requirement, as only minimal or null changes are required for
implementing this system.

2.3.3 Social Feasibility

The aspect of study is to check the level of acceptance of the system by the
user. This includes the process of training the user to use the system efficiently. The user
must not feel threatened by the system, instead must accept it as a necessity. The level of
acceptance by the users solely depends on the methods that are station to educate the user
about the system and to make him familiar with it.

\
15

CHAPTER 3

SYSTEM SPECIFICATION

3.1 HARDWARE REQUIREMENTS

 Processor : Intel processor 3.0 GHz


 RAM : 2GB
 Hard disk : 500 GB
 Compact Disk : 650 Mb
 Keyboard : Standard keyboard
 Mouse : Logitech mouse
 Monitor : 15 inch color monitor

3.2 SOFTWARE REQUIREMENTS

 Front End : PHP


 Back End : MYSQL
 Server : XAMP
 Operating System : Windows OS
 System type : 32-bit or 64-bit Operating System
 IDE : Dreamweaver 8.0
 DLL : Depends upon the title
16

CHAPTER 4

SOFTWARE DESCRIPTION

4.1 FRONT END SOFTWARE

4.1.1 Feature of PHP

PHP: Hypertext Preprocessor (the name is a recursive acronym) is a widely used,


general-purpose scripting language that was originally designed for web development to
produce dynamic web pages. For this purpose, PHP code is embedded into the HTML
source document and interpreted by a web server with a PHP processor module, which
generates the web page document.

As a general-purpose programming language, PHP code is processed by an


interpreter application in command-line mode performing desired operating system
operations and producing program output on its standard output channel. It may also
function as a graphical application. PHP is available as a processor for most modern web
servers and as standalone interpreter on most operating systems and computing platforms.

PHP was originally created by Rasmus Lerdorf in 1995[1] and has been in
continuous development ever since. The main implementation of PHP is now produced by
The PHP Group and serves as the de facto standard for PHP as there is no formal
specification.

PHP is free software released under the PHP License, which is incompatible with
the GNU General Public License (GPL) because restrictions exist regarding the use of the
term PHP.

Hypertext refers to files linked together using hyperlinks, such as HTML


(HyperText Markup Language) files. Preprocessing is executing instructions that modify
the output. Below is a demonstration of the difference between HTML and PHP file.
17

4.1.2 Accessing an HTML Page

Fig 4.1 Accessing an HTML Page

1. Your browser sends a request to that web page's server (computer) for the file
(HTML or image) you wish to view.
2. The web server (computer) sends the file requested back to your computer.
3. Your browser displays the file appropriately.
4. If you request a PHP file (ends with ".php"), the server handles it differently.

4.1.3 Accessing a PHP Page

Fig 4.2. Accessing PHP Page

 Your browser sends a request to that web page's server for the PHP file you wish to
view.
 The web server calls PHP to interpret and perform the operations called for in the
PHP script.
 The web server sends the output of the PHP program back to your computer.
18

 Your browser displays the output appropriately.

PHP originally stood for personal home page. Its development began in 1994 when
the Danish/Greenlandic programmer Rasmus Lerdorf initially created a set of Perl scripts
he called 'Personal Home Page Tools' to maintain his personal homepage, including tasks
such as displaying his résumé and recording how much traffic his page was receiving. He
rewrote these scripts as C programming language Common Gateway Interface (CGI)
binaries, extending them to add the ability to work with web forms and to communicate
with databases and called this implementation 'Personal Home Page/Forms Interpreter' or
PHP/FI. PHP/FI could be used to build simple, dynamic web applications. Lerdorf released
PHP/FI as 'Personal Home Page Tools (PHP Tools) version 1.0' publicly on June 8, 1995,
to accelerate bug location and improve the code. This release already had the basic
functionality that PHP has today. This included Perl-like variables, form handling, and the
ability to embed HTML. The syntax was similar to Perl but was more limited and simpler,
although less consistent. A development team began to form and, after months of work and
beta testing, officially released PHP/FI 2 in November 1997.

A new major version has been under development alongside PHP 5 for several
years. This version was originally planned to be released as PHP 6 as a result of its
significant changes, which included plans for full Unicode support. However, Unicode
support took developers much longer to implement than originally thought, and the
decision was made in March 2010[13] to move the project to a branch, with features still
under development moved to trunk.

Changes in the new code include the removal of register_globals, magic quotes,
and safe mode. The reason for the removals was that register_globals had given way to
security holes, and the use of magic quotes had an unpredictable nature, and was best
avoided. Instead, to escape characters, magic quotes may be replaced with the addslashes()
function, or more appropriately an escape mechanism specific to the database vendor itself
like MySQL_real_escape_string() for MySQL. Functions that will be removed in future
versions and have been deprecated in PHP 5.3 will produce a warning if used.
19

PHP currently does not have native support for Unicode or multibyte strings;
Unicode support is under development for a future version of PHP and will allow strings as
well as class, method, and function names to contain non-ASCII characters.

PHP interpreters are available on both 32-bit and 64-bit operating systems, but on
Microsoft Windows the only official distribution is a 32-bit implementation, requiring
Windows 32-bit compatibility mode while using Internet Information Services (IIS) on a
64-bit Windows platform. As of PHP 5.3.0, experimental 64-bit versions are available for
MS Windows.

4.1.4 Security

The PHP interpreter only executes PHP code within its delimiters. Anything
outside its delimiters is not processed by PHP (although non-PHP text is still subject to
control structures described within PHP code). The most common delimiters are <?php to
open and ?> to close PHP sections. <script language="php"> and </script> delimiters are
also available, as are the shortened forms <? or <?= (which is used to echo back a string or
variable) and ?> as well as ASP-style short forms <% or <%= and %>. While short
delimiters are used, they make script files less portable as support for them can be disabled
in the PHP configuration, and so they are discouraged. The purpose of all these delimiters
is to separate PHP code from non-PHP code, including HTML.

The first form of delimiters, <?php and ?>, in XHTML and other XML documents,
creates correctly formed XML 'processing instructions'. This means that the resulting
mixture of PHP code and other markup in the server-side file is itself well-formed XML.

Variables are prefixed with a dollar symbol and a type does not need to be specified
in advance. Unlike function and class names, variable names are case sensitive. Both
double-quoted ("") and heredoc strings allow the ability to embed a variable's value into
the string. PHP treats newlines as whitespace in the manner of a free-form language
(except when inside string quotes), and statements are terminated by a semicolon.
20

In terms of keywords and language syntax, PHP is similar to most high level
languages that follow the C style syntax. if conditions, for and while loops, and function
returns are similar in syntax to languages such as C, C++, Java and Perl.

4.1.5 Benefit of PHP

Because the server does processing, the output of PHP files changes when its input
changes. For example, most of the pages on the Horticulture site have only two (2) PHP
commands:

 Include the header file that defines the links on the left, the banner, and the quick
links at the top.
 Include the footer file that displays the mission statement and Horticulture contact
information.
 Because including the files is performed every time the PHP file is accessed, when
the header/footer files change, the new content will be immediately updated.

PHP has become the most popular Web programming language not only because it
is free. PHP is a full-fledged programming language (unlike HTML for example, which is
more of a presentation means) and many complex applications can be written it it. Another
benefit of applications written in PHP is that they are fast and if written properly, they
could be pretty secure. There are also tons of ready PHP scripts and functions, which you
can customize to your liking and use in your PHP applications.

Web development is becoming a more prosperous industry lately. Since the Internet
and the computer wave in general are becoming quite lucrative, web development is
becoming a booming industry in which everyone wants to be a part. However, it is also a
very competitive industry since there are many professionals that are quite adept at
programming. Therefore, learning proper PHP development strategies is beneficial. If you
already have prior knowledge of computer language and coding, PHP should come as a
second nature to you.
21

Before building website you need to know which language you are going to use in
a professional looking website. PHP is one of the best and easy to use programming
language as it can be run to any operating system. PHP is free language so that is the huge
advantage of this language. For handling database connections, formatting date, editing
strings, handling emails and all PHP can be very useful. It can be easily extend for some
specific functions that you would like to add in your website. Reliability of this language is
extra ordinary as PHP already runs on millions of servers around the world, which means
that it's powerful enough for even the most demanding situations. It provides web
developers much more liberation in creating website with some of the outstanding features
and they can use regular elements frequently.

PHP can be very much successful for creating Dynamic Websites. PHP
programmers with the use of open source codes benefit from the flexibility of editing,
modifying and updating the source code when there is mandatory.

PHP is based on C++ programming language and the syntax used in PHP is fairly
similar to C, C++. There is huge community of developers who still believes that C/C++ is
still the best programming language. For every website to get reasonable progress it can be
use Content Management System such as Joomla, Word Press etc. here PHP and MySQL
are very helpful in successful CMS running. There are so many IT companies which
provide best quality PHP web development work from India. The reason for Outsourcing
PHP development to India is that it is very cost effective with better quality. In the
professional field of Web and software development services we have achieved great
amount of victory with skilled and experienced PHP programmers.

PHP has been supported by almost every hosting company. PHP can be the best
choice to run an application on Linux based hosting platforms. PHP is a server side
scripting language originally designed to build dynamic websites. Modern web 2.0
applications are largely characterized by mashups and desktop style user interfaces. php is
an excellent choice for interacting with other websites and providing rich user experience.
Simple php commands like curl or fopen allow you to grab data from other websites with
relative ease.
22

4.2 BACK END SOFTWARE

4.2.1 What is Data Base ?

A database is an organized collection of data. A relational database, more


restrictively, is a collection of schemas, tables, queries, reports, views, and other elements.
Database designers typically organize the data to model aspects of reality in a way that
supports processes requiring information, such as (for example) modelling the availability
of rooms in hotels in a way that supports finding a hotel with vacancies.

. A database-management system (DBMS) is a software application that interacts


with end-users, other applications, and the database itself to capture and analyze data. A
general-purpose DBMS allows the definition, creation, querying, update, and
administration of databases.

A database is not generally portable across different DBMSs, but different DBMSs
can interoperate by using standards such as SQL and ODBC or JDBC to allow a single
application to work with more than one DBMS. Computer scientists may classify database-
management systems according to the database models that they support; the most popular
database systems since the 1980s have all supported the relational model - generally
associated with the SQL language.

4.2.2 Features of MySQL

MySQL Introduction

The MySQL database has become the world's most popular open source database
because of its consistent fast performance, high reliability and ease of use. It's used on
every continent -- Yes, even Antarctica! -- by individual Web developers as well as many
of the world's largest and fastest-growing organizations to save time and money powering
their high-volume Web sites, business-critical systems and packaged software.
23

Not only is MySQL the world's most popular open source database, it's also
become the database of choice for a new generation of applications built on the LAMP
stack (Linux, Apache, MySQL, PHP / Perl / Python.) MySQL runs on more than 20
platforms including Linux, Windows, Mac OS, Solaris, HP-UX, IBM AIX, giving you the
kind of flexibility that puts you in control.

Whether you're new to database technology or an experienced developer or DBMS,


MySQL offers a comprehensive range of certified software, support, training and
consulting to make you successful.

MySQL can be built and installed manually from source code, but this can be
tedious so it is more commonly installed from a binary package unless special
customizations are required. On most Linux distributions the package management system
can download and install MySQL with minimal effort, though further configuration is
often required to adjust security and optimization settings.

Though MySQL began as a low-end alternative to more powerful proprietary


databases, it has gradually evolved to support higher-scale needs as well. It is still most
commonly used in small to medium scale single-server deployments, either as a
component in a LAMP based web application or as a standalone database server.

Much of MySQL's appeal originates in its relative simplicity and ease of use, which
is enabled by an ecosystem of open source tools such as phpMyAdmin

There are however limits to how far performance can scale on a single server, so on
larger scales, multi-server MySQL deployments are required to provide improved
performance and reliability. A typical high-end configuration can include a powerful
master database which handles data write operations and is replicated to multiple slaves
that handle all read operations.
24

CHAPTER 5

PROJECT DESCRIPTION

5.1 PROBLEM DEFINITION

Car parking System will help users to book a car slot for some fee specified. Till
now there was no clear web based UI to help the users to parking the vehicle. They had to
manually rent the vehicle through their offices. It was a difficult task to manage parking
vehicles. Keeping track of all the parking cars was a problem.

5.2 OVERVIEW OF THE PROJECT

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 hard. This aim of the project is to automate the work performed in the car parking
management system like generating daily bookings, records of car or cab available for
booking, record of routes available, parking slot for cars for every rout, store record of the
customer. Car parking 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.
25

5.3 MODULE DESCRIPTION

5.3.1 Admin
 Login
 Add Slot Details
 Add User Details
 View Booking Details
 View Payment Details
 Report

5.3.2 User
 User Register
 User Login
 View Slot Details
 Booking
 Cancel
 Payment
 Feedback

Login
The admin can only login in this page. It checks whether the username and
password are correct, if correct allows the administrator to update or view the details else
displays the error message.

Add slot
Add and manage parking slot and locations. Set access rules and visibility
(private/public), monitor usage and consumption.
Add User Details
In this module, admin add the user details like username, mobile number,
password, Location and city.
View payment
Accept payments from customers, generate receipts and reports. PayPal, credit &
debit card and voucher payments are supported out-of-the-box with further payment
options to be added upon request.
26

View Feedback
The admin view can their feedback about the entire process whether it may be
positive or negative and the feedback.

Reports
Administrator is responsible for providing the all reports. The bills provided by
administrator are checked by secretary

Registration
In this module describe the user registration process. User register the information
like a user name, mobile number, mail id, etc.
\
Login
User was registered into this website after that they are receive the notification via
SMS/email id.
Booking

Easy booking via web or mobile application, Authentication with a telephone call
or mobile application allows the ad hoc use of unregistered users (no need to build roaming
systems for users). EV drivers will be able to locate EV charging stations, get step by-step
directions, determine the charger type (Single or DualLevel Port), and view real-time
station status (available, in use, etc.) in our new Advanced dashboards.
Parking locations

This module creates and configures parking lots, sometimes referred to as parking
orbits, Real-time monitoring of parking space availability by facility, level, and single
space. Monitors the occupancy of parking lots and parking garages.
Payment

Accept payments from customers, generate receipts and reports. PayPal, credit &
debit card and voucher payments are supported out-of-the-box with further payment
options to be added upon request.

Feedback

The customer can provide their feedback about the entire process whether it may be
positive or negative and the feedback.
27

5.4 USE CASE DIAGRAM

Vehicle Registration

Vehicle Information

Free Space Updation

Booking
Vehicle User Parking Controller

Entry & Exit Time

Fast-Tag Integration

Notification

Check IN & Check OUT

Parking Space Simulation


28

5.5 CLASS DIAGRAM

Vehicle Users Parking Controllers


Register Vehicle
Information Updation
Book Book
Entry & Exit Time
Fast - Tag Fast-Tag
Notification Notification
Check IN/OUT Timing
Parking Space Parking Space

Vehicle Registration() Vehicle Information()


Vehicle Information() Information Updates()
Bookings() Bookings()
Entry & Exit Timings() Entrey & Exit Time()
Fast - Tag Integration() Fast - Tag Integration()
Notification Details() Notification()
Check IN/OUT Timings() Check IN/OUT Timings()
Parking Space SSimulation() Parking Space Simulation()

Cloud Server
Access
Storage

Access Vehicle Information()


Store Vehicle Information()
29

5.6 STATE DIAGRAM

Vehicle Parking Space


Users Controller

Vehicle Vehicle
Registration Informations

Vehicle Free Space


Information Updation

Booking View Vehicl


Booking

Vehicle Entry Entry & Exit


& Exit Time Timings

Fast Tag Fast Tag


Integration Integrations

Notification Notifications

Check IN / Check IN &


OUT Out Timings

Parking Space
Simulation
30

5.7 DATABASE DESIGN

A “database” is an aggregation of data in contiguous location in some organized


fashion.

These data are stored in the rows and columns form called table. Thus, a collection
of all tables with their inter relationship could be termed a database.

Types of database

Various data modules are used to represent the data and each one is treated in
different manners to stored and retrieve data. The various types of data modules are
Hierarchical model, Network model, Relationship model

Hierarchical model

In a hierarchical data model the records have a parent child relationship. It is stored
together as a logical unit to create a relationship between these two units one unit must be
considered as parent has many children but child has only one parent. This type of model is
called as hierarchical model.

Network model

The network model allows any unit can be related to other multiple units through
fixed relationship. Age of this network model is that the database does not have fixed
structure. This type of model is called network model is network model.

Relationship model

A relational model stores closely related data in logical unit called tables. It is
represented the in forma of o9f rows and columns. There is no fixed relationship among
31

the tables and no parent child relationship. This type of model is more advantage to get
information from the tables.

5.8 INPUT DESIGN

Input design is the process of converting user-originated inputs to a computer-based


format. Input design is one of the most expensive phases of the operation of computerized
system and is often the major problem of a system.

In the project, the input design is made in various web forms with various methods.
For example, in the Admin form, the empty username and password is not allowed. The
username if exists in the database, the input is considered to be invalid and is not accepted.

It is important to design appropriate data input methods to prevent errors while


entering data. These methods depend on whether the data is entered by customers in forms
manually and later entered by data entry operators, or data is directly entered by users

5.9 OUTPUT DESIGN

The design of output is the most important task of any system. During output
design, developers identify the type of outputs needed, and consider the necessary output
controls and prototype report layouts.

Output design generally refers to the results and information that are generated by
the system for many end-users; output is the main reason for developing the system and the
basis on which they evaluate the usefulness of the application. In the project, if the
employee has to communicate with other employees they can communicate through send
and receive message.
32

CHAPTER 6

SYSTEM TESTING

System Testing
Testing is the stage of implementation of which aimed at ensuring that the system
works accurately and efficiently before live operation commences. Testing is vital to the
success of the system. System testing makes a logical assum

ption that if all the parts of the system


are correct the goal will be achieved. The candidates system subject to a variety of tests.
Online response, volume, stress, recovery, security and usability tests. A series of testing
are performed for the proposed system before the system is ready for user acceptance
testing.

6.1 WHITE BOX TESTING

White box testing assumes that the specific logic is important and must be tested to
guarantee the system proper functioning. The main use of t6he white box id the error based
33

testing. In a white box testing, the bugs are looked for that has a low probability of
execution that have been overlooked previously. It is also known as path testing.
 API testing – testing of the application using public and private APIs.
 Code coverage – creating tests to satisfy some criteria of code coverage
Fault injection methods – introducing faults to gauge the efficacy of testing
strategies
 Mutation testing methods
 Static testing methods

White box testing assumes that the specific logic is important and must be tested to
guarantee the systems proper functioning. The main use of the white box id the error based
testing.

6.2 BLACK BOX TESTING

Black box testing also called behavioral testing, focuses on the functional
requirements of software. This testing approach enables the software engineer to drive the
input conditions that will fully exercise all requirements for a program.

 Incorrect or missing functions


 Interface errors
 Errors in data structures or external database access
 Behavior or performance errors
 Initialization and termination errors

6.3 UNIT TESTING

The procedure level testing is made first. By giving improper inputs, the errors
occurred are noted and eliminated .Then the web form level is made.
34

The first level of test is unit testing. The purpose of unit testing is to ensure that
each program is fully tested. The second step is integration testing. In this individual
program units or program are integrated and tested as a complete system to ensure that the
software requirements are met.

This testing is based on individual software components or modules. It done by the


programmer and not by testers, as it requires detailed knowledge of the internal program
design and code. Unit tests are created by programmers or occasionally by white box
tasters during the development process. 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. Unit
tests find problems early in the development cycle.

6.4 ACCEPTANCE TESTING


Acceptance testing can be defined in many ways, but a simple definition is the
succeeds when the software functions in a manner that can be reasonable expected by the
customer. After the acceptance test has been conducted, one of the two possible conditions
exists. This is to fine whether the inputs are accepted by the database or other validations.
For example accept only numbers in the numeric field, date format data in the date field.
Also the null check for the not null fields.
35

6.5 TEST CASE REPORT

Test Case Data Set Name Input Records Output Records


1 Admin Login admin admin
2 User Login s1 123456
36

CHAPTER 7

SYSTEM IMPLEMENTATION

After the system has been tested, the implementation type or the change over
technique from the existing system to the new system is a step-by-step process. In the
system at first only a module of the system is implemented and checked for suitability and
efficiency. When the end user related to the particular module is satisfied with the
performance, the next step of implementation is preceded.

Implementation to some extent is also done in parallel. For instance, modules


which are not linked, with other modules are implemented in parallel and the training is the
step-by-step process. Backups are necessary, because unexpected events may happen at
any time. This helps to recover the original status of the records from any accidental
updating and intentional deletion of records.

Software implementation method is a systematically structured approach to


effectively integrate software based on the service or component into workflow of an
organizational structure or an individual end-user. The proposed system was implemented
in a single phase.

The implementation step consists of


 Making necessary changes to the system as desired by the user
 Training the user personnel to the implementation by means of software
demonstration.
 The project will be fruitful only if the application is properly implemented
according to the plans made
37

CHAPTER 8

CONCLUSIONS AND FUTURE ENHANCEMENTS

8.1 CONCLUSION

Site Design for parking offers context for how to design parking stations in a
variety of parking facility types. It provides background on the underlying parking facility
design and function. Additionally, it demonstrates how to create convenient and safe
Parking stations. Every parking design will offer a different set of issues. The design
templates shown in Section 5 provide examples that can be adapted to address a range of
physical conditions.

8.2 FUTURE ENHANCEMENT

In future work, we will detail and develop this new adaptable self-organization
protocol for wireless sensor networks by performing simulations in order to demonstrate its
strength by comparing it with other existing self-organization protocols.
The future aspects of IoV is bright with the assumption that the aforementioned
challenges and issues would be resolved. A summarized view of the evolution of vehicular
communication is depicted in for making a clear picture of IoV ahead. IoV would bring
novel features in every field of automobile right from the manufacturing up to the customer
experience. Some of these features of future vehicular communications are introduced
below
Online Vehicle
Each vehicle would be online right from the completion of manufacturing up
to the usage by customers. Most of the services related to vehicle would be available
online. The services include status of vehicles, annual inspection report by authority, road
tax payment status, repair or service history, etc. The management cost of vehicle would be
drastically reduced. This is due to the online availability and timely intimation of service
related information.
38

Global Internet ID

Each vehicle would have a uniquely identifiable number in Internet which is a


prerequisite for online presence of vehicles. Inspite of deficiencies, GPS based
identification is started by various organizations of GOVTs for enhancing safety in public
transport. The global Internet ID would eliminate the need of GPS based vehicle
identification approach. The issues related to the accountability in accidents, fasciations in
registration and unauthorized modification would be addressed with more credibility.
Black box in vehicle kind of service would be made possible with the inclusion of global
Internet
39

APPENDICES
APPENDIX I
SAMPLE SOURCE CODE

Index
<?php
session_start();
include("include/dbconnect.php");
extract($_REQUEST);
$msg="";
$uname=$_SESSION['uname'];
$q1=mysql_query("select * from ev_station where id=$id");
$r1=mysql_fetch_array($q1);
$num=$r1['num_charger'];
$station=$r1['uname'];
$stname=$r1['name'];

//get time after 15 minutes


//$selectedTime="11:50 PM";
//$endTime = strtotime("+15 minutes",strtotime($selectedTime));
//$ss=date('h:i A', $endTime);
//echo $ss;

//find time between 2 times


/*$current_time = "05:20 PM";
$sunrise = "04:50 PM";
$sunset = "05:20 PM";
$date1 = DateTime::createFromFormat('H:i a', $current_time);
$date2 = DateTime::createFromFormat('H:i a', $sunrise);
$date3 = DateTime::createFromFormat('H:i a', $sunset);
if ($date1 >= $date2 && $date1 < $date3)
{
40

echo 'here';
}
else
{
echo "av";
}*/

if(isset($btn))
{
$q3=mysql_query("select * from ev_booking where carno='$carno'");
$n3=mysql_num_rows($q3);
if($n3>0)
{
$r3=mysql_fetch_array($q3);
$cimage=$r3['cimage'];
}
else
{
$rn=rand(1,10);
$cimage="c".$rn.".jpg";
}

$rdate=date("d-m-Y");
$ch1=mktime(date('h')+4,date('i')+30,date('s'));
$rtime=date('H:i:s',$ch1);

//get time after 15 minutes


//$selectedTime=$rtime;
// $endTime = strtotime("+30 minutes",strtotime($selectedTime));
// $etime=date('h:i A', $endTime);
//echo $et;
$x=0;
41

$q2=mysql_query("select * from ev_booking where station=$id && slot=$slot &&


rdate='$rdate' && status=1");
$n2=mysql_num_rows($q2);
/*if($n2>0)
{
while($r2=mysqli_fetch_array($q2))
{
$current_time = $rtime;
$sunrise = $r2['rtime'];
$sunset = $r2['etime'];
$date1 = DateTime::createFromFormat('H:i a', $current_time);
$date2 = DateTime::createFromFormat('H:i a', $sunrise);
$date3 = DateTime::createFromFormat('H:i a', $sunset);
if ($date1 >= $date2 && $date1 < $date3)
{
$x++;
}
else
{

}
} */

if($n2==0)
{
$mq=mysql_query("select max(id) from ev_booking");
$mr=mysql_fetch_array($mq);
$bid=$mr['max(id)']+1;
$exe=mysql_query("insert into
ev_booking(id,uname,station,carno,reserve,slot,cimage,mins,plan,amount,rtime,etime,rdate
42

,otp,pay_st,status)
values($bid,'$uname','$id','$carno','1','$slot','$cimage','0','','','$rtime','','$rdate','','0','1')");

?>
<script language="javascript">
alert("Booked Successfully");
window.location.href="slot.php?id=<?php echo $id; ?>";
</script>
<?php

}
else
{
?>
<script language="javascript">
alert("Already Booked in this Slot!");
</script>
<?php
}
}
?>
<!DOCTYPE html>
<html lang="en">

<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Colorlib Templates">
<meta name="author" content="Colorlib">
<meta name="keywords" content="Colorlib Templates">
43

<!-- Title Page-->


<title><?php include("include/title.php"); ?></title>

<!-- Icons font CSS-->


<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet"
media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet"
media="all">
<!-- Font special for pages-->
<!--<link href="https://fonts.googleapis.com/css?
family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i" rel="stylesheet">-->

<!-- Vendor CSS-->


<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/datepicker/daterangepicker.css" rel="stylesheet" media="all">

<!-- Main CSS-->


<link href="css/main.css" rel="stylesheet" media="all">
<link href="css/style_menu.css" rel="stylesheet" media="all">
<style type="text/css">
<!--
.style2 {color: #009900}
-->
</style>
</head>

<body>
<?php include("include/link_user.php"); ?>

<div class="page-wrapper bg-gra-03 p-t-45 p-b-50">


<div class="wrapper wrapper--w790">
44

<div class="card card-5">

<div style="padding-left:20px">
<br>
<h3>User: <?php echo $uname; ?></h3>
</div>
<div class="card-body">
<form method="POST">
<div class="form-row">
<div class="name">Car No.</div>
<div class="value">
<div class="input-group">
<input class="input--style-5" type="text" name="carno">
</div>
</div>
</div>

<div>
<input type="submit" name="btn" class="btn btn--radius-2 btn--red" value="Booking" />
</div>
</form>
</div>
</div>
</div>
</div>

<!-- Jquery JS-->


<script src="vendor/jquery/jquery.min.js"></script>
45

<!-- Vendor JS-->


<script src="vendor/select2/select2.min.js"></script>
<script src="vendor/datepicker/moment.min.js"></script>
<script src="vendor/datepicker/daterangepicker.js"></script>

<!-- Main JS-->


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

</body><!-- This templates was made by Colorlib (https://colorlib.com) -->

</html>
<!-- end document-->
History
<?php
session_start();
include("include/dbconnect.php");
extract($_REQUEST);
$msg="";
$uname=$_SESSION['uname'];
$qry=mysql_query("select * from ev_booking where uname='$uname' order by id desc");

if(isset($_REQUEST['act'])=="cancel")
{

$bid=$_REQUEST['bid'];
mysql_query("update ev_booking set charge_st=0 where id=$bid");
?>
<script language="javascript">
window.location.href="history.php";
</script>
<?php
}
46

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

<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Colorlib Templates">
<meta name="author" content="Colorlib">
<meta name="keywords" content="Colorlib Templates">

<!-- Title Page-->


<title><?php include("include/title.php"); ?></title>

<!-- Icons font CSS-->


<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet"
media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet"
media="all">
<!-- Font special for pages-->
<!--<link href="https://fonts.googleapis.com/css?
family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i" rel="stylesheet">-->

<!-- Vendor CSS-->


<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/datepicker/daterangepicker.css" rel="stylesheet" media="all">

<!-- Main CSS-->


<link href="css/main.css" rel="stylesheet" media="all">
<link href="css/style_menu.css" rel="stylesheet" media="all">
</head>
47

<body>
<?php include("include/link_user.php"); ?>
<div class="page-wrapper bg-gra-03 p-t-45 p-b-50">
<div class="wrapper wrapper--w790">
<div class="card card-5">
<div style="padding-left:100px">
<br><h3>User: <?php echo $uname; ?></h3>
<table width="80%" border="1" align="center" cellpadding="5" cellspacing="0">
<tr>
<th width="5%" align="left">Sno</th>
<th width="34%" align="left">Station</th>
<th width="20%" align="left">Slot No. </th>
<th width="21%" align="left">IN Time </th>
<th width="20%" align="left">OUT Time </th>
<th width="20%" align="left">Details</th>
</tr>
<?php
$i=0;
while($row=mysql_fetch_array($qry))
{
$i++;
$q1=mysql_query("select * from ev_station where id='".$row['station']."'");
$r1=mysql_fetch_array($q1);
?>
<tr>
<td align="left"><?php echo $i; ?></td>
<td align="left"><?php echo '<a href="map.php?lat='.$r1['lat'].'&lon='.$r1['lon'].'"
target="_blank">'.$r1['name'].", ".$r1['area'].", ".$r1['city'].'</a>'; ?></td>
<td align="left"><?php echo $row['slot']; ?></td>
<td align="left"><?php
echo $row['rdate']." ".$row['rtime'];
?></td>
<td align="left"><?php echo $row['edate']." ".$row['etime']; ?></td>
48

<td align="left"><?php

if($row['pay_st']=="2")
{
echo "<br>Amount: Rs. ".$row['amount']."(Paid)";
}
else
{
echo "Parking";
}
?></td>
</tr>
<?php
}
?>
</table>
</div>
<div class="card-body">

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

<!-- Jquery JS-->


<script src="vendor/jquery/jquery.min.js"></script>
<!-- Vendor JS-->
<script src="vendor/select2/select2.min.js"></script>
<script src="vendor/datepicker/moment.min.js"></script>
<script src="vendor/datepicker/daterangepicker.js"></script>

<!-- Main JS-->


49

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

</body><!-- This templates was made by Colorlib (https://colorlib.com) -->

</html>
<!-- end document-->
Home
<?php
session_start();
include("include/dbconnect.php");
extract($_REQUEST);
$msg="";
$uname=$_SESSION['uname'];
$qry=mysql_query("select * from ev_station where uname='$uname'");
$row=mysql_fetch_array($qry);
?>
<!DOCTYPE html>
<html lang="en">

<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Colorlib Templates">
<meta name="author" content="Colorlib">
<meta name="keywords" content="Colorlib Templates">

<!-- Title Page-->


<title><?php include("include/title.php"); ?></title>

<!-- Icons font CSS-->


<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet"
media="all">
50

<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet"


media="all">
<!-- Font special for pages-->
<!--<link href="https://fonts.googleapis.com/css?
family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i" rel="stylesheet">-->

<!-- Vendor CSS-->


<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/datepicker/daterangepicker.css" rel="stylesheet" media="all">

<!-- Main CSS-->


<link href="css/main.css" rel="stylesheet" media="all">
<link href="css/style_menu.css" rel="stylesheet" media="all">
</head>

<body>
<?php include("include/link_station.php"); ?>
<div class="page-wrapper bg-gra-03 p-t-45 p-b-50">
<div class="wrapper wrapper--w790">
<div class="card card-5">
<div style="padding-left:100px">
<br>
<h3>Parking Station: <?php echo $uname; ?></h3>
<table width="80%" border="1" align="center" cellpadding="5" cellspacing="0">
<tr>
<td width="50%" align="left">Energy Station </td>
<td width="50%" align="left"><?php echo $row['name']; ?></td>
</tr>
<tr>
<td align="left">Area</td>
<td align="left"><?php echo $row['area']; ?></td>
</tr>
<tr>
51

<td align="left">City</td>
<td align="left"><?php echo $row['city']; ?></td>
</tr>
<tr>
<td align="left">Number of Vehicle Charger </td>
<td align="left"><?php echo $row['num_charger']; ?></td>
</tr>
<tr>
<td align="left">Location</td>
<td align="left"><a href="#">View Map </a></td>
</tr>
<tr>
<td height="22" colspan="2" align="center"><a href="#">Edit</a></td>
</tr>
</table>
</div>
<div class="card-body">

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

<!-- Jquery JS-->


<script src="vendor/jquery/jquery.min.js"></script>
<!-- Vendor JS-->
<script src="vendor/select2/select2.min.js"></script>
<script src="vendor/datepicker/moment.min.js"></script>
<script src="vendor/datepicker/daterangepicker.js"></script>

<!-- Main JS-->


<script src="js/global.js"></script>
52

</body><!-- This templates was made by Colorlib (https://colorlib.com) -->

</html>
<!-- end document-->
Login
<?php
session_start();
include("include/dbconnect.php");
extract($_REQUEST);
$msg="";
if(isset($btn))
{
$qry="select * from ev_station where uname='$uname' && pass='$pass'";
$result=mysql_query($qry);

if(mysql_num_rows($result)>0)
{
$_SESSION['uname']=$uname;
header("location:home.php");
}
else
{
$msg="Invalid Username or Password!";
}
}

?>
Login2
<?php
session_start();
include("include/dbconnect.php");
extract($_REQUEST);
53

$msg="";
if(isset($btn))
{
$qry="select * from ev_admin where username='$uname' && password='$pass'";
$result=mysql_query($qry);

if(mysql_num_rows($result)>0)
{
$_SESSION['uname']=$uname;
header("location:admin.php");
}
else
{
$msg="Invalid Username or Password!";
}
}

?>
Payment
<?php
session_start();
include("include/dbconnect.php");
extract($_REQUEST);
$msg="";
$uname=$_SESSION['uname'];
$q1=mysql_query("select * from ev_register where uname='$uname'");
$r1=mysql_fetch_array($q1);

$q2=mysql_query("select * from ev_booking where id=$bid");


$r2=mysql_fetch_array($q2);
$n2=mysql_num_rows($q2);
$station=$r2['station'];
54

$edate=date("d-m-Y");
$ch1=mktime(date('h')+4,date('i')+30,date('s'));
$etime=date('H:i:s',$ch1);

mysql_query("update ev_booking set edate='$edate',etime='$etime' where id=$bid");

$sq1=mysql_query("select * from ev_booking where id=$bid");


$sr1=mysql_fetch_array($sq1);
$rdt=$sr1['rdate'];
$edt=$sr1['edate'];
$rt=$sr1['rtime'];
$et=$sr1['etime'];
$rddd=$rdt." ".$et;
$eddd=$edt." ".$et;

$thour=(strtotime($edt)-strtotime($rdt))/(60*60*24);
$perday=$thour+1;
$park_cost=$perday*20;

if($r2['charge']>0)
{
$amount=$r2['charge'];
}
else
{
$amount=$park_cost;
}
55

mysql_query("update ev_booking set amount=$amount where id=$bid");

if(isset($btn))
{
$otp=rand(1000,9999);
if($pay_mode=="Bank")
{

mysql_query("update ev_booking set pay_mode='$pay_mode',sms_st=1,otp='$otp' where


id=$bid");

?>
<script language="javascript">
window.location.href="verify_otp.php?bid=<?php echo $bid; ?>";
</script>
<?php
}
else
{
mysql_query("update ev_booking set pay_mode='$pay_mode',pay_st=1 where id=$bid");
?>
<script language="javascript">
alert("Wait for Payment Process");
window.location.href="slot.php?id=<?php echo $station; ?>";
</script>
<?php
}
}
?>
<!DOCTYPE html>
<html lang="en">
56

<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Colorlib Templates">
<meta name="author" content="Colorlib">
<meta name="keywords" content="Colorlib Templates">

<!-- Title Page-->


<title><?php include("include/title.php"); ?></title>

<!-- Icons font CSS-->


<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet"
media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet"
media="all">
<!-- Font special for pages-->
<!--<link href="https://fonts.googleapis.com/css?
family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i" rel="stylesheet">-->

<!-- Vendor CSS-->


<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/datepicker/daterangepicker.css" rel="stylesheet" media="all">

<!-- Main CSS-->


<link href="css/main.css" rel="stylesheet" media="all">
<link href="css/style_menu.css" rel="stylesheet" media="all">
<style type="text/css">
<!--
.style2 {color: #009900}
-->
</style>
<script language="javascript">
57

function checkMode()
{
if(document.form1.pay_mode.value=="Bank")
{
document.getElementById("x1").style.display="block";
}
else
{
document.getElementById("x1").style.display="none";
}
}
</script>
</head>

<body>
<?php include("include/link_user.php"); ?>

<div class="page-wrapper bg-gra-03 p-t-45 p-b-50">


<div class="wrapper wrapper--w790">
<div class="card card-5">
<div class="card-heading">
<h2 class="title">Payment</h2>
</div>
<div style="padding-left:20px">
<br>
<h3>User: <?php echo $uname; ?></h3>
</div>
<div class="card-body">
<form method="POST" name="form1">
<div class="form-row">
<div class="name">Pay By</div>
<div class="value">
58

<div class="input-group">
<select name="pay_mode" onChange="checkMode()">
<option value="">-Pay Mode-</option>
<option value="Bank">Bank</option>
<option value="Cash">Cash</option>
</select>

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

<div class="form-row" id="x1" style="display:none">


<div class="name">Card No.</div>
<div class="value">
<div class="input-group">
<input class="input--style-5" type="text" name="card" readonly="" value="<?php echo
$r1['card']; ?>">
</div>
</div>
</div>

<div class="form-row">
<div class="name">Amount</div>
<div class="value">
<div class="input-group">
Rs. <?php echo $amount; ?>
</div>
</div>
</div>

<div>
<input type="submit" name="btn" class="btn btn--radius-2 btn--red" value="Payment" />
59

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

<!-- Jquery JS-->


<script src="vendor/jquery/jquery.min.js"></script>
<!-- Vendor JS-->
<script src="vendor/select2/select2.min.js"></script>
<script src="vendor/datepicker/moment.min.js"></script>
<script src="vendor/datepicker/daterangepicker.js"></script>

<!-- Main JS-->


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

</body><!-- This templates was made by Colorlib (https://colorlib.com) -->

</html>
<!-- end document-->
Reg_station
<?php
include("include/dbconnect.php");
extract($_REQUEST);
if(isset($btn))
{
$mq=mysql_query("select max(id) from ev_station");
$mr=mysql_fetch_array($mq);
$id=$mr['max(id)']+1;
60

$exe=mysql_query("insert into
ev_station(id,name,stype,num_charger,area,city,lat,lon,uname,pass)
values($id,'$name','$stype','$num_charger','$area','$city','$lat','$lon','$uname','$pass')");
if($exe)
{
?>
<script language="javascript">
alert("Registered Successfully");
window.location.href="login2.php";
</script>
<?php
}
else
{
?>
<script language="javascript">
alert("Could not Registered!");
</script>
<?php
}
}
?>
register
?php
include("include/dbconnect.php");
extract($_REQUEST);
if(isset($btn))
{
$mq=mysql_query("select max(id) from ev_register");
$mr=mysql_fetch_array($mq);
$id=$mr['max(id)']+1;
$exe=mysql_query("insert into
ev_register(id,name,address,mobile,email,account,card,bank,amount,uname,pass)
61

values($id,'$name','$address','$mobile','$email','$account','$card','$bank','10000','$uname','
$pass')");
if($exe)
{
?>
<script language="javascript">
alert("Registered Successfully");
window.location.href="login.php";
</script>
<?php
}
else
{
?>
<script language="javascript">
alert("Could not Registered!");
</script>
<?php
}
}
?>
Slot
<?php
session_start();
include("include/dbconnect.php");
extract($_REQUEST);
$msg="";
$uname=$_SESSION['uname'];

$rdate=date("d-m-Y");

$q1=mysql_query("select * from ev_station where id=$id");


62

$r1=mysql_fetch_array($q1);
$num=$r1['num_charger'];
$station=$r1['uname'];
$stname=$r1['name'];

if(isset($_REQUEST['act']))
{
$act=$_REQUEST['act'];
}
else
{
$act="";
}

/*if($act=="req")
{

$rid=$_REQUEST['rid'];
mysqli_query($conn,"update ev_booking set charge_st=1 where id=$rid");
?>
<script language="javascript">
window.location.href="slot.php?id=<?php echo $id; ?>";
</script>
<?php
}
else*/
if($act=="cancel")
{
$rid=$_REQUEST['rid'];
mysql_query("update ev_booking set charge_st=0 where id=$rid");
?>
<script language="javascript">
window.location.href="slot.php?id=<?php echo $id; ?>";
63

</script>
<?php
}

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

<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Colorlib Templates">
<meta name="author" content="Colorlib">
<meta name="keywords" content="Colorlib Templates">

<!-- Title Page-->


<title><?php include("include/title.php"); ?></title>

<!-- Icons font CSS-->


<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet"
media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet"
media="all">
<!-- Font special for pages-->
<!--<link href="https://fonts.googleapis.com/css?
family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i" rel="stylesheet">-->

<!-- Vendor CSS-->


<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/datepicker/daterangepicker.css" rel="stylesheet" media="all">
64

<!-- Main CSS-->


<link href="css/main.css" rel="stylesheet" media="all">
<link href="css/style_menu.css" rel="stylesheet" media="all">
<style type="text/css">
<!--
.style2 {color: #009900}
-->
</style>
</head>

<body>
<?php include("include/link_user.php"); ?>

<!--<div class="page-wrapper bg-gra-03 p-t-45 p-b-50">


<div class="wrapper wrapper--w790">
<div class="card card-5">-->

<div align="center">
<br><h3>User: <?php echo $uname; ?>, Station:<?php echo $stname; ?> (<?php echo
$station; ?>)</h3>
<?php

$k=1;
$r=ceil($num/5);
$rem=$num%5;
if($rem>0)
{
$cc=$rem;
}
else
{
$cc=5;
65

}
?>
<table border="1" align="center">
<?php
for($i=1;$i<=$r;$i++)
{
?><tr><?php

if($i<$r)
{
$c=5;
}
else
{
$c=$cc;
}

for($j=1;$j<=$c;$j++)
{

?><td valign="top" align="center">

<table width="90%" height="262" border="1" align="center" cellpadding="10"


cellspacing="10">
<tr>
<td align="center">Slot:<?php echo $k; ?> </td>
</tr>
<tr>
<td align="center" valign="top">
<?php
66

$sq=mysql_query("select * from ev_booking where station='$id' && rdate='$rdate' &&


slot=$k && status=1");
$sn=mysql_num_rows($sq);
if($sn>0)
{
$sr=mysql_fetch_array($sq);
?>
Car No.: <?php echo $sr['carno']; ?>
<?php
if($sr['pay_st']=="1" && $sr['pay_mode']=="Cash")
{
echo " (Payment..)";
}
else
{
?>
<a href="payment.php?bid=<?php echo $sr['id']; ?>">OUT</a> <br />
<?php
}
?>

<img src="images/<?php echo $sr['cimage']; ?>" width="62" height="123" /><br />


<?php
/*if($sr['charge_st']=="1")
{
?>
<span class="style2">Wait for Charge</span>
<?php
echo ' / <a href="slot.php?act=cancel&id='.$id.'&rid='.$sr['id'].'">Cancel</a><br />';
}
else if($sr['charge_st']=="2")
{
67

?>
<iframe src="charge2.php?rid=<?php echo $sr['id']; ?>" frameborder="0" width="100%"
height="40"></iframe>
<?php
}
else if($sr['charge_st']>=3)
{
?>
<span class="style2">Charge Completed</span><br />
<a href="select.php?id=<?php echo $id; ?>&slot=<?php echo $k; ?>&rid=<?php echo
$sr['id']; ?>">Need Charge</a>
<?php
}
else
{
?>
<a href="select.php?id=<?php echo $id; ?>&slot=<?php echo $k; ?>&rid=<?php echo
$sr['id']; ?>">Need Charge</a>
<?php
}*/
?>
<br />
Book Time: <?php echo $sr['rdate'].",".$sr['rtime']; ?> <br />
(Reserved for <?php
if($sr['reserve']=="1")
{
echo "Parking";
}

?>)
<?php

}
68

else
{
?>
<img src="images/slot.jpg" width="186" height="234"><br>
<!--<select name="btim">
<option value="">-Booked Time-</option>
<option>10:40 AM-11:10 AM</option>
</select>-->

<a href="book.php?slot=<?php echo $k; ?>&id=<?php echo $id; ?>">Booking</a>


<?php
}
?> </td>
</tr>
</table>
</td><?php
$k++;
}
?></tr><?php
}
?>
</table>

</div>
<div class="card-body">

</div>
<!--</div>
</div>
</div>-->

<!-- Jquery JS-->


69

<script src="vendor/jquery/jquery.min.js"></script>
<!-- Vendor JS-->
<script src="vendor/select2/select2.min.js"></script>
<script src="vendor/datepicker/moment.min.js"></script>
<script src="vendor/datepicker/daterangepicker.js"></script>

<!-- Main JS-->


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

</body><!-- This templates was made by Colorlib (https://colorlib.com) -->

</html>
<!-- end document-->
View
<?php
session_start();
include("include/dbconnect.php");
extract($_REQUEST);
$msg="";
$uname=$_SESSION['uname'];

$rdate=date("d-m-Y");

$q1=mysql_query("select * from ev_station where uname='$uname'");


$r1=mysql_fetch_array($q1);
$id=$r1['id'];
$num=$r1['num_charger'];
$station=$r1['uname'];
$stname=$r1['name'];

if(isset($_REQUEST['act']))
{
70

$act=$_REQUEST['act'];
}
else
{
$act="";
}

if($act=="start")
{

$rid=$_REQUEST['rid'];
mysql_query("update ev_booking set charge_st=2 where id=$rid");
?>
<script language="javascript">
window.location.href="view.php";
</script>
<?php
}

if($act=="pay")
{
mysql_query("update ev_booking set pay_st=2,status=0,sms_st=1 where id=$bid");
?>
<script language="javascript">
window.location.href="paid.php?bid=<?php echo $bid; ?>";
</script>
<?php
}

?>
<!DOCTYPE html>
<html lang="en">
71

<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Colorlib Templates">
<meta name="author" content="Colorlib">
<meta name="keywords" content="Colorlib Templates">

<!-- Title Page-->


<title><?php include("include/title.php"); ?></title>

<!-- Icons font CSS-->


<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet"
media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet"
media="all">
<!-- Font special for pages-->
<!--<link href="https://fonts.googleapis.com/css?
family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i" rel="stylesheet">-->

<!-- Vendor CSS-->


<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/datepicker/daterangepicker.css" rel="stylesheet" media="all">

<!-- Main CSS-->


<link href="css/main.css" rel="stylesheet" media="all">
<link href="css/style_menu.css" rel="stylesheet" media="all">
<style type="text/css">
<!--
.style2 {color: #009900}
-->
</style>
</head>
72

<body>
<?php include("include/link_station.php"); ?>

<!--<div class="page-wrapper bg-gra-03 p-t-45 p-b-50">


<div class="wrapper wrapper--w790">
<div class="card card-5">-->

<div align="center">
<br><h3>Parking Station:<?php echo $stname; ?></h3>
<?php

$k=1;
$r=ceil($num/5);
$rem=$num%5;
if($rem>0)
{
$cc=$rem;
}
else
{
$cc=5;
}
?>
<table border="1" align="center">
<?php
for($i=1;$i<=$r;$i++)
{
?><tr><?php

if($i<$r)
{
73

$c=5;
}
else
{
$c=$cc;
}

for($j=1;$j<=$c;$j++)
{

?><td valign="top" align="center">

<table width="90%" height="262" border="1" align="center" cellpadding="10"


cellspacing="10">
<tr>
<td align="center">Slot:<?php echo $k; ?> </td>
</tr>
<tr>
<td align="center" valign="top">
<?php

$sq=mysql_query("select * from ev_booking where station='$id' && rdate='$rdate' &&


slot=$k && status=1");
$sn=mysql_num_rows($sq);
if($sn>0)
{
$sr=mysql_fetch_array($sq);
?>
Car No.: <?php echo $sr['carno']; ?><br />
<img src="images/<?php echo $sr['cimage']; ?>" width="62" height="123" /><br />
<?php
74

?>
<br />
<?php
if($sr['pay_st']=="1" && $sr['pay_mode']=="Cash")
{
?><h3 style="color:#FF0000">Payment Verification</h3><?php
echo ' <a href="view.php?act=pay&bid='.$sr['id'].'">Amount Received</a>';
}
else
{
?>
Book Time: <?php echo $sr['rdate'].",".$sr['rtime']; ?> <br />
(Reserved for <?php
if($sr['reserve']=="1")
{
echo "Parking";
}

echo ")";
}
?>
<?php

}
else
{
?>
<img src="images/slot.jpg" width="186" height="234"><br>
<!--<select name="btim">
<option value="">-Booked Time-</option>
<option>10:40 AM-11:10 AM</option>
</select>-->
75

<!--<a href="book.php?slot=<?php //echo $k; ?>&id=<?php //echo $id;


?>">Booking</a>-->
<?php
}
?> </td>
</tr>
</table>
</td><?php
$k++;
}
?></tr><?php
}
?>
</table>

</div>
<div class="card-body">

</div>
<!--</div>
</div>
</div>-->

<!-- Jquery JS-->


<script src="vendor/jquery/jquery.min.js"></script>
<!-- Vendor JS-->
<script src="vendor/select2/select2.min.js"></script>
<script src="vendor/datepicker/moment.min.js"></script>
<script src="vendor/datepicker/daterangepicker.js"></script>

<!-- Main JS-->


76

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

</body><!-- This templates was made by Colorlib (https://colorlib.com) -->

</html>
<!-- end document-->

APPENDIX II
SAMPLE SCREEN SHOTS

Home.php
77

User login.php

Register.php
78

User.php

Parking.php
79

Parking cost.php

Booking.php
80
81

Station.php
82

Parking Station.php
83
84
85
86

REFERENCES

Book Reference

1) “Beginning PHP and MySQL From Novice to Professional” by W Jason Gilmore


2) “PHP: A Beginner’s Guide” by Vikram Vaswani
3) “PHP Object – Oriented Solutions” by David Powers
4) “Learning PHP 5” by David Sklar
5) “Build Your Own Database Driven Web Site Using PHP & MySQL” by Kevin
Yank
6) “Modern PHP: New Features and Good Practices” by Josh Lockhart
7)  “PHP: Learn PHP in 24 Hours or Less – A Beginner’s Guide To Learning PHP
Programming Now” by Robert Dwight

Website Reference
https://www.w3schools.com/php/php_intro.asp
https://www.tutorialspoint.com/php/index.html
https://www.tutorialspoint.com/php/php_syntax_overview.htm

You might also like