0% found this document useful (0 votes)
37 views75 pages

Project College

Uploaded by

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

Project College

Uploaded by

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

A Project Report

On
“Online Gas Booking System”

Submitted in partial fulfillment of the requirement of


University of Mumbai
For the Degree of

Bachelor of Computer Science


Submitted By

Anand Rajak
Under the Guidance of

Prof. Nilam Shelar


Final Year Computer Science

Department of BSc. Computer Science Ramniranjan Jhunjhunwala College of


Arts, Science & Commerce
Affiliated to University of Mumbai.
Mumbai

(2021-2022)
.

1
RAMNIRANJAN JHUNJHUNWALA COLLEGE
GHATKOPAR(W), MUMBAI-400 086

CERTIFICATE

This is to certify that Anand Naresh Rajak has successfully completed the project titled

“ Online Gas BookingSystem ”


under our guidance towards the partial fulfillment of degree of Bachelors of Science (Computer
Science – SEM VI) submitted to Ramniranjan Jhunjhunwala College, Ghatkopar (W) during the
academic year 2021 – 2022 as specified by
UNIVERSITY OF MUMBAI.

Prof. Nilam Shelar Prof. (Mrs.) Anita Gaikwad


Project Guide In-Charge
Dept. Of Computer Science Dept. Of Computer Science

2
Index

Sr. Topic Page


No. No.
1. Acknowledgement 4
2. Declaration 5
3. Feasibility Study 6-7
Economical Feasibility
Technical Feasibility
Operational Feasibility
4. Scope of the System 8
5. Existing system and its disadvantages 9
6. Proposed system and its Advantages 10
7. Technical Requirement 11
8. Software Development Model 12-15
9. Gantt Chart 16-19
10. System Analysis 20-33
▪ ER Diagram 20-23
▪ Class Diagram 23-24
▪ Object Diagram 24-26
▪ Activity Diagram 27-28
▪ Sequence Diagram 29-31
▪ Use case Diagram 31-33
11. System Design 34-38
• Component Diagram 34-35
• Deployment Diagram 36-37
12. Table Daigram 38
13. System Implementation 39-73
• System coding 39-62
• System Testing 62-73
14. Future Enhancement 74
15. References 74
3
Acknowledgement
I have great pleasure for representing this project report entitled
“ONLINE GAS BOOKING SYSTEM ” and I grab this opportunity to convey my
immense regards towards all the distinguished people who havetheir
valuable contribution in the hour of need.

I take this opportunity to thank “Dr. Mr. Himanshu


Dawda”, our Principal of Ramniranjan Jhunjhunwala college, Ghatkopar
(W) for giving me an opportunity to study in the institute and the most
needed guidance throughout the duration of the course.

I also like to thanks my gratitude to “Prof. Mrs. Anita Gaikwad”,


Head of the Department for their timely and prestigious guidance and
necessary support during each phase of the project.

I also like to extend my gratitude to “Prof. Nilam Shelar”, for


their timely and prestigious guidance and necessarysupport
during each phase of the project.

I also thanks to my friends who have been constant


source of help to solve the problems and also helped me during
the project development phase.

Thanking You
ANAND RAJAK

4
Declaration

I declare that this written submission represents my own


ideas in my own words and where other’s ideas or words have
been included, I have adequately cited and referenced the original
sources. I also declare that I have adhered to all principles of
academic honesty and integrity and have not misrepresented or
fabricated or falsified any idea/fact/data/source in my
submission. I understand that any violation of the above will be
cause for disciplinary action by the Institute and can also evoke
penal action from the sources which have thus not been properly
cited or from whom proper permission has not been taken when
needed.

ANAND RAJAK

5
Feasibility Study
Feasibility study is to check the viability of the project
under consideration. Theoretically various types of feasibilities
are conducted, but I have conducted three types of feasibilities
explained as under.

ECONOMIC FEASIBILITY
1. Development Cost

• Equipment required for developing the software are


easily available.
• Equipment maintenance is also minimum.
• Once the required hardware and software requirements
get fulfilled there is no need for the users of our system to
spend for any additional overhead.
2. Benefits which cannot be measured:

• Increased customer Loyalty.


• Increased customer satisfaction.

TECHNICAL FEASIBILITY
At first it is necessary to check that the proposed system is technically
feasible or not and to determine the technology and skill necessary to carry
out the project. If they are not available then find out the solution to
obtain them.

6
OPERATIONAL FEASIBILITY
Proposed system is beneficial only if it can be turned into
system that will meet the need of the client’s operating
requirements. The proposed system is operationally feasible due
to the following reasons:

• It is easy to use and is very simple.


• The website will support all browser.
• Will avoid confusion and resistance by catching the user’s

attention, as it is presentable.

7
Scope of the System
“ Online Gas Booking System “ is the Online Gas Cylinder
Booking website . In which we can book a Gas cylinder at home or at your
own place. This proposed system will allow to sign up or log in process.
Which contain user name, mobile no. ,email and password . According to
These Information user can book a gas cylinder at your home .

In this system, user can book a gas cylinder and Distributor are
also register here and know the which users have a need of gas cylinder.
Distributor can manage the consumers detail and which they are delivered
Can also shown here. In Admin Panel, admin can Manage the Distributor
Detail and delete or edit the distributor and consumers also.

8
Existing system and it's Disadvantage
In Existing system has more complex and confusing in it and
Also Has very lagging in those websites . Existing system have many
disadvantage has to follow:

• They are very costly.


• These system has don’t have enough gas cylinders to serve
the people.
• They are very much time taking to book a gas cylinder.
• They don’t have computerised record of whose person
taken the Gas Cylinder.
• They required much more labour to work on it.

9
Proposed system and it’s Advantages
In the Proposed System , will have the sign up or login
Process Which provide the user proper guide . these system has
Many advantages as follows :

• Has a large number of Gas Cylinder.


• User will sign up with the Name , email , mobile number.
• User will get the Gas Cylinder at your home.
• Keeps all the Booking report in the computerized
manner.
• User can get the information of Gas Cylinder
available At your nearby place .
• Users get the Service fast as possible.

10
Technical requirement
Programming Language :
Frontend - HTML , CSS , JavaScript
Backend - PHP , Mysql

Hardware requirement :
• Processor : i3 7th generation
• Ram : 8 GB
• Rom : 1 TB
• Mouse, Keyboard, Monitor etc.

11
Software Development Model
V- model
The V-model is an SDLC model where execution of processes happens
in a sequential manner in a V-shape. It is also known as Verification
and Validation model. The V-Model is an extension of the waterfall
model and is based on the association of a testing phase for each
corresponding development stage. This means that for every single
phase in the development cycle, there is a directly associated testing
phase. This is a highly-disciplined model and the next phase starts
only after completion of the previous phase.
1. Requirement Analysis

In the requirements analysis phase, the first step in the


verification process, the requirements of the system are collected
by analyzing the needs of the users. This phase is concerned with
establishing what the ideal system has to perform. However it
does not determine how the software will be designed or built.
Usually, the users are interviewed and a document called the
user requirements document is generated.

2. System Design
System Design is the phase where system engineers analyze and
understand the business of the proposed system by studying the
user requirements document. They figure out possibilities and
techniques by which the user requirements can be implemented.
If any of the requirements are not feasible, the user is informed

12
of the issue. A resolution is found and the user requirement
document is edited accordingly.

3. Architecture Design
The phase of the design of computer architecture and software
architecture can also be referred to as high-level design. The
baseline in selecting the architecture is that it should realize all
which typically consists of the list of modules, brief functionality
of each module, their interface relationships, dependencies,
database tables, architecture diagrams, technology details etc.
The integration testing design is carried out in the particular
phase.

4. Module Design
The module design phase can also be referred to as low-level
design. The designed system is broken up into smaller units or
modules and each of them is explained so that the programmer
can start coding directly.

5. Coding Phase
After designing, the coding phase is started. Based on the
requirements, a suitable programming language is decided. There
are some guidelines and standards for coding. Before checking in
the repository, the final build is optimized for better
performance, and the code goes through many code reviews to
check the performance.
13
6. Validation Phase
In the V-model, each stage of verification phase has a
corresponding stage in the validation phase.

i. Unit Testing
Unit tests designed in the module design phase are executed
on the code during this validation phase. Unit testing is the
testing at code level and helps eliminate bugs at an early
stage, though all defects cannot be uncovered by unit testing.

ii. Integration Testing


Integration Test Plans are developed during the
Architectural Design Phase. These tests verify that units
created and tested independently can coexist and
communicate among themselves. Test results are shared
with customer's team.

iii. System Testing


System testing is directly associated with the system design
phase. System tests check the entire system functionality
and the communication of the system under development
with external systems. Most of the software and hardware
compatibility issues can be uncovered during this system
test execution.

14
iv. Acceptance Testing
Acceptance testing is associated with the business
requirement analysis phase and involves testing the
product in user environment. Acceptance tests uncover the
compatibility issues with the other systems available in the
user environment. It also discovers the non-functional
issues such as load and performance defects in the actual
user environment.

15
Gantt Chart
A Gantt chart is made up of several different elements. Below given
are 8 key components to know how to read a Gantt chart:
• Task list: Runs vertically down the left of the Gantt chart to
describe project work and may be organized into groups and
subgroups.
• Timeline: Runs horizontally across the top of the Gantt chart and
shows months, weeks, days, and years.
• Dateline: A vertical line that highlights the current date on the
Gantt chart.
• Bars: Horizontal markers on the right side of the Gantt chart that
represent tasks and show progress, duration, and start and end
dates.
• Milestones: Yellow diamonds that call out major events, dates,
decisions, and deliverables.
• Dependencies: Light gray lines that connect tasks that need to
happen in a certain order.
• Progress: Shows how far along work is and may be indicated by
% Complete and/or bar shading.
• Resource assigned: Indicates the person or team responsible for
completing a task.

16
Title Start date End date Duration
(days)
Requirement Analysis
Preliminary 09-07-2021 13-07-2021 5
Investigation
Project Topic 14-07-2021 20-07-2021 7
Discussion
Current System 21-07-2021 25-07-2021 5
Description
Proposed System 26-07-2021 30-07-2021 5
Description
Feasibility Study 31-07-2021 09-08-2021 10
System Analysis
ER Diagram 10-08-2021 15-08-2021 5
Class Diagram 16-08-2021 20-08-2021 5
Object Diagram 21-08-2021 25-08-2021 5
Activity Diagram 26-08-2021 30-08-2021 5
Sequence Diagram 31-08-2021 05-09-2021 6
Use Case Diagram 06-09-2021 10-09-2021 5
System Design
Component Diagram 15-09-2021 20-09-2021 5

Deployment Diagram 21-09-2021 23-09-2021 3

System coding
(09-11-2021 ---- 22-02-2022)

System Testing
(04-02-2022 ---- 10-03-2022)

17
18
System Implementation

19
System Analysis

Entity-Relationship Diagram

ER Diagram stands for Entity Relationship Diagram, also known as


ERD is a diagram that displays the relationship of entity sets stored
in a database. In other words, ER diagrams help to explain the logical
structure of databases. ER model helps to systematically analyze
data requirements to produce a welldesigned database. The ER
Model represents real-world entities and the relationships between
them.

ER Diagrams contain different symbols that use rectangles to


represent entities, ovals to define attributes and diamond shapes to
represent relationships.

At first look, an ER diagram looks very similar to the flowchart.


However, ER Diagram includes many specialized symbols, and its
meanings make this model unique. The purpose of ER Diagram is to
represent the entity framework infrastructure.

ER Diagram is composed of entities, relationship and attributes. They


also depict cardinality, which defines relationships in terms of
numbers.
• Entity
An entity is an object or component of data. An entity is
represented as rectangle in an ER diagram. For example: Student
20
and college and these two entities have many to one relationship
as many student studies in a single college.
An entity that cannot be uniquely identified by its own
attributes and relies on the relationship with other entity called
weak entity. The weak entity is represented by a double
rectangle.
• Attribute

An attribute describes the property of an entity. An attributes


represented as oval in an ER diagram. These are four types of
attributes:

1. Key attribute
2. Composite attribute

3. Multi attribute

4. Derived attribute
• Relationship

A relationship is represented by diamond shape in ER diagram; it


shows the relationship among entities. There are four types of
relationships:

1. One to One
2. One to Many
3. Many to One
4. Many to Many
• ER Diagram Symbols

21
22
Class Diagram

Class diagram is a static diagram. It represents the static view of an


application. Class diagram is not only used for visualizing, describing,
and documenting different aspects of a system but also for
constructing executable code of the software application. Class
diagram describes the attributes and operations of a class and also
the constraints imposed on the system. The class diagrams are widely
used in the modelling of object oriented systems because they are
the only UML diagrams, which can be mapped directly with object-
oriented languages. Class diagram shows a collection of classes,
interfaces, associations, collaborations, and constraints. It is also
known as a structural diagram.

23
The class diagram is used to identify and classify the objects which
constitute a system. It also includes the important attributes of the
objects which must be captured.

Object Diagram

An object diagram is a graph of instances, including objects and data


values. A static object diagram is an instance of a class diagram; it
shows a snapshot of the detailed state of a system at a point in time.
24
Object diagrams and class diagrams are closely related and use almost
identical notation. Both diagrams are meant to visualize static
structure
of a system. While class diagrams show classes, object diagrams
display instances of classes (objects).
Object diagrams are more concrete than class diagrams. They are
often
used to provide examples or act as test cases for class diagrams. Only
aspects of current interest in a model are typically shown on an object
diagram. Object diagrams are derived from class diagrams so object
diagrams are dependent upon class diagrams.

Purpose of Object Diagrams:


• The purpose of a diagram should be understood clearly to
implement
it practically. The purposes of object diagrams are similar to class
diagrams.
• The difference is that a class diagram represents an abstract model
consisting of classes and their relationships. However, an object
diagram represents an instance at a particular moment, which is
concrete in nature.
• It means the object diagram is closer to the actual system
behaviour.
The purpose is to capture the static view of a system at a particular
moment.

25
26
Activity Diagram

Activity diagrams are graphical representations of workflows of


stepwise activities and actions with support for choice, iteration and
concurrency. In the Unified Modeling Language, activity diagrams can
be used to describe the business and operational step-by- step
workflows of components in a system. An activity diagram shows the
overall flow of control. An activity diagram shows the overall flow of
control. Activity diagrams are constructed from a limited repertoire of
shapes, connected with arrows.
Activity diagrams are constructed from a limited repertoire of shapes,
connected with arrows.

The most important shape types:


● Rounded rectangle represents activities.
● Diamonds represent decisions.
● Bars represent the start (split) or end (join) of concurrent activities.
● A black circle represents the start (initial state) of the workflow.
● An encircled black circle represents the end (final state).
● Arrows run from the start towards the end and represent the order
in which activity happen.

27
28
Sequence Diagram

A sequence diagram describes interactions among classes in terms of


an “Exchange of message over time”. Sequence diagrams are used to
depict the time sequence of message exchanged between objects.

Message can correspond to operation on class or an event trigger.

Notations of a Sequence Diagram include:

 Lifeline: It is a vertical dashed line that represents the


“lifetime” of an object.

 Arrows: They indicate flow of message between objects.

Activation: It is a thin rectangle showing period of time, during which


an object is performing an action.

29
30
Use Case diagram :
This Use Case Diagram is a graphic depiction of the interactions among
the elements of Online Gas Booking System. It represents the
methodology used in system analysis to identify, clarify, and organize
system requirements of Online Gas Booking System. The main actors
of Online Gas Booking System in this Use Case Diagram are: Super
Admin, System User, Agencies, Customers, who perform the different
type of use cases such as Manage Gas, Manage Connections, Manage
Customers, Manage Bookings, Manage Payments, Manage Delivery,
Manage Users and Full Online Gas Booking System Operations. Major
elements of the UML use case diagram of Online Gas Booking System
are shown on the picture below.
31
The relationships between and among the actors and the use cases of
Online Gas Booking System:

• Super Admin Entity : Use cases of Super Admin are Manage Gas,
Manage Connections, Manage Customers, Manage Bookings,
Manage Payments, Manage Delivery, Manage Users and Full
Online Gas Booking System Operations
• System User Entity : Use cases of System User are Manage Gas,
Manage Connections, Manage Customers, Manage Bookings,
Manage Payments, Manage Delivery
• Agencies Entity : Use cases of Agencies are Create New
Connections, View Connection Requests, Add Booking, Deliver
Bookings
• Customers Entity : Use cases of Customers are Request For new
Connections, Refill Booking, Make Payment

32
Use Case Diagram of Online Gas Booking System :

33
System Design
Component Diagram :

This is a Component diagram of Online Gas Booking System which


shows components, provided and required interfaces, ports, and
relationships between the Customer, Connection, Booking, Payment
and Delivery. This type of diagrams is used in Component-Based
Development (CBD) to describe systems with Service-Oriented
Architecture (SOA). Online Gas Booking System UML component
diagram, describes the organization and wiring of the physical
components in a system.

Components of Component Diagram :

• Customer Component
• Connection Component
• Booking Component
• Payment Component
• Delivery Component

Features of Component Diagram:


▪ Models the components of Online Gas Booking System.
▪ Model the database schema of Online Gas Booking System
▪ Model the executables of an application of Online Gas Booking
System
▪ Model the system's source code of Online Gas Booking System
34
Component Diagram of Online Gas Booking System :

35
Deployment Diagram :

Deployment diagram is a structure diagram which shows architecture


of the system as deployment (distribution) of software artifacts to
deployment targets. Artifacts represent concrete elements in the
physical world that are the result of a development process.
Deployment Diagram is usually represented by a node which is either
hardware device or some software execution environment. Nodes
could be connected through communication paths to create
networked systems of arbitrary complexity. Note, that component
was directly deployed to nodes in UML 1.x deployment diagrams. In
UML 2.x artifacts are deployed to nodes, and artifacts could manifest
(implement) components. Components are deployed to nodes
indirectly through artifacts. Deployment diagrams could describe
architecture at specification level (also called type level) or at
instance level (similar to class diagrams and object diagrams).

• Specification level : deployment diagram shows some overview


of deployment of artifacts to deployment targets, without
referencing specific instances of artifacts or nodes.
• Instance level : deployment diagram shows deployment of
instances of artifacts to specific instances of deployment targets.
It could be used for example to show differences in deployments
to development, staging or production.

36
Purpose of Deployment Diagram :-

▪ They show the structure of the run-time system


▪ They capture the hardware that will be used to implement
the system and the links between different items of
hardware.
▪ They model physical hardware elements and the
communication paths between them
▪ They can be used to plan the architecture of a system.

Deployment Diagram of Online Gas Booking system :

37
Table Diagram :

User login table

Sr. No Column Datatype Description


1 email String User’s Email
2 password String Password of
user
3 username String Username
4 phoneno Integer Phone no of
user

Admin login:

ID INT id of admin
password string password of admin

Distributor login:

Sr. No Column Datatype Description


1 email String distributor’s
Email
2 password String Password of
distributor
3 name String Distributor name
4 phoneno Integer Phone no of
distributor

38
system implementation
System coding:
Home page :

<?php
session_start();
if(isset($_SESSION['cid']))
header("Location:consumer/");
else if(isset($_SESSION['did']))
header("Location:distributor/");
else if(isset($_SESSION['aid']))
header("Location:admin/");
?>
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gas Booking Portal</title>
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/fonts/font-awesome.min.css">
<link rel="stylesheet" href="assets/css/user.css">
<link rel="icon" href="fev.png" type="image/png" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<style>
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
margin: 0;
}
input[type=number]{
-moz-appearance:textfield;
}

#box .row{
margin-top:20px;
}
textarea {
resize: none;
}
</style>
</head>

<body>
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header"><a href="index.php" class="navbar-brand navbar-link"><i class="glyphicon
glyphicon-fire text-info"></i>Gas Booking Portal</a>
<button data-toggle="collapse" data-target="#navcol-1" class="navbar-toggle collapsed"><span class="sr-
only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-
bar"></span></button>
</div>
39
<div class="collapse navbar-collapse" id="navcol-1">
<ul class="nav navbar-nav navbar-right">
<li role="presentation" class="active"><a href="index.php"><i class="fa fa-home"></i> Home
</a></li>
<li role="presentation"><a href="#" data-toggle="modal" data-target="#signModal"><i
class="glyphicon glyphicon-pencil"></i> Sign Up</a></li>
<li role="presentation"><a href="#" data-toggle="modal" data-target="#loginModal"><i
class="glyphicon glyphicon-user"></i> Log-In</a></li>
</ul>
</div>
</div>
</nav>
<div class="jumbotron hero">
<div class="modal fade" role="dialog" tabindex="-1" id="signModal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-
hidden="true">×</span></button>
<h4 class="modal-title">Sign Up</h4></div>
<div class="modal-body">
<ul class="nav nav-pills">
<li class="active"><a data-toggle="pill" href="#con">New Consumer</a></li>
<li><a data-toggle="pill" href="#dis">New Distributor</a></li>
</ul>

<div class="tab-content">
<div id="con" class="tab-pane fade in active">

<br>
<p class='text-success'>Only valid Consumers to register on the site. Please ensure you give a correct mobile
no. that mapped with your Customer ID. All future notifications will be sent to this mobile no. only.</p>

<form class="bootstrap-form-with-validation" onSubmit="return sub();" method="post">


<div class="form-group">
<label class="control-label" for="text-input">Consumer ID</label>
<input class="form-control" type="number" name="conid" id="conid" min=1 max=9999999999 required />
</div>
<div class="form-group">
<label class="control-label" for="text-input" >Mobile<small> (Without Country Code & Only 10
Digits.)</small></label>
<input class="form-control" type="text" name="cmno" id="cmno" pattern="[1-9]{1}[0-9]{9}" title="At
least Ten Digits" maxlength=10 required />
</div>

<div class="form-group">
<label class="control-label" for="password-input" >Password Input</label><small> (Must contain at least
6 or more characters)</small>
<input class="form-control" type="password" name="pass" id="password" pattern=".{6,}" title="Six or
more characters" required maxlength=16/>
</div>
<div class="form-group">
<label class="control-label" for="password-input" >Confirm Password</label>
<input class="form-control" type="password" name="cpass" id="cpass" required maxlength=16/>

<script>
var password = document.getElementById("password")
, confirm_password = document.getElementById("cpass");

function validatePassword(){
40
if(password.value != confirm_password.value) {
confirm_password.setCustomValidity("Passwords Don't Match");
} else {
confirm_password.setCustomValidity('');
}
}

password.onchange = validatePassword;
confirm_password.onkeyup = validatePassword;
</script>

</div>
<div class="form-group">
<button class="btn btn-primary btn-block" type="submit" name="ncon_sub">Submit</button>
<br>
<p id='msg' class="text-danger"></p>
</div>
</form>

<script>
function sub()
{

var name = $("#conid").val();


var mno = $("#cmno").val();
var pass = $("#cpass").val();

$.ajax({
type: "POST",
url: "ncon.php",
data: "conid="+name+"&cmno="+mno+"&cpass="+pass,
success: function(html)
{
$('#msg').html(html);

var chk=document.getElementById('msg').innerHTML;
if(chk==='True')
{
alert('You have been successfully registered.');
//location.href= "index.php";
window.location.reload()
}
}
});

return false;
}
</script>

</div>

<div id="dis" class="tab-pane fade">


<br>
<p class='text-success'>After this process we will verify you.</p>

<form class="bootstrap-form-with-validation" method="post" id="new_con_form">

41
<div class="form-group">
<label class="control-label" for="text-input">Distributor Name</label>
<input class="form-control" type="text" name="dname" id="dname" maxlength=20 required />
</div>
<div class="form-group">
<label class="control-label" for="textarea-input">Address </label>
<textarea class="form-control" name="dadd" id="dadd" maxlength=100 required></textarea>
</div>
<div class="form-group">
<label for="inputState">City</label>
<select id="dcity" name="dcity" class="form-control" required>
<option value='Ahmedabad'>Ahmedabad</option>
<option value='Surat'>Surat</option>
<option value='Vadodara'>Vadodara</option>
<option value='Bhavnagar'>Bhavnagar</option>
<option value='Bhavnagar'>mumbai</option>
<option value='Bhavnagar'>pune</option>
<option value='Bhavnagar'>thane</option>
</select>
</div>
<div class="form-group">
<label for="inputZip">Pin-Code</label>
<input type="text" class="form-control" id="dpin" name="dpin" pattern=".{6,}" title="Six Digits"
maxlength=6 required>
</div>
<div class="form-group">
<label class="control-label" for="email-input">Email</label>
<input class="form-control" type="email" name="demail" id="demail" maxlength=30 required />
</div>
<div class="form-group">
<label class="control-label" for="text-input" >Mobile<small> (Without Country Code & Only 10
Digits.)</small></label>
<input class="form-control" type="text" name="dmno" id="dmno" pattern="[1-9]{1}[0-9]{9}" title="At
least Ten Digits" maxlength=10 required/>
</div>
<div class="form-group">
<label class="control-label" for="text-input" >Identification Proof<small> (Only PAN card accepted & It
must be image and size sould be &lt;2MB)</small></label>
<input class="form-control" type="file" name="id_img" required />
</div>
<div class="form-group">
<label class="control-label" for="password-input" >Password Input</label><small> (Must contain at least
6 or more characters)</small>
<input class="form-control" type="password" name="dpass" id="dpass" maxlength=16 pattern=".{6,}"
title="Six or more characters" required/>
</div>
<div class="form-group">
<label class="control-label" for="password-input" >Confirm Password</label>
<input class="form-control" type="password" name="dcpass" id="dcpass" maxlength=16 required />

<script>
var password = document.getElementById("dpass")
, confirm_password = document.getElementById("dcpass");

function validatePassword(){
if(password.value != confirm_password.value) {
confirm_password.setCustomValidity("Passwords Don't Match");
} else {
confirm_password.setCustomValidity('')
}
}
42
password.onchange = validatePassword;
confirm_password.onkeyup = validatePassword;
</script>

</div>
<div class="form-group">
<button class="btn btn-primary btn-block" type="submit" name="ncon_sub">Submit</button>
<br>
<p id='dmsg' class="text-danger"></p>
</div>
</form>

<script>
$(document).ready(function (e) {
$("#new_con_form").on('submit',(function(e) {
e.preventDefault();
$.ajax({
url: "ndis.php",
type: "POST",
data: new FormData(this),
contentType: false,
cache: false,
processData:false,
success: function(html)
{
$("#dmsg").html(html);
var chk=document.getElementById('dmsgg').innerHTML;
if(chk==='True')
{
alert('Your response has been registered, After verification we will notify you.');
window.location.reload()
}
}
});
}));
});
</script>

</div>

</div>

</div>
<div class="modal-footer">
<button class="btn btn-default" type="button" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>

<div class="modal fade" role="dialog" tabindex="-1" id="loginModal">

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

43
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-
hidden="true">×</span></button>
<h4 class="modal-title">Log-In</h4></div>
<div class="modal-body">
<p><b>Select your role</b></p>

<ul class="nav nav-pills">


<li class="active"><a data-toggle="pill" href="#conLogin">Consumer</a></li>
<li><a data-toggle="pill" href="#disLogin">Distributor</a></li>
<li><a data-toggle="pill" href="#adminLogin">Admin</a></li>
</ul>

<div class="tab-content">
<div id="conLogin" class="tab-pane fade in active">

<form class="bootstrap-form-with-validation" onSubmit="return cl_sub();" method="post">


<br>
<div class="form-group">
<label class="control-label" for="text-input">Consumer ID</label>
<input class="form-control" type="number" name="Lconid" id="Lconid" min=1 max=9999999999 required />
</div>

<div class="form-group">
<label class="control-label" for="password-input" >Password Input</label><small> (Must contain at least
6 or more characters)</small>
<input class="form-control" type="password" name="Lcpass" id="Lcpass" pattern=".{6,}" title="Six or
more characters" required maxlength=16/>
</div>

<div class="form-group">
<button class="btn btn-primary" type="submit" name="c_login">Log-In</button>
<a href="fg_pwd.php?con" target="_parent" class="btn btn-primary"
onclick="window.open('fg_pwd.php?con','newwindow','width=400,height=350');return false;"> Forgot Password?</a>
<br><br>
<p class="text-danger" id='clmsg'></p>
</div>
</form>

<script>
function cl_sub()
{

var conid = $("#Lconid").val();


var cpass = $("#Lcpass").val();

$.ajax({
type: "POST",
url: "c_log.php",
data: "conid="+conid+"&cpass="+cpass,
success: function(html)
{
$('#clmsg').html(html);

var chk=document.getElementById('clmsg').innerHTML;

if(chk==='True')
{
44
alert('You have been successfully logged in.');
location.href= "consumer/";
//window.location.reload()
}
}
});

return false;
}
</script>

</div>

<div id="disLogin" class="tab-pane fade in">

<form class="bootstrap-form-with-validation" onSubmit="return dl_sub();" method="post">


<br>
<div class="form-group">
<label class="control-label" for="text-input">Distributor ID</label>
<input class="form-control" type="number" name="Ldisid" id="Ldisid" min=1 max=99999 required />
</div>

<div class="form-group">
<label class="control-label" for="password-input" >Password</label><small> (Must contain at least 6 or
more characters)</small>
<input class="form-control" type="password" name="Ldpass" id="Ldpass" pattern=".{6,}" title="Six or
more characters" required maxlength=16/>
</div>

<div class="form-group">
<button class="btn btn-primary" type="submit" name="d_login">Log-In</button>
<a href="fg_pwd.php?dis" target="_parent" class="btn btn-primary"
onclick="window.open('fg_pwd.php?dis','newwindow','width=400,height=350');return false;"> Forgot Password?</a>
<br><br>
<p class="text-danger" id='dlmsg'></p>
</div>
</form>

<script>
function dl_sub()
{

var disid = $("#Ldisid").val();


var dispass = $("#Ldpass").val();

$.ajax({
type: "POST",
url: "d_log.php",
data: "disid="+disid+"&dispass="+dispass,
success: function(html)
{
$('#dlmsg').html(html);

var chk=document.getElementById('dlmsg').innerHTML;
if(chk==='True')
{
alert('You have been successfully logged in.');
location.href= "distributor/";
//window.location.reload()
45
}
}
});

return false;
}
</script>

</div>

<div id="adminLogin" class="tab-pane fade in">

<form class="bootstrap-form-with-validation" onSubmit="return al_sub();" method="post">


<br>
<div class="form-group">
<label class="control-label" for="text-input">Admin ID</label>
<input class="form-control" type="text" name="Ladid" id="Ladid" min=1 max=9999999999 required />
</div>

<div class="form-group">
<label class="control-label" for="password-input" >Password Input</label><small> (Must contain at least
6 or more characters)</small>
<input class="form-control" type="password" name="Ladpass" id="Ladpass" pattern=".{6,}" title="Six or
more characters" required maxlength=16/>
</div>

<div class="form-group">
<button class="btn btn-primary btn-block" type="submit" name="ad_login">Log-In</button>
<br><br>
<p class="text-danger" id='almsg'></p>
</div>
</form>

<script>
function al_sub()
{

var aid = $("#Ladid").val();


var apass = $("#Ladpass").val();

$.ajax({
type: "POST",
url: "admin_log.php",
data: "aid="+aid+"&apass="+apass,
success: function(html)
{
$('#almsg').html(html);

var chk=document.getElementById('almsg').innerHTML;
if(chk==='True')
{
alert('You have been successfully logged in.');
location.href= "admin/";
//window.location.reload()
}
}
});

return false;
46
}
</script>

</div>

</div>
</div>
<div class="modal-footer">
<button class="btn btn-default" type="button" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="carousel slide" data-ride="carousel" id="carousel-1">
<div class="carousel-inner" role="listbox">
<div class="item active"><img style=" margin: 0 auto;" src="assets/img/1.jpg" alt="First
Image"></div>
<div class="item"><img style=" margin: 0 auto;" src="assets/img/2.jpg" alt="Second Image"></div>
<div class="item"><img style=" margin: 0 auto;" src="assets/img/3.jpg" alt="Third Image"></div>
<div class="item"><img style=" margin: 0 auto;" src="assets/img/4.jpg" width="1000px"
height="400px" alt="Fourth Image"></div>
</div>
<div><a class="left carousel-control" href="#carousel-1" role="button" data-slide="prev"><i
class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">Previous</span></a><a class="right carousel-
control" href="#carousel-1" role="button"
data-slide="next"><i class="glyphicon glyphicon-chevron-right"></i><span class="sr-
only">Next</span></a></div>
</div>
</div>
<section class="testimonials">
<h2 class="text-center">Safety Tips For LPG Home - Do’s & Don’ts</h2>
<div class="container ">
<div class="row" id='box'>
<div class="col-md-6">
<div class="row">
<div class="col-md-12" style="text-align:center">
<u><h3><span class="glyphicon glyphicon-ok text-success"></span> DO'S</h3></u>
</div>
</div>
<div class="row">
<div class="col-md-3">
<img class="bg-success" style="padding:10px; width:60px;height:60px"
src="assets/img/tips/a1.png" />
</div>
<div class="col-md-9">
<h4>Use LPG in Ventilated Area</h3>
</div>
</div>
<div class="row">
<div class="col-md-3">
<img class="bg-success" style="padding:10px; width:60px;height:60px"
src="assets/img/tips/a2.png" />
</div>
<div class="col-md-9">
<h4>Before connecting, check for LPG leakage</h3>
</div>
</div>
<div class="row">
<div class="col-md-3">
<img class="bg-success" style="padding:10px; width:60px;height:60px"
src="assets/img/tips/a3.png" />
47
</div>
<div class="col-md-9">
<h4>Close the regulator knob once you finish cooking</h3>
</div>
</div>
<div class="row">
<div class="col-md-3">
<img class="bg-success" style="padding:10px; width:60px;height:60px"
src="assets/img/tips/a4.png" />
</div>
<div class="col-md-9">
<h4>Always keep the cylinder vertical, upright during usage and storage</h3>
</div>
</div>
<div class="row">
<div class="col-md-3">
<img class="bg-success" style="padding:10px; width:60px;height:60px"
src="assets/img/tips/a5.png" />
</div>
<div class="col-md-9">
<h4>Always install LPG pipeline above ground level</h3>
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-12" style="text-align:center">
<u><h3><span class="glyphicon glyphicon-remove text-danger"></span> DON'T</h3></u>
</div>
</div>
<div class="row">
<div class="col-md-3">
<img class="bg-danger" style="padding:10px; width:60px;height:60px"
src="assets/img/tips/b1.png" />
</div>
<div class="col-md-9">
<h4>Don’t place cylinders in closed areas.</h3>
</div>
</div>
<div class="row">
<div class="col-md-3">
<img class="bg-danger" style="padding:10px; width:60px;height:60px"
src="assets/img/tips/b2.png" />
</div>
<div class="col-md-9">
<h4>Do not use any flammable objects near or over the burner</h3>
</div>
</div>
<div class="row">
<div class="col-md-3">
<img class="bg-danger" style="padding:10px; width:60px;height:60px"
src="assets/img/tips/b3.png" />
</div>
<div class="col-md-9">
<h4>Do not switch on or off any lights or electrical equipment, smoke or use naked
flames incase of leakage</h3>
</div>
</div>
<div class="row">
<div class="col-md-3">

48
<img class="bg-danger" style="padding:10px; width:60px;height:60px"
src="assets/img/tips/b4.png" />
</div>
<div class="col-md-9">
<h4>Do not roll the cylinder</h3>
</div>
</div>
<div class="row">
<div class="col-md-3">
<img class="bg-danger" style="padding:10px; width:60px;height:60px"
src="assets/img/tips/b5.png" />
</div>
<div class="col-md-9">
<h4>Never store LPG in basement, cellar, elevated platforms</h3>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="features">
<div class="container">
<div class="row">
<div class="col-md-6">
<h2>Get in touch</h2>
<form action="mailto:[email protected]" method="post" enctype="text/plain">
<div class="form-group">
<input id="name" type="text" class="form-control" name="name" placeholder="Name"
required>
</div>
<div class="form-group">
<input id="email" type="email" class="form-control" name="email" placeholder="Email"
required>
</div>
<div class="form-group">
<input id="mno" type="number" class="form-control" name="mno" placeholder="Mobile
No." max=9999999999 required>
</div>
<div class="form-group">
<textarea id="msg" name="msg" class="form-control" rows="5" id="comment"
placeholder="Message" required></textarea>
</div>
<button type="submit" class="btn btn-default btn-block bg-success"><span class="glyphicon
glyphicon-send"></span> Submit</button>
</form>
</div>
<div class="col-md-6">
<br>
<div id="map" style="width:100%;height:400px;border-radius:5px"></div>
<script>
function myMap() {
var myCenter = new google.maps.LatLng(22.6064729,72.8165446);
var mapCanvas = document.getElementById("map");
var mapOptions = {center: myCenter, zoom: 13};
var map = new google.maps.Map(mapCanvas, mapOptions);
var marker = new google.maps.Marker({position:myCenter});
marker.setMap(map);
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDekdn4w7om4HjEgGDb75-
pJV_S3gOJBPU&callback=myMap"></script>
49
</div>
</div>
</div>
</section>
<footer class="site-footer">
<div class="container">
<div class="row">
<div class="col-sm-6">
<h5>Copyright © 2022</h5></div>
</div>
</div>
</footer>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
</body>

</html>

Admin Page :

<?php
session_start();
include_once('../includes/db_con.php');

if(isset($_SESSION['aid']))
{
$title='Admin-Dashboard';
$path='design/';

include_once('design/header.php');
echo '
<style>
.b{
padding:10px;
padding-top:20px;
margin:5px;
color:white;
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}
.b:hover
{
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
.row .glyphicon {
font-size: 60px;
padding:10px;
}
</style>
';
$tc = mysqli_fetch_row(mysqli_query($conn,"select count(cid) from consumer_detail"))[0];
$td = mysqli_fetch_row(mysqli_query($conn,"select count(did) from distributor_detail"))[0];
$tfc = mysqli_fetch_row(mysqli_query($conn,"select count(subject) from feedback_complain"))[0];

//order fetch
$po = mysqli_fetch_row(mysqli_query($conn,"select count(oid) from order_detail where status='Pending'"))[0];
//Pending
$ao = mysqli_fetch_row(mysqli_query($conn,"select count(oid) from order_detail where status='Approved'"))[0];
//Approved

50
$ofdo = mysqli_fetch_row(mysqli_query($conn,"select count(oid) from order_detail where status='Out for
delivery'"))[0]; //Out for delivery
$do = mysqli_fetch_row(mysqli_query($conn,"select count(oid) from order_detail where status='Delivered'"))[0];
//Delivered

echo '
<div class="container">
<br>
<div class="panel panel-default">
<div class="panel-heading"><h2>'.$title.'</h2></div>
<div class="panel-body">
<div class="row" style="padding:10px">
<div class="col-sm-4">
<div class="b row" style="background:#00b8d4">
<div class="col-md-4">
<span class="glyphicon glyphicon-user"></span>
</div>
<div class="col-md-8">
<h4><strong>Total Consumers</strong></h4>
<h3>'.$tc.'</h3>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="b row" style="background:#00c853">
<div class="col-md-4">
<span class="glyphicon glyphicon-user"></span>
</div>
<div class="col-md-8">
<h4><strong>Total Distributors</strong></h4>
<h3>'.$td.'</h3>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="b row" style="background:#455a64">
<div class="col-md-4">
<span class="glyphicon glyphicon-list-alt"></span>
</div>
<div class="col-md-8">
<h4><strong>Feedback & Complaints</strong></h4>
<h3>'.$tfc.'</h3>
</div>
</div>
</div>
</div>

<!-- order chart -->


<!-- MDB core JavaScript -->
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.5.0/js/mdb.min.js"></script>

<div class="row" style="padding:30px">


<div class="col-sm-12" style="box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px
rgba(0,0,0,0.24);">
<h3 style="text-align:center">Orders statistics</h3>
<canvas id="doughnutChart"></canvas>
</div>
</div>
<script>
//doughnut
51
var ctxD = document.getElementById("doughnutChart").getContext("2d");
var myLineChart = new Chart(ctxD, {
type: "doughnut",
data: {
labels: ["Pending", "Approved", "Out for delivery", "Delivered"],
datasets: [
{
data: ['.$po.','.$ao.','.$ofdo.','.$do.'],
backgroundColor: ["#F7464A", "#46BFBD", "#FDB45C", "#949FB1"],
hoverBackgroundColor: ["#FF5A5E", "#5AD3D1", "#FFC870", "#A8B3C5"]
}
]
},
options: {
responsive: true
}
});
</script>

</div>
</div>
</div>
';
include_once('design/footer.php');
}
else
{
header('Location:../index.php');
}
?>

User page :

<?php
session_start();
include_once('../includes/db_con.php');

if(isset($_SESSION['cid']))
{
$title='Consumer-Dashboard';
$cid=$_SESSION['cid'];

$result=mysqli_query($conn,"select name from consumer_detail where cid=$cid");


$r=mysqli_fetch_row($result);

$con_name=' '.$r[0];
$path='design/';

include_once('design/header.php');

//Add active class for navigation bar


echo "
<script>
$(document).ready(function(){
$('').addClass('active');
});
</script>
";

52
//fetch current consumer detail
$result = mysqli_query($conn,"select * from consumer_detail where cid=$cid") or die(mysqli_error($conn));
$r = mysqli_fetch_array($result);

echo '
<style>
.row .glyphicon {
font-size: 50px;
}
.square-service-block
{

position:relative;
overflow:hidden;
margin:15px auto;
//padding:10px;
}
.square-service-block a {
border-radius: 5px;
display: block;
padding: 30px 10px;
text-align: center;
width: 100%;
}
.square-service-block a:hover b{
text-decoration:underline;
}
table
{
font-size:medium;
}
thead tr{
background: #009688;
color:white;
}
</style>

<div class="container">
<br>
<div class="panel panel-default">
<div class="panel-heading"><h2>'.$title.'</h2></div>
<div class="panel-body">

<div class="row">

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

<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th colspan=2 class="text-center">Consumer Details</th>
</tr>
</thead>
<tbody>
<tr>
<th>Consumer ID :</th>
<td>'.$r['cid'].'</td>
</tr>
<tr>
<th>Consumer Name :</th>
53
<td>'.$r['name'].'</td>
</tr>
<tr>
<th>Registered Address :</th>
<td>'.$r['address'].'</td>
</tr>
<tr>
<th>Registered Mobile No. :</th>
<td>'.$r['m_no'].'</td>
</tr>
<tr>
<th>Registered Email :</th>
<td>'.$r['e_id'].'</td>
</tr>
</tbody>
</table>';

//fetch linked distributor detail


$did=$r['did'];
$result = mysqli_query($conn,"select * from distributor_detail where did=$did") or
die(mysqli_error($conn));
$r = mysqli_fetch_array($result);

echo '
<table class="table table-striped">
<thead>
<tr>
<th colspan=2 class="text-center">Linked Distributor Details</th>
</tr>
</thead>
<tbody>
<tr>
<th>Distributor ID :</th>
<td>'.$r['did'].'</td>
</tr>
<tr>
<th>Distributor Name :</th>
<td>'.$r['name'].'</td>
</tr>
</tbody>
</table>

</div>

</div>
<div class="col-sm-6">

<div class="row">
<div class="col-sm-6">
<div class="square-service-block">
<a href="c_prof.php" class="btn btn-info btn-lg">
<span class="glyphicon glyphicon-user"></span>
<br><b>Profile<b>
</a>
</div>
</div>
<div class="col-sm-6">
<div class="square-service-block">
<a href="book_ord.php" class="btn btn-success btn-lg">
<span class="glyphicon glyphicon-shopping-cart"></span>
<br><b>Book Order<b>
54
</a>
</div>
</div>
<div class="col-sm-6">
<div class="square-service-block">
<a href="track_refill.php" class="btn btn-primary btn-lg">
<span class="glyphicon glyphicon-hourglass"></span>
<br><b>Track Order<b>
</a>
</div>
</div>
<div class="col-sm-6">
<div class="square-service-block">
<a href="ord_history.php" class="btn btn-warning btn-lg">
<span class="glyphicon glyphicon-copy"></span>
<br><b>Order History<b>
</a>
</div>
</div>
<div class="col-sm-6">
<div class="square-service-block">
<a href="feed_com.php" class="btn btn-danger btn-lg">
<span class="glyphicon glyphicon-edit"></span>
<br><b>Feedback & Complaint<b>
</a>
</div>
</div>
</div>

</div>

</div>
</div>
</div>
';

include_once('design/footer.php');
}
else
{
header('Location:../index.php');
}
?>

Distributor Page:

<?php
session_start();
include_once('../includes/db_con.php');

if(isset($_SESSION['did']))
{
$title='Distributor-Dashboard';
$did=$_SESSION['did'];

$result=mysqli_query($conn,"select name from distributor_detail where did=$did");


$r=mysqli_fetch_row($result);

$dis_name=' '.$r[0];
$path='design/';
55
include_once('design/header.php');

//fetch current distributor details


$result=mysqli_query($conn,"select * from distributor_detail where did=$did") or die(mysqli_error($conn));
$r=mysqli_fetch_array($result);

echo '
<style>
.row .glyphicon {
font-size: 50px;
}
.square-service-block
{

position:relative;
overflow:hidden;
margin:15px auto;
//padding:10px;
}
.square-service-block a {
border-radius: 5px;
display: block;
padding: 30px 10px;
text-align: center;
width: 100%;
}
.square-service-block a:hover b{
text-decoration:underline;
}
table
{
font-size:medium;
}
thead tr{
background: #009688;
color:white;
}
</style>

<div class="container">
<br>
<div class="panel panel-default">
<div class="panel-heading"><h2>'.$title.'</h2></div>
<div class="panel-body">

<div class="row">

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

<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th colspan=2 class="text-center">Distributor Details</th>
</tr>
</thead>
<tbody>
<tr>
<th>Distributor ID :</th>
<td>'.$r['did'].'</td>
56
</tr>
<tr>
<th>Distributor Name :</th>
<td>'.$r['name'].'</td>
</tr>
<tr>
<th>Registered Address :</th>
<td>'.$r['address'].'</td>
</tr>
<tr>
<th>Registered Mobile No. :</th>
<td>'.$r['m_no'].'</td>
</tr>
<tr>
<th>Registered Email :</th>
<td>'.$r['e_id'].'</td>
</tr>
</tbody>
</table>
</div>

</div>';

echo '
<div class="col-sm-6">

<div class="row">
<div class="col-sm-6">
<div class="square-service-block">
<a href="d_prof.php" class="btn btn-info btn-lg">
<span class="glyphicon glyphicon-user"></span>
<br><b>Profile<b>
</a>
</div>
</div>
<div class="col-sm-6">
<div class="square-service-block">
<a href="add_con.php" class="btn btn-success btn-lg">
<span class="glyphicon glyphicon-copy"></span>
<br><b>Add Connection<b>
</a>
</div>
</div>
<div class="col-sm-6">
<div class="square-service-block">
<a href="man_con.php" class="btn btn-primary btn-lg">
<span class=" glyphicon glyphicon-tasks"></span>
<br><b>Manage Consumers<b>
</a>
</div>
</div>
<div class="col-sm-6">
<div class="square-service-block">
<a href="chk_ord.php" class="btn btn-warning btn-lg">
<span class="glyphicon glyphicon-retweet"></span>
<br><b>Check Orders<b>
</a>
</div>
</div>
<div class="col-sm-6">
<div class="square-service-block">
57
<a href="view_fc.php" class="btn btn-danger btn-lg">
<span class="glyphicon glyphicon-edit"></span>
<br><b>View <br>Feedback & Complaint<b>
</a>
</div>
</div>
</div>

</div>

</div>
</div>
</div>
';

include_once('design/footer.php');
}
else
{
header('Location:../index.php');
}
?>

User Login :

<?php
session_start();
include_once('includes/db_con.php');

if(isset($_REQUEST['conid']))
{
$cid = $_REQUEST['conid'];
$cpass = $_REQUEST['cpass'];

$result=mysqli_query($conn,"SELECT pwd from consumer_detail where cid=$cid") or die(mysqli_error($conn));


$r=mysqli_fetch_row($result);

if($r[0]==$cpass)
{
$result=mysqli_query($conn,"SELECT status from consumer_detail where cid=$cid") or
die(mysqli_error($conn));
$r=mysqli_fetch_row($result);

if($r[0]=='Deactive')
{
echo 'Your account is now deactivated due to not access since last five month.';
}
else
{
$_SESSION['cid']=$cid;
echo 'True';
}
}
else
{
echo 'Invalid ID or Password.';
}
}
else
{

58
header('Location:index.php');
}
?>

Distributor Login :

<?php
session_start();
include_once('includes/db_con.php');

if(isset($_REQUEST['disid']))
{
$disid = $_REQUEST['disid'];
$dispass = $_REQUEST['dispass'];

$result=mysqli_query($conn,"SELECT pwd from distributor_detail where did=$disid") or die(mysqli_error($conn));


$r=mysqli_fetch_row($result);

if($r[0]==$dispass)
{
$result=mysqli_query($conn,"SELECT status from distributor_detail where did=$disid") or
die(mysqli_error($conn));
$r=mysqli_fetch_row($result);

if($r[0]=='Deactive')
{
echo 'Your account is under verification process.';
}
else
{
$_SESSION['did']=$disid;
echo 'True';
}
}
else
{
echo 'Invalid ID or Password.';
}
}
else
{
header('Location:index.php');
}
?>

Database :

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

CREATE TABLE `admin` (


`aid` int(10) NOT NULL,
`pwd` varchar(16) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `admin` (`aid`, `pwd`) VALUES


(1, 'rootroot')
59
CREATE TABLE `consumer_detail` (
`cid` int(10) NOT NULL,
`did` int(5) NOT NULL,
`pwd` varchar(16) DEFAULT NULL,
`name` varchar(30) NOT NULL,
`address` varchar(100) NOT NULL,
`city` varchar(10) NOT NULL,
`pin` int(6) NOT NULL,
`m_no` bigint(10) NOT NULL,
`e_id` varchar(30) NOT NULL,
`reg_date` date DEFAULT NULL,
`status` varchar(15) NOT NULL DEFAULT 'Not Registered'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `consumer_detail` (`cid`, `did`, `pwd`, `name`, `address`, `city`, `pin`, `m_no`, `e_id`, `reg_date`,
`status`) VALUES
(2, 1, '111111', 'Raj Pravinbhai Zalavadiya', '201,Sai Darshan, Nana Varachha', 'Surat', 394525, 8787954652,
'[email protected]', '2018-02-07', 'Deactive'),
(3, 2, '333333', 'Biren V. Gadhiya', 'B12, Khodiyar row house, Katargam', 'Ahmedabad', 366666, 7877777777,
'[email protected]', '2018-02-08', 'Active'),
(5, 1, '555555', 'Jenish Kishorbhai Mangukiya', 'D2/304, Gangotri rec., Sudama chowk, Mota Varachha', 'Surat',
394101, 9904436106, '[email protected]', '2018-02-09', 'Active'),
(6, 1, NULL, 'Krunal Dineshbhai Lukhi', '21, White House, Panvel point road', 'Surat', 394101, 9876543210,
'[email protected]', NULL, 'Not Registered'),
(225, 1, '225225', 'Ravi K. Kanpara', '22', 'Surat', 388554, 8565655521, '[email protected]', '2018-02-21', 'Active');

CREATE TABLE `distributor_detail` (


`did` int(5) NOT NULL,
`pwd` varchar(16) NOT NULL,
`name` varchar(20) NOT NULL,
`address` varchar(100) NOT NULL,
`city` varchar(10) NOT NULL,
`pin` int(6) NOT NULL,
`m_no` bigint(10) NOT NULL,
`e_id` varchar(30) NOT NULL,
`status` varchar(10) NOT NULL DEFAULT 'Deactive',
`proof` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `distributor_detail` (`did`, `pwd`, `name`, `address`, `city`, `pin`, `m_no`, `e_id`, `status`,
`proof`) VALUES
(1, '111111', 'Jai Ganesh Agency', 'D12, GIDC-Kapodra', 'Surat', 384511, 8200703812, '[email protected]', 'Active',
'distributor/proof/1.jpg'),
(2, '222222', 'Gitanjali PVT LTD', '12, Amazon plaza, Ring road', 'Ahmedabad', 355002, 8547856321,
'[email protected]', 'Active', 'distributor/proof/2.jpg'),
(9, '111111', 'Nandan LTD', '12, Birla Mart, Behind Maruti Chowk', 'Bhavnagar', 555656, 7898765421,
'[email protected]', 'Active', 'distributor/proof/9.jpg'),
(10, '333333', 'Tapovan Group', 'A55, JZ Shopping Mart, LH road', 'Vadodara', 366444, 9875452121, '[email protected]',
'Deactive', 'distributor/proof/10.png');

CREATE TABLE `feedback_complain` (


`cid` int(10) NOT NULL,
`did` int(5) NOT NULL,
`date` date NOT NULL,
`time` time NOT NULL,
`type` varchar(10) NOT NULL,
`subject` varchar(30) NOT NULL,
`description` varchar(300) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
60
INSERT INTO `feedback_complain` (`cid`, `did`, `date`, `time`, `type`, `subject`, `description`) VALUES
(5, 1, '2018-02-25', '10:34:46', 'Feedback', 'Product related', 'Last product delivery taken two weeks.'),
(5, 1, '2018-02-25', '10:34:53', 'Feedback', 'Website related', 'Your website\'s interface is awesome.'),
(225, 1, '2018-02-25', '10:35:48', 'Complaint', 'Defected Product', 'Delivered product is defected.'),
(225, 1, '2018-02-25', '10:35:54', 'Feedback', 'Website related', 'Good user-interface.'),
(3, 2, '2018-04-06', '18:14:48', 'Complaint', 'Notification related', 'Since two month, I didn\'t getting any
SMS/Email regarding product delivery, I am doing manually by checking order status in website. Please fix this
issue.');

CREATE TABLE `order_detail` (


`oid` int(10) NOT NULL,
`cid` int(10) NOT NULL,
`did` int(5) NOT NULL,
`date` date NOT NULL,
`time` time NOT NULL,
`amt` float NOT NULL DEFAULT '475',
`status` varchar(20) NOT NULL DEFAULT 'Pending'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `order_detail` (`oid`, `cid`, `did`, `date`, `time`, `amt`, `status`) VALUES
(10, 5, 1, '2018-02-14', '10:07:17', 475, 'Delivered'),
(15, 5, 1, '2018-02-14', '10:15:24', 475, 'Delivered'),
(16, 5, 1, '2018-02-14', '11:13:52', 475, 'Delivered'),
(17, 225, 1, '2018-02-21', '10:10:04', 475, 'Delivered'),
(18, 225, 1, '2018-02-26', '10:04:35', 475, 'Approved'),
(19, 5, 1, '2018-03-21', '18:36:45', 475, 'Delivered'),
(24, 5, 1, '2018-03-22', '13:32:31', 475, 'Pending'),
(25, 3, 2, '2018-04-06', '17:39:56', 475, 'Pending');

ALTER TABLE `admin`


ADD PRIMARY KEY (`aid`);

ALTER TABLE `consumer_detail`


ADD PRIMARY KEY (`cid`),
ADD KEY `con_dis_id` (`did`);

ALTER TABLE `distributor_detail`


ADD PRIMARY KEY (`did`);

ALTER TABLE `feedback_complain`


ADD KEY `fc_con_id` (`cid`),
ADD KEY `fc_dis_id` (`did`);

ALTER TABLE `order_detail`


ADD PRIMARY KEY (`oid`),
ADD KEY `od_con_id` (`cid`),
ADD KEY `od_dis_id` (`did`);

ALTER TABLE `admin`


MODIFY `aid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

ALTER TABLE `consumer_detail`


MODIFY `cid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=226;

ALTER TABLE `distributor_detail`


MODIFY `did` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

ALTER TABLE `order_detail`


MODIFY `oid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;
61
ALTER TABLE `consumer_detail`
ADD CONSTRAINT `con_dis_id` FOREIGN KEY (`did`) REFERENCES `distributor_detail` (`did`);

ALTER TABLE `feedback_complain`


ADD CONSTRAINT `fc_con_id` FOREIGN KEY (`cid`) REFERENCES `consumer_detail` (`cid`),
ADD CONSTRAINT `fc_dis_id` FOREIGN KEY (`did`) REFERENCES `distributor_detail` (`did`);

ALTER TABLE `order_detail`


ADD CONSTRAINT `od_con_id` FOREIGN KEY (`cid`) REFERENCES `consumer_detail` (`cid`),
ADD CONSTRAINT `od_dis_id` FOREIGN KEY (`did`) REFERENCES `distributor_detail` (`did`);
COMMIT;

System Testing :
System testing of software or hardware is testing conducted on a complete, integrated system
to evaluate the system's compliance with its specified requirements. System testing falls within
the scope of blackbox testing, and assuch, should require no knowledge of the inner design of the
code or logic.

As a rule, system testing takes, as its input, all of the "integrated" software components that
have passed integration testing and also the software systemitself integrated with any applicable
hardware system(s). The purpose of integration testing is to detect any inconsistencies between
the software unitsthat are integrated together (called assemblages) or between any of the
assemblages and the hardware.

Testing the whole system System testing is performed on the entire system inthe context of a
Functio3nal Requirement Specification(s) (FRS) and/or a System Requirement.

Specification (SRS). System testing tests not only the design, but also the behavior and even the
believed expectations of the customer. It is also intendedto test up to and beyond the bounds
defined in the software/hardware requirements specification(s).

Validation

At the culmination of the integration testing, Software is completely assembled as a package.


Interfacing errors have been uncovered and corrected and a final senes of software test begin in
validation testing. Validation testing can be defined in many ways, but a simple definition is that the
validation succeeds when the software functions in a manner that is expected by the customer.
Aftervalidation test has been conducted, one of the three possible conditions exists.

• The function or performance characteristics confirm to specification andare accepted.


• A deviation from specification is uncovered and a deficiency lists iscreated.
• Proposed system under consideration has been tested by using validationtest and found to
be working satisfactory.

62
Validation Table :

User Table :
Sr. Column Datatype Description
No
1 userId Integer Store id of user

2 name String Store name of user

3 email String Store email of user

4 password String Store password of user

Output Testing

After performing the validation testing, the next step is output testing
of the proposed system, since no system could be useful if it does not
produce the required output in a specific format. The output format on the
screen is found 92to be correct. The format was designed in the system
design time according to the user needs. For the hard copy also; the output
comes as per the specified requirements by the user. Hence output testing
did not result in any correction for the system.

63
Home page :

64
Consumer Register Page :

Distributor Register Page :

65
Login Page :

Admin Login Page :

66
Admin Home Page :

Manage Distributor :

67
Feedback or Complaints Page :

Consumer Login Page:

68
Consumer Home Page :

Consumer order :

69
Track Order :

Feedback page :

70
Consumer Profile :

71
Distributor Login Page :

Distributor Home Page :

72
Manage Orders:

Manage Consumers :

73
Future Enhancement
• User Interface Improvements.
• Add more functionalities to admin side.
• User Experience.
• OTP based Login System.
• Mobile Number and Email alert system.

REFERENCES
https://www.w3schools.com/php/
https://www.google.com/
https://www.youtube.com/
https://creately.com/

74
75

You might also like