Full Project
Full Project
Submitted By
Page 1
Department of Computer Science
Thodupuzha
2020-2022
Thodupuzha
Page 2
CERTIFICATE
This is to certify that the project work entitled “ CABLE TV BILLING PORTAL” was
done by VIGNESH R (Reg No. 200011017633) and KARTHIKA K (Reg No.
200011017630) of the Department of Computer Science , College of Applied
Science Thodupuzha in partial requirement for the award of Master’s Degree
in Computer Science from M.G University is a bona fide record work carried
out by them during the year 2020-2022
Lecturer-in charge
principal
Page 3
DECLARATION
Page 4
DECLARATION
I hereby declare that the project work entitled ‘Cable tv Billing portal’ developed in partial
fulfillment of the award of Master’s Degree in Computer Science of Mahatma Gandhi
University, Kottayam, during the year 2020-2022 is my original work.
Place: Muttom
Date:
Page 5
ACKNOWLEDGEMENT
Page 6
ACKNOWLEDGEMENT
We thank the ALMIGHTY GOD for showering his immense blessing and
giving
strength to complete our project work successfully.
We take this opportunity as our privilege to thank all those persistent
contribution and suggestions have helped us in the fulfillment of our project.
We express our grateful thanks to Mr. Jees George , Head of the Computer
Science Department who has been the guide for the project and timely guidance
given for the successful completion of the project work.
We also thank Mrs. Sindhu venugopal who gave us guidance and suggestions
to improve the project.
Last but not least we thank our friends who gave us wealth of suggestion for
the successful completion of our project.
Page 7
ABSTRACT
Page 8
ABSTRACT
CABLE TV BILLING PORTAL
The main objective of developing‘ Cable Tv Billing Portal ‘ project is to make the cable
accounting automated and simpler. This project is useful for Cable Operator to manage the
day to day customer report built with Customer Billing System Facility.
Modules
Customer account module
Area and location module
Tariff module
Transaction module
Payment module
Report module
Dashboard module
Language used
Front End: PHP:
• PHP stands for PHP: Hypertext Pre-processor
• PHP is a server-side scripting language, like ASP
• PHP scripts are executed on the server
• PHP supports many databases (MySQL, Informix, Oracle, and Generic ODBC
• PHP is an open source software (OSS)
Page 9
• MySQL compiles on a number of platforms
Hardware requirements
Operating System - Windows XP / Windows 7
Processor - Intel dual core
RAM – 1 GB
Hard Disk – Minimum 40 GB
Keyboard, monitor and mouse
Software requirements
Adobe Dreamweaver CS 6.0
Apache Server
MySQL database Server
TABLE OF CONTENTS
Page 10
1. INTRODUCTION
2. SPECIFIC REQUIRMENTS
3. SYSTEM DESIGN
5. DETAILED DESIGN
6. CODING
7. SYSTEM TESTING
8. USER MANUAL
9. CONCLUSION
Page 11
INTRODUCTION
INTRODUCTION
Page 12
The software “CABLE TV BILLING PORTAL” is intended to make the
cable accounting automated and simpler. This project is useful for Cable
Operator to manage the day to day customer report built with Customer Billing
System Facility.
The system would be having two logins. One for admin and operator and the
other one for customer. Admin has the overall authority of the system, he can
add, edit, update and delete the records. MYSQL manages the database for the
requested retrieval and updating of records.
Admin and operator can view user account details. The system generates bill
automatically. The system calculates bill for every customers and updates the
information into customers account. Customers can pay monthly, half yearly
and yearly rent through online. Administrator can view paid report, pending
report, payment report, transaction report, etc.
Page 13
Purpose
The purpose of this document is to present a detailed description of Cable TV Billing
Portal. It will illustrate the purpose and complete declaration for the development of
system. It will also explain system constraints, interface and interactions with other
external applications. This document is primarily intended to be proposed to a customer
for its approval and a reference for developing the first version of the system for the
development team.
The main purpose of developing Cable TV Billing Portal project is to make the cable
accounting automated and simpler. This project is useful for Cable Operator to manage
the day to day customer report built with Customer Billing System Facility. This is the
complete one step software solution for all types of cable TV operators.
Scope
The main scopes of the projects are:
Page 14
Overview
The following subsections provide complete overview of the SRS documentation for the
product “Cable TV Billing Portal”. The entire SRS is documented in the view of admin,
operators and customers. The following subsections are arranged to complete outlook of the
software, its perspective, features, and system requirements.
Overall description
Product Perspective
The Cable TV Billing Portal project is the web based application with two interfaces: One is
for customers and another is for cable operators. The website works in the desktop
computers, laptops, and mobile devices with the help of browser.
Product functions
The project Cable Application has following product functions:
We make a web based online billing and customer management application for Cable
TV operators.
Automatic package calculation, Customer and operator login, Change tariff plan can
be done with this software. Cable TV operator can control billing from anywhere.
The website is secure because user must enter login details to access the website.
The system contains huge records. For that reason the search option has been
provided in all report pages. So the search results can be viewed in the list view.
The product works online with help of internet connection.
User Characteristics
Administrator: The administrators are the main users with full authority who handles
complete website information.
Cable operators: Cable operators can manage their customers, connections, set-top
boxes information, billing, collections & other important aspects of their business,
with ease.
Customers: The customers are the subscribers of the cable TV. The customers can
make payment through online by entering amount and payment details.
Page 15
General Constraints
This system is provisioned to be built on the Core PHP which is highly flexible.
Designed to run on windows xp, and further versions.
Latest browsers like internet explorer or Mozilla Firefox or Google chrome required.
Internet facility is essential to use this web application.
Page 16
SPECIFIC REQUIREMENTS
Page 17
SPECIFIC REQUIREMENTS
User interfaces
This software provides good graphical interface for the front end which is self-explanatory.
The website is designed using HTML and CSS.PHP is used as frontend and MYSQL server
used as backend.
Hardware interfaces
Operating system : Windows XP or higher version
Hard disk : Minimum 40 GB hard disk
RAM : Minimum 1 GB RAM
Processor : Intel Pentium or above
Software interfaces
XAMPP 1.8.2
Server : Apache server 2.4.7
Language used : PHP 5.4
Database : MYSQL server 5.5
User interface design : HTML, AJAX, JavaScript
Web browser : Mozilla, Google chrome, Internet explorer
IDE : Adobe Dreamweaver CS 6.0
Communication interfaces
The project shall use the HTTP protocol for communication over the internet and for the
intranet communication will be through TCP/IP protocol suite.
Functional Requirements
Customer account module: The customers can register through online. After the
connection verification customer can login to the system and they can view their profile
details, tariff details, and billing and payment details.
Area and location module: Admin adds areas and area wise rent for each areas and
assigns these areas to the operators.
Page 18
Tariff module: A customer can have a bill-period based on a monthly cycle, six-monthly
cycle or yearly cycle. Even the cycle starting date can be fixed based on the customer’s
profile activated date.
Billing module: The system will generate bill automatically according to the customer
tariff plan based on a monthly cycle, six-monthly cycle or yearly cycle.
Payment module: This option is available for customers and cable operators. This system
allows customers to make payment through online. Operator can add entry of payment
details. The system generates receipt after the payment.
Report module: Administrator can view collection lists just on the click of a button. The
system generates various kinds of report location-wise, customer wise, paid report, unpaid
report, etc. All the connections & devices associated with a customer are displayed, along-
with the last bill-periods and payment details.
Dashboard module: This dashboard module is for administrator where admin can
manage complete control of the website. Admin is the super user of the website. Only the
administrator can set Tariff details and available area or location records.
Performance requirements
The system is supposed to be having good memory space and RAM should be above I
GB.
The application shall be able to do a validation check on the information provided in
the user-authentication form and the place-order form to avoid false or incomplete
information.
Design constraints
The web pages are designed using HTML and CSS scripts. This software is a PHP based
Web Application. It runs on any platform (Windows, Linux or Mac) which has support for
php. Apache and MySQL are the server required for this Web Application to run. Once
installed, you can access this software using a web-browser from any computer on the same
network. The server should have the latest Intel processor (preferably Dual Core or higher)
and a minimum of 1 GB of RAM.
Page 19
System attributes Integrity
The authorized user shall be allowed to access the Cable application project.
Based on the user type, the project shall provide a user specific interface.
Correctness
The assigned project modules should be received by the specified user.
Availability
The system shall be made available to the Customers, Cable operators, and
administrator year round.
Robustness
The system shall be able to save and view all the records in the fraction of seconds.
Installation:
A Readme for installation instructions and required dependencies will be provided with the
software. A user friendly installer script will also be provided.
Page 20
SYSTEM DESIGN
SYSTEM DESIGN
Introduction
Page 21
System Analysis :
The system analysis approach emphasises a closed look on all parts of the system.
The analyst must consider all the system elements, their inputs, outputs, control,
feedback and the environment when the system is being constructed.
System Design:
The goal of system design phase is to produce a model or representation of the
system, which can be used to build the system. Here the emphasis is on translating the
requirements of the system into design specification.
Applicable Documents
The document used in system design is Software Requirement Specification Document.
Functional Decomposition
The system can be decomposed into functional components as follows.
The Components are–
The customer registers through online. Cable operator verifies customer
details. After the verification the system send login credentials to the
customer.
The admin can add different types of tariff plans. The system works on the
basis of tariff plan.
The system generates monthly invoice, half yearlyinvoice, and yearly
invoice automatically. Customer can view invoice details in the mail or
customer account.
Customer can make payment through online by entering payment type,
card number, expiry date, etc. The system generates billing receipt with
paid amount, balance amount, paid date, etc.
Program Description
Page 22
Context flow diagram is a top level data flow diagram. It only contains one process node that
generalises the function of the entire system in relationship to external entities. In context
diagram the entire system is treated as a single process and all its inputs, outputs, sinks and
sources are identified and shown.
A DFD represents flow of data through a system. Data flow diagrams are commonly used
during problem analysis. It views a system as a function that performs the input into the
Page 23
desired output. A DFD shows movement of data through the different transformations or
processes in the system.
Data Flow diagrams can be used to provide the end users with the physical idea of where the
data they input ultimately has an effect upon the structure of whole system from order to
dispatch to restock how any system is developed can be determined through data flow
diagram. The appropriate register saved in database and maintained by appropriate
authorities.
Page 24
Notations in the DFD
Symbol Description
The circle or bubble represents a process.
A process is named and each process is
represented by a named circle.
Page 25
DFD Level-1
Page 26
DFD Level 2
D
escription of component:
Input :
Area details
Tariff plan details
Operator details
Process Definition :
Adding available area records
Adding area wise tariff records
Adding operator details
Page 27
Output Definition:
The area component stores area details in the area table
The tariff component stores tariff details in the tariff table. The system needs
area details to insert tariff records.
The operator detail stores in user table. The system stores area wise operator
details.
Page 28
Description of component
Input :
Customer registration profile details
Account verification details
Cable tariff plan to the customer
Process Definition:
Customer registration process
Customer account verification process
Assigning cable tariff plan to the customer
Output Definition:
The customer registration detail stores in customer table. The system
needs area record to add customer details
The customer account need to be verified to activate. After the activation
the operator assigns tariff plan to the customer's account.
Page 29
Description of component
Input :
Login credentials
Logged in operator details
Invoice receipt
Process Definition:
Login process
Generate Monthly invoice
Sending mail
Output Definition:
If the entered login id and password valid the system opens operator
account page.
The monthly invoice report stores in invoice table
The system sends mail to the customer’s registered mail ID.
Page 30
Description of component
Input :
Login credentials
Transaction details with card number, expiry date
Payment receipt
Process Definition:
Login process
Payment process
Generating bill
Output definition:
In the login component the system checks entered login id and password
from customer table.
The system stores payment details and it generates receipt. The customer
can view payment receipt in the billing module.
Page 31
DATA BASE DESIGN
Page 32
DATA BASE DESIGN
Introduction:
area
billing
customer
invoice
print data
tariff plan
user
Page 33
Database tables
Page 34
Table name: Tariff plan
Tariff plan table stores different tariff plan records. This is the master table to configure
monthly, half yearly and yearly tariff plan records.
Page 35
Table name: Billing
The billing table stores all billing details with collected amount, balance amount and bank
credentials.
Entity-Relationship Diagram:
An entity-relationship (ER) diagram is a specialized graphic that illustrates the relationships
between entities in a database. ER diagrams often use symbols to represent three different
types of information. Boxes are commonly used to represent entities. Diamonds are normally
used to represent relationships and ovals are used to represent attributes.
Page 36
The Symbols are shown in below table
Entity is represented by a
box within the ERD.
Entity Entities are abstract
concepts, each representing
one or more instances of the
concept in question. An
entity might be considered a
container that holds all of the
instances of a particular thing
in a system. Entities are
equivalent to database tables
in a relational database, with
each row of the table
representing an instance of
that entity.
Relationships are
represented by Diamonds. A
Relationship relationship is a named
collection or association
between entities or used to
relate to two or more entities
with some common
attributes or meaningful
interaction between the
objects.
Page 37
ER Diagram
usr_id
usr_name prt_id
usr_login_id
1 1
enters printdata prt_check
user
usr_password 1
1
1
generates prt_masterdata
adds creates
tariffplan_id
area_code
area_code N N N
area_name inv_id
tariffplan area inv_status
pln_name area_note
invoice inv_rate
plan_rate user_id
1 1
N inv_billdate
generated for
registers
for
1 1
1
cust_id cust_name
customer
cust_address password
1
pays
N
bil_id bil_collectedamt
billing
bil_no bil_transtype
Page 38
Database Schema design:
MySQL Workbench simplifies database design and maintenance, automates time-consuming
and error-prone tasks, and improves communication among DBA and developer teams. It
enables data architects to visualize requirements, communicate with stakeholders, and resolve
design issues before a major investment of time and resources is made. It enables model-
driven database design, which is the most efficient methodology for creating valid and well-
performing databases, while providing the flexibility to respond to evolving business
requirements. Model and Schema Validation utilities enforce best practice standards for data
modeling, also enforce MySQL-specific physical design standards so no mistakes are made
when building new ER diagrams or generating physical MySQL databases.
Page 39
DETAILED DESIGN
DETAILED DESING
Page 40
Introduction:
The purpose of preparing this document is to explain complete design details of our Cable
TV Billing Portal (Cable operator billing software).
This detailed design report will mainly contain the general definition and features of the
project, design constraints, the overall system architecture and data architecture. Additionally,
a brief explanation about our current progress and schedule of the project will be provided in
related sections. Design of the system and subsystems/modules will be explained both
verbally and visually by means of diagrams in order to help the programmer to understand all
information stated in this document correctly and easily.
Applicable document
Page 41
Modular Decomposition of Components
Dashboard Component:
2. Identification of Modules:
Customer Component
1. Structure chart for Customer:
Page 42
2. Identification of Modules:
Register
Change password
Profile
login
Payment component:
2. Identification of Modules:
Page 43
CODING
CODING
userlogin.php
<?php
include("header.php");
Page 44
if(isset($_SESSION[usr_id]))
{
echo "<script>window.location='useraccount.php';</script>";
}
if(isset($_POST[submit]))
{
$pwd = md5($_POST[password]);
echo $sql = "SELECT * FROM user WHERE usr_login_id='$_POST[loginid]' AND
usr_password='$pwd' AND usr_status='Active'";
$qsql = mysqli_query($con,$sql);
if(mysqli_num_rows($qsql) == 1)
{
$rs= mysqli_fetch_array($qsql);
$_SESSION[usr_id] = $rs[usr_id];
$_SESSION[usr_type] = $rs[usr_type];
echo "<script>window.location='useraccount.php';</script>";
}
else
{
echo "<script>alert('Invalid Login ID or password..');</script>";
}
}
?>
<center><h2><a href="#">User Login Panel</a><span class="text-uppercase margin-l-
20">Kindly enter login ID and Password</span></h2></center>
Page 45
?>
<script>
functionvalidateform()
{
if(document.frmuserlogin.loginid.value=="")
{
alert('Login id should not be empty..');
return false;
}
else if(document.frmuserlogin.password.value=="")
{
alert('Password should not be empty..');
return false;
}
else
{
return true;
}
}
</script>
customer.php
<?php
include("header.php");
//if($_POST[randomid] == $_SESSION[randomid])
{
$pwd = md5($_POST[password]);
Page 46
if(isset($_POST[submit]))
{
if(isset($_GET[editid]))
{
$sql ="UPDATE customer SET
cust_name='$_POST[name]',login_id='$_POST[login]',cust_address='$_POST[address2]',cu
st_email='$_POST[email]',cust_contactno='$_POST[contactno2]',cust_mobileno='$_POST[
mobno2]',cust_dob='$_POST[dob2]',cust_tinno='$_POST[tin]',cust_status='Active',cust_cod
e='$_POST[code]',set_top_box='$_POST[stbno]',pln_id='$_POST[tariff]',start_date='$_POS
T[stdate]',end_date='$_POST[enddate]',bldgname='$_POST[bname]',flat_no='$_POST[fno]',
vc_no='$_POST[vcno]',area_code='$_POST[areacode]' where cust_id='$_GET[editid]'";
$qsql = mysqli_query($con,$sql);
if(!$qsql)
{
echomysqli_error($con);
}
if(mysqli_affected_rows($con) == 1)
{
echo "<SCRIPT>alert('customer record updated
successfully...');</SCRIPT>";
}
}
else
{
$sql="INSERT INTO
customer(cust_name,login_id,password,cust_address,cust_email,cust_contactno,cust_mobile
no,cust_dob,cust_tinno,cust_status,cust_code,set_top_box,pln_id,start_date,end_date,bldgna
me,flat_no,vc_no,area_code)VALUES('$_POST[name]','$_POST[login]','$pwd','$_POST[ad
dress2]','$_POST[email]','$_POST[contactno2]','$_POST[mobno2]','$_POST[dob2]','$_POS
T[tin]','Pending','$_POST[code]','$_POST[stbno]','$_POST[tariff]','$_POST[stdate]','$_POST
[enddate]','$_POST[bname]','$_POST[fno2]','$_POST[vcno]','$_POST[areacode]')";
$qsql = mysqli_query($con,$sql);
if(!$qsql)
{
echomysqli_error($con);
}
if(mysqli_affected_rows($con) == 1)
{
echo "<SCRIPT>alert('Customer Account created
successfully....');</SCRIPT>";
Page 47
$mailmsg = ' Thanks for the registration .. Your account will be reviewed in 2-4 working
days.
<table border="1">
<tr>
<th width="280" scope="row"> Customer name <font color="red"
size="5">*</font></th>
<td width="614">'. $_POST[name]. '</td>
</tr>
<tr>
<th scope="row"> Date of birth</th>
<td>'.$_POST[dob2]. '</td>
</tr>
<tr>
<th scope="row"> Area <font color="red" size="5">*</font></th>
<td>'. $rsarea[area_name]. '</td>
</tr>
<tr>
<th scope="row">Term<font color="red" size="5">*</font></th>
<td>'.$rstariffplan[plan_code]. '</td>
</tr>
<tr>
<th scope="row">Plan name<font color="red" size="5">*</font></th>
<td>'.$rstariffplan[pln_name]. '</td>
</tr>
<tr>
<th scope="row">Plan cost<font color="red" size="5">*</font></th>
<td>Rs.'.$rstariffplan[plan_rate]. '</td>
</tr>
<tr>
<th scope="row"> Login ID<font color="red" size="5">*</font></th>
<td>'.$_POST[login]. '</td>
</tr>
<tr>
<th scope="row"> Address<font color="red" size="5">*</font></th>
<td>'.$_POST[address2]. '</td>
</tr>
<tr>
<th scope="row"> Email id<font color="red" size="5">*</font></th>
<td>'.$_POST[email2]. '</td>
</tr>
<tr>
<th scope="row"> Contact no</th>
<td>'. $_POST[contactno2]. '</td>
</tr>
<tr>
<th scope="row"> Mobile no<font color="red" size="5">*</font></th>
<td>'.$_POST[mobno2] . '</td>
Page 48
</tr>
</table>';
include("sendmail.php");
sendmail($_POST[email],"Registration confirmation mail from Cable
TV Billing Portal",$mailmsg,$_POST[name]);
echo "<SCRIPT>window.location='index.php';</SCRIPT>";
}
}
}
}
$_SESSION[randomid] = rand();
if(isset($_GET[editid]))
{
$sqledit = "SELECT * FROM customer WHERE cust_id='$_GET[editid]'";
$qsqledit = mysqli_query($con,$sqledit);
$rsedit = mysqli_fetch_array($qsqledit);
}
?>
<?php
include("sidebar.php");
?>
<h2><a href="#">Customer Registration Panel</a></h2>
<h4><span class="text-uppercase margin-l-20">Kindly enter the customer
details</span></h4>
<tr>
<th width="280" scope="row"> Customer name </th>
<td width="614"><input type="text" name="name" value="<?php echo
$rsedit[cust_name]; ?>"></td>
</tr>
<tr>
<th scope="row"> Date of birth </th>
<td><input type="date" name="dob2" value="<?php echo $rsedit[cust_dob]; ?>" max="<?
php
echo date("Y-m-d",mktime(0,0,0,date(m),date(d),date(Y)-18));
?>" /></td>
</tr>
<tr>
<th scope="row"> Area </th>
<td>
Page 49
<select name="areacode" onChange="loadtariff(this.value)" >
<option value=''>Select Area</option>
<?php
$sqlarea= "SELECT * FROM area WHERE area_status='Active'";
$qsqlarea = mysqli_query($con,$sqlarea);
while($rsarea = mysqli_fetch_array($qsqlarea))
{
if($rsarea[area_code] == $rsedit[area_code])
{
echo"<option value='$rsarea[area_code]' selected>
$rsarea[area_name</option>";
}
else
{
echo"<optionvalue='$rsarea[area_code]'>$rsarea[area_name]</option>";
}
}
?>
</select></td>
</tr>
<tr>
<th scope="row">Tariff plan
</th>
<td><div id='divtariff'><select name='tariff'></select></div></td>
</tr>
<tr>
<th scope="row"> Login ID
</th>
<td><input type="text" name="login" value="<?php echo $rsedit[login_id]; ?>" /></td>
</tr>
<tr>
<th scope="row"> Password</th>
<td><input type="password" name="password"></td>
</tr>
<tr>
<th scope="row"> Confirm password</th>
<td><input type="password" name="cpassword"></td>
</tr>
<tr>
<th scope="row"> Address</th>
<td><textarea name="address2"><?php echo $rsedit[cust_address]; ?></textarea></td>
</tr>
<!--
<tr>
<th scope="row"> Building name</th>
<td><input type="text" name="bname" value="<?php echo $rsedit[bldgname]; ?>"></td>
</tr>
<tr>
Page 50
<th scope="row"> Flat No.</th>
<td><input type="text" name="fno2" value="<?php echo $rsedit[flat_no]; ?>" /></td>
</tr>
-->
<tr>
<th scope="row"> Email id</th>
<td><input type="text" name="email" value="<?php echo $rsedit[cust_email]; ?>" /></td>
</tr>
<tr>
<th scope="row"> Mobile no
</th>
<td><input type="text" name="mobno2" value="<?php echo $rsedit[cust_mobileno]; ?>"
/></td>
</tr>
<tr>
<th height="36" colspan="2" scope="row"><div align="center">
<input type="submit" name="submit" id="submit" value="Click here to Register">
</div></th>
</tr>
</table>
</center>
</form>
<?php
include("footer.php");
?>
<script>
functionvalidateform()
{
varalphaExp = /^[a-zA-Z]+$/; //Variable to validate only alphabets
varalphaspaceExp = /^[a-zA-Z\s]+$/; //Variable to validate only alphabets and
space
varalphanumbericExp = /^[a-zA-Z0-9]+$/; //Variable to validate only
alphabets and space
varnumericExpression = /^[0-9]+$/; //Variable to validate only numbers
var emailExp=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-
9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if(document.frmcustomer.name.value=="")
{
alert('Customer name should not be empty..');
return false;
}
else if(document.frmcustomer.dob2.value=="")
{
alert('Customer date of birth should not be empty..');
return false;
}
Page 51
else if(!document.frmcustomer.name.value.match(alphaspaceExp))
{
alert('Customer name is not valid...');
return false;
}
else if(document.frmcustomer.login.value=="")
{
alert('Login ID should not be empty..');
return false;
}
else if(!document.frmcustomer.login.value.match(alphanumbericExp))
{
alert('Entered Login ID is not valid..');
return false;
}
else if(document.frmcustomer.password.value=="")
{
alert('Password should not be empty..');
return false;
}
else if(document.frmcustomer.password.value.length< 6)
{
alert('Password should be more than 6 character..');
return false;
}
else if(document.frmcustomer.cpassword.value=="")
{
alert('Confirm password should not be empty..');
return false;
}
Else if(document.frmcustomer.password.value!
=document.frmcustomer.cpassword.value )
{
alert('Password and Confirm password not matching...');
return false;
}
else if(document.frmcustomer.areacode.value=="")
{
alert('Area code should not be empty..');
return false;
}
else if(document.frmcustomer.tariff.value=="")
{
alert('Tariff type should not be empty..');
return false;
}
else if(document.frmcustomer.address2.value=="")
{
alert('Address should not be empty..');
return false;
Page 52
}
else if(document.frmcustomer.email.value=="")
{
alert('Email ID should not be empty..');
return false;
}
else if(!document.frmcustomer.email.value.match(emailExp))
{
alert('Kindly enter valid email id..');
return false;
}
else if(document.frmcustomer.mobno2.value=="")
{
alert('Mobile number should not be empty..');
return false;
}
else if(document.frmcustomer.mobno2.value.length !=10)
{
alert('mobile no is not valid');
return false;
}
else if(!document.frmcustomer.mobno2.value.match(numericExpression))
{
alert('Mobile number is not valid...');
return false;
}
else
{
return true;
}
}
functionloadtariff(areaid)
{
if (areaid == "")
{
document.getElementById("divtariff").innerHTML="<selectname='tariff'>
</select>";
return;
}
else
{
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
Page 53
if (this.readyState == 4 &&this.status == 200) {
document.getElementById("divtariff").innerHTML = this.responseText;
}
};
xmlhttp.open("GET","ajaxtariff.php?areaid="+areaid,true);
xmlhttp.send();
}
}
</script>
changepassword.php
<?php
include("header.php");
$oldpwd = md5($_POST[oldpass]);
$newpwd = md5($_POST[newpass]);
if(isset($_POST[submit]))
{
$sql = "UPDATE customer set password='$newpwd' WHERE password='$oldpwd'
AND cust_id='$_SESSION[cust_id]'";
$qsql = mysqli_query($con,$sql);
if(mysqli_affected_rows($con)==1)
{
echo "<script>alert('Customer password updated successfully...');</script>";
}
else
{
echo "<script>alert('Failed to update password...');</script>";
}
}
?>
<?php
include("sidebar.php");
?>
Page 54
<tr>
<th height="42" scope="row"> New Password</th>
<td> <input type="password" name="newpass"></td>
</tr>
<tr>
<th height="47" scope="row"> Confirm password</th>
<td> <input type="password" name="confirmpass"></td>
</tr>
<tr>
<th height="36" colspan="2" scope="row"><div align="center">
<input type="submit" name="submit" id="submit" value="Submit">
</div></th>
</tr>
</table>
</form>
<?php
include("footer.php");
?>
<script>
functionvalidateform()
{
if(document.frmchangepass.oldpass.value=="")
{
alert('Old password should not be empty..');
return false;
}
else if(document.frmchangepass.newpass.value=="")
{
alert('New password should not be empty..');
return false;
}
else if(document.frmchangepass.newpass.value.length< 6)
{
alert('New password should not be more than 6 characters..');
return false;
}
else if(document.frmchangepass.confirmpass.value=="")
{
alert('Confirm password should not be empty..');
return false;
}
elseif(document.frmchangepass.newpass.value!
=document.frmchangepass.confirmpass.value )
{
alert('Password and Confirm password not matching...');
return false;
}
else
Page 55
{
return true;
}
}
</script>
viewtariff.php
<?php
include("header.php");
$_SESSION[randomid] = rand();
if(isset($_GET[delid]))
{
$sql ="DELETE FROM tariffplan WHERE tariffplan_id='$_GET[delid]' ";
$qsql = mysqli_query($con,$sql);
if(mysqli_affected_rows($qsql) == 1)
{
echo "<script>alert('User record deleted successfully..');</script>";
}
}
?>
<?php
include("sidebar.php");
?>
Page 56
echo"<optionvalue='$rsarea[area_code]'
selected>$rsarea[area_name]</option>";
}
else
{
echo"<option value='$rsarea[area_code]'>$rsarea[area_name]</option>";
}
}
?>
</select></th>
<th scope="row"><input type="submit" name="brnseracharea" value="Click
Here to Select">
</th>
</tr>
</tbody>
</table>
</form>
<?php
include("datatables.php");
?>
<table id="example" class="table table-striped table-bordered" cellspacing="0"
width="100%">
<thead>
<tr>
<th scope="col"> Location</th>
<th scope="col"> Term</th>
<th scope="col"> Plan name</th>
<th scope="col"> Plan rate</th>
<th scope="col"> Plan note</th>
<?php
if($_SESSION[usr_type] == "Admin")
{
?>
<th scope="col"> Plan status</th>
<th scope="col"> Action</th>
<?php
}
?>
</tr>
</thead>
<tbody>
<?php
$sql = "SELECT * FROM tariffplan INNER JOIN area ON tariffplan.area_code =
area.area_code WHERE tariffplan.tariffplan_id!='0' ";
if($_SESSION[usr_type] == "Operator")
{
$sql = $sql ." ANDtariffplan.pln_status='Active'AND area.user_id='$_SESSION[usr_id]'";
}
if($_GET[areacode] != "")
{
Page 57
$sql = $sql ." ANDtariffplan.area_code='$_GET[areacode]'";
}
//echo $sql;
$qsql = mysqli_query($con,$sql);
while($rs = mysqli_fetch_array($qsql))
{
$sqlarea= "SELECT * FROM area WHERE area_status='Active' AND
area_code='$rs[area_code]'";
$qsqlarea = mysqli_query($con,$sqlarea);
$rsarea = mysqli_fetch_array($qsqlarea);
echo"<tr>
<td> $rsarea[area_name]</td>
<td> $rs[plan_code]</td>
<td> $rs[pln_name]</td>
<td> Rs. $rs[plan_rate]</td>
<td> $rs[pln_note]</td>";
if($_SESSION[usr_type] == "Admin")
{
echo "<td> $rs[pln_status]</td>";
echo"<td> <ahref='tariffplan.php?editid=$rs[tariffplan_id]'>Edit</a>";
if($rs[pln_status] == "Inactive")
{
echo " | <a href='viewtariff.php?delid=$rs[tariffplan_id]' onclick='return
deleteconfirm()'>Delete</a>";
}
echo "</td>";}
echo "</tr>";
}
?></tbody></table><?phpinclude("footer.php");?>
<script type="application/javascript">
functiondeleteconfirm()
{
if(confirm("Are you sure want to delete this record?") == true)
{
return true;
}
else
{
return false;
}
}
</script>
Page 58
SOFTWARE TESTING
SOFTWARE TESTING
Introduction:
Page 59
Testing is the major quality control measure used during software development. It is a basic
function to detect errors in the software. During the requirement analysis and design the
output of the document that is usually and nonexecutable after the coding phase the computer
programs are available that can be executed for testing purpose.This implies that testing not
only has to uncover errors introduce during the previous phased. The goal of testing is to
uncover requirement, design, and coding errors in the program.
Testing determines whether the system appears to be working according to the specifications.
It is the phase where we try to break the system and we test the system with real scenarios at
a point.
Levels of Testing
Unit Testing
The unit testing of the source code has to be done for every individual unit of module that
was developed part of the system and some errors were found for every turn and rectified.
This form of testing was used to check for the behavior signified the working of system in
different environment as an independent functional unit.
Integration Testing:
From the individual parts to the cohesion of each part to make the system as a whole,there is
need to test the working between the assembled modules of the system. The modules are
integrated to makeup the entire system. The testing process is concerned with finding errors
that result from unanticipated interaction between the sub-system and system component. It is
also concerned with validating the system meets its functional and non –functional
requirement.
System Testing:
The requirement specification document that is the entire system is to be tested to see
whether it meets the requirement or not.
Forms
Area Form:
Page 60
Serial. Condition to be tested Test Data Expected Remarks
No. Output
1. If operator is empty Agent Alerts the user SUCCESSFUL
that operator
should not be
empty
2. If area name is empty Area name Alerts the user SUCCESSFUL
that area name
should not be
empty
3. if area status is empty Area status Alerts the user SUCCESSFUL
that area status
should not be
empty
Customer Form:
Serial No. Condition to Test Data Expected Output Remarks
be tested
1. If customer Customer Name Alerts the user that customer SUCCESSFUL
name is empty name should not be empty
2. If customer Customer name Alerts the user to input SUCCESSFUL
name contains alphabet in the customer
numbers name
3. If login id is Login Id Alerts the user that login id SUCCESSFUL
empty should not be empty
4. If login id is Login id Alerts the user to input
not alphabet or alphabets or numbers in login SUCCESSFUL
numbers id
5. If customer Password Alerts the user that password SUCCESSFUL
password is should not be empty
empty
6. If password is Password Alerts the user that password SUCCESSFUL
more than six should not contain more than
characters six characters
7. If confirm Confirm password Alerts the user that confirm SUCCESSFUL
password is password should not be
empty empty
8. If new Confirmpassword, Alerts the user that password SUCCESSFUL
password and password and confirm password should
confirm be same
password is
same
9. If area code is Area code Alerts the user that area code SUCCESSFUL
empty should not be empty
10. If Tariff plan is Tariff plan Alerts the user that tariff plan SUCCESSFUL
empty should not be empty
11. If Address is Address Alerts the user that Address SUCCESSFUL
empty should not be empty
12. If Email id is Email id Alerts the user that email id SUCCESSFUL
empty should not be empty
13. If mobile no is Mobile no Alerts the user that mobile no SUCCESSFUL
empty should not be empty
14. If mobile Mobile no Alerts the user that mobile SUCCESSFUL
Page 61
number is non number should not contain
numeric alphabetic characters
Customer change password:
Serial No. Condition to be Test Data Expected Output Remarks
tested
1. If Old password Old Password Alerts the user that old SUCCESSFUL
is empty password should not be
empty
2. If New New Password Alerts the user that new SUCCESSFUL
password is password should not be
empty empty
3. If new password New password Alerts the user that new SUCCESSFUL
is more than 6 password should not contain
characters more than 6 characters
4. If confirm Confirm password Alerts the user that confirm SUCCESSFUL
password is password should not be
empty empty
5. If newpassword New password, Alerts the user that new SUCCESSFUL
and confirm Confirm password password and confirm
password is password must be same
same
Customer profile:
Serial No. Condition to be Test Data Expected Output Remarks
tested
1. If customer name Customer name Alerts the user that SUCCESSFUL
is empty customer name
should not be
empty
2. If customer name Customer name Alerts the user to SUCCESSFUL
contains numbers input alphabet in
the customer name
3. If address is Address Alerts the user that SUCCESSFUL
empty address should not
be empty
4. If address less Address Alerts the user that SUCCESSFUL
than 6 character address should be
more than 6
characters
5. If mobile no is Mobile no Alerts the user that SUCCESSFUL
empty mobile no should
not be empty
Page 62
1. If customer paid Paid amount Alerts the user SUCCESSFUL
amount is that customer
empty paid amount
should not be
empty
2. If transaction Transaction Alerts the user SUCCESSFUL
type is empty type that transaction
type should not
be empty
3. If card holder is Card holder Alerts the user SUCCESSFUL
empty that card holder
should not be
empty
4. If card number Card number Alerts the user SUCCESSFUL
is empty that card
number should
not be empty
5. If expiry date is Expiry date Alerts the user SUCCESSFUL
empty that expiry date
should not be
empty
6. If cvv number is CVV number Alerts the user SUCCESSFUL
empty that cvv number
should not be
empty
Tariff plan:
Serial No. Condition to be Test Data Expected Remarks
tested Output
1. If area name is Area name Alters the user SUCCESSFUL
empty that area name
should not be
empty
2. If plan term is Plan term Alerts the user SUCCESSFUL
empty that plan term
should not be
empty
2. If plan code is Plan code Alters the user SUCCESSFUL
empty that plan code
should not be
empty
3. If plan name is Plan name Alters the user SUCCESSFUL
empty that plan name
should not be
empty
4. If status is empty Status Alters the user SUCCESSFUL
that status should
not be empty
Invoice.php:
Serial No Condition to be Test Data Expected Remarks
Page 63
tested Output
1. If customer id is Customer id Alters the user SUCCESSFUL
empty that plan name
should not be
empty
2. If invoice rate is Invoice rate Alters the user SUCCESSFUL
empty that invoice rate
should not be
empty
3. If bill date is Bill date Alters the user SUCCESSFUL
empty that plan name
should not be
empty
User:
Serial No Condition to be Test Data Expected Remarks
tested Output
1. If user type is User type Alerts the user SUCCESSFUL
empty that user type
should not be
empty
2. If user name is User name Alerts the user SUCCESSFUL
empty that user name
should not be
empty
3. If user name User name Alerts the user to SUCCESSFUL
contains numbers input alphabet in
the customer
name
4. If login id is Login id Alerts the user SUCCESSFUL
empty that login id
should not be
empty.
5. If login id is not Login id Alerts the user to
alphabet or input alphabets or SUCCESSFUL
numbers numbers in login
id
6. If password is Password Alerts the user SUCCESSFUL
empty that password
should not be
empty
7. If password is Password Alerts the user SUCCESSFUL
more than 6 that password
characters should not
contain more
than six
characters.
8. If confirm Confirm Alerts the user SUCCESSFUL
password is password that confirm
empty password should
not be empty.
9. If password and Confirm Alerts the user SUCCESSFUL
confirm password password, that confirm
is same password password and
Page 64
password must be
same
10. If area code is Area code Alerts the user SUCCESSFUL
empty that area code
should not be
empty
11. If status is empty Status Alerts the user SUCCESSFUL
that status should
not be empty
User login:
Serial No. Condition to be Test Data Expected Remarks
tested Output
1. If login id is Login id Alerts the user SUCCESSFUL
empty that login id
should not be
empty
2. If password is Password Alerts the user SUCCESSFUL
empty that password
should not be
empty
User profile:
Serial No. Condition to be Test Data Expected Remarks
tested Output
1. If user type is User type Alerts the user SUCCESSFUL
empty that user type
should not be
empty
2. If user name is User name Alerts the user SUCCESSFUL
empty that user name
should not be
empty
3. If user name User name Alerts the user to SUCCESSFUL
contains numbers input alphabet in
the customer
name
4. If user status is Status Alerts the user SUCCESSFUL
empty that status should
not be empty
Page 65
USER MANUAL
USER MANUAL
Cable TV Billing Portal system is a user friendly web application which is developed using
PHP and Ajax as front end and MySQL as the back end. In order to run this software the
Page 66
minimum software requirements are the system should be expected under windows operating
system.
Execution methods:
For Administrator:
Open the web browser. Type the URL as “localhost/CABLE
APPLICATION/userlogin.php”.
Administrator should give his login id and password to get logged into the system.
Administrator can access the following:
Dashboard
Profile
Change password
View customer
New invoice
View invoice
View payments
Print data
Add area
View area
Add tariff plan
View tariff plan
Add operator
View operator
Logout
For Operator:
Open the web browser. Type the URL as “localhost/CABLE
APPLICATION/userlogin.php”. Operator should give his login id and password to
get logged into the system.
Page 67
Opertor can accessthe following:
Dashboard
Profile
Change password
View customer
New invoice
View invoice
View Payment
View tariff plan
Logout
For customers:
Open the web browser. Type the URLas
“localhost/CABLEAPPLICATION/customerlogin.php”.Customer should give his login id
and password to get logged into the system.
Customer can access the following:
Account
Invoice report
Payment report
Make payment
Profile
My plan
Change password
Logout
Page 68
CONCLUSION
CONCLUSION
Page 69
REFERENCES
Page 70
Page 71