Cheathen Cms FINAL-1
Cheathen Cms FINAL-1
PROJECT REPORT ON
“CLIENT MANAGAMENT SYSTEM”
CHETHAN SG
18RNSB7043
CERTIFICATE
This is to Certify that the Project Report titled “CLIENT MANAGEMENT
SYSTEM” is a Bonafede record of work done by Student Chethan SG
(18RNSB7043) of Bangalore University, Bangalore, in partial fulfillment of
the requirements of Sixth Semester BCA during the year 2021.
Valued-by:
We further declare that we have not submitted this project report in part or in
full to any other university for the award of any degree.
Place:
ACKNOWLEDGEMENT
We ensure our Humble and sincere gratitude to Dr. Susil Kumar Sahoo
(HOD) for his great encouragement and valuable support.
We offer our sincere to our guide MR. RATIKANTA MAJHI who has
always given us a constant source of inspiration and encouragement during
the course of our project.
Last but not least we thank our management and lab coordinator for
providing us the support to complete the project. We would like thank each
and everybody who supported us throughout the long and attention
consuming project.
ABSTRACT
The present scenario offers manual data entry. A lot of time is wasted in creating
the reports as well as maintaining them. In case, if any query arises to get the
information about the client, the whole report is re-typed or xeroxed. This
seriously affects the authentication of the system. This Client Management
System is totally outdated and involves high risk of ambiguity and redundancy
Chapter 1 1 Introduction
2.1.3 Constraints 11
2.2.3 Supportability 12
III
2.2.6 Design Constraints 12
2.2.7 Interfaces 12
DFD-Level-1
DFD-Level-2
DFD-Level-3
3.2.2 ER Diagram 16
4.3 Codes 20
IV
5.2 Unit Testing 87
Chapter 6 6 Conclusion
6.1 Limitation of the Project 89
6.3 Bibilography 90
V
Client Management System OXFORD COLLEGE OF SCIENCE,2021
CHAPTER 1
INTRODUCTION
Client Management System is software application which is used to manage a company's interaction
with current and potential clients. Client management system is an automatic system which delivers
data processing in very high speed in systematic manner.
In Client Management System we use PHP and MySQL Database. This project keeps the records of
clients. Client Management System has two module i.e. admin and client.
Admin Module
1. Dashboard: In this section, admin can briefly view the total services, total clients, total today's
sales, total yesterday's sales, total seven's sales and total sales. 2. Services: In this section, admin
can manage services (Add/Update).
3. Add Clients: In this section, admin can add new clients
4. Clients List: In this section, admin can update the client details and add services which are
provided by admin.
5. Invoices: In this section, admin can view invoices of the client and also take print of invoice.
6. Reports: In this section admin can view the clients details and check the sales reports (month
wise/year wise) in a particular period.
7. Search Invoice: In this section, admin can search clients invoice with the help of his/her invoice
number.
Admin can also update his profile, change the password and recover the password.
Client Module
Client Management System (CMS) is an established concept which is used to manage client
lifecycle through various technologies and process oriented tools. This study identifies how w eb
application can be utilized for improved client management and to understand the potential of web
Client Management System is software application which is used to manage a company's interaction
with current and potential clients. Client management system is an automatic system which delivers
data processing in very high speed in systematic manner.
In Client Management System we use PHP and MySQL Database. This project keeps the records of
clients. Client Management System has two module i.e. admin and client.
The main objective of the Client Management System project is to have a fully automated Client
Management System. This system will enable to draw the details of the client. This Client
Management System will definitely reduce the time, energy and money wasted in manually
searching the details of the clients. With the help of this software, all the services and clients can be
properly channelized.
Client Management System is software application which is used to manage a company's interaction
with current and potential clients. Client management system is an automatic system which delivers
data processing in very high speed in systematic manner.
In Client Management System we use PHP and MySQL Database. This project keeps the records of
clients. Client Management System has two module i.e. admin and client.
In the flexibility of the uses the interface has been developed a graphics concept in mind, associated
through a browses interface. The GUI’S at the top level have been categorized as
CHAPTER 2
SYSTEM REQUIREMENTS
A software requirement definition is an abstract description of the services which the system should
provide, and the constraints under which the system must operate. It should only specify the external
behavior of the system. The requirements are specified as below:
2.2.7 INTERFACE
The administrative user interface concentrates on the consistent information that is practically, part
of the organizational activities and which needs proper authentication for the data collection. The
interfaces help the administrations with all the transactional states like Data insertion, Data deletion
and Date updation along with the extensive data search capabilities.
The operational user interface also helps the ordinary users in managing their own information helps
the ordinary users in managing their own information in a customized manner as per the assisted
flexibilities.
The operational or generic user interface helps the users upon the system in transactions through the
existing data and required services.
CHAPTER 3
DESIGN SPECIFICATION
The data in the system has to be stored and retrieved from database. Designing the database is part
of system design. Data elements and data structures to be stored have been identified at analysis
stage. They are structured and put together to design the data storage and retrieval system.
ADMIN TABLE
PAGE TABLE
CLIENT TABLE
INVOICE TABLE
SERVICE TABLE
Design is the first step in the development phase for any techniques and principles for the purpose
of defining a device, a process or system in sufficient detail to permit its physical realization. Once
the software requirements have been analyzed and specified the software design involves three
technical activities - design, coding, implementation and testing that are required to build and verify
the software.
The design activities are of main importance in this phase, because in this activity, decisions
ultimately affecting the success of the software implementation and its ease of maintenance are
made. These decisions have the final bearing upon reliability and maintainability of the system.
Design is the only way to accurately translate the customer’s requirements into finished software or
a system.
Design is the place where quality is fostered in development. Software design is a process through
which requirements are translated into a representation of software. Software design is conducted in
two steps. Preliminary design is concerned with the transformation of requirements into data
3.2.2 ER DIAGRAM
Definition
The Entity-Relationship (ER) model was originally proposed by Peter in 1976 [Chen76] as a way
to unify the network and relational database views. Simply stated the ER model is a conceptual data
model that views the real world as entities and relationships. A basic component of the model is the
Entity-Relationship diagram which is used to visually represent data objects. Since Chen wrote his
paper the model has been extended and today it is commonly used for database design for the
database designer, the utility of the ER model is:
• It maps well to the relational model. The constructs used in the ER model can easily be
transformed into relational tables.
• It is simple and easy to understand with a minimum of training. Therefore, the model can be
used by the database designer to communicate the design to the end user.
Definition
The database schema of a database is its structure described in a formal language supported by the
database management system (DBMS). The term "schema” refers to the organization of data as a
blueprint of how the database is constructed (divided into database tables in the case of relational
databases).
Normalization is the process of organizing data in a database so that it meets two basic requirements:
A 1nf table is in 2nf form if and only if all of its non-prime attributes are functionally dependent on
the whole of every candidate key.
CHAPTER 4
IMPLEMENTATION
4.1 INTRODUCTION TO SOFTWARE USED
Description
Visual Studio Code is a free source-code editor made by Microsoft for Windows, Linux and macOS.
Features include support for debugging, syntax highlighting, intelligent code completion, snippets,
code refactoring, and embedded Git.
4.2 MySQL
Description
MySQL is free and open-source software under the terms of the GNU General Public License, and
is also available under a variety of proprietary licenses. MySQL was owned and sponsored by the
Swedish company MySQL AB, which was bought by Sun Microsystems (now Oracle Corporation).
In 2010, when Oracle acquired Sun, Widenius forked the open-source MySQL project to create
MariaDB.
4.2 XAMPP
Description
XAMPP is a free and open-source cross-platform web server solution stack package developed by
Apache Friends, consisting mainly of the Apache HTTP Server, MariaDB database, and interpreters
for scripts written in the PHP and Perl programming languages.
<head>
<title>Client Management System||Login Page</title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!-- Graph CSS -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<link href='//fonts.googleapis.com/css?family=Roboto:700,500,300,100italic,100,400'
rel='stylesheet' type='text/css'>
<!-- lined-icons -->
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
<!-- //lined-icons -->
<script src="js/jquery-1.10.2.min.js"></script>
<!--clock init-->
</head>
<body>
<div class="error_page">
<div class="error-top">
<h2 class="inner-tittle page" style="left: 36%">ADMIN</h2>
<div class="login">
<div class="buttons login">
<h3 class="inner-tittle t-inner" style="color: #257de6">Sign In</h3>
</div>
<form id="login" method="post" name="login">
<input type="text" class="text" value="User Name" onfocus="this.value = '';" onblur="if (this.value
== '') {this.value = 'E-mail address';}" name="username" required="true">
ABOUT US
<?php
session_start(); error_reporting(0);
include('includes/dbconnection.php'); if
(strlen($_SESSION['clientmsaid']==0)) {
header('location:logout.php');
} else{ if(isset($_POST['submit']))
{
$clientmsaid=$_SESSION['clientmsaid'];
$pagetitle=$_POST['pagetitle'];
$pagedes=$_POST['pagedes'];
$sql="update tblpage set PageTitle=:pagetitle,PageDescription=:pagedes where
PageType='aboutus'";
$query=$dbh->prepare($sql);
$query->bindParam(':pagetitle',$pagetitle,PDO::PARAM_STR);
$query->bindParam(':pagedes',$pagedes,PDO::PARAM_STR);
$query->execute();
echo '<script>alert("About us has been updated")</script>';
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Client Management Sysytem|| Update About Us</title>
<div class="sub-heard-part">
<ol class="breadcrumb m-b-0">
<li><a href="dashboard.php">Home</a></li>
<li class="active">Update About Us</li>
</ol>
</div>
<!--/sub-heard-part-->
<!--/forms-->
<div class="forms-main">
<h2 class="inner-tittle">Update About Us </h2>
<div class="graph-form">
<div class="form-body">
<form method="post">
<?php
$sql="SELECT * from tblpage where PageType='aboutus'";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1; if($query->rowCount()
> 0) {
foreach($results as $row)
{ ?>
<div class="form-group"> <label for="exampleInputEmail1">Page Title</label> <input
type="text" name="pagetitle" value="<?php echo $row->PageTitle;?>" class="form-control"
required='true'> </div>
<div class="form-group"> <label for="exampleInputEmail1">Page Description</label> <textarea
type="text" name="pagedes" id="pagedes" required="true"class="form-control"><?php echo
$row->PageDescription;?></textarea> </div>
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<?php } ?>
ADD CLIENT
<?php
session_start(); error_reporting(0);
include('includes/dbconnection.php');
if
(strlen($_SESSION['clientmsaid']==0
)) { header('location:logout.php');
} else{
if(isset($_POST['submit']))
{
$clientmsaid=$_SESSION['clientmsaid'];
$acctid=mt_rand(100000000, 999999999);
$accttype=$_POST['accounttype'];
$password=md5($_POST['password']);
$cname=$_POST['cname'];
$comname=$_POST['comname'];
$address=$_POST['address'];
$city=$_POST['city'];
$state=$_POST['state'];
$zcode=$_POST['zcode'];
$wphnumber=$_POST['wphnumber'];
$cellphnumber=$_POST['cellphnumber'];
$ophnumber=$_POST['ophnumber'];
$email=$_POST['email'];
$websiteadd=$_POST['websiteadd'];
$notes=$_POST['notes'];
$sql="insert into
tblclient(AccountID,AccountType,ContactName,CompanyName,Address,City,State,ZipCode,Wor
kphnumber,Cellphnumber,Otherphnumber,Email,WebsiteAddress,Notes,Password)values(:acctid,
:accttype,:cname,:comname,:address,:city,:state,:zcode,:wphnumber,:cellphnumber,:ophnumber,:e
mail,:websiteadd,:notes,:password)";
$query=$dbh->prepare($sql);
$query->bindParam(':acctid',$acctid,PDO::PARAM_STR); $query-
>bindParam(':accttype',$accttype,PDO::PARAM_STR);
$query->bindParam(':cname',$cname,PDO::PARAM_STR);
$query->bindParam(':comname',$comname,PDO::PARAM_STR);
$query->bindParam(':address',$address,PDO::PARAM_STR);
$query->bindParam(':city',$city,PDO::PARAM_STR);
$query->bindParam(':state',$state,PDO::PARAM_STR);
$query->bindParam(':zcode',$zcode,PDO::PARAM_STR);
$query->bindParam(':wphnumber',$wphnumber,PDO::PARAM_STR);
$query->bindParam(':cellphnumber',$cellphnumber,PDO::PARAM_STR);
$query->bindParam(':ophnumber',$ophnumber,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':websiteadd',$websiteadd,PDO::PARAM_STR);
$query->bindParam(':notes',$notes,PDO::PARAM_STR);
$query->bindParam(':password',$password,PDO::PARAM_STR);
$query->execute();
$LastInsertId=$dbh->lastInsertId(); if
($LastInsertId>0) {
echo '<script>alert("Client has been added.")</script>'; echo
"<script>window.location.href ='add-client.php'</script>";
<!--//skycons-icons-->
</head>
<body>
<div class="page-container">
<!--/content-inner-->
<div class="left-content">
<div class="inner-content">
<?php include_once('includes/header.php');?>
<!--//outer-wp-->
<div class="outter-wp">
<!--/sub-heard-part-->
<div class="sub-heard-part">
<ol class="breadcrumb m-b-0">
<li><a href="dashboard.php">Home</a></li>
<li class="active">Add Clients</li>
</ol>
</div>
<!--/sub-heard-part-->
<!--/forms-->
<div class="forms-main">
<h2 class="inner-tittle">Add Clients </h2>
<div class="graph-form">
<div class="form-body">
<form method="post">
cols="3"></textarea> </div>
<button type="submit" class="btn btn-default" name="submit" id="submit">Save</button>
</form>
</div>
</div>
</div>
</div>
<?php include_once('includes/footer.php');?>
</div>
</div>
<?php include_once('includes/sidebar.php');?>
<div class="clearfix"></div>
</div> <script>
var toggle = true;
$(".sidebar-icon").click(function() { if
(toggle)
{
$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
$("#menu span").css({"position":"absolute"});
} else
{
$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
setTimeout(function() {
$("#menu span").css({"position":"relative"});
}, 400);
}
toggle = !toggle;
});
</script>
<!--js -->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<?php } ?>
ADD SERVICE
<?php
session_start(); error_reporting(0);
include('includes/dbconnection.php
'); if
(strlen($_SESSION['clientmsaid']=
=0)) {
header('location:logout.php');
} else{ if(isset($_POST['submit']))
$sname=$_POST['sname'];
$price=$_POST['price'];
$LastInsertId=$dbh->lastInsertId(); if
($LastInsertId>0) {
echo '<script>alert("Service has been added.")</script>'; echo
"<script>window.location.href ='add-services.php'</script>";
} else
{
echo '<script>alert("Something Went Wrong. Please try again")</script>';
}
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Client Management Sysytem|| Add Services</title>
<?php include_once('includes/header.php');?>
<!--//outer-wp-->
<div class="outter-wp">
<!--/sub-heard-part-->
<div class="sub-heard-part">
<ol class="breadcrumb m-b-0">
<li><a href="dashboard.php">Home</a></li>
<li class="active">Add Services</li>
</ol>
</div>
<!--/sub-heard-part-->
<!--/forms-->
<div class="forms-main">
<h2 class="inner-tittle">Add Services </h2>
<div class="graph-form">
<div class="form-body">
<form method="post">
<div class="form-group"> <label for="exampleInputEmail1">Service Name</label> <input
type="text" name="sname" placeholder="Service Name" value="" class="form -control"
required='true'> </div>
<?php include_once('includes/sidebar.php');?>
<div class="clearfix"></div>
</div> <script>
$(".sidebar-icon").click(function() { if
(toggle)
{
$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
$("#menu span").css({"position":"absolute"});
} else
{
$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
setTimeout(function() {
$("#menu span").css({"position":"relative"});
}, 400);
}
toggle = !toggle;
});
</script>
<!--js -->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
ADMIN PROFILE
<?php
session_start(); error_reporting(0);
include('includes/dbconnection.php'); if
(strlen($_SESSION['clientmsaid']==0)) {
header('location:logout.php');
} else{ if(isset($_POST['submit']))
{
$adminid=$_SESSION['clientmsaid'];
$AName=$_POST['adminname']; $mobno=$_POST['mobilenumber'];
$email=$_POST['email'];
$sql="update tbladmin set
AdminName=:adminname,MobileNumber=:mobilenumber,Email=:email where ID=:aid";
$query = $dbh->prepare($sql);
$query->bindParam(':adminname',$AName,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':mobilenumber',$mobno,PDO::PARAM_STR);
$query->bindParam(':aid',$adminid,PDO::PARAM_STR);
$query->execute();
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Client Management Sysytem|| Admin Profile</title>
<?php include_once('includes/header.php');?>
<!--//outer-wp-->
<div class="outter-wp">
<!--/sub-heard-part-->
<div class="sub-heard-part">
<ol class="breadcrumb m-b-0">
<li><a href="dashboard.php">Home</a></li>
<li class="active">Profile</li>
</ol>
</div>
<!--/sub-heard-part-->
<!--/forms-->
<div class="forms-main">
<h2 class="inner-tittle">Admin Profile </h2>
<div class="graph-form">
<div class="form-body">
<form method="post">
<?php
required='true'> </div>
$(".sidebar-icon").click(function() { if
(toggle)
{
$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
$("#menu span").css({"position":"absolute"});
} else
{
$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
setTimeout(function() {
$("#menu span").css({"position":"relative"});
}, 400);
}
toggle = !toggle;
});
</script>
<!--js -->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
REPORT DETAILS
<?php
session_start(); error_reporting(0);
include('includes/dbconnection.php'); if
(strlen($_SESSION['clientmsaid']==0)) {
header('location:logout.php');
} else{
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Client Management Sysytem || Between dates reports </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!-- Graph CSS -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<link href='//fonts.googleapis.com/css?family=Roboto:700,500,300,100italic,100,400'
rel='stylesheet' type='text/css'>
<!-- lined-icons -->
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' /> <!--
/js -->
<script src="js/jquery-1.10.2.min.js"></script>
<!-- //js-->
</head>
<body>
<div class="page-container">
<!--/content-inner-->
<div class="left-content">
<div class="inner-content">
<!-- header-starts -->
<?php include_once('includes/header.php');?>
<?php
$sql="select distinct
tblclient.ContactName,tblclient.CompanyName,tblinvoice.BillingId,tblinvoice.PostingDate from
tblclient join tblinvoice on tblclient.ID=tblinvoice.Userid where date(tblinvoice.PostingDate)
between '$fdate' and '$tdate'";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1; if($query->rowCount()
> 0)
{ foreach($results as
$row)
{ ?>
<tr class="active">
<th scope="row"><?php echo htmlentities($cnt);?></th>
<td><?php echo htmlentities($row->BillingId);?></td>
<td><?php echo htmlentities($row->CompanyName);?></td>
<td><?php echo htmlentities($row->ContactName);?></td>
<td><?php echo htmlentities($row->PostingDate);?></td>
</div>
</div>
<!--//graph-visual-->
</div>
<!--//outer-wp-->
<?php include_once('includes/footer.php');?>
</div>
</div>
<!--//content-inner-->
<!--/sidebar-menu-->
<?php include_once('includes/sidebar.php');?>
<div class="clearfix"></div>
</div> <script>
var toggle = true;
$(".sidebar-icon").click(function() { if
(toggle)
{
$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
$("#menu span").css({"position":"absolute"});
} else
{
$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
setTimeout(function() {
$("#menu span").css({"position":"relative"});
}, 400);
}
toggle = !toggle;
});
</script>
<!--js -->
<script src="js/jquery.nicescroll.js"></script>
DEPARTME NT OF COMPUTER SCIENCE,BANGALORE UNIVERSITY - 46 -
Client Management System OXFORD COLLEGE OF SCIENCE,2021
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<?php } ?>
CHANGE PASSWORD
<?php
session_start(); error_reporting(0);
include('includes/dbconnection.php');
error_reporting(0); if
(strlen($_SESSION['clientmsaid']==0)) {
header('location:logout.php');
} else{ if(isset($_POST['submit']))
{
$adminid=$_SESSION['clientmsaid'];
$cpassword=md5($_POST['currentpassword']); $newpassword=md5($_POST['newpassword']);
$sql ="SELECT ID FROM tbladmin WHERE ID=:adminid and Password=:cpassword";
$query= $dbh -> prepare($sql);
$query-> bindParam(':adminid', $adminid, PDO::PARAM_STR);
$query-> bindParam(':cpassword', $cpassword, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
}
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Client Management System|| Change Password</title>
<?php include_once('includes/header.php');?>
<!--//outer-wp-->
<div class="outter-wp">
<!--/sub-heard-part-->
<div class="sub-heard-part">
DEPARTME NT OF COMPUTER SCIENCE,BANGALORE UNIVERSITY - 49 -
Client Management System OXFORD COLLEGE OF SCIENCE,2021
<?php include_once('includes/sidebar.php');?>
<div class="clearfix"></div>
</div> <script>
$(".sidebar-icon").click(function() { if
(toggle)
{
$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
$("#menu span").css({"position":"absolute"});
} else
{
$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
setTimeout(function() {
$("#menu span").css({"position":"relative"});
}, 400);
}
toggle = !toggle;
});
</script>
<!--js -->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
CONTACT US
<?php
session_start(); error_reporting(0);
include('includes/dbconnection.php'); if
(strlen($_SESSION['clientmsaid']==0)) {
header('location:logout.php');
} else{ if(isset($_POST['submit']))
{
$clientmsaid=$_SESSION['clientmsaid'];
$pagetitle=$_POST['pagetitle'];
$pagedes=$_POST['pagedes'];
$mobnum=$_POST['mobnum'];
$email=$_POST['email'];
$sql="update tblpage set
PageTitle=:pagetitle,PageDescription=:pagedes,Email=:email,MobileNumber=:mobnum where
PageType='contactus'";
$query=$dbh->prepare($sql);
$query->bindParam(':pagetitle',$pagetitle,PDO::PARAM_STR);
$query->bindParam(':pagedes',$pagedes,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':mobnum',$mobnum,PDO::PARAM_STR);
$query->execute();
echo '<script>alert("Contact us has been updated")</script>';
}
?>
<!DOCTYPE HTML>
<html>
<head>
DEPARTME NT OF COMPUTER SCIENCE,BANGALORE UNIVERSITY - 52 -
Client Management System OXFORD COLLEGE OF SCIENCE,2021
<div class="left-content">
<div class="inner-content">
<?php include_once('includes/header.php');?>
<!--//outer-wp-->
<div class="outter-wp">
<!--/sub-heard-part-->
<div class="sub-heard-part">
<ol class="breadcrumb m-b-0">
<li><a href="dashboard.php">Home</a></li>
<li class="active">Update Contact Us</li>
</ol>
</div>
<!--/sub-heard-part-->
<!--/forms-->
<div class="forms-main">
<h2 class="inner-tittle">Update Contact Us </h2>
<div class="graph-form">
<div class="form-body">
<form method="post">
<?php
{ ?>
<div class="form-group"> <label for="exampleInputEmail1">Page Title</label> <input type="text"
name="pagetitle" id="pagetitle" required="true" value="<?php echo $row-
>PageTitle;?>" class="form-control"> </div>
<div class="form-group"> <label for="exampleInputEmail1">Email</label> <input type="text"
name="email" id="email" required="true" value="<?php echo $row->Email;?>"
class="formcontrol"> </div>
<div class="form-group"> <label for="exampleInputEmail1">Mobile Number</label> <input
type="text" name="mobnum" id="mobnum" required="true" value="<?php echo $row-
>MobileNumber;?>" class="form-control"> </div>
<div class="form-group"> <label for="exampleInputEmail1">Page Description</label> <textarea
type="text" name="pagedes" id="pagedes" required="true"class="form-control"><?php echo
$row->PageDescription;?></textarea> </div>
tion() { if
(toggle)
{
$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
$("#menu span").css({"position":"absolute"});
} else
{
$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
setTimeout(function() {
$("#menu span").css({"position":"relative"});
}, 400);
}
toggle = !toggle;
});
</script>
<!--js -->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
DASHBOARD
<?php
session_start(); error_reporting(0);
include('includes/dbconnection.php'); if
(strlen($_SESSION['clientmsaid']==0)) {
header('location:logout.php');
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Client Management System||Dashboard</title>
<script src="js/serial.js"></script>
<script src="js/light.js"></script>
<script src="js/radar.js"></script>
<link href="css/barChart.css" rel='stylesheet' type='text/css' />
<link href="css/fabochart.css" rel='stylesheet' type='text/css' />
<!--clock init-->
<script src="js/css3clock.js"></script>
<!--Easy Pie Chart-->
<!--skycons-icons-->
<script src="js/skycons.js"></script>
<script src="js/jquery.easydropdown.js"></script>
<!--//skycons-icons-->
</head>
<body>
<div class="page-container">
<!--/content-inner-->
<div class="left-content">
<div class="inner-content">
<?php include_once('includes/header.php');?>
<div class="outter-wp">
<!--custom-widgets-->
<div class="custom-widgets">
<div class="row-one">
<div class="col-md-4 widget">
<div class="stats-left ">
<?php
$todays_sale=$row6->todaysale;
}
?>
<h5>Today</h5>
<h4>Sales($)</h4>
</div>
<div class="stats-right">
<label><?php echo $todays_sale;?></label>
</div>
<div class="clearfix"> </div>
</div>
<div class="clearfix"> </div>
</div>
</div>
DEPARTME NT OF COMPUTER SCIENCE,BANGALORE UNIVERSITY - 60 -
Client Management System OXFORD COLLEGE OF SCIENCE,2021
</div>
<div class="outter-wp">
<!--custom-widgets-->
<div class="custom-widgets">
<div class="row-one">
<?php
$sql8="select sum(tblservices.ServicePrice) as totalcost from
tblinvoice join tblservices on
tblservices.ID=tblinvoice.ServiceId where
date(PostingDate)>=(DATE(NOW()) - INTERVAL 7 DAY);";
$sevendays_sale=$row8->totalcost;
}
?>
<h5>Last Sevendays</h5>
<h4>Sale($)</h4>
</div>
<div class="stats-right">
<label><?php echo $sevendays_sale;?></label>
</div>
<div class="clearfix"> </div>
</div>
<div class="col-md-4 widget states-last">
<div class="stats-left">
<?php
$sql9="select sum(tblservices.ServicePrice) as totalcost
from tblinvoice join tblservices on
tblservices.ID=tblinvoice.ServiceId";
<?php include_once('includes/footer.php');?>
</div>
</div>
<!--//content-inner-->
<?php include_once('includes/sidebar.php');?>
<div class="clearfix"></div>
DEPARTME NT OF COMPUTER SCIENCE,BANGALORE UNIVERSITY - 63 -
Client Management System OXFORD COLLEGE OF SCIENCE,2021
</div> <script>
var toggle = true;
$(".sidebar-icon").click(function() { if
(toggle)
{
$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
$("#menu span").css({"position":"absolute"});
}
toggle = !toggle;
});
</script>
<!--js -->
<link rel="stylesheet" href="css/vroom.css">
<script type="text/javascript" src="js/vroom.js"></script>
<script type="text/javascript" src="js/TweenLite.min.js"></script>
<script type="text/javascript" src="js/CSSPlugin.min.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
FORGET PASSWORD
<?php
session_start(); error_reporting(0);
include('includes/dbconnection.php');
if(isset($_POST['submit']))
{
$email=$_POST['email'];
$mobile=$_POST['mobile'];
$newpassword=md5($_POST['newpassword']);
$sql ="SELECT Email FROM tbladmin WHERE Email=:email and MobileNumber=:mobile";
$query= $dbh -> prepare($sql);
$query-> bindParam(':email', $email, PDO::PARAM_STR);
$query-> bindParam(':mobile', $mobile, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ); if($query -
> rowCount() > 0)
{
$con="update tbladmin set Password=:newpassword where Email=:email and
MobileNumber=:mobile";
$chngpwd1 = $dbh->prepare($con);
$chngpwd1-> bindParam(':email', $email, PDO::PARAM_STR);
$chngpwd1-> bindParam(':mobile', $mobile, PDO::PARAM_STR);
$chngpwd1-> bindParam(':newpassword', $newpassword, PDO::PARAM_STR);
$chngpwd1->execute();
echo "<script>alert('Your Password succesfully changed');</script>";
} else
{
echo "<script>alert('Email id or Mobile no is invalid');</script>";
}
}
?>
<!DOCTYPE HTML>
<html>
<head>
<div class="error_page">
<div class="error-top">
<h2 class="inner-tittle page">CMS</h2>
<div class="login">
<div class="new">
<p><a href="index.php">Already have an account</a></p>
<div class="clearfix"></div>
</div>
</form>
</div>
</div>
<!--//login-top-->
</div>
<!--//login-->
<!--footer section start-->
<div class="footer">
<?php include_once('includes/footer.php');?>
</div>
<!--footer section end-->
<!--/404-->
<!--js -->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
INVOICES
<?php
session_start(); error_reporting(0);
include('includes/dbconnection.php'); if
(strlen($_SESSION['clientmsaid']==0)) {
header('location:logout.php');
} else{
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Client Management Sysytem || Invoice </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!-- Graph CSS -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<link href='//fonts.googleapis.com/css?family=Roboto:700,500,300,100italic,100,400'
rel='stylesheet' type='text/css'>
<!-- lined-icons -->
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' /> <!--
/js -->
<script src="js/jquery-1.10.2.min.js"></script>
<!-- //js-->
</head>
<body>
<div class="page-container">
<!--/content-inner-->
<div class="left-content">
<div class="inner-content">
<!-- header-starts -->
<?php include_once('includes/header.php');?>
<!-- //header-ends -->
<!--outter-wp-->
<div class="outter-wp">
<!--sub-heard-part-->
<div class="sub-heard-part">
<ol class="breadcrumb m-b-0">
<li><a href="dashboard.php">Home</a></li>
<li class="active">Invoice</li>
</ol>
</div>
<!--//sub-heard-part-->
<div class="graph-visual tables-main">
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{ foreach($results as
$row)
{ ?>
<tr class="active">
<th scope="row"><?php echo htmlentities($cnt);?></th>
<td><?php echo htmlentities($row->BillingId);?></td>
<td><?php echo htmlentities($row->CompanyName);?></td>
<td><?php echo htmlentities($row->ContactName);?></td>
<td><?php echo htmlentities($row->PostingDate);?></td>
<td><a href="view-invoice.php?invoiceid=<?php echo $row->BillingId;?>">View</a></td> </tr>
<?php $cnt=$cnt+1;}} ?>
</tbody> </table>
</div>
</div>
</div>
<!--//graph-visual-->
</div>
<!--//outer-wp-->
<?php include_once('includes/footer.php');?>
</div>
</div>
<!--//content-inner-->
<!--/sidebar-menu-->
<?php include_once('includes/sidebar.php');?>
<div class="clearfix"></div>
</div> <script>
var toggle = true;
$(".sidebar-icon").click(function() { if
(toggle)
{
$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
$("#menu span").css({"position":"absolute"});
} else
{
$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
setTimeout(function() {
$("#menu span").css({"position":"relative"});
}, 400); }
toggle = !toggle;
});
</script>
<!--js -->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<?php } ?>
CLIENT(index.html)
<?php
session_start(); error_reporting(0);
include('includes/dbconnection.php')
; if(isset($_POST['login']))
{
$email=$_POST['email'];
$password=md5($_POST['password']);
$sql ="SELECT ID FROM tblclient WHERE Email=:email and Password=:password";
$query=$dbh->prepare($sql);
$query-> bindParam(':email', $email, PDO::PARAM_STR);
$query-> bindParam(':password', $password, PDO::PARAM_STR);
$query-> execute();
$results=$query->fetchAll(PDO::FETCH_OBJ); if($query->rowCount()
> 0)
{ foreach ($results as $result)
{
$_SESSION['clientmsuid']=$result->ID;
}
$_SESSION['login']=$_POST['username'];
echo "<script type='text/javascript'> document.location ='dashboard.php'; </script>";
} else{ echo "<script>alert('Invalid
Details');</script>";
}
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Client Management System||Login Page</title>
DEPARTME NT OF COMPUTER SCIENCE,BANGALORE UNIVERSITY - 73 -
Client Management System OXFORD COLLEGE OF SCIENCE,2021
DELIMITER $$
DELIMITER ;
Call PRUTHVI( );
SQL TRIGGER
DELIMITER $$
CREATE TRIGGER `ADD_GST` BEFORE INSERT ON `tblservices`
FOR EACH ROW BEGIN SET new.ServicePrice = new.ServicePrice + new.ServicePrice * 0.18;
END
$$
DELIMITER ;
DELIMITER $$
$$
CREATE TRIGGER `tr_ins_pmp` BEFORE INSERT ON `tblclient`
FOR EACH ROW SET NEW.CompanyName = UPPER(NEW.CompanyName)
$$
DELIMITER ;
Chapter 5
CHAPTER 5
SOFTWARE TESTING
Unit testing is a software development process in which the smallest testable parts of an application,
called units, are individually and independently scrutinized for proper operation. This testing
methodology is done during the development process by the software developers and sometimes QA
staff. The main objective of unit testing is to isolate written code to test and determine if it works as
intended.
Unit testing is an important step in the development process, because if done correctly, it can help
detect early flaws in code which may be more difficult to find in later testing stages.
Unit testing is a component of TDD, a pragmatic methodology that takes a meticulous approach to
building a product by means of continual testing and revision. This testing method is also the first
level of software testing, which is performed before other testing methods such as integration testing.
Unit tests are typically isolated to ensure a unit does not rely on any external code or functions.
Testing can be done manually but is often automated.
Unit testing uses modules for testing purpose, and these modules are combined and tested in
integration testing. The Software is developed with a number of software modules that are coded by
different coders or programmers. The goal of integration testing is to check the correctness of
communication among all the modules.
Unlike a CLI (command-line interface) system, a GUI may have additional operations that need to
be tested. A relatively small program such as Microsoft WordPad has 325 possible GUI
operations.[1] In a large program, the number of operations can easily be an order of magnitude larger.
The second problem is the sequencing problem. Some functionality of the system may only be
accomplished with a sequence of GUI events. For example, to open a file a user may first have to
click on the File Menu, then select the Open operation, use a dialog box to specify the file name, and
focus the application on the newly opened window. Increasing the number of possible operations
increases the sequencing problem exponentially. This can become a serious issue when the tester is
creating test cases manually.
Regression testing is often a challenge with GUIs as well. A GUI may change significantly, even
though the underlying application does not. A test designed to follow a certain path through the GUI
may then fail since a button, menu item, or dialog may have changed location or appearance.
These issues have driven the GUI testing problem domain towards automation. Many diffe rent
techniques have been proposed to automatically generate test suites that are complete and that
simulate user behavior.
Most of the testing techniques attempt to build on those previously used to test CLI programs, but
these can have scaling problems when applied to GUIs. For example, Finite State Machine-based
modeling[2][3] — where a system is modeled as a finite state machine and a program is used to
generate test cases that exercise all states — can work well on a system that has a limited number of
states but may become overly complex and unwieldy for a GUI (see also model-based testing).
CHAPTER 6
CONCLUSION
6.1 LIMITATIONS OF PROJECT
It has been a great pleasure for me to work on this exciting and challenging project. This project
proved good for me as it provided practical knowledge of not only programming in PHP and MySQL
web based application. It also provides knowledge about the latest technology used in developing
web enabled application and client server technology that will be great demand in future.
This will provide better opportunities and guidance in future in developing projects independent
it provides a friendly graphical user interface which proves to be better when compared to the
existing system.
system security, data security and reliability are the striking features.
6.3 BIBLOGRAPHY