Mini Project
Mini Project
Mini Project
1
INTRODUCTION
2
Problem Definition
In some cases, the existing system might heavily rely on manual data entry for recording meter readings
and customer information. This manual process can be time-consuming and prone to human errors.
2. Paper-Based Billing:
Traditional systems may generate paper-based bills, which require printing, sorting, and mailing to
customers. This can lead to delays in bill delivery and increases the overall administrative workload.
In manual systems, customers may have limited access to their billing information. They might need to visit
the Electricity Board's office or make inquiries over the phone to get details about their bills and
consumption.
4. Billing Discrepancies:
Manual calculations and data entry can result in billing discrepancies, leading to customer complaints and
revenue loss for the Electricity Board.
The existing system might not have the capability to monitor electricity consumption in real time. This
limitation can hinder proactive load management and resource planning.
Manual payment processing and record-keeping can be inefficient, leading to delays in payment updates
and difficulties in tracking outstanding dues.
7. Limited Analytics:
3
The existing system might lack analytical tools and data insights, making it challenging for the Electricity
Board to analyze consumption patterns and plan for future demand.
In manual systems, handling customer grievances and resolving issues might take longer, impacting overall
customer satisfaction. 9. Dependency on Physical Documents: The reliance on physical documents for
record-keeping can lead to storage and retrieval challenges, especially when dealing with a large customer
base.
Updating tariff rates and applying changes to the billing system might be a time-consuming process in the
existing setup. Overall, the existing EB Bill Management System might work adequately, but it may have
several limitations in terms of efficiency, customer service, and resource management.
1) Manual Data Entry Errors: Manual data entry for meter readings and customer information can lead to
human errors, resulting in inaccurate billing calculations and discrepancies in bills.
2) Delayed Bill Generation: The manual process of collecting and processing meter readings can cause delays
in bill generation and delivery, leading to late payments and customer dissatisfaction.
3) Inefficient Billing Process: The manual billing process can be time-consuming and labor-intensive,
increasing the administrative workload for the Electricity Board.
4) Limited Customer Access: Customers may have limited access to their billing information and
consumption data. They may need to visit the Electricity Board's office or make phone inquiries to get
details about their bills.
5) Difficulty in Bill Dispute Resolution: Billing discrepancies arising from manual processes can lead to
disputes, and resolving such issues can be time-consuming and cumbersome.
6) Lack of Real-Time Monitoring: The existing system may lack real-time monitoring of electricity
consumption, making it challenging for the Electricity Board to manage resources efficiently and respond
to fluctuations in demand.
7) Payment Processing Challenges: Manual payment processing and record-keeping can lead to delays in
updating payment information and difficulties in tracking outstanding dues.
4
8) Limited Data Insights: The existing system may not provide robust analytics and data insights, hindering
the Electricity Board's ability to analyze consumption patterns and plan for future demand effectively.
9) Customer Grievance Handling: Handling customer grievances and resolving issues may take longer in a
manual system, impacting overall customer satisfaction. Dependence on Physical Documents: Relying on
physical documents for record-keeping can lead to storage and retrieval challenges, especially when dealing
with a large customer base.
6
4. Multiple Payment Options:
The proposed system offers various payment methods, such as online payment gateways, mobile wallets,
and bank transfers, making it convenient for customers to settle their bills.
5. Real-time Billing Notifications:
Customers receive real-time billing notifications via SMS or email, reminding them of upcoming
payments and due dates to avoid late fees.
6. Consumption Analytics and Energy Insights:
The system provides customers with consumption analytics and energy insights, enabling them to
monitor their electricity usage patterns and take energy-saving measures.
The proposed system offers advanced reporting and data analytics tools for the Electricity Board to
analyze consumption patterns, identify high-consumption areas, and plan resource allocation effectively.
The system facilitates easy tariff management, allowing the Electricity Board to update tariff rates and
The digitalized billing system reduces paper usage, contributing to environmental sustainability.
The proposed system is designed to be scalable, accommodating a growing number of customers. Strong
security measures are implemented to safeguard customer data and prevent unauthorized access.
The system is integrated with customer service channels to offer personalized assistance and support to
customers.
7
3. FEASIBILITY STUDY
The preliminary investigation examines project feasibility and the likelihood the systemwill be useful to the
organization. The main objective of the feasibility study is to test the Technical, Legal, Schedule,
Operational, and Economical feasibility of adding new modules and debugging the old running system. All
system is feasible if they are unlimited resourcesand infinite time. There are aspects in the feasibility study
portion of the preliminaryinvestigation:
o Assessment of existing technical infrastructure and compatibility with the proposed system.
o Evaluation of the required hardware, software, and networking resources.
o Identification of potential technical challenges and risks in implementing the system.
o Analysis of the availability of skilled technical personnel to develop, deploy, and maintain the system.
o Assessment of how the proposed system fits into the existing operational processes of the Electricity
Board.
o Analysis of the impact on daily operations, staff workload, and customer service.
o Identification of any potential disruptions during the transition from the existing system to the proposed
system.
o Evaluation of the willingness and readiness of staff to adapt to the new system.
o Cost estimation for the development, deployment, and maintenance of the EB Bill Management System.
o Calculation of potential cost savings and benefits derived from the automation of billing processes.
o Analysis of the return on investment (ROI) and payback period for the project.
o Comparison of costs with the potential benefits to determine whether the project is economically viable.
8
3.4. Legal Feasibility:
o Examination of any legal or regulatory requirements related to implementing the EB Bill Management
System.
o Evaluation of data privacy and security compliance to ensure customer data protection.
o Assessment of any potential legal barriers or constraints that may arise during the system implementation.
9
4. SYSTEM ANALYSIS
1. Introduction:
o Purpose: A brief overview of the SRS and the purpose of the EB Bill Management System project.
o Scope: The scope of the system, including the functionalities it will provide and the intended users.
2. System Overview:
o High-Level Description: A high-level description of the EB Bill Management System, its goals, and
objectives.
o Stakeholders: Identification of stakeholders involved in the project, including users, administrators, and
managers.
3. Functional Requirements:
o Detailed Description of Functionalities: A comprehensive list of functionalities the system must provide,
including:
o User registration and login.
o Automated meter reading and data collection.
o Bill generation based on meter readings and tariff rates.
10
4. Non-Functional Requirements:
5. Constraints:
o Technical Constraints: Limitations imposed by the existing technical infrastructure and environment.
o Budget and Time Constraints: Budgetary limitations and project schedule constraints.
o Assumptions made during the requirements gathering phase that may impact the project.
o External dependencies, such as third-party APIs or services required for system integration.
7. Data Requirements:
o Description of the data required for the system, including customer information, billing data, and
consumption records.
8. System Architecture:
o Use case diagrams and detailed descriptions of various user interactions with the system.
10. Glossary:
The Software Requirement Specification serves as a crucial reference for all project stakeholders,
including developers, testers, and project managers, ensuring a clear understanding of the system
requirements and expectations.
11
4.2 HARDWARE REQUIREMENTS:
12
5.SYSTEM DESIGN
In most situations, many physical database design decisions are implicit or eliminated when we choose
the database management technologies to use with the information system we are designing. Since many
organizations have standard for operating systems, database management system and data access languages,
we must deal only with those choices not implicit in the given technologies .The primary goal of database
design is data processing efficiency. In the context diagram, the system is represented as a single process
called "EB Bill Management System," which interacts with two external entities: "Electricity Board" and
"Customer." The "Electricity Board" entity represents the organization providing electricity services, and
the "Customer" entity represents the consumers using electricity.
13
Level 1 DFD:
In the Level 1 DFD, the "EB Bill Management System" process is broken down into two sub-processes:
"Process 1" (Data Entry) and "Process 2" (Bill Generation). The "Data Entry" process is responsible for
capturing meter readings and customer data, while the "Bill Generation" process calculates electricity
consumption and generates bills accordingly.
14
LEVEL 2 DFD (FOR PROCESS 1 - DATA ENTRY):
o In the Level 2 DFD, we focus on the "Process 1" (Data Entry) sub-process. The data is directly captured
from the "Smart Meter" device, which provides real-time electricity consumption readings.
The architecture as define on in built sector derived section defined legal act provide content variant
function deploy.
BillDate Date
City Text 30
15
In this table there are no multivalued attributes. So this is in First Normal Form.
In this table there are no multivalued attributes. So this is in First Normal Form.
In this table there are no multivalued attributes. So this is in First Normal Form.
BILL CHARGE:
Code Design Code Test
16
Bill_no Number Auto Primary Key
In this table there are no multivalued attributes. So this is in First Normal Form.
Street Text 20
These are the tables, which are used in the project development for storing different record. Every table
has a primary key for storing unique record . we have also used foreign key for making relationship
between the tables.
Input Stream:
o Input stream shows the way by which information are passed in to the table as record. We have used
mainly two forms in the project inputting the record in the table first is commercial bill record form and
17
second is domestic bill record form. By these form we input the records of the table name, address,
service centre, customer_id etc
Output Stream:
o Input stream shows the way by which information viewed by the user which are stored in the database.
o Commercial bill calculation form and domestic bill calculation forms are used as an output stream we can
see the record and also can see the name , bill date,total_bill etc.
o Commercial report form and home report form are used for getting the total record of the domestic bill
and commercial bill in printed form.
custom_form
o Name
o E-mail
o Number
o Bill
o Customer Query
o Consummation current Unit
18
4 Address Big int Foreign key
19
6. SOFTWARE DEVELOPMENT ENVIRONMENT
PHP frameworks are a crucial part of web development, as they provide a structured and
organized way to build robust web applications. A PHP frameworkis a collection of pre-written,
reusable code and libraries that streamline the development process, promote code reusability,
and enforce best practices. These frameworks aim to simplify common tasks, enhance security,
and improve overallefficiency in web application development.
MVC Architecture: Most PHP frameworks follow the Model-View- Controller (MVC)
architectural pattern. MVC separates the application intothree interconnected components: the
Model (data and business logic), the View (presentation layer), and the Controller (handles user
input and manages the flow between Model and View). This separation of concerns improves
code maintainability and scalability.
Routing: PHP frameworks typically provide a routing system that allows developers to define
URL patterns and map them to specific actions or controllers. This enables clean and user-
friendly URLs while providing flexibility in handling different requests.
Database Abstraction: Frameworks usually offer built-in support for database access through
ORM (Object-Relational Mapping) or database abstraction layers. ORM allows developers to
interact with the database using object-oriented code, abstracting away low-level SQL queries.
Template Engine: To separate presentation from logic, PHP frameworks often come with a
template engine. This engine allows developers to defineHTML templates with placeholders,
which are then filled with data from theapplication during runtime.
Form Handling and Validation: Validating and handling form submissions is a common task in
web applications. PHP frameworks often provide libraries to facilitate form validation and
20
processing, making it easier to dealwith user input securely.
Security Features: Many PHP frameworks include built-in security featuresto help developers
prevent common vulnerabilities, such as SQL injection, XSS (Cross-Site Scripting), CSRF
(Cross-Site Request Forgery), and more. These features are often implemented by default,
reducing the chance of security loopholes if used correctly.
Error Handling and Logging: Effective error handling and logging are crucial for debugging and
monitoring applications. PHP frameworks usuallyoffer tools to log errors and exceptions, helping
developers identify and fix issues quickly.
Session and Cookie Management: Web applications often require session and cookie
management to maintain user state. PHP frameworks often provide convenient APIs for working
with sessions and cookies securely.
XAMPP is a free and open-source software package that facilitates the setup and
deployment of a local web server environment. The primary objectives ofXAMPP are as follows:
Simplify Web Development: XAMPP aims to simplify the process of setting up a local web server
environment for web development. It providesan all-in-one package that includes Apache (web
server), MySQL/MariaDB (database server), PHP (server-side scripting language), and Perl
(scripting language), allowing developers to install and configurethese components easily.
Testing and Debugging: XAMPP provides a local server environment where developers can test
and debug their web applications before deploying them to a live server. This local testing
environment helps identify and fix issues early in the development process, leading to more
robust and stable applications.
Learning and Education: XAMPP is widely used in educational settings toteach web development
and programming. Its user-friendly installation andconfiguration process make it an ideal tool for
beginners to start learning web development concepts and practices.
21
Web Application Prototyping: XAMPP allows developers to quickly prototype web applications
without the need for internet connectivity or a live server. It provides an isolated environment on
the developer's computer, enabling rapid development and experimentation.
Ease of Deployment: While primarily intended for local development and testing, XAMPP can
also be used as a lightweight server for small-scale production deployments, such as hosting
small websites or intranet applications.
Integration of Web Development Tools: XAMPP comes with phpMyAdmin, a popular web-
based database management tool, which makes it easy to manage MySQL/MariaDB databases.
This integration further simplifies the database administration tasks during development.
XAMPP's Apache component is one of the key elements in the XAMPP software package.
Apache is a popular open-source web server software that powers a significant portion of
websites on the internet. When you install XAMPP, it includesthe Apache HTTP Server, which
allows you to run a local web server environment on your computer for web development and
testing purposes. Here's an overview of XAMPP's Apache:
Web Server Functionality: Apache is a robust web server that serves static content (HTML, CSS,
images, etc.) and handles dynamic content by processing server-side scripts, such as PHP files.
When you start XAMPP, Apache runs inthe background and listens for incoming HTTP requests
on your local machine.
Port Configuration: By default, Apache in XAMPP listens on port 80 for HTTPrequests and port
443 for HTTPS requests. These ports are the standard ports for web traffic. However, you can
change the port settings in the Apache configuration if necessary, especially if you encounter
conflicts with other applications that use the same ports.
Virtual Hosts: XAMPP's Apache supports virtual hosts, allowing you to set upmultiple websites
on your local development environment. Each virtual host can have its own domain name or
subdomain, and you can map them to different directories on your file system. This feature
enables you to simulatea more realistic web hosting environment locally.
PHP Integration: Apache in XAMPP is configured to work seamlessly with PHP, a popular
22
server-side scripting language used for dynamic web development. When a request is made to a
PHP file, Apache passes the requestto PHP for processing, and the output is then sent back to the
client's browser.
Server-Side Script Support: Besides PHP, Apache supports other server-side scripting languages,
such as Perl and Python. This means you can run applications and scripts written in these
languages in your XAMPP environment.
Module Support: Apache is modular in nature, allowing the addition of variousmodules to extend
its functionality. XAMPP comes with a selection of commonly used Apache modules pre-
installed, but you can easily enable or disable additional modules as needed through the XAMPP
control panel.
Error Handling and Logging: Apache provides detailed error logs, which are essential for
debugging and troubleshooting during development. You can check these logs to identify and
resolve issues with your web applications.
Security Considerations: While XAMPP's Apache is designed to be user- friendly for local
development, security considerations should be taken seriously if you plan to deploy your
applications to a live server. It's crucial tofollow best practices and configure Apache securely
when hosting web applications in production environments.
MySQL is an open-source relational database management system (RDBMS) that iswidely used
for storing, managing, and retrieving data in web applications and various software projects. It is
known for its robustness, scalability, and ease of use. Here are some key features and
characteristics of MySQL:
o Relational Database Management System: MySQL follows the relational model for data storage,
where data is organized into tables with rows and columns. It supports SQL (Structured Query
Language) for defining, manipulating, and querying data.
Scalability: MySQL can handle databases of varying sizes, from small-scale projects to large
enterprise-level applications. It offers various storage engines,such as InnoDB and MyISAM, each
with different performance characteristicsand suitability for specific use cases.
High Performance: MySQL is known for its speed and efficiency in handling read and write
operations. It employs various optimization techniques, caching mechanisms, and indexing to
enhance database performance.
Replication and High Availability: MySQL supports database replication, which allows data to
be copied from one MySQL database (master) to one or more other databases (slaves). This
feature ensures high availability and fault tolerance, as the slaves can take over if the master fails.
Data Security: MySQL provides built-in data security features, including userauthentication,
access control, and encryption of data in transit and at rest. Properly configured, it can safeguard
sensitive information from unauthorizedaccess.
Stored Procedures and Triggers: MySQL supports stored procedures andtriggers, which are
pre-defined routines or actions that are executed when certain events occur. These features can
help implement business logic and automate common database operations.
Integration with Web Development: MySQL is commonly used in conjunction with web
development technologies like PHP, Python, Java, and others. Web applications can interact with
MySQL to store and retrieve data, making it a popular choice for dynamic web development.
MySQL Server stores records relating to each other in a table. Different tables are created for the
various groups of information. Related tables are grouped together toform a database.
24
Primary Key
Every table in SQL Server has a field or a combination of fields that uniquely identifies each
record in the table. The Unique identifier is called the Primary Key, orsimply the Key. The primary
key provides the means to distinguish one record fromall other in a table. It allows the user and
the database system to identify, locate and refer to one particular record in the database.
Relational Database
Sometimes all the information of interest to a business operation can be stored in onetable. SQL
Server makes it very easy to link the data in multiple tables. Matching an employee to the
department in which they work is one example. This is what makes SQL Server a relational
database management system, or RDBMS. It stores data in two or more tables and enables you
to define relationships between the table and enables you to define relationships between the
tables.
Foreign Key
When a field is one table matches the primary key of another field is referred to as aforeign key.
A foreign key is a field or a group of fields in one table whose values match those of the primary
key of another table.
Referential Integrity
Not only does SQL Server allow you to link multiple tables, it also maintains consistency
between them. Ensuring that the data among related tables is correctly matched is referred to as
maintaining referential integrity.
6.6.Benefits of PHP
PHP (Hypertext Preprocessor) is a widely-used server-side scripting language that has been a
cornerstone of web development for many years. It offers numerous benefits that have
contributed to its popularity among developers and businesses alike. Here are some key
advantages of PHP:
Open Source: PHP is an open-source language, which means it is freely available for use,
distribution, and modification. This has led to a vast and active community of developers
contributing to its continuous improvement and evolution.
Easy to Learn and Use: PHP has a relatively simple and straightforward syntaxthat is easy for
beginners to grasp. Its similarity to C, Java, and other programming languages makes it
25
accessible to those already familiar with these languages.
Integration with Web Servers: PHP integrates seamlessly with popular web servers like Apache
and Nginx, making it effortless to set up and run PHP- based web applications.
Vast Community and Documentation: The large PHP community offers extensive
documentation, tutorials, and online resources, making it easier for developers to find answers to
their questions and stay updated with best practices.
Wide Adoption and Popularity: PHP is widely used, which means there is a plethora of PHP-
based libraries, frameworks, and tools available for developers to leverage. This reduces the
need to reinvent the wheel and speedsup the development process.
Support for Databases: PHP has built-in support for numerous databases, withMySQL being one
of the most popular choices. This allows developers to easily interact with databases and manage
data in web applications.
Server-Side Scripting: Being a server-side language, PHP executes on the webserver, generating
dynamic content before sending it to the client's browser. This reduces the workload on the
client's device and makes it suitable for handling complex server-side tasks.
Great for Web Development: PHP was designed for web development, making it an excellent
choice for creating dynamic websites, web applications, contentmanagement systems (CMS), e-
commerce platforms, and more.
Scalability: PHP can handle a wide range of project sizes, from small personalwebsites to large-
scale enterprise applications. When used with the rightarchitecture and optimization techniques,
26
PHP can be highly scalable.
27
7.Testing
7.1 INTRODUCTION
Software testing is a critical element of software quality assurance and represents the ultimate
review of specification, design and coding. In fact, testing is the one step in the software
engineering process that could be viewed as destructive ratherthan constructive.
A strategy for software testing integrates software test case design methods into a well-planned
series of steps that result in the successful construction of software. Testing is the set of activities
that can be planned in advance and conducted systematically. The underlying motivation of
program testing is to affirm softwarequality with methods that can economically and effectively
apply to both strategicto both large and small-scale systems.
3. Unit Testing
4. Functional Testing
5. Performance Testing
6. Integration Testing
7. Validation Testing
8. System Testing
9. Output Testing
Black-box testing is a software testing technique that focuses on testing the functionality of a
software application without knowledge of its internal code, structure, or implementation details.
Testers approach the software as a "black box," where they have no visibility into the internal
workings but can only interact with the inputs and observe the outputs. The primary goal of
black-boxtesting is to evaluate the application's behavior from a user's perspective and ensure
that it meets the specified requirements and functions correctly.
3. Unit Testing
Unit testing is a software testing technique in which individual units or components of a software
application are tested in isolation to ensure they function correctly and produce the expected
outputs. A unit is the smallest testable part of a program, typically a single function, method, or
procedure. Theobjective of unit testing is to verify that each unit of the software performs as
intended and meets its design specifications.
4. Functional Testing
Functional testing is a software testing technique that focuses on verifying the functionality of a
software application by testing it against the specified functional requirements. It involves testing
the application as a whole to ensurethat it meets the intended business requirements and performs
its functions correctly. Functional testing is typically performed from an end-user perspectiveand
does not require knowledge of the internal code or implementation details.
5. Performance Testing
29
performance bottlenecks, measure system behavior, and ensure that the application
performs optimally, meeting the desired performance requirements.
6. Integration Testing
Integration testing is a software testing technique that focuses on testing the interactions and
integration between different components, modules, or services of a software application. The
purpose of integration testing is to ensure that theintegrated components work together as expected
and that the interfaces between them function correctly. It helps identify any inconsistencies,
interface issues, ordefects that may arise when combining individual units into a larger system.
7. Validation Testing
Validation testing is a software testing process that focuses on evaluating a software application
to determine whether it meets the specified requirements and satisfies the intended use and user
needs. The main goal of validation testing is to ensure that the software delivers the expected
functionality and is fit for itsintended purpose before it is released to end-users or customers.
8.System Testing
System testing is a software testing technique that evaluates the entire softwareapplication as a
whole to ensure that it functions correctly and meets its intended requirements in a real-world
environment. Unlike unit testing and integration testing, which focus on individual units or the
interactions betweencomponents, system testing examines the integrated application as a
complete system to verify its overall behavior and performance.
1. Output Testing
Output testing, also known as output validation testing, is a software testing process that focuses
on verifying the correctness, accuracy, and completeness ofthe output produced by a software
application. The output in this context refersto the results, responses, or data generated by the
application based on its inputsand processing.
30
User Acceptance Testing (UAT) is a software testing phase that involves end- users or
stakeholders evaluating the software application to determine whether it meets their
requirements and expectations. It is one of the final stages of the software testing process before
the application is deployed to the production environment. The primary goal of UAT is to ensure
that the software is fit for its intended purpose and that it satisfies the needs of the users.
31
CONCLUSION:
The Electricity Online Bill Payment System (EB) revolutionized the traditional billing process,
improving accuracy, efficiency, and customer satisfaction. This system benefits the Electricity
Board by enhancing revenue management and resource planning capabilities. The shift towards
digitalization and real-time monitoring ensures a more sustainable and reliable electricity
supply to consumers. Usability testing was conducted during the post-implementation review
and performance evaluation to ensure users can effectively perform tasks using real data. The
system caters to consumers' bills and allows administrators to generate monthly reports,
improving billing accuracy, and reducing consumption and workload on Electricity Board
eliminates bill variation based on market demand. The conceptual framework allows for
technological or environmental changes. The system manages consumers' data and validates
input with immediate notification centralized in Electricity Board offices across the nation.
32
APPENDICES
APPENDIX-I
CODING
Index
<?php
require_once("Includes/config.php");
require_once("Includes/session.php");
// if ($count===0) {
// }
if(isset($_SESSION['logged']))
if ($_SESSION['logged'] == true)
if ($_SESSION['account']=="admin") {
header("Location:admin/index.php");
elseif ($_SESSION['account']=="user") {
header("Location:user/index.php");
else {
header("Location:../index.php");
if(isset($_POST['login_submit'])) {
if(!(isset($_POST['email']))) {
if(!(isset($_POST['pass']))) {
location('index.php');
33
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="data:image/x-
icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAoJiIKKCYiWgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoJiIgKCYiuygmIhgAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoJiJDKCYi7SgmIlIAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoJi
JzKCYi/SgmIqAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAACgmIgooJiKmKCYi/ygmIuAoJiIOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAACgmIh8oJiLPKCYi/ygmIv4oJiI/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAACgmIkEoJiLrKCYi/ygmIv8oJiKMAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgmInAoJiL8KCYi/ygmIv8oJiL/KCYiySgmIpwoJiJzKCYi
KQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgmIhYoJiJyKCYinCgmIsIoJiL8KCYi/ygmIv8oJiL/K
CYinygmIgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoJiJTKCYi/yg
mIv8oJiL5KCYiaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AoJiIeKCYi7ygmIv8oJiLjKCYiNwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAoJiIDKCYixCgmIv8oJiK+KCYiFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAKCYigigmIv8oJiKJKCYiAwAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKCYiPigmIvAoJiJSAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKCYiEigmIrooJiInAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
ACgmIlooJiIMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAA//8AAP/3AAD/7wAA/88AAP8fAAD+PwAA/D8AAPgfAAD4DwAA/j8AAPx/AAD4/wAA8f8A
APf/AADv/wAA//8AAA==" rel="icon" type="image/x-icon" />
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body bgcolor='green'>
<div class="container">
<div class="navbar-header">
</div>
</div>
<!--/.nav-collapse -->
</div>
</div>
<div id="headerwrap">
35
<div class="darkhearderwrap">
<div class="container">
<div class="row">
</p>
</div>
<div class="col-lg-6">
<h1>Sign Up</h1>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<h3></h3>
</div>
</div>
<h4>1 - Login</h4>
<p></p>
</div>
<!--/col-lg-4 -->
<div class="col-lg-4">
<p></p>
</div>
<!--/col-lg-4 -->
<div class="col-lg-4">
<h4>3 - Transact</h4>
<p></p>
</div>
<!--/col-lg-4 -->
</div>
</div>
<?php
require_once("footer.php");
?>
<!--=======================JS=========================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="assets/js/jquery-1.11.0.js"></script>
<script src="assets/js/custom.js"></script>
<script>
function validateForm() {
var x = document.forms["myForm"]["email"].value;
return false;
} </script> </body>
</html>
LOGIN PAGE:
<!-- NOTE
-->
<?php
require_once("Includes/config.php");
require_once("Includes/session.php");
/*if(!(isset($_POST['email']&&isset($_POST['pass'])))) {
location('index.php');
}*/
// if ($count === 0) {
// }
?>
<div class="form-group">
38
<input type="text" placeholder="Email Id" name="email" id="email" class="form-control">
</div>
<div class="form-group">
</div>
</form>
SIGN UP
<!-- NOTE
-->
<?php
require_once("Includes/session.php");
$flag=0;
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
if(isset($_POST["reg_submit"])) {
$email = test_input($_POST['email']);
$password = test_input($_POST["inputPassword"]);
$confpassword = test_input($_POST["confirmPassword"]);
$address = test_input($_POST["address"]);
$email = test_input($_POST['email']);
// NAME VALIDATION
39
if (empty($_POST["name"])) {
$flag=1;
echo $nameErr;
} else {
$name = test_input($_POST["name"]);
if (!preg_match("/^[a-zA-Z ]*$/",$name)) {
$flag=1;
echo $nameErr;
// EMAIL VALIDATION
if (empty($_POST["email"])) {
$flag=1;
} else {
$email = test_input($_POST["email"]);
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$flag=1;
echo $emailErr;
// PASSWORD VALIDATION
if (empty($_POST["inputPassword"]))
$flag=1;
}
40
else
$password = $_POST["inputPassword"];
// CONFIRM PASSWORD
if (empty($_POST["confirmPassword"]))
$confpasswordErr = "missing";
$flag=1;
else
if($_POST['confirmPassword'] == $password)
$confpassword = $_POST["confirmPassword"];
else
$flag = 1;
// ADDRESS VALIDATION
if (empty($_POST["address"])) {
$flag=1;
echo $addrErr;
} else {
$address = test_input($_POST["address"]);
// if (!preg_match("/^[a-zA-Z1-9]*$/",$address)) {
// // $flag=1;
41
// echo $addrErr;
// }
//CONTACT VALIDATION
if (empty($_POST["contactNo"])) {
$flag=1;
$contactNo = "";
} else {
$contactNo = test_input($_POST["contactNo"]);
if(!preg_match("/^d{10}$/", $_POST["contactNo"])){
// $flag=1;
echo $_POST['contactNo'];
echo $flag;
if($flag == 0)
require_once("Includes/config.php");
VALUES('$name','$email','$contactNo','$password','$address')";
echo $sql;
if (!mysqli_query($con,$sql))
header("Location:index.php");
}
42
?>
<?php
// if(isset($flag)) {
// if($flag === 0) {
// echo '
// <table class="table">
// </table>
// ';
// echo '
// <table class="table">
// </table>
// ';
// }
// }
?>
<div class="col-md-12">
</div>
</div>
<div class="form-group">
<div class="col-md-12">
</div>
</div>
<div class="form-group">
43
<div class="col-md-12">
</div>
</div>
<div class="form-group">
<div class="col-md-12">
</div>
</div>
<div class="form-group">
<div class="col-md-12">
</div>
</div>
<div class="form-group">
<div class="col-md-12">
</div>
</div>
<div class="form-group">
<div class="col-md-10">
</div>
</div>
</form>
BILL PAGE
<?php
44
require_once('head_html.php');
require_once('../Includes/config.php');
require_once('../Includes/session.php');
require_once('../Includes/admin.php');
if ($logged==false) {
header("Location:../index.php");
}
?>
<body>
<div id="wrapper">
<?php
require_once("nav.php");
require_once("sidebar.php");
?>
<div class="container-fluid">
45
<!-- Pills Tabbed GENERATED | GENERATE -->
<ul class="nav nav-pills nav-justified">
<li class="active"><a href="#generated" data-toggle="pill">Generated History</a>
</li>
<li class=""><a href="#generate" data-toggle="pill">Generate New</a>
</li>
</ul>
<div class="table-responsive">
<table class="table table-hover table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Bill No.</th>
<th>User</th>
<th>Bill Date</th>
<th>UNITS Consumed</th>
<th>Amount</th>
<th>Due Date</th>
<th>STATUS</th>
</tr>
</thead>
<tbody>
<?php
$id=$_SESSION['aid'];
46
$query1 = "SELECT COUNT(user.name) FROM user,bill WHERE user.id=bill.uid AND
aid={$id}";
$result1 = mysqli_query($con,$query1);
$row1 = mysqli_fetch_row($result1);
$numrows = $row1[0];
include("paging1.php");
$result = retrieve_bills_generated($_SESSION['aid'],$offset, $rowsperpage);
while($row = mysqli_fetch_assoc($result)){
?>
<tr>
<td><?php echo $row['bid']?></td>
<td height="50"><?php echo $row['user'] ?></td>
<td><?php echo $row['bdate'] ?></td>
<td><?php echo $row['units'] ?></td>
<td><?php echo $row['amount'] ?></td>
<td><?php echo $row['ddate'] ?></td>
<td><?php echo $row['status'] ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php include("paging2.php"); ?>
</div>
<!-- .table-responsive -->
</div>
<!-- .tab-genereated -->
47
<!-- <h4>{User} due bill info goes here and each linked to a transaction form </h4> -->
<!-- create a clickable list of USERS leading to a modal form to fill up units -->
<?php
$sql = "SELECT curdate1()";
$result = mysqli_query($con,$sql);
if($result === FALSE) {
echo "FAILED";
die(mysql_error());
}
$row = mysqli_fetch_row($result);
// echo $row[0];
if ($row[0] == 1) {
include("generate_bill_table.php") ;
}
else
{
echo "<div class=\"text-danger text-center\" style=\"padding-top:100px; font-size: 30px;\">";
echo " <b><u>BILL TO BE GENERATED ONLY ON THE FIRST OF THE
MONTH</u></b>";
echo " </div>" ;
}
?>
</div>
</div>
<!-- /.tab-content -->
</div>
<!-- /.col-lg-12 -->
48
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<?php
require_once("footer.php");
require_once("js.php");
?>
</body>
</html>
USERS PAGE
<?php
require_once('head_html.php');
require_once('../Includes/config.php');
require_once('../Includes/session.php');
require_once('../Includes/admin.php');
if ($logged==false) {
header("Location:../index.php");
}
?>
49
<body>
<div id="wrapper">
<?php
require_once("nav.php");
require_once("sidebar.php");
?>
<div class="container-fluid">
while($row = mysqli_fetch_assoc($result)){
?>
<tr>
<td height="50"><?php echo $row['id'] ?></td>
<td><?php echo $row['name'] ?></td>
<td><?php echo $row['email'] ?></td>
<td><?php echo $row['phone'] ?></td>
<td><?php echo $row['address'] ?></td>
</tr>
<?php } ?>
</tbody>
51
</table>
<?php include("paging2.php"); ?>
</div>
<!-- ./table -rsponsive -->
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<?php
require_once("footer.php");
require_once("js.php");
?>
</body>
</html>
DASHBOARD USERS
<div class="table-responsive">
<table class="table table-hover table-striped table-bordered table-condensed">
<thead>
52
<tr>
<!-- <th>#</th> -->
<th>USER</th>
<th>UNITS</th>
<th>BILL DATE</th>
<th>DUE DATE</th>
<th>GENERATE</th>
</tr>
</thead>
<tbody>
<?php
$query1 = "SELECT COUNT(*) FROM user";
$result1 = mysqli_query($con,$query1);
$row1 = mysqli_fetch_row($result1);
$numrows = $row1[0];
include("paging1.php");
$result = retrieve_bill_data($offset, $rowsperpage);
while($row = mysqli_fetch_assoc($result)){
?>
<tr>
<form action="generate_bill.php" method="post" name="form_gen_bill" onsubmit="return
checkInp()">
<?php
$query3 = "SELECT bdate as bdate1 from bill ,user WHERE user.id=bill.uid and
user.id={$row['uid']} ORDER BY bill.id DESC ";
$result3 = mysqli_query($con,$query3);
$flag=0;
while($row2 = mysqli_fetch_assoc($result3)){
if($row2['bdate1']==$row['bdate']) $flag=1;
}
53
if($flag==0)
{
?>
<input type="hidden" name="uid" value=<?php echo $row['uid'] ?> >
<input type="hidden" name="uname" value=<?php echo $row['uname'] ?> >
<td height="50">
<?php echo $row['uname'] ?>
</td>
<td>
<input class="form-control" type="tel" name="units" placeholder="ENTER UNITS">
</td>
<td>
<?php echo $row['bdate'] ?>
</td>
<td>
<?php echo $row['ddate'] ?>
</td>
<td>
<button type="submit" name="generate_bill" class="btn btn-success form-
control">GENERATE BILL </button>
</td>
<?php
}
?>
</form>
</tr>
<?php
}
54
?>
</tbody>
</table>
<?php include("paging2.php"); ?>
</div><!-- ./table-responsive -->
<script>
// function checkInp()
// {
// var x=document.forms["form_gen_bill"]["units"].value;
// if (isNaN(x))
// {
// alert("Must input numbers");
// return false;
// }
// }
</script>
55
APPENDIX-II
SCREEN SHOTS:
HOME PAGE:
TRACK PAGE:
56
SIGN UP PAGE:
57
DASHBOARD:
58
59
APPENDIX-III
REFERENCES
[1]. Arimoro, T. A., Oyetunji, A. K., &Odugboye, O. E. (2019). Analysis of Electricity Billing
System in Corporate Buildings in Lagos, Nigeria. Studies, 1(6), 10-20.
[2]. Panthala, S., Islam, N., & Habib, S. A. (2015). Automated industrial load measurement
system.
[3]. Adegboyega, A., Gabriel, A. A., Ademola, A. J., Victor, A. I., &Nigeri, K. (2013). Design
and Implementation of an Enhanced Power Billing System for Electricity Consumers in Nigeria.
African Journal of Computing & ICT, 6(1).
[4]. Antoniou, G., Batten, L., Narayan, S., &Parampalli, U. (2009). A privacy preserving e-
payment scheme. In Intelligent Distributed Computing III (pp. 197-202). Springer, Berlin,
Heidelberg
[5]. Rahul K. Sai (2016) Advanced Centralized Electricity Billing System Using (IOT).
International Journal of Advanced Research in Computer Science and Software Engineering
icrosoft Developer Network (MSDN)
[6]. Li, S., Wang, G., Zhou, J., & Chen, K. (2009). Fair and secure mobile billing systems.
Wireless personal communications, 51(1), 81-93.
[7]. Al-Ani, M. S., &Noory, R. (2012). Billing system design based on internet environment.
Editorial Preface, 3(9).
[8]. Barreto, P. S., Amvame-Nze, G., Silva, C.V., Oliveira, J. S. S., de Carvalho, H. P., Abdalla,
H., ... &Puttini, R. (2005, April). A study of billing schemes in an experimental next generation
network. In International Conference on Networking (pp. 66-74). Springer, Berlin, Heidelberg
[9]. Bo, Y., Dongsu, L., &Yumin, W. (2002).An anonymity-revoking e-payment system with a
smart card. International Journal on Digital Libraries
60