Mini Project

Download as pdf or txt
Download as pdf or txt
You are on page 1of 60

ABSTRACT

 In today`s world, where electricity consumption has soared to unprecedented levels, it is


essential to ensure that accurate bills are generated, and payments are made promptly to
avoid service disruptions. The management of electric bills can be a daunting task, especially
for large organizations and individuals who have complex electricity consumption patterns.
To simplify the process of electricity bill management, various software, and applications
have been developed that help manage the billing process effectively. These tools automate
the bill payment process, track electricity usage patterns, and provide analysis reports that
can be used to optimize energy consumption. Using electricity bill management software,
customers can monitor their energy usage, track their spending, and identify areas of high
energy consumption that can be addressed to reduce energy expenses. In conclusion,
electricity bill management is crucial to ensure accurate billing, timely payments, and
efficient energy management. By adopting software and tools that simplify the process,
individuals and organizations can optimize their energy usage, reduce their carbon footprint,
and contribute to a more sustainable future.

1
INTRODUCTION

1.1 Project Overview


Electricity Billing System a software-based application (EBS) is a comprehensive software
application designed to efficiently manage the billing process for electricity consumption. The system aims
to automate and streamline the entire billing lifecycle, from meter reading to bill generation and payment
processing. By leveraging technology, the system improves accuracy, reduces manual errors, enhances
customer experience, and provides valuable insights to the Electricity Board for efficient resource planning.

1.2 Project Description


 This project aims at serving the Department of Electricity by computerizing the billing system. It mainly
focuses on the calculation of units consumed during the specified time and the money to be charged by the
electricity offices.
 This computerized system will make the overall billing system easy, accessible, comfortable, and practical
for consumers.
 To design the billing system more service oriented and simple, the following features have been
implemented in the project. The application has a high speed of performance with accuracy and
 efficiency.
 The software provides a facility for data sharing, it does not require any staff as in the conventional system.
Once it is installed on the system only the meter readings are to be given by the admin where the customer
can view all details, it has the provision of security restrictions.
 The electricity billing software calculates the units consumed by the customer and makes bills, it requires
small storage for installation and functioning. There is a provision for debugging if any problem is
encountered in the system.
 The system excludes the need of maintaining paper electricity bills, the administrator does not have to keep
a manual track of the users, and users can pay the amount without visiting the office. Thus, it saves human
efforts and resources.

2
Problem Definition

2.1 EXISTING SYSTEM


The existing system of an EB (Electricity Board) Bill Management System refers to the current
manual or automated processes in place before the implementation of any new system. It is essential to
understand the existing system's strengths, weaknesses, and limitations to identify areas for improvement
and design a more efficient solution. Here is an overview of the key aspects of the existing EB Bill
Management System:

1. Manual Data Entry:

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.

3. Limited Customer Access:

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.

5. Lack of Real-Time Monitoring:

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.

6. Payment Processing Challenges:

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.

8. Customer Grievance Handling:

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.

10. Tariff Updates:

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.

Drawbacks of the Existing System of Eb bill management


drawbacks of the existing system:

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.

2.1 PROPOSED SYSTEM:


The proposed system for the EBM Bill is an advanced and automated solution designed to address
the limitations of the existing system and provide a more efficient, transparent, and customer-centric
approach. The key features and improvements of the proposed system include:

1. Automated Meter Reading:


The proposed system integrates with smart meters or automated reading devices to collect real-time
electricity consumption data. This eliminates the need for manual data entry and ensures accurate billing
calculations.
2. Online Customer Portal:
A user-friendly web portal is provided for customers to register and access their accounts. Customers
can view their billing history, consumption trends, and payment status online.
3. Automated Bill Generation:
The system automatically generates bills based on the meter readings and applicable tariff rates. Bills
are generated periodically (e.g., monthly) and sent to customers via email or accessible through the
customer portal.
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.
7. Efficient Grievance Handling:
5
A ticketing system is implemented to handle customer queries and complaints effectively. Customer
grievances are promptly addressed, leading to improved customer satisfaction.
8. Advanced Reporting and Analytics:
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.
9. Tariff Management and Updates:
The system facilitates easy tariff management, allowing the Electricity Board to update tariff rates and
apply changes seamlessly.
10. Environment-Friendly Approach:
The digitalized billing system reduces paper usage, contributing to environmental sustainability.
11. Scalability and Security:
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.

12. Integration with Customer Service:


The system is integrated with customer service channels to offer personalized assistance and support
to customers.

ADVANTAGES OF THE PROPOSED SYSTEM OF EB BILL


MANAGEMENT

1. Automated Meter Reading:


The proposed system integrates with smart meters or automated reading devices to collect real-time
electricity consumption data. This eliminates the need for manual data entry and ensures accurate billing
calculations.
2. Online Customer Portal:
A user-friendly web portal is provided for customers to register and access their accounts. Customers
can view their billing history, consumption trends, and payment status online.
3. Automated Bill Generation:
The system automatically generates bills based on the meter readings and applicable tariff rates. Bills
are generated periodically (e.g., monthly) and sent to customers via email or accessible through the
customer portal.

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.

7. Efficient Grievance Handling:


A ticketing system is implemented to handle customer queries and complaints effectively. Customer
grievances are promptly addressed, leading to improved customer satisfaction.
8. Advanced Reporting and Analytics:

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.

9. Tariff Management and Updates:

The system facilitates easy tariff management, allowing the Electricity Board to update tariff rates and

apply changes seamlessly.

10. Environment-Friendly Approach:

The digitalized billing system reduces paper usage, contributing to environmental sustainability.

11. Scalability and Security:

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.

12. Integration with Customer Service:

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:

3.1 Technical Feasibility


3.2 Operation Feasibility
3.3 Economical Feasibility
3.4 Legal Feasibility
3.5 Scheduling Feasibility

3.1. Technical Feasibility:

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.

3.2 Operational Feasibility:

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.

3.3. Economic Feasibility:

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.

3.5. Scheduling Feasibility:

o Creation of a detailed project timeline and implementation plan.


o Identification of critical milestones and potential risks that may affect the project schedule.
o Evaluation of the availability of resources and potential bottlenecks that may impact the project timeline.

9
4. SYSTEM ANALYSIS

4.1. Software Requirement Specification (SRS)


Software Requirement Specification (SRS) is a detailed document that outlines the functional and non-
functional requirements of the proposed EB (Electricity Board) Bill Management System project. It serves
as a foundation for the development team, helping them understand what needs to be built and how the
system should behave. Below are the key sections typically included in the SRS:

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.

 Online bill payment options.


 Real-time billing notifications.
 Customer portal for accessing billing information and consumption analytics.
 Grievance handling and customer support features.
 Reporting and data analytics for the Electricity Board.

10
4. Non-Functional Requirements:

o Performance: Requirements related to system response time and throughput.


o Security: Measures to ensure data confidentiality, integrity, and protection against unauthorized access.
o Usability: User interface requirements to enhance user-friendliness and accessibility.
o Reliability: Expectations regarding system stability, availability, and error handling.
o Scalability: Requirements for accommodating a growing number of users and data volumes.
o Compatibility: Specifications for hardware, software, and browser compatibility.

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.

6. Assumptions and Dependencies:

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 High-level system architecture and component diagrams.

9. Use Cases and User Interaction:

o Use case diagrams and detailed descriptions of various user interactions with the system.

10. Glossary:

o Definitions of technical terms and domain-specific jargon used in the SRS.

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:

o Processor : Pentium Dual core 2.3GHz

o Hard disk : 50 GB or higher

o RAM : 2GB (Min)

4.3 SOFTWARE REQUIREMENTS:

 Windows 7 or above is required for the operating system.

 Tools : XAMPP 8.0.28 / PHP 8.0.28

 Backend : ML(Machine Learning) MySQL,

12
5.SYSTEM DESIGN

5.1 Data Flow Diagram:


A Data Flow Diagram (DFD) is a graphical representation of the flow of data within a system, showing
how data moves between different processes and entities. Here is a simple example of a DFD for an EB
(Electricity Board) Bill Management System:

LEVEL 0 DFD (CONTEXT DIAGRAM):

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.

5.2 ARCHITECTURE DIAGRAM

The architecture as define on in built sector derived section defined legal act provide content variant
function deploy.

5.3 CLASS DIAGRAM AND TABLE DESIGN


Table Name: BILL

Field Name Data Type Size Constraint

Bill_no Number Auto Primary key

BillDate Date

Amount Number Auto

City Text 30

15
In this table there are no multivalued attributes. So this is in First Normal Form.

TABLE NAME : CUSTOMER

Field Name Data Type Size Constraint


Customer First Name Text 10
Customer Middle Name Text 10
Customer Last Name Text 10
Cust_id Number Auto Primary Key
Service_Centre Text 20
Street Text 20
City Text 20
City Code Number Auto
State Text 20

In this table there are no multivalued attributes. So this is in First Normal Form.

SERVICE CENTRE TABLE:

Field Name Data Type Size Constraint


Cust_id Number Auto Foreign Key
Service_Centre Text 20
Street Text 20
City Text 20
City Code Number Auto
State Text 10

In this table there are no multivalued attributes. So this is in First Normal Form.

BILL CHARGE:
Code Design Code Test

Field Name Data Type Size Constraint

16
Bill_no Number Auto Primary Key

Fix _charge Number Auto

E_duty Number Auto

Total Charge Number Auto

Total Unit Number Auto

In this table there are no multivalued attributes. So this is in First Normal Form.

COMMERCIAL BILL TABLE:

Field Name Data Type Size Constraint

Customer Name Text 20

Shop_no Text 20 Primary Key

Street Text 20

Bill_no Integer Auto Foreign Key

Bill Amount Integer Auto

Bill Date Date

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.

5.4 DATABASE DESIGN:

Entities with Attributes


o Name
o E-mail
o Number
o Address

custom_form
o Name
o E-mail
o Number
o Bill
o Customer Query
o Consummation current Unit

5.5 DATABASE TABLE:

Sno Column Name Data type Constraint

1. Name Big int Foreign key

2 E-mail Big int Foreign key

3 Number Big int Foreign key

18
4 Address Big int Foreign key

5 password Big int Foreign key

6 Con pass Big int Foreign key

19
6. SOFTWARE DEVELOPMENT ENVIRONMENT

6.1 . INTRODUCTION TO PHP FRAMEWORK

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.

Here's an introduction to PHP frameworks and their key features:

PHP CSS HTML

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.

6.2 .OBJECTIVES OF XAMPP

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.

Cross-Platform Compatibility: XAMPP is designed to be cross-platform, meaning it is available


for Windows, macOS, Linux, and other operating systems. This makes it convenient for
developers to work on different platforms without having to install and configure separate server
components.

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.

Open-Source Community Support: XAMPP is an open-source project, which means it benefits


from a vast community of contributors and users. The community actively supports XAMPP by
providing updates, bug fixes,and extensions, ensuring that the software remains up-to-date and
reliable.

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.

6.3 .XAMPP APACHE AN OVERVIEW

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.

6.4 EVOLUTION OF WEB APPLICATION:

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

 Open-Source and Community-Driven: MySQL is an open-source project,which means it is


freely available for use, and its source code can be modified

Cross-Platform Compatibility: MySQL is designed to be cross-platform, meaning it can run on


various operating systems, including Windows, macOS,Linux, and others. This makes it highly
23
versatile and adaptable to different development environments.

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.

Client/Server Architecture: MySQL operates in a client/server architecture, where clients


(applications) communicate with the MySQL server to access and manipulate the database. This
design enables multiple clients to interact with the same database concurrently.

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.

6.5.MySQL Server Tables

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.

Platform Independence: PHP is a cross-platform language, meaning it can run on various


operating systems, such as Windows, macOS, Linux, and others, without requiring modifications
to the code.

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.

Community-Driven Frameworks: PHP has a rich ecosystem of frameworks such as Laravel,


Symfony, CodeIgniter, and more. These frameworks provide ready-to-use components,
enhancing development speed and code maintainability.

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.

7.2.VARIOUS LEVELS OF TESTING


1. White Box Testing

2. Black Box Testing

3. Unit Testing

4. Functional Testing

5. Performance Testing

6. Integration Testing

7. Validation Testing

8. System Testing

9. Output Testing

10. User Acceptance Testing.

1. White Box Testing


 White-box testing, also known as clear-box testing or structural testing, is a software testing
technique that examines the internal structure and implementation of a software application. In
this approach, the tester has accessto the source code and is aware of the underlying architecture,
algorithms, and data structures of the system being tested. The main objective of white-box
28
testing is to verify that the code functions as intended and that all components are correctly
implemented.

2. Black Box 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

 Performance testing is a type of software testing that focuses on evaluating the


speed, responsiveness, stability, and scalability of a software application under
various workload conditions. The primarygoal of performance testing is to identify

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.

2. User Acceptance Testing

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

employees. It also increases electricity distribution, connection, tariff scheduling, and

eliminates bill variation based on market demand. The conceptual framework allows for

adjustments and enhancement maintenance to integrate future demands according to

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

// $err_login="There were some problem";

// }

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

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta name="description" content="">

<meta name="author" content="">

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

<title>Eb bill for mca</title>

<!-- Bootstrap core CSS -->

<link href="assets/css/bootstrap.css" rel="stylesheet">

<link href="assets/css/font-awesome.css" rel="stylesheet">


34
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-
awesome.min.css"> -->

<!-- Custom styles for this template -->

<link href="assets/css/main.css" rel="stylesheet">

<!-- Fonts from Google Fonts -->

<!-- <link href='http://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css'> -->

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

<!-- Fixed navbar -->

<div class="navbar navbar-default navbar-fixed-top">

<div class="container">

<div class="navbar-header">

<a class="navbar-brand" href="index.php"><b>Eb bill</b></a>

</div>

<div class="navbar-collapse collapse" >

<?php include("login.php"); ?>

</div>

<!--/.nav-collapse -->

</div>

</div>

<div id="headerwrap">

35
<div class="darkhearderwrap">

<div class="container">

<div class="row">

<div class="col-lg-6 signup">

<h1>Electricity Bill<br>Management System World next View</h1>

<p><marquee>To ensure a value of electricity</marquee>

</p>

</div>

<!-- /col-lg-6 -->

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

<h1>Sign Up</h1>

<?php include("signup.php"); ?>

</div>

<!-- /col-lg-6 -->

</div>

<!-- /row -->

</div>

<!-- /container -->

</div>

</div>

<!-- /headerwrap -->

<div class="container">

<div class="row mt centered">

<div class="col-lg-6 col-lg-offset-3">

<h1>How this Portal woks</h1>

<h3></h3>

</div>

</div>

<!-- /row -->

<div class="row mt centered">


36
<div class="col-lg-4">

<img src="assets/img/unnamed.png" width="180" alt="">

<h4>1 - Login</h4>

<p></p>

</div>

<!--/col-lg-4 -->

<div class="col-lg-4">

<img src="assets/img/ser02.png" width="180" alt="">

<h4>2 - Peruse Bills</h4>

<p></p>

</div>

<!--/col-lg-4 -->

<div class="col-lg-4">

<img src="assets/img/ser03.png" width="180" alt="">

<h4>3 - Transact</h4>

<p></p>

</div>

<!--/col-lg-4 -->

</div>

<!-- /row -->

</div>

<!-- /container -->

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

<!-- Bootstrap Core JavaScript -->


37
<script src="assets/js/bootstrap.min.js"></script>

<!-- jQuery Version 1.11.0 -->

<script src="assets/js/custom.js"></script>

<script>

function validateForm() {

var x = document.forms["myForm"]["email"].value;

var atpos = x.indexOf("@");

var dotpos = x.lastIndexOf(".");

if (atpos< 1 || dotpos<atpos+2 || dotpos+2>=x.length) {

alert("Not a valid e-mail address");

return false;

} </script> </body>

</html>

LOGIN PAGE:

<!-- NOTE

SINGLE PAGE FORM ALONG WITH VALIDATION

NO PHP LEAKS BACK TO THE INDEX

-->

<?php

require_once("Includes/config.php");

require_once("Includes/session.php");

/*if(!(isset($_POST['email']&&isset($_POST['pass'])))) {

location('index.php');

}*/

// if ($count === 0) {

// echo "There were some problem";

// }

?>

<form action="index.php" class="navbar-form navbar-right" role="form" method="post">

<div class="form-group">
38
<input type="text" placeholder="Email Id" name="email" id="email" class="form-control">

</div>

<div class="form-group">

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

</div>

<button type="login_submit" class="btn btn-success" onclick=" validateForm();">Sign In</button>

</form>

SIGN UP

<!-- NOTE

SINGLE PAGE FORM ALONG WITH VALIDATION

NO PHP LEAKS BACK TO THE INDEX

-->

<?php

require_once("Includes/session.php");

$nameErr = $phoneErr = $addrErr = $emailErr = $passwordErr = $confpasswordErr = "";

$name = $email = $password = $confpassword = $address = "";

$flag=0;

//CHECK IF A VALID FORM STRING

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

$nameErr = "Name is required";

$flag=1;

echo $nameErr;

} else {

$name = test_input($_POST["name"]);

// check if name only contains letters and whitespace

if (!preg_match("/^[a-zA-Z ]*$/",$name)) {

$nameErr = "Only letters and white space allowed";

$flag=1;

echo $nameErr;

// EMAIL VALIDATION

if (empty($_POST["email"])) {

$emailErr = "Email is required";

$flag=1;

} else {

$email = test_input($_POST["email"]);

// check if e-mail address is well-formed

if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {

$emailErr = "Invalid email format";

$flag=1;

echo $emailErr;

// PASSWORD VALIDATION

if (empty($_POST["inputPassword"]))

$passwordErr = "PASSWORD missing";

$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

$confpasswordErr = "Not same as password!";

$flag = 1;

// ADDRESS VALIDATION

if (empty($_POST["address"])) {

$addrErr = "Address is required";

$flag=1;

echo $addrErr;

} else {

$address = test_input($_POST["address"]);

// check if address only contains letters and whitespace

// if (!preg_match("/^[a-zA-Z1-9]*$/",$address)) {

// $addrErr = "Only letters, numbers and white space allowed";

// // $flag=1;
41
// echo $addrErr;

// }

//CONTACT VALIDATION

if (empty($_POST["contactNo"])) {

$flag=1;

$contactNo = "";

// echo "error here";

} else {

$contactNo = test_input($_POST["contactNo"]);

if(!preg_match("/^d{10}$/", $_POST["contactNo"])){

$phoneErr="10 digit phone no allowed.";

// $flag=1;

// echo "or here";

echo $_POST['contactNo'];

// Only if succeed from the validation thourough put

echo $flag;

if($flag == 0)

require_once("Includes/config.php");

$sql = "INSERT INTO user (`name`,`email`,`phone`,`pass`,`address`)

VALUES('$name','$email','$contactNo','$password','$address')";

echo $sql;

if (!mysqli_query($con,$sql))

die('Error: ' . mysqli_error($con));

header("Location:index.php");

}
42
?>

<?php

// if(isset($flag)) {

// if($flag === 0) {

// echo '

// <table class="table">

// <tr class="success">Account Created</tr>

// </table>

// ';

// } elseif ($flag === 1) {

// echo '

// <table class="table">

// <tr class="danger">There were errors in the form.</tr>

// </table>

// ';

// }

// }

?>

<form action="signup.php" method="post" class="form-horizontal" role="form" onsubmit="return


validateForm()">

<div class="row form-group">

<div class="col-md-12">

<input type="name" class="form-control" name="name" id="name" placeholder="Full Name" required>

<!-- <label><?php echo $nameErr;?></label> -->

</div>

</div>

<div class="form-group">

<div class="col-md-12">

<input type="email" class="form-control" name="email" id="email" placeholder="Email" required>

<!-- <label><?php echo $emailErr;?></label> -->

</div>

</div>

<div class="form-group">

43
<div class="col-md-12">

<input type="password" class="form-control" name="inputPassword" id="inputPassword"


placeholder="Password" required>

<!-- <label><?php echo $passwordErr;?></label> -->

</div>

</div>

<div class="form-group">

<div class="col-md-12">

<input type="password" class="form-control" name="confirmPassword" placeholder="Confirm Password"


required>

<!-- <label><?php echo $confpasswordErr;?></label><label><?php echo $confpasswordErr;?></label> -->

</div>

</div>

<div class="form-group">

<div class="col-md-12">

<input type="tel" class="form-control" name="contactNo" placeholder="Contact No." required>

<!-- <label><?php echo $phoneErr;?></label> -->

</div>

</div>

<div class="form-group">

<div class="col-md-12">

<input type="address" class="form-control" name="address" placeholder="Address" required>

<!-- <label><?php echo $addrErr;?></label> -->

</div>

</div>

<div class="form-group">

<div class="col-md-10">

<button name="reg_submit" class="btn btn-primary">Register</button>

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

<!-- Page Content -->


<div id="page-content-wrapper">

<div class="container-fluid">

<!-- Page Heading -->


<div class="row">
<div class="col-lg-12">
<h1 class="page-header">
BILLS
</h1>

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>

<!-- Tab panes -->


<div class="tab-content">
<div class="tab-pane fade in active" id="generated">
<!-- <h4>{User} Bills(ALL UP TO DATE) goes here{Table form}</h4> -->
<!-- DB RETRIEVAL search db where id is his and status is processed -->

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

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

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

<!-- Page Content -->


<div id="page-content-wrapper">

<div class="container-fluid">

<!-- Page Heading -->


<div class="row">
<div class="col-lg-12">
<h1 class="page-header">
USERS
<small>Details</small>
<!-- Like bills processed by the admin ; bills generated , unprocessed complaint
maybe a stats infograph -->
</h1>
<ol class="breadcrumb">
<li>User</li>
<li class="active">Details</li>
</ol>
<div class="table-responsive" style="padding-top: 0">
<table class="table table-hover table-bordered table-condensed">
<thead>
50
<tr>
<th>User No.</th>
<th>User Name</th>
<th>EMAIL</th>
<th>PHONE NO</th>
<th>ADDRESS</th>
</tr>
</thead>
<tbody>
<?php
$id=$_SESSION['aid'];
$query1 = "SELECT COUNT(*) FROM user";
$result1 = mysqli_query($con,$query1);
$row1 = mysqli_fetch_row($result1);
$numrows = $row1[0];
include("paging1.php");
// include('../Includes/admin.php');
$result = retrieve_users_detail($_SESSION['aid'],$offset, $rowsperpage);

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><!-- ./col -->

</div> <!-- /.row -->

</div><!-- /.container-fluid -->

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

ADMIN LOGIN 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

You might also like