You are on page 1of 70

CHAPTER 1

INTRODUCTION

Drivers searching for parking are estimated to be responsible for about 30% of traffic
congestion in cities. Historically, cities, businesses, and property developers have tried to match
parking supply to growing demand for parking spaces. It has become clear, though, that simply
creating more parking spaces is not sufficient to address the problem of congestion. New
approaches using smart parking systems look to provide a more balanced view of parking
that better manages the relationship between supply and demand. Smart parking can be defined
as the use of advanced technologies for the efficient operation, monitoring, and management of
parking within an urban mobility strategy. The global market for smart parking systems reached
$93.5 million, with the United States representing 46% market share, and offering a strong
growth opportunity for companies offering services in the United States and overseas. A
number of
technologies provide the basis for smart parking solutions, including vehicle sensors, wireless
communications, and data analytics. Smart parking is also made viable by innovation in areas
such as smartphone apps for customer services, mobile payments, and in-car navigation systems.
At the heart of the smart parking concept is the ability to access, collect, analyze, disseminate,
and act on information on parking usage. Increasingly, this information is provided in real-time
from intelligent devices that enable both parking managers and drivers to optimize the use of
parking capacity.

1
CHAPTER 2

ORGANIZATION PROFILE

Company Profile

1. Word from the Director

2. About us

3. Aims and Objectives

4. Our Services

5. Our Team, Infrastructure and Quality Statement

6. Our HR Management and Value

7. Partnership with the Government and Members

Word from the Director

To my knowledge, “Message from the director” is just a formality when you print a
company profile like this. Neither I am here to talk in great lengths about our company nor am
I here to fulfill the formality of being an Executive Director. But I am here right in front of
you, to be your eyes to make you witness the true flavor, to take you through the realm of
RND’s success story. The secret of our success is, we believe, “whatever we do, there is still a
room for improvement”. It is this belief that has been a fuel for us, over the years, to be
innovative, self- competitive and to come out with more than one solution to our clients.
To succeed also requires, we believe, the highest standards of corporate behavior towards
everyone we work with, the communities we touch, and the environment on which we have an
impact. This is our road to sustainable, profitable growth, creating long-term value for our
shareholders, our people, and our business partners.
Our vision for our education and training division is to make our trainees an employable
product. Our accelerated curriculum is supported through the development of positive
personal attributes centered around the "5 R's", relationships, rigor, respect, relevance, and
responsibility.

2
Our Web Design team has been delivering innovative, cost effective and timely solutions that
drive the growth of small and medium-sized businesses worldwide. Engineered by high
quality professionals and managed by matured processes, we help forward-thinking companies
achieve and surpass their business goals. Our time tested, state-of-the-art and emerging
technology solutions are backed by the highest level of quality assurance. We deliver robust
and feature-rich Internet solutions that result in increased brand awareness, sales and customer
service.
We are also aware of our social responsibility and contribute in the form of generating
employment opportunities to the society, wherever we exist in. We try to stick to our
corporate values to make a meaningful contribution to our business partners, shareholders,
clients and our staff. I welcome you all to the rich and enriching experience of RND. From the
desk of Managing Director.
About Us
We take pride in introducing ourselves as RND an MNC from US and UK and its corporate
office at Trichy. Our core business is Software development and Web design and
Development. RND with an outstanding success in Software development and Web design
and Development gradually spread its wings of desire on to Training and Development.
RND’s Software Development Division specializes in the business of providing services to
its clients across India. Our expertise lies in reducing costs and improving productivity by
bringing the strategic advantage to the doorstep of our customer in more ways than one.
Thereby improving reliability, speed, agility and enabling our customers to achieve
sustainable differential advantage over their competition. Thus, we are a full service
organization offering a unique integration of strategy, technology and creative implementation
geared for measurable impact on our clients' business performance.
Aims and Objectives
RND aims to drive the overall growth of the global sourcing market and maintain India’s
leadership position, by taking up the role of a strategic adviser to franchising companies in the
Indian IT-BPO sector.
RND’s seven fold strategy towards achieving these objectives:

 Strengthen the brand equity of India as a premier global sourcing destination

3
 Partner with Government of India and State Governments in formulating IT policies
and legislation. Partner with global stakeholders for promoting the industry in
global markets.
 Strive for a thought leadership position and deliver world-class research and
strategic inputs for the industry and its stakeholders.
 Expand the quantity and quality of the talent pool in India

 Continuous engagement with all franchising companies and stakeholders to


devise strategies to achieve shared aspirations for the industry and the
country.
 Encourage and facilitate members to uphold world class quality standards and
enhance operational excellence.
 Aim to uphold Intellectual Property Rights.

4
CHAPTER 3

SYSTEM CONFIGURATIONS

3.1. HARWARE CONFIGURATION

 Processors : Intel® Core™ i5 processor 4300M at 2.60 GHz or 2.59 GHz (1


socket, 2 cores, 2 threads per core), 8 GB of DRAM
 Disk space : 320 GB
 Operating systems: Windows® 10, macOS*, and Linux*

3.2. SOFTWARE CONFIGURATION

 Server Side : Python 3.7.4(64-bit) or (32-bit)


 Client Side : HTML, CSS, Bootstrap
 IDE : Flask 1.1.1
 Back end : MySQL 5.
 Server : WampServer 2i
 OS : Windows 10 64 –bit or Ubuntu 18.04 LTS “Bionic Beaver”

5
CHAPTER 4

SOFTWARE FEATURES

4.1. Overview of Python

Python 3.7.4
Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming
language. It was created by Guido van Rossum during 1985- 1990. Like Perl, Python source
code is also available under the GNU General Public License (GPL). This tutorial gives enough
understanding on Python programming language.

Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is


designed to be highly readable. It uses English keywords frequently where as other languages
use punctuation, and it has fewer syntactical constructions than other languages. Python is a
MUST for students and working professionals to become a great Software Engineer specially
when they are working in Web Development Domain.
Python is currently the most widely used multi-purpose, high-level programming language.
Python allows programming in Object-Oriented and Procedural paradigms. Python programs
generally are smaller than other programming languages like Java. Programmers have to type
relatively less and indentation requirement of the language, makes them readable all the time.
Python language is being used by almost all tech-giant companies like – Google, Amazon,
Facebook, Instagram, Dropbox, Uber… etc. The biggest strength of Python is huge collection of
standard libraries which can be used for the following:
 Machine Learning
 GUI Applications (like Kivy, Tkinter, PyQt etc.)
 Web frameworks like Django (used by YouTube, Instagram, Dropbox)
 Image processing (like OpenCV, Pillow)
 Web scraping (like Scrapy, BeautifulSoup, Selenium)

6
 Test frameworks
 Multimedia
 Scientific computing
 Text processing and many more.
Tensor Flow
Tensor Flow is an end-to-end open-source platform for machine learning. It has a
comprehensive, flexible ecosystem of tools, libraries, and community resources that lets
researchers push the state-of-the-art in ML, and gives developers the ability to easily build and
deploy ML-powered applications.

Tensor Flow provides a collection of workflows with intuitive, high-level APIs for both
beginners and experts to create machine learning models in numerous languages. Developers
have the option to deploy models on a number of platforms such as on servers, in the cloud, on
mobile and edge devices, in browsers, and on many other JavaScript platforms. This enables
developers to go from model building and training to deployment much more easily.
Keras
Keras is a deep learning API written in Python, running on top of the machine learning platform
Tensor Flow. It was developed with a focus on enabling fast experimentation.

 Allows the same code to run on CPU or on GPU, seamlessly.


 User-friendly API which makes it easy to quickly prototype deep learning models.

7
 Built-in support for convolutional networks (for computer vision), recurrent networks
(for sequence processing), and any combination of both.
 Supports arbitrary network architectures: multi-input or multi-output models, layer
sharing, model sharing, etc. This means that Keras is appropriate for building essentially
any deep learning model, from a memory network to a neural Turing machine.
Pandas
pandas is a fast, powerful, flexible and easy to use open source data analysis and manipulation
tool, built on top of the Python programming language. pandas is a Python package that provides
fast, flexible, and expressive data structures designed to make working with "relational" or
"labeled" data both easy and intuitive. It aims to be the fundamental high-level building block for
doing practical, real world data analysis in Python.

Pandas is mainly used for data analysis and associated manipulation of tabular data in Data
frames. Pandas allows importing data from various file formats such as comma-separated values,
JSON, Parquet, SQL database tables or queries, and Microsoft Excel. Pandas allows various data
manipulation operations such as merging,reshaping,selecting,as well as data cleaning, and data
wrangling features. The development of pandas introduced into Python many comparable
features of working with Data frames that were established in the R programming language. The
panda’s library is built upon another library NumPy, which is oriented to efficiently working
with arrays instead of the features of working on Data frames.
NumPy
NumPy, which stands for Numerical Python, is a library consisting of multidimensional array
objects and a collection of routines for processing those arrays. Using NumPy, mathematical and
logical operations on arrays can be performed.

8
NumPy is a general-purpose array-processing package. It provides a high-performance
multidimensional array object, and tools for working with these arrays.
Matplotlib
Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations
in Python. Matplotlib makes easy things easy and hard things possible.

Matplotlib is a plotting library for the Python programming language and its numerical
mathematics extension NumPy. It provides an object-oriented API for embedding plots into
applications using general-purpose GUI toolkits like Tkinter, wxPython, Qt, or GTK.
. Scikit Learn
scikit-learn is a Python module for machine learning built on top of SciPy and is distributed
under the 3-Clause BSD license.

Scikit-learn (formerly scikits. learn and also known as sklearn) is a free software machine
learning library for the Python programming language. It features various classification,
regression and clustering algorithms including support-vector machines, random forests, gradient
boosting, k-means and DBSCAN, and is designed to interoperate with the Python numerical and
scientific libraries NumPy and SciPy.
Pillow
Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging
Library by Fredrik Lundh and Contributors.

Python pillow library is used to image class within it to show the image. The image modules that
belong to the pillow package have a few inbuilt functions such as load images or create new
images, etc.

9
OpenCV
OpenCV is an open-source library for the computer vision. It provides the facility to the machine
to recognize the faces or objects.

In OpenCV, the CV is an abbreviation form of a computer vision, which is defined as a field of


study that helps computers to understand the content of the digital images such as photographs
and videos.
MySQL
MySQL tutorial provides basic and advanced concepts of MySQL. Our MySQL tutorial is
designed for beginners and professionals. MySQL is a relational database management system
based on the Structured Query Language, which is the popular language for accessing and
managing the records in the database. MySQL is open-source and free software under the GNU
license. It is supported by Oracle Company. MySQL database that provides for how to manage
database and to manipulate data with the help of various SQL queries. These queries are: insert
records, update records, delete records, select records, create tables, drop tables, etc. There are
also given MySQL interview questions to help you better understand the MySQL database.

MySQL is currently the most popular database management system software used for managing
the relational database. It is open-source database software, which is supported by Oracle
Company. It is fast, scalable, and easy to use database management system in comparison with
Microsoft SQL Server and Oracle Database. It is commonly used in conjunction with PHP
scripts for creating powerful and dynamic server-side or web-based enterprise applications. It is

10
developed, marketed, and supported by MySQL AB, a Swedish company, and written in C
programming language and C++ programming language. The official pronunciation of MySQL
is not the My Sequel; it is My Ess Que Ell. However, you can pronounce it in your way. Many
small and big companies use MySQL. MySQL supports many Operating Systems like Windows,
Linux, MacOS, etc. with C, C++, and Java languages.
WampServer
WampServer is a Windows web development environment. It allows you to create web
applications with Apache2, PHP and a MySQL database. Alongside, PhpMyAdmin allows you
to manage easily your database.

WAMP Server is a reliable web development software program that lets you create web apps
with MYSQL database and PHP Apache2. With an intuitive interface, the application features
numerous functionalities and makes it the preferred choice of developers from around the world.
The software is free to use and doesn’t require a payment or subscription.
Bootstrap 4
Bootstrap is a free and open-source tool collection for creating responsive websites and web
applications. It is the most popular HTML, CSS, and JavaScript framework for developing
responsive, mobile-first websites.

It solves many problems which we had once, one of which is the cross-browser compatibility
issue. Nowadays, the websites are perfect for all the browsers (IE, Firefox, and Chrome) and for

11
all sizes of screens (Desktop, Tablets, Phablets, and Phones). All thanks to Bootstrap developers
-Mark Otto and Jacob Thornton of Twitter, though it was later declared to be an open-source
project.
Easy to use: Anybody with just basic knowledge of HTML and CSS can start using Bootstrap
Responsive features: Bootstrap's responsive CSS adjusts to phones, tablets, and desktops
Mobile-first approach: In Bootstrap, mobile-first styles are part of the core framework
Browser compatibility: Bootstrap 4 is compatible with all modern browsers (Chrome, Firefox,
Internet Explorer 10+, Edge, Safari, and Opera)
Flask
Flask is a web framework. This means flask provides you with tools, libraries and technologies
that allow you to build a web application. This web application can be some web pages, a blog, a
wiki or go as big as a web-based calendar application or a commercial website.

Flask is often referred to as a micro framework. It aims to keep the core of an application simple
yet extensible. Flask does not have built-in abstraction layer for database handling, nor does it
have formed a validation support. Instead, Flask supports the extensions to add such
functionality to the application.  Although Flask is rather young compared to
most Python frameworks, it holds a great promise and has already gained popularity among
Python web developers. Let’s take a closer look into Flask, so-called “micro” framework for
Python.
Flask was designed to be easy to use and extend. The idea behind Flask is to build a solid
foundation for web applications of different complexity. From then on you are free to plug in any
extensions you think you need. Also you are free to build your own modules. Flask is great for
all kinds of projects. It's especially good for prototyping.
Flask is part of the categories of the micro-framework. Micro-framework are normally
framework with little to no dependencies to external libraries. This has pros and cons. Pros
would be that the framework is light, there are little dependency to update and watch for security

12
bugs, cons is that some time you will have to do more work by yourself or increase yourself the
list of dependencies by adding plugins. In the case of Flask, its dependencies are:
WSGI-Web Server Gateway Interface (WSGI) has been adopted as a standard for Python web
application development. WSGI is a specification for a universal interface between the web
server and the web applications.
Werkzeug-It is a WSGI toolkit, which implements requests, response objects, and other utility
functions. This enables building a web framework on top of it. The Flask framework uses
Werkzeug as one of its bases.
Jinja2 Jinja2 is a popular templating engine for Python. A web templating system combines a
template with a certain data source to render dynamic web pages.

CHAPTER 5

PROJECT DESCRIPTION

5.1. OVERVIEW OF PROJECT

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

13
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.

5.2. PROBLEM STATEMENT

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.3. MODULE DESCRIPTION

Modules list

Vehicle User

 Registration

14
 Login
 View parking location
 Booking for parking
 Parking payment
Parking Controller

 Login
 Add vehicle information
 Payment verification
 Reports
Modules Description

User Modules

User Registration

In this module describe the user registration process. User register the information like a
user name, mobile number, mail id, etc.

User Login

User was registered into this website using their user name and password in parking
system.

View parking location

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.

Booking for parking

Easy booking via web or mobile application, Authentication with a telephone call or
mobile application allows the ad hoc use of unregistered users. User booking information are
stored in parking system database.

Parking payment
15
Payment can be done through online and as well as offline by the users in efficiently.

Parking Controller Modules

Controller Login

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

Add parking information

Add and manage parking slot and locations. Set access rules and visibility
(private/public), monitor usage and consumption.

Payment verification

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.

Reports

Controller is responsible for providing the all reports. The bills provided by controller are
checked by secretary.

CHAPTER 6

SYSTEM ANALYSIS

6.1. EXISTING SYTSEM

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

16
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.
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.

6.2. PROPOSED SYSTEM

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:

17
 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...)
Advantages
 Avoided Carbon Emissions
 Improved Public Health
 Complete electrification of public transport system
 Displacing petroleum
 Dynamic pricing
 Better and more efficient Parking

CHAPTER 7

SYSTEM DESIGN

7.1. UML DIAGRAMS

18
7.1.1. 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

7.1.1. Use case Diagram

7.1.2. CLASS DIAGRAM

19
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()

7.1.2. Class Diagram

7.1.3. SEQUENCE DIAGRAM

20
Vehicle User Cloud Server Parking
Controller

Vehicle Registration

View Booked Vehicles

Provide Vehicle Information

View Vehicle Information

Free Space Updation

Booking

View Vehicle Bookings

Entry & Exiit Timings

View Entry & Exit Timings

Fast Tag Integration

Fast Tag Integration

Notification

Notifications

Check IN & OUT Timings

Verify Check IN & OUT Timings

Parking Space Simulation

7.1.3. Sequence Diagram

7.1.4. COLLABORATION DIAGRAM

21
7.1.4. Collaboration Diagram

7.1.5. STATECHART DIAGRAM

22
7.1.5. State chart Diagram

7.1.6. ACTIVITY DIAGRAM

23
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

7.1.6. ACTIVITY DIAGRAM

24
7.1.7. COMPONENT DIAGRAM

7.1.7. COMPONENT DIAGRAM

7.1.8. DEPLOYMENT DIAGRAM

25
7.1.8. DEPLOYMENT DIAGRAM

7.2. DATABASE DESIGN

26
Table structure for table parking_booking

Field Type Null Default


id int(11) Yes NULL
uname varchar(20) Yes NULL
station varchar(30) Yes NULL
carno varchar(20) Yes NULL
reserve varchar(20) Yes NULL
slot int(11) Yes NULL
cimage varchar(20) Yes NULL
mins int(11) Yes NULL
plan int(11) Yes NULL
amount double Yes NULL
rtime varchar(20) Yes NULL
etime varchar(20) Yes NULL
rdate varchar(15) Yes NULL
edate varchar(15) Yes NULL
otp varchar(10) Yes NULL
charge double Yes NULL
charge_time int(11) Yes NULL
charge_min int(11) Yes NULL
charge_sec int(11) Yes NULL
charge_st int(11) Yes NULL
pay_mode varchar(20) Yes NULL
pay_st int(11) Yes NULL
sms_st int(11) Yes NULL
status int(11) Yes NULL

Table 1.1. Table structure for table parking_booking

Table structure for table user_register

27
Field Type Null Default
id int(11) Yes NULL
name varchar(20) Yes NULL
address varchar(40) Yes NULL
mobile bigint(20) Yes NULL
email varchar(40) Yes NULL
accoun varchar(20) Yes NULL
t
card varchar(20) Yes NULL
bank varchar(20) Yes NULL
amount double Yes NULL
uname varchar(20) Yes NULL
pass varchar(20) Yes NULL

Table 1.2. Table structure for table user_register

Table structure for table station_register

Field Type Null Default


id int(11) Yes NULL
name varchar(20) Yes NULL
stype varchar(20) Yes NULL
num_charge int(11) Yes NULL
r
area varchar(30) Yes NULL
city varchar(30) Yes NULL
lat varchar(20) Yes NULL
lon varchar(20) Yes NULL
uname varchar(20) Yes NULL
pass varchar(20) Yes NULL

Table 1.3. Table structure for table station_register

28
CHAPTER 8

SYSTEM TESTING

TESTING

Test Case
File level deduplication will save a relatively large memory space. In general, file level
deduplication view multiple copies of same file. It stores first file and then it links other
references to the first file. Only one copy will be stored. In testing, even though file names are
same, the system can able to detect deduplication. If we upload the same file by using different
names, it will view only the content and not names. Thus redundant data is avoided.
In registration phase, the user may not registered before and type their information. So if
the user is new user, the alert message will display that the user is not registered before.
Unit Testing
It is the testing of an individual unit or group of related units. It is done by programmer to
test that the implementation is producing expected output against given input and it falls under
white box testing. Unit testing is done in order to check registration whether the user properly
registered into the cloud. It is done in order to check whether a file is properly uploaded into the
cloud. And an encryption and decryption is checked with unit testing if it is converted properly.
Then deduplication is checked with unit testing.
Integration Testing
All the modules should be integrated into a single module and it should be checked that it
is still working still by integration testing.
System Testing
It is done to ensure that by putting the software in different environments and check that
it still works. System Testing is done by uploading same file in this cloud checking whether any
duplicate file exists.
Software Testing
It is the process of evaluating a software item to detect differences between given input
and expected output. Also to assess the feature of a software item. Testing assess the quality of

29
the product. It is a process that should be done during the development process. In other words
software testing is a verification and validation process.
There are two types of software testing.
1. Black box testing
2. White box testing
Verification
Verification is the process to make sure the product satisfies the conditions imposed at
the start of the development phase. In other words, to make sure the product behaves the way we
want it to.
Validation
Validation is the process to make sure the product satisfies the specified requirements at
the end of the development phase. In other words, to make sure the product is built as per
customer requirements.
Black Box Testing
Black box testing is a testing which ignores internal mechanism of system and focuses on
output generated against any input and execution of system. It is done for validation. It is done to
check encryption and decryption after uploading a file into the cloud.
White Box Testing
It is done for verification and it is a testing that takes into account the internal mechanism
of the system. It is done by checking content verification. It will verify that whether same content
exists in the cloud.

8.1. TEST PLAN

TEST TEST TYPE OF DURATION REMARKS


PLAN ID MODULE TESTING
SP1 Station Unit testing 5 Hours Register station details and
view parking request and
verified
SP2 User System 2 hours Register user details and car
Testing parking booking

30
8.2. TEST CASE

S.NO SCENARIO INPUT EXPECTED ACTUAL OUTPUT


OUTPUT
1 User register Name, mobile no, email, User Registered Add registered
address, bank name, successfully
account no
2 User login Username, password Login Login successfully
3 Station register Station name, Station Station added Added successfully
location, Charging
payment
5 Station login Username, password Login Login successfully
6 Booking Vehicle no, Time Booked Booking Successfully
duration
7 Payment Bank name, account no, Payment verified Payment verification
card no successfully

8.3. BUG REPORT

BUG ID SCENARIO BUG DESCRIPTION BUG STATUS


SPBS 01 User login Valid username & password and then Success
booking parking

31
CHAPTER 9

CONCLUSION

In conclusion, the Smarter Parking System was developed and met the required and
targeted goals to an extent. 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.

32
CHAPTER 10

FUTURE ENHANCEMENTS

Where most of the problems that the project targeted where able to be solved and
targeted via the features provided by this system, such as prevention of occupation of multiple
or private parks and collision of cars. Although the scale of the project was small, the results
were valid enough and took enough precautions to proof that the solution is viable and could be
deployed in real life with the correct measures. However, the challenges that are commonly
faced by IoT systems would still apply to this project and should be considered carefully
before approaching a fully applied solution. Throughout the process of carrying out this project
and developing the system from scratch, there were many ideas that seemed very beneficial and
useful yet were not developed due to time constriction and experience.

33
APPENDICES

APPENDIX I

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);

34
if ($date1 >= $date2 && $date1 < $date3)
{
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;

35
$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,otp,p
ay_st,status)
values($bid,'$uname','$id','$carno','1','$slot','$cimage','0','','','$rtime','','$rdate','','0','1')");

36
?>
<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">
<!-- Title Page-->
<title><?php include("include/title.php"); ?></title>
<!-- Icons font CSS-->

37
<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">
<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>

38
<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>
<!-- 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="";

39
$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
}
?>
<!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">-->

40
<!-- 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_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);
?>

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

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

43
<!-- 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>
<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>

44
<tr>
<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>
</body><!-- This templates was made by Colorlib (https://colorlib.com) -->

45
</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);
$msg="";
if(isset($btn))
{

46
$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'];
$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");

47
$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;
}
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

48
}
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">
<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">-->

49
<!-- 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">
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">

50
<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">
<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>

51
<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" />
</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))
{

52
$mq=mysql_query("select max(id) from ev_station");
$mr=mysql_fetch_array($mq);
$id=$mr['max(id)']+1;
$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))

53
{
$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)
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");

54
extract($_REQUEST);
$msg="";
$uname=$_SESSION['uname'];
$rdate=date("d-m-Y");
$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'];
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'];

55
mysql_query("update ev_booking set charge_st=0 where id=$rid");
?>
<script language="javascript">
window.location.href="slot.php?id=<?php echo $id; ?>";
</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">
<!-- Main CSS-->

56
<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;
}
?>
<table border="1" align="center">
<?php

57
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
$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

58
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")
{
?>
<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 />

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

60
<?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-->
<script src="js/global.js"></script>
</body><!-- This templates was made by Colorlib (https://colorlib.com) -->
</html>
<!-- end document-->
View
<?php

61
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']))
{
$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")

62
{
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">
<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-->

63
<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_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++)

64
{
?><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
$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

65
?>
<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>-->
<!--<a href="book.php?slot=<?php //echo $k; ?>&id=<?php //echo $id; ?>">Booking</a>-->

66
<?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-->
<script src="js/global.js"></script>
</body><!-- This templates was made by Colorlib (https://colorlib.com) -->
</html>
<!-- end document-->

67
APPENDIX II

SCREEN SHOTS

68
REFERENCES

Website Reference

1) https://www.researchgate.net/publication/303842610_IoT_based_Smart_Parking_System
2) https://www.researchgate.net/publication/319345084_Smart_Car_Parking_System
3) https://thecarpark.com/
4) https://www.vevs.com/car-parking-websites/

69
70

You might also like