Banking System

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 105

S K SOMAIYA DEGREE COLLEGE OF ARTS, SCIENCE AND

COMMERCE
VIDYAVIHAR, MUMBAI-77

PROJECT REPORT

ON

Finance management website

BY

BHAVYA R PATEL

T.Y.BSC(COMPUTER SCIENCE)

ROLL NO:66

PROJECT GUIDE
Prof.Poonam Pandey

HEAD OF DEPARTMENT
Prof.Swati Maurya
ACKNOWLEDGEMENT
I have great pleasure in presenting this project entitled
“FINANCIAL MANAGEMENT SYSTEM”
I take this opportunity to thank “DR. MANALI LONDHE” our
principal ok SK SOMAIYA DEGREE COLLEGE OF ARTS,
SCIENCE AND COMMERCE for giving the opportunity to
study in the institute and the most needed guidance
throughout the duration of the course.
I would also like to extend my gratitude to “MS. POONAM
PANDEY” for the timely and prestige guidance and also
provided the guidance and necessary support during each
phase of the project.

Thanking You,

BHAVYA PATEL
TABLE OF CONTENTS

CHAPTER 1: INTRODUCTION TO THE PROJECT

OBJECTIVE OF THE PROJECT


PROJECT CATEGORY
FEATURES
DESCRIPTION
FRONT END & BACK END
CHAPTER 2: SYSTEM DESIGN

E R DIAGRAM
DATABASE DESIGN
USE CASE DIAGRAM
SEQUENCE DIAGRAM
ACTIVITY DIAGRAM
CLASS DIAGRAM
CHAPTER 3: USAGE INFO

DESCRIPTION
SCREENSHOTS
CHAPTER 4: CODING
SYSTEM CODES
OBJECTIVE
FMS- Make your Bank Loan Management easy FMS is a Modern and
Responsive Loan management system. It is developed by PHP and
HTML 5. It is design and develop for companies, bank etc that require
streamlined loan control, savings account and SMS notification
system. The system also automates the savings, borrowing and
payment processes. This software is a web based application used
by most cooperative, mini – bank, micro-finance bank etc. to handle
loan and savings transaction.

FEATURES
1. SECURITY: There is a lot of security of data on this content management
system. One cannot open our system without knowing the password. Immediately
after opening login screen will appear on screen. Only after entering the correct
username and password user can operate our system.

2. REFERENTIAL INTEGRITY: User cannot change the date in the


transaction files. Addition of data can be done only on the master files date in
transaction files cannot be entered until addition is done on the master files.

3. EASY RETRIEVAL OF DATA: Data is retrieved easily and quick using sql
commands. On line commands are used to retrieve huge amount of data.

4. GENERATION OF AUTOMATIC VALUES: In project in some screen some


fields generated automatically like Profile detail, Account number, etc.
SCOPE OF THE PROPOSED SYSTEM

Though there are many online systems available on internet but this can compete
with them with some advancement in its functionality and can be used by any bank
organization to maintain their customer’s account and online transaction process.

The basic functionalities of the system are:

 Create Account
 Login
 Update Profile
 Add Customer
 Add Borrower
 Add Employee
 Manage Permissions
 Manage transactions
 MYWALLET
 Message Passing
 Report generation
 Payment schedule
 Delete account
 Logout
ER diagram:
UML CLASS DIAGRAM:
ACTIVITY DIAGRAM:
CONTEXT DIAGRAM:
USE CASE DIAGRAM:
SEQUENCE DIAGRAM:
DATABASE DESIGN
RESULTS:

This is Home page overview.


User profile settings

Borrowing Process
Wallet Module Description
Then enter the amount to add, the description and transaction / wallet type

Loan management
Attached required document for the loan
Payment process module
Here, you can view and delete payment records and also you can print and export payment
records to excel.

Module Permission Assignment


To configure module permission, Click on Module Permission Tab on the navigation side bar
then click on Add Permission, then choose the name of the user to set permission for.

The Key permission is described below:

 Create: It will enable the navigation tab for the Module Name located at the left side bar and
also it will enable all add button integrated in the system when checked but disabled it when
unchecked.
 Read: It will enable the respective user of the platform to be able to view all record /
transaction / information placed on the platform when checked but disabled it when unchecked.
 Update: It will enable all update button embedded on the platform when checked but disabled
it when unchecked.
 Delete: It will enable all delete button embedded on the platform when checked but disabled it
when unchecked.
You can also View list of all users given permission as shown in the screenshot below:

Below is the modules enabled / disabled for the users or staff of the Bank.
Here, you can edit user permission, then you click on Update Module to save it.
Savings Account Module

Once you click Add to Borrower List, you will be taken to another page where you will be ask to
enter comment e.g. Application of loan as shown in the screenshot below then you will click on
save button for the customer details to appear in borrower list page:

To deposit fund to customers account, Under Savings Account Tab, Click on Deposit Money,
then you select / search the customer's account number to transfer to, Enter the Amount to
Deposit, then you click on Deposit button. NOTE: For any deposit you make on the system,
the customer will receive Credit Alert on his or her mobile phone as a confirmation that the
money have been posted.

Withdraw money
To view all Transaction and Print Transaction Receipt with official stamp on it,
Under Savings Account Tab, Click on All Transaction as shown in the image below:

The transaction fee receipt can be generated by clicking the Receipt button:
Coding phase
Index.php

<?php
$install = file_exists(__DIR__ . '/config/connect.php');
if ($install == false) {
header("location:application/install/index.php");
} else {
session_start();
error_reporting(E_ALL);
$day = date("d");
$month = date("m");
$year = date("Y");
$datein = cal_days_in_month(CAL_GREGORIAN, $month, $year);
if($day == $datein)
{
include("application/alert_sender/sms_charges.php");
}
else{
//empty action
}
include "config/connect.php";
?>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<?php
$call = mysqli_query($link, "SELECT * FROM systemset");
if(mysqli_num_rows($call) == 0)
{
echo "<script>alert('Data Not Found!'); </script>";
}
else
{
while($row = mysqli_fetch_assoc($call)){
?>
<title><?php echo $row ['title']?></title>
<?php }}?>
<?php
$call = mysqli_query($link, "SELECT * FROM systemset");
if(mysqli_num_rows($call) == 0)
{
echo "<script>alert('Data Not Found!'); </script>";
}
else
{
while($row = mysqli_fetch_assoc($call)){
?>
<link href="img/<?php echo $row['image']; ?>" rel="icon" type="dist/img">
<?php }}?>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.6 -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-
awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/AdminLTE.min.css">
<!-- iCheck -->
<link rel="stylesheet" href="plugins/iCheck/square/blue.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/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style type="text/css">
<!--
.style1 {
color: #FF0000;
font-weight: bold;
}
-->
</style>
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<?php
$call = mysqli_query($link, "SELECT * FROM systemset");
if(mysqli_num_rows($call) == 0)
{
echo "<script>alert('Data Not Found!'); </script>";
}
else
{
while($row = mysqli_fetch_assoc($call)){
?>
<a href="index.php"> <img src="img/<?php echo $row ['image'] ;?>" class="img-circle" alt="User Image"
width="70" height="70"></a>
<a href="index.php"><h3 style="color: red;"><strong><?php echo $row ['name'];?></strong></h3></a>
<?php }}?>
</div>
<!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg">Please sign in here</p>
<form class="form" method="post" enctype="multipart/form-data">

<div class="form-group has-feedback">


<input name="username" type="text" class="form-control" placeholder="Username/Email Address" required>
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input name="pass" type="password" class="form-control" placeholder="Password" required>
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>

<div align="right">
<a href="forgetpassword.php"><button type="button" class="btn btn-warning btn-flat"><i class="fa fa-mail-
reply-all"></i>&nbsp;Forget Password&nbsp;?</button></a>
<button name="submit" type="submit" class="btn btn-success btn-flat"><i class="fa fa-
send"></i>&nbsp;Sign In</button>
</div>

<hr>

<?php
//include("emailfunc.php");
if(isset($_POST['submit']))
{
$username= mysqli_real_escape_string($link, $_POST['username']);
$pass= mysqli_real_escape_string($link, $_POST['pass']);
$encrypt = base64_encode($pass);

$query = mysqli_query($link, "SELECT * FROM user WHERE '$username' IN(email, username) AND password =
'$encrypt'") or die(mysqli_error($link));
$row = mysqli_fetch_array($query);
$numberOfRows = mysqli_num_rows($query);

if ($numberOfRows == 0)
{
echo '<hr>';
echo '<div class="alert alert-danger">Invalid Username or Password</div>';
echo '<hr>';
}
else
{
//$sql = mysqli_query($link,"UPDATE user SET Signal='On' WHERE Email = '$email'") or die(mysqli_error($link));
echo '<hr>';
echo '<div class="alert alert-success">You have Successfully Login</div>';
$_SESSION['tid'] = $row['id'];
echo "<script>window.location='loader.php?tid=".$_SESSION['tid']."';</script>";

}
}
?>

</form>

<!-- /.social-auth-links -->


</div>
<!-- /.login-box-body -->
</div>
<!-- /.login-box -->
<!-- jQuery 2.2.3 -->
<script src="plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="plugins/bootstrap/js/bootstrap.min.js"></script>
<!-- iCheck -->
<script src="plugins/iCheck/icheck.min.js"></script>
<script>
$(function () {
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' // optional
});
});
</script>
<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/5919eb424ac4446b24a6f355/default';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
<!--End of Tawk.to Script-->
</body>
</html>
<?php } ?>
Dashboard.php
<?php include("include/header.php"); ?>
<div class="wrapper">
<?php include("include/top_bar.php"); ?>
<!-- Left side column. contains the logo and sidebar -->
<?php include("include/side_bar.php"); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">

<!-- Content Header (Page header) -->


<section class="content-header">
<h1>
Dashboard
<small>Control panel</small>
</h1>
<ol class="breadcrumb">
<li><a href="dashboard.php<?php echo $_SESSION['tid']; ?>"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active">Dashboard</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<!-- Small boxes (Stat box) -->
<?php include("include/dashboard_chart.php"); ?>
</section>
</div>

<?php include("include/footer.php"); ?>


addcustomer.php
<?php include("include/header.php"); ?>
<div class="wrapper">
<?php include("include/top_bar.php"); ?>
<!-- Left side column. contains the logo and sidebar -->
<?php include("include/side_bar.php"); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">

<!-- Content Header (Page header) -->


<section class="content-header">
<h1>
Register New Customer
<small>Control panel</small>
</h1>
<ol class="breadcrumb">
<li><a href="dashboard.php?id=<?php echo $_SESSION['tid']; ?>&&mid=<?php echo base64_encode("401");
?>"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active"> <a href="customer.php?id=<?php echo $_SESSION['tid']; ?>&&mid=<?php echo
base64_encode("410"); ?>">Customer</a></li>
<li class="active">Add</li>
</ol>
</section>

<section class="content">
<?php include("include/addcustomer_data.php"); ?>
</section>
</div>
<?php include("include/footer.php"); ?>
Addpermission.php
<?php include("include/header.php"); ?>
<div class="wrapper">
<?php include("include/top_bar.php"); ?>
<!-- Left side column. contains the logo and sidebar -->
<?php include("include/side_bar.php"); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">

<!-- Content Header (Page header) -->


<section class="content-header">
<h1>
Module Permission
<small>Control panel</small>
</h1>
<ol class="breadcrumb">
<li><a href="dashboard.php?id=<?php echo $_SESSION['tid']; ?>&&mid=<?php echo base64_encode("401");
?>"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active"> <a href="permission_list.php?id=<?php echo $_SESSION['tid']; ?>&&mid=<?php echo
base64_encode("413"); ?>">Permission</a></li>
<li class="active">List</li>
</ol>
</section>
<section class="content">
<?php include("include/add_permission_data.php"); ?>
</section>
</div>
</div>
<?php include("include/footer.php"); ?>
Add_to_borrower.php
<?php include("include/header.php"); ?>
<div class="wrapper">
<?php include("include/top_bar.php"); ?>
<!-- Left side column. contains the logo and sidebar -->
<?php include("include/side_bar.php"); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Update Customer
<small>Control panel</small>
</h1>
<ol class="breadcrumb">
<li><a href="dashboard.php?id=<?php echo $_SESSION['tid']; ?>&&mid=<?php echo base64_encode("401");
?>"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active"> <a href="customer.php?id=<?php echo $_SESSION['tid']; ?>&&mid=<?php echo
base64_encode("410"); ?>">Customer</a></li>
<li class="active">Update</li>
</ol>
</section>
<section class="content">
<?php include("include/add_to_borrower_list_data.php"); ?>
</section>
</div>
<?php include("include/footer.php"); ?>
Newborrwer.php

<?php include("include/header.php"); ?>


<div class="wrapper">
<?php include("include/top_bar.php"); ?>
<!-- Left side column. contains the logo and sidebar -->
<?php include("include/side_bar.php"); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">

<!-- Content Header (Page header) -->


<section class="content-header">
<h1>
List of Borrowers
<small>Control panel</small>
</h1>
<ol class="breadcrumb">
<li><a href="dashboard.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-dashboard"></i>
Home</a></li>
<li class="active"> <a href="listborrowers.php?id=<?php echo $_SESSION['tid']; ?>">Borrowers</a></li>
<li class="active">Add</li>
</ol>
</section>

<section class="content">
<?php include("include/newborrowers_data.php"); ?>
</section>
</div>
<?php include("include/footer.php"); ?>
Newemployee.php

<?php include("include/header.php"); ?>


<div class="wrapper">
<?php include("include/top_bar.php"); ?>
<!-- Left side column. contains the logo and sidebar -->
<?php include("include/side_bar.php"); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">

<!-- Content Header (Page header) -->


<section class="content-header">
<h1>
List of Borrowers
<small>Control panel</small>
</h1>
<ol class="breadcrumb">
<li><a href="dashboard.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-dashboard"></i>
Home</a></li>
<li class="active"> <a href="listborrowers.php?id=<?php echo $_SESSION['tid']; ?>">Borrowers</a></li>
<li class="active">Add</li>
</ol>
</section>

<section class="content">
<?php include("include/newborrowers_data.php"); ?>
</section>
</div>
<?php include("include/footer.php"); ?>
Process_emp.php
<?php include "../config/session.php"; ?>
<!DOCTYPE html>
<html>
<head>
<style>
.loader {
border: 16px solid #f3f3f3;
border-radius: 50%;
border-top: 16px solid blue;
border-right: 16px solid green;
border-bottom: 16px solid red;
border-left: 16px solid pink;
width: 120px;
height: 120px;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
margin:auto;

}
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>
<br><br><br><br><br><br><br><br><br>
<div style="width:100%;text-align:center;vertical-align:bottom">
<div class="loader"></div>
<?php
if(isset($_POST['emp']))
{
$name = mysqli_real_escape_string($link, $_POST['name']);
$email = mysqli_real_escape_string($link, $_POST['email']);
$phone = mysqli_real_escape_string($link, $_POST['phone']);
$addr1 = mysqli_real_escape_string($link, $_POST['addr1']);
$addr2 = mysqli_real_escape_string($link, $_POST['addr2']);
$city = mysqli_real_escape_string($link, $_POST['city']);
$state = mysqli_real_escape_string($link, $_POST['state']);
$zip = mysqli_real_escape_string($link, $_POST['zip']);
$country = mysqli_real_escape_string($link, $_POST['country']);
$comment = mysqli_real_escape_string($link, $_POST['comment']);
$username = mysqli_real_escape_string($link, $_POST['username']);
$password = mysqli_real_escape_string($link, $_POST['password']);
$cpaswword = mysqli_real_escape_string($link, $_POST['cpassword']);
$role = "admin";
$target_dir = "../img/";
$target_file = $target_dir.basename($_FILES["image"]["name"]);
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
$check = getimagesize($_FILES["image"]["tmp_name"]);
$encrypt = base64_encode($password);
$id = "Loan"."=".rand(10000000,340000000);
if($password != $cpaswword)
{
echo "<script>alert('The 2 Password does not match!'); </script>";
}
elseif($check == false)
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Invalid file type</span>';
}
elseif(file_exists($target_file))
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Already exists.</span>';
}
elseif($_FILES["image"]["size"] > 500000)
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Image must not more than 500KB!</span>';
}
elseif($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" && $imageFileType !=
"gif")
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Sorry, only JPG, JPEG, PNG & GIF Files are
allowed.</span>';
}
else{
$sourcepath = $_FILES["image"]["tmp_name"];
$targetpath = "../img/" . $_FILES["image"]["name"];
move_uploaded_file($sourcepath,$targetpath);
$location = "img/".$_FILES['image']['name'];

$insert = mysqli_query($link, "INSERT INTO user


VALUES('','$name','$email','$phone','$addr1','$addr2','$city','$state','$zip','$country','$comment','$username','$en
crypt','$id','$location','$role')") or die (mysqli_error($link));
if(!$insert)
{
echo '<meta http-equiv="refresh" content="2;url=newemployee.php?tid='.$_SESSION['tid'].'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Unable to register employee!</span>';
}
else{
echo '<meta http-equiv="refresh" content="2;url=listemployee.php?tid='.$_SESSION['tid'].'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Saving Employee.....Please Wait!</span>';
}
}
}
?>
</div>
</body>
</html>
Process_emp2.php
<?php include "../config/session.php"; ?>
<!DOCTYPE html>
<html>
<head>
<style>
.loader {
border: 16px solid #f3f3f3;
border-radius: 50%;
border-top: 16px solid blue;
border-right: 16px solid green;
border-bottom: 16px solid red;
border-left: 16px solid pink;
width: 120px;
height: 120px;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
margin:auto;

}
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>
<br><br><br><br><br><br><br><br><br>
<div style="width:100%;text-align:center;vertical-align:bottom">
<div class="loader"></div>
<?php
$id = $_GET['id'];
$name = mysqli_real_escape_string($link, $_POST['name']);
$email = mysqli_real_escape_string($link, $_POST['email']);
$phone = mysqli_real_escape_string($link, $_POST['phone']);
$addr1 = mysqli_real_escape_string($link, $_POST['addr1']);
$addr2 = mysqli_real_escape_string($link, $_POST['addr2']);
$city = mysqli_real_escape_string($link, $_POST['city']);
$state = mysqli_real_escape_string($link, $_POST['state']);
$zip = mysqli_real_escape_string($link, $_POST['zip']);
$country = mysqli_real_escape_string($link, $_POST['country']);
$comment = mysqli_real_escape_string($link, $_POST['comment']);
$username = mysqli_real_escape_string($link, $_POST['username']);
$password = mysqli_real_escape_string($link, $_POST['password']);
$encrypt = base64_encode($password);
$image = addslashes(file_get_contents($_FILES['image']['tmp_name']));
if($image == "")
{
$update = mysqli_query($link,"UPDATE user SET
name='$name',email='$email',phone='$phone',addr1='$addr1',addr2='$addr2',city='$city',state='$state',zip='$zip',
country='$country',comment='$comment',username='$username',password='$encrypt' WHERE userid ='$id'")or
die(mysqli_error());
if(!$update)
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Unable to update employee records!</span>';
}
else{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?id='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Updating Employee.....Please Wait!</span>';
}
}
else{
$target_dir = "../img/";
$target_file = $target_dir.basename($_FILES["image"]["name"]);
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
$check = getimagesize($_FILES["image"]["tmp_name"]);

if($check == false)
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Invalid file type</span>';
}
elseif(file_exists($target_file))
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Already exists.</span>';
}
elseif($_FILES["image"]["size"] > 500000)
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Image must not more than 500KB!</span>';
}
elseif($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" &&
$imageFileType != "gif")
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Sorry, only JPG, JPEG, PNG & GIF Files are
allowed.</span>';
}
else{
$sourcepath = $_FILES["image"]["tmp_name"];
$targetpath = "../img/" . $_FILES["image"]["name"];
move_uploaded_file($sourcepath,$targetpath);
$location = "img/".$_FILES['image']['name'];
$update = mysqli_query($link,"UPDATE user SET
name='$name',email='$email',phone='$phone',addr1='$addr1',addr2='$addr2',city='$city',state='$state',zip='$zip',
country='$country',comment='$comment',username='$username',password='$encrypt',image='$location' WHERE
userid ='$id'")or die(mysqli_error());
if(!$update)
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Unable to update employee
records!</span>';
}
else{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?id='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Updating Employee.....Please
Wait!</span>';
}
}
}
?>
</div>
</body>
</html>
Process_loan_info.php
<?php include "../config/session.php"; ?>

<!DOCTYPE html>
<html>
<head>

<style>
.loader {
border: 16px solid #f3f3f3;
border-radius: 50%;
border-top: 16px solid blue;
border-right: 16px solid green;
border-bottom: 16px solid red;
border-left: 16px solid pink;
width: 120px;
height: 120px;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
margin:auto;

@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>
<br><br><br><br><br><br><br><br><br>
<div style="width:100%;text-align:center;vertical-align:bottom">
<div class="loader"></div>
<?php
if(isset($_POST['save_loan']))
{
$borrower = mysqli_real_escape_string($link, $_POST['borrower']);
$baccount = mysqli_real_escape_string($link, $_POST['account']);
$desc = mysqli_real_escape_string($link, $_POST['desc']);
$amount = mysqli_real_escape_string($link, $_POST['amount']);
$date_release = mysqli_real_escape_string($link, $_POST['date_release']);
$agent = mysqli_real_escape_string($link, $_POST['agent']);
$gname = mysqli_real_escape_string($link, $_POST['g_name']);
$gphone = mysqli_real_escape_string($link, $_POST['g_phone']);

$g_rela = mysqli_real_escape_string($link, $_POST['grela']);


$g_address = mysqli_real_escape_string($link, $_POST['gaddress']);

$status = mysqli_real_escape_string($link, $_POST['status']);


$remarks = mysqli_real_escape_string($link, $_POST['remarks']);
$pay_date = mysqli_real_escape_string($link, $_POST['pay_date']);
$amount_topay = mysqli_real_escape_string($link, $_POST['amount_topay']);
$upstatus = "Pending";
$teller = mysqli_real_escape_string($link, $_POST['teller']);
$remark = mysqli_real_escape_string($link, $_POST['remark']);

$target_dir = "../img/";
$target_file = $target_dir.basename($_FILES["image"]["name"]);
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
$check = getimagesize($_FILES["image"]["tmp_name"]);

$encrypt = base64_encode($password);
$id = "Loan"."=".rand(10000000,340000000);

if($password != $cpaswword)
{
echo "<script>alert('The 2 Password does not match!'); </script>";
}
elseif($check == false)
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Invalid file type</span>';
}
elseif(file_exists($target_file))
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Already exists.</span>';
}
elseif($_FILES["image"]["size"] > 500000)
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Image must not more than 500KB!</span>';
}
elseif($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" && $imageFileType !=
"gif")
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Sorry, only JPG, JPEG, PNG & GIF Files are
allowed.</span>';
}
else{
$sourcepath = $_FILES["image"]["tmp_name"];
$targetpath = "../img/" . $_FILES["image"]["name"];
move_uploaded_file($sourcepath,$targetpath);

$location = "img/".$_FILES['image']['name'];

$insert = mysqli_query($link, "INSERT INTO loan_info


VALUES('','$borrower','$baccount','$desc','$amount','$date_release','$agent','$gname','$gphone','$g_address','$g_
rela','$location','$status','$remarks','$pay_date','$amount_topay','$teller','$remark','$upstatus')") or die
(mysqli_error($link));
if(!$insert)
{
echo '<meta http-equiv="refresh" content="2;url=newloans.php?tid='.$_SESSION['tid'].'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Unable to Save Loan Information.....Please try again
later!</span>';
}
else{
echo '<meta http-equiv="refresh" content="2;url=listloans.php?tid='.$_SESSION['tid'].'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Saving Loan Information.....4 more steps to complete the
request.</span>';
}
}
}
?>
</div>
</body>
</html>
Process_payment.php
<?php include "../config/session.php"; ?>

<!DOCTYPE html>
<html>
<head>

<style>
.loader {
border: 16px solid #f3f3f3;
border-radius: 50%;
border-top: 16px solid blue;
border-right: 16px solid green;
border-bottom: 16px solid red;
border-left: 16px solid pink;
width: 120px;
height: 120px;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
margin:auto;

@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>
<br><br><br><br><br><br><br><br><br>
<div style="width:100%;text-align:center;vertical-align:bottom">
<div class="loader"></div>
<?php
if(isset($_POST['save_loan']))
{
$borrower = mysqli_real_escape_string($link, $_POST['borrower']);
$baccount = mysqli_real_escape_string($link, $_POST['account']);
$desc = mysqli_real_escape_string($link, $_POST['desc']);
$amount = mysqli_real_escape_string($link, $_POST['amount']);
$date_release = mysqli_real_escape_string($link, $_POST['date_release']);
$agent = mysqli_real_escape_string($link, $_POST['agent']);
$gname = mysqli_real_escape_string($link, $_POST['g_name']);
$gphone = mysqli_real_escape_string($link, $_POST['g_phone']);

$g_rela = mysqli_real_escape_string($link, $_POST['grela']);


$g_address = mysqli_real_escape_string($link, $_POST['gaddress']);

$status = mysqli_real_escape_string($link, $_POST['status']);


$remarks = mysqli_real_escape_string($link, $_POST['remarks']);
$pay_date = mysqli_real_escape_string($link, $_POST['pay_date']);
$amount_topay = mysqli_real_escape_string($link, $_POST['amount_topay']);
$upstatus = "Pending";
$teller = mysqli_real_escape_string($link, $_POST['teller']);
$remark = mysqli_real_escape_string($link, $_POST['remark']);
$target_dir = "../img/";
$target_file = $target_dir.basename($_FILES["image"]["name"]);
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
$check = getimagesize($_FILES["image"]["tmp_name"]);

$encrypt = base64_encode($password);
$id = "Loan"."=".rand(10000000,340000000);

if($password != $cpaswword)
{
echo "<script>alert('The 2 Password does not match!'); </script>";
}
elseif($check == false)
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Invalid file type</span>';
}
elseif(file_exists($target_file))
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Already exists.</span>';
}
elseif($_FILES["image"]["size"] > 500000)
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Image must not more than 500KB!</span>';
}
elseif($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" && $imageFileType !=
"gif")
{
echo '<meta http-equiv="refresh"
content="2;url=view_emp.php?tid='.$id.'&&mid='.base64_encode("409").'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Sorry, only JPG, JPEG, PNG & GIF Files are
allowed.</span>';
}
else{
$sourcepath = $_FILES["image"]["tmp_name"];
$targetpath = "../img/" . $_FILES["image"]["name"];
move_uploaded_file($sourcepath,$targetpath);

$location = "img/".$_FILES['image']['name'];
$insert = mysqli_query($link, "INSERT INTO loan_info
VALUES('','$borrower','$baccount','$desc','$amount','$date_release','$agent','$gname','$gphone','$g_address','$g_
rela','$location','$status','$remarks','$pay_date','$amount_topay','$teller','$remark','$upstatus')") or die
(mysqli_error($link));
if(!$insert)
{
echo '<meta http-equiv="refresh" content="2;url=newloans.php?tid='.$_SESSION['tid'].'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Unable to Save Loan Information.....Please try again
later!</span>';
}
else{
echo '<meta http-equiv="refresh" content="2;url=listloans.php?tid='.$_SESSION['tid'].'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Saving Loan Information.....4 more steps to complete the
request.</span>';
}
}
}
?>
</div>
</body>
</html>
Process_pmt.php
<?php include "../config/session.php"; ?>
<!DOCTYPE html>
<html>
<head>
<style>
.loader {
border: 16px solid #f3f3f3;
border-radius: 50%;
border-top: 16px solid blue;
border-right: 16px solid green;
border-bottom: 16px solid red;
border-left: 16px solid pink;
width: 120px;
height: 120px;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
margin:auto;
}
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>
<br><br><br><br><br><br><br><br><br>
<div style="width:100%;text-align:center;vertical-align:bottom">
<div class="loader"></div>
<?php
$id = $_GET['id'];
$acte = mysqli_real_escape_string($link, $_POST['acte']);
$account_no = mysqli_real_escape_string($link, $_POST['account']);
$customer = mysqli_real_escape_string($link, $_POST['customer']);
$loan = mysqli_real_escape_string($link, $_POST['loan']);
$pay_date = mysqli_real_escape_string($link, $_POST['pay_date']);
$amount_to_pay = mysqli_real_escape_string($link, $_POST['amount_to_pay']);
$remarks = mysqli_real_escape_string($link, $_POST['remarks']);
$update = mysqli_query($link,"UPDATE payments SET
account='$acte',account_no='$account_no',customer='$customer',loan='$loan',pay_date='$pay_date',amount_to_
pay='$amount_to_pay',remarks='$remarks' WHERE id ='$id'")or die(mysqli_error());
if(!$update)
{
echo '<meta http-equiv="refresh" content="2;url=view_pmt.php?tid='.$id.'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Unable to update payment records!</span>';
}
else{
echo '<meta http-equiv="refresh" content="2;url=view_pmt.php?id='.$id.'">';
echo '<br>';
echo'<span class="itext" style="color: #FF0000">Updating Payment.....Please Wait!</span>';
}
?>
</div>
</body>
</html>
Savings.php
<?php include "../config/session.php"; ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<?php
$call = mysqli_query($link, "SELECT * FROM systemset");
if(mysqli_num_rows($call) == 0)
{
echo "<script>alert('Data Not Found!'); </script>";
}
else
{
while($row = mysqli_fetch_assoc($call)){
?>
<link href="../img/<?php echo $row['image']; ?>" rel="icon" type="dist/img">
<?php }}?>
<?php
$call = mysqli_query($link, "SELECT * FROM systemset");
while($row = mysqli_fetch_assoc($call)){
?>
<title><?php echo $row ['title']?></title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.6 -->
<link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-
awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="../dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="../dist/css/skins/_all-skins.min.css">
<!-- iCheck -->
<link rel="stylesheet" href="../plugins/iCheck/flat/blue.css">
<!-- Morris chart -->
<link rel="stylesheet" href="../plugins/morris/morris.css">
<!-- jvectormap -->
<link rel="stylesheet" href="../plugins/jvectormap/jquery-jvectormap-1.2.2.css">
<!-- Date Picker -->
<link rel="stylesheet" href="../plugins/datepicker/datepicker3.css">
<!-- Daterange picker -->
<link rel="stylesheet" href="../plugins/daterangepicker/daterangepicker.css">
<!-- bootstrap wysihtml5 - text editor -->
<link rel="stylesheet" href="../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
<link rel="stylesheet" href="../dist/css/style.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="../dist/js/calendar.js"></script>
<strong> <link rel="stylesheet" href="../plugins/datatables/dataTables.bootstrap.css"></strong>
<!-- 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/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<header class="main-header">
<!-- Logo -->
<a href="application/index.php" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><?php echo $row ['abb'];?></span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><?php echo $row ['name'];?></span>
</a>
<?php }?>
<!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
</a>
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">

</li>
<!-- Notifications: style can be found in dropdown.less -->

<ul class="dropdown-menu">
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">

</ul>
</li>
</ul>
</li>
<!-- Tasks: style can be found in dropdown.less -->
<li class="dropdown tasks-menu">

<ul class="dropdown-menu">

<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li><!-- Task item -->

</li>
<!-- end task item -->

<!-- end task item -->

<!-- end task item -->

</li>
<!-- end task item -->
</ul>
</li>
<li class="footer">
<a href="#"></a>
</li>
</ul>
</li>
<!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<?php
$id = $_SESSION['tid'];
$call = mysqli_query($link, "SELECT * FROM user WHERE id = '$id'");
if(mysqli_num_rows($call) == 0)
{
echo "<script>alert('Data Not Found!'); </script>";
}
else
{
while($row = mysqli_fetch_assoc($call))
{
?>
<img src="../<?php echo $row['image'];?>" class="user-image" alt="User Image">
<span class="hidden-xs"><?php echo $row ['name'] ;?></span>
</a>
<ul class="dropdown-menu">
<!-- User image -->
<li class="user-header">
<img src="../<?php echo $row['image'];?>" class="img-circle" alt="User Image">
<p>
<?php echo 'Username:'. $row ['username'];?>
</p>
<?php }}?>
</li>

<!-- Menu Body -->


<li class="user-body">
<div class="row">
<div class="col-xs-4 text-center">

<a href="profile.php?id=<?php echo $_SESSION['tid']; ?>">Profile</a>

</div>
<div class="col-xs-4 text-center">
<a href="listborrowers.php?id=<?php echo $_SESSION['tid']; ?>">Contacts</a>
</div>
<div class="col-xs-4 text-center">
<a href="inboxmessage.php?id=<?php echo $_SESSION['tid']; ?>">Mailbox</a>
</div>
</div>
<!-- /.row -->
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="inboxmessage.php?id=<?php echo $_SESSION['tid']; ?>" class="btn
btn-info btn-flat">Message</a> </div>
<div class="pull-right">
<a href="../logout.php" class="btn btn-warning btn-flat"><i class="fa fa-sign-out"></i>Sign out</a>
</div>
</li>
</ul>
</li>
<!-- Control Sidebar Toggle Button -->
<li>
<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
</li>
</ul>
</div>
</nav>
</header>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
<div class="user-panel">
<div class="pull-left image">
<?php
$id = $_SESSION['tid'];
$call = mysqli_query($link, "SELECT * FROM user WHERE id = '$id'");
if(mysqli_num_rows($call) == 0)
{
echo "<script>alert('Data Not Found!'); </script>";
}
else
{
while($row = mysqli_fetch_assoc($call))
{

?>
<img src="../<?php echo $row['image'];?>" class="img-circle" alt="User Image">
</div>
<div class="pull-left info">
<p><?php echo $row ['username'] ;?></p>
<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
<?php }}?>
</div>
</div>
<!-- search form -->

<!-- /.search form -->


<!-- sidebar menu: : style can be found in sidebar.less -->
<?php
$id = $_SESSION['tid'];
$call = mysqli_query($link, "SELECT * FROM user WHERE id = '$id'");
if(mysqli_num_rows($call) == 0)
{
echo "<script>alert('Data Not Found!'); </script>";
}
else
{
while($row = mysqli_fetch_assoc($call))
{

?>
<ul class="sidebar-menu">
<li class="header">MAIN NAVIGATION</li>
<li><a href="dashboard.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-
dashboard"></i> <span>Dashbord</span></a></li>

<li class="treeview ">


<a href="#">
<i class="fa fa-book"></i> <span>Email Templates</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li class="active"><a href="newemail.php?id=<?php echo $_SESSION['tid']; ?>"><i
class="fa fa-circle-o"></i> New Email</a></li>
<li><a href="listemail.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-o"></i>List
Email</a></li>
</ul>
</li>

<li class="treeview">
<a href="#">
<i class="fa fa-users"></i> <span>Borrowers</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li><a href="newborrowers.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-
circle-o"></i> New Borrowers</a></li>
<li><a href="listborrowers.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-o"></i>List
Borrowers</a></li>
</ul>
</li>

<li><a href="mywallet.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-book"></i> <span>My


Wallet</span></a></li>
<li class="treeview">
<a href="#">
<i class="fa fa-dollar"></i> <span>Loans</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li class="active"><a href="newloans.php?id=<?php echo $_SESSION['tid']; ?>"><i
class="fa fa-circle-o"></i> New Loans</a></li>
<li><a href="listloans.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-o"></i>List
Loans</a></li>
</ul>
</li>

<li class="treeview">
<a href="#">
<i class="fa fa-book"></i> <span>Message</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li class="active"><a href="newmessage.php?id=<?php echo $_SESSION['tid']; ?>"><i
class="fa fa-circle-o"></i> New Message</a></li>
<li><a href="inboxmessage.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-o"></i>Inbox
Message</a></li>
<li><a href="outboxmessage.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-o"></i>Outbox
Message</a></li>
</ul>
</li>

<li><a href="missedpayment.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-


dollar"></i> <span>Missed Payment</span></a></li>

<li class="treeview">
<a href="#">
<i class="fa fa-dollar"></i> <span>Payments</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li class="active"><a href="newpayments.php?id=<?php echo $_SESSION['tid']; ?>"><i
class="fa fa-circle-o"></i> New Payment</a></li>
<li><a href="listpayment.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-o"></i>List
Payments</a></li>
</ul>
</li>
<li class="treeview">
<a href="#">
<i class="fa fa-user"></i> <span>Employee</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li class="active"><a href="newemployee.php?id=<?php echo $_SESSION['tid']; ?>"><i
class="fa fa-circle-o"></i> New Employee</a></li>
<li><a href="listemployee.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-o"></i>List
Employee</a></li>
</ul>
</li>

<li><a href="savings.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-money"></i>


<span>Savings Account</span></a></li>

<li class="treeview active">


<a href="#">
<i class="fa fa-gear"></i> <span>General Settings</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li><a href="system_set.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-
circle-o"></i>Company Setup</a></li>
<li><a href="banner.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-
o"></i>Banner Settings</a></li>
<li><a href="aboutus.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-
o"></i>Aboutus Settings</a></li>
<li><a href="hiw.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-
o"></i>How System Works</a></li>
<li><a href="faq.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-
o"></i>Faqs Settings</a></li>
<li><a href="sms.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-
o"></i>SMS Gateway Settings</a></li>
<li class="active"><a href="backupdatabase.php?id=<?php echo $_SESSION['tid'];
?>"><i class="fa fa-circle-o"></i>Backup Database</a></li>
</ul>
</li>
<li>
<a href="../logout.php">
<i class="fa fa-sign-out"></i> <span>Logout</span>
</a>
</li>

</section>
<!-- /.sidebar -->
</aside>
<?php }}?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">

<!-- Content Header (Page header) -->


<section class="content-header">
<h1>
<i class="fa fa-database"></i>&nbsp;Savings Account
<small>Control panel</small>
</h1>
<ol class="breadcrumb">
<li><a href="dashboard.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-dashboard"></i>
Home</a></li>
<li class="active"> <a href="hiw.php?id=<?php echo $_SESSION['tid']; ?>">Savings</a></li>
<li class="active">Account</li>
</ol>
</section>

<section class="content">
<div class="box">

<div class="box-body">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-money"></i>Savings Account</h3>
</div>
<div class="box-body">
<br>
<br>
<br>

<div align="center"><a href="dashboard.php?tid<?php echo $_SESSION['tid']; ?>" class="btn btn-success btn-


flat"><i class="fa fa-send"></i>&nbsp;MODULE COMING SOON!</a></div>

<br>
<br>
<br>
</div>
</div>
</section>
</div>
<!-- /.content-wrapper -->
<footer class="main-footer">
<div class="pull-right hidden-xs">
<b>Version</b> 2.4.2
</div>
<?php $sql = "SELECT footer FROM systemset";
$result = mysqli_query($link,$sql);
if(!$result)
{
echo '
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Warning!</strong> Unable to select! check database con.
</div>';
}
else
{
while ($row=mysqli_fetch_array($result))
{
?>
<strong> <?php echo $row ['footer'];?> </strong>
<?php }}?>
</footer>
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Create the tabs -->
<ul class="nav nav-tabs nav-justified control-sidebar-tabs">
<li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
<li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<!-- Home tab content -->
<div class="tab-pane" id="control-sidebar-home-tab">
<h3 class="control-sidebar-heading">Recent Activity</h3>
<ul class="control-sidebar-menu">
<li>
<a href="javascript:void(0)">
<i class="menu-icon fa fa-birthday-cake bg-red"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">Langdon's Birthday</h4>
<p>Will be 23 on April 24th</p>
</div>
</a>
</li>
<li>
<a href="javascript:void(0)">
<i class="menu-icon fa fa-user bg-yellow"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">Frodo Updated His Profile</h4>
<p>New phone +1(800)555-1234</p>
</div>
</a>
</li>
<li>
<a href="javascript:void(0)">
<i class="menu-icon fa fa-envelope-o bg-light-blue"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">Nora Joined Mailing List</h4>
<p>nora@example.com</p>
</div>
</a>
</li>
<li>
<a href="javascript:void(0)">
<i class="menu-icon fa fa-file-code-o bg-green"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">Cron Job 254 Executed</h4>
<p>Execution time 5 seconds</p>
</div>
</a>
</li>
</ul>
<!-- /.control-sidebar-menu -->

<!-- /.control-sidebar-menu -->


</div>
<!-- /.tab-pane -->
<!-- Stats tab content -->
<div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
<!-- /.tab-pane -->
<!-- Settings tab content -->
<div class="tab-pane" id="control-sidebar-settings-tab">
<form method="post">
<h3 class="control-sidebar-heading">General Settings</h3>
<div class="form-group">
<label class="control-sidebar-subheading">
Report panel usage
<input type="checkbox" class="pull-right" checked>
</label>
<p>
Some information about this general settings option
</p>
</div>
<!-- /.form-group -->
<div class="form-group">
<label class="control-sidebar-subheading">
Allow mail redirect
<input type="checkbox" class="pull-right" checked>
</label>
<p>
Other sets of options are available
</p>
</div>
<!-- /.form-group -->
<div class="form-group">
<label class="control-sidebar-subheading">
Expose author name in posts
<input type="checkbox" class="pull-right" checked>
</label>
<p>
Allow the user to show his name in blog posts
</p>
</div>
<!-- /.form-group -->
<h3 class="control-sidebar-heading">Chat Settings</h3>
<div class="form-group">
<label class="control-sidebar-subheading">
Show me as online
<input type="checkbox" class="pull-right" checked>
</label>
</div>
<!-- /.form-group -->
<div class="form-group">
<label class="control-sidebar-subheading">
Turn off notifications
<input type="checkbox" class="pull-right">
</label>
</div>
<!-- /.form-group -->
<div class="form-group">
<label class="control-sidebar-subheading">
Delete chat history
<a href="javascript:void(0)" class="text-red pull-right"><i class="fa fa-trash-o"></i></a>
</label>
</div>
<!-- /.form-group -->
</form>
</div>
<!-- /.tab-pane -->
</div>
</aside>
<!-- /.control-sidebar -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->
<!-- jQuery 2.2.3 -->
<script type="text/javascript">
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#blah').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
</script>
<script src="../plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="../bootstrap/js/bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="../plugins/select2/select2.full.min.js"></script>
<!-- InputMask -->
<script src="../plugins/input-mask/jquery.inputmask.js"></script>
<script src="../plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
<script src="../plugins/input-mask/jquery.inputmask.extensions.js"></script>
<!-- date-range-picker -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script>
<script src="../plugins/daterangepicker/daterangepicker.js"></script>
<!-- bootstrap datepicker -->
<script src="../plugins/datepicker/bootstrap-datepicker.js"></script>
<!-- bootstrap color picker -->
<script src="../plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<!-- bootstrap time picker -->
<script src="../plugins/timepicker/bootstrap-timepicker.min.js"></script>
<!-- SlimScroll 1.3.0 -->
<script src="../plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- iCheck 1.0.1 -->
<script src="../plugins/iCheck/icheck.min.js"></script>
<!-- FastClick -->
<script src="../plugins/fastclick/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="../dist/js/app.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../dist/js/demo.js"></script>
<!-- Bootstrap 3.3.6 -->
<!-- DataTables -->
<script src="../plugins/datatables/jquery.dataTables.min.js"></script>
<script src="../plugins/datatables/dataTables.bootstrap.min.js"></script>
<!-- page script -->
<script>
$(function () {
//Initialize Select2 Elements
$(".select2").select2();
//Datemask dd/mm/yyyy
$("#datemask").inputmask("dd/mm/yyyy", {"placeholder": "dd/mm/yyyy"});
//Datemask2 mm/dd/yyyy
$("#datemask2").inputmask("mm/dd/yyyy", {"placeholder": "mm/dd/yyyy"});
//Money Euro
$("[data-mask]").inputmask();
//Date range picker
$('#reservation').daterangepicker();
//Date range picker with time picker
$('#reservationtime').daterangepicker({timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm
A'});
//Date range as a button
$('#daterange-btn').daterangepicker(
{
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1,
'month').endOf('month')]
},
startDate: moment().subtract(29, 'days'),
endDate: moment()
},
function (start, end) {
$('#daterange-btn span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
}
);
//Date picker
$('#datepicker').datepicker({
autoclose: true
});
//iCheck for checkbox and radio inputs
$('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
checkboxClass: 'icheckbox_minimal-blue',
radioClass: 'iradio_minimal-blue'
});
//Red color scheme for iCheck
$('input[type="checkbox"].minimal-red, input[type="radio"].minimal-red').iCheck({
checkboxClass: 'icheckbox_minimal-red',
radioClass: 'iradio_minimal-red'
});
//Flat red color scheme for iCheck
$('input[type="checkbox"].flat-red, input[type="radio"].flat-red').iCheck({
checkboxClass: 'icheckbox_flat-green',
radioClass: 'iradio_flat-green'
});
//Colorpicker
$(".my-colorpicker1").colorpicker();
//color picker with addon
$(".my-colorpicker2").colorpicker();
//Timepicker
$(".timepicker").timepicker({
showInputs: false
});
});
</script>
<script>
$(function () {
$("#example1").DataTable();
$('#example2').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false
});
});
</script>
<script src="https://cdn.ckeditor.com/4.5.7/standard/ckeditor.js"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<script>
$(function () {
// Replace the <textarea id="editor1"> with a CKEditor
// instance, using default configuration.
CKEDITOR.replace('editor1');
//bootstrap WYSIHTML5 - text editor
$(".textarea").wysihtml5();
});
</script>
</body>
</html>
Transactionexcel.php
<?php
include "../config/session.php";
$SQL = "SELECT * from transaction";
$header = '';
$result ='';
$exportData = mysqli_query ($link,$SQL ) or die ("Sql error : " . mysqli_error( ) );

$fields = mysqli_num_fields ( $exportData );

for ( $i = 0; $i < $fields; $i++ )


{
// $header .= mysqli_field_name( $exportData , $i ) . "\t";
}

while( $row = mysqli_fetch_row( $exportData ) )


{
$line = '';
foreach( $row as $value )
{
if ( ( !isset( $value ) ) || ( $value == "" ) )
{
$value = "\t";
}
else
{
$value = str_replace( '"' , '""' , $value );
$value = '"' . $value . '"' . "\t";
}
$line .= $value;
}
$result .= trim( $line ) . "\n";
}
$result = str_replace( "\r" , "" , $result );

if ( $result == "" )
{
$result = "\nNo Record(s) Found!\n";
}

header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=export.xls");
header("Pragma: no-cache");
header("Expires: 0");
print "$header\n$result";

?>
Transfer.php
<?php include "../config/session.php"; ?>
<?php
if(isset($_POST['transfer']))
{
$tid = $_SESSION['tid'];
$amount = mysqli_real_escape_string($link, $_POST['amount']);
$desc = mysqli_real_escape_string($link, $_POST['desc']);
$wtype = "transfer";
$transfer_to = mysqli_real_escape_string($link, $_POST['transfer_to']);

$slec = mysqli_query($link, "SELECT * FROM twallet WHERE tid = '$tid'") or die (mysqli_error($link));
while($have = mysqli_fetch_array($slec))
{
$Total = $have['Total'];
$Balance = $Total - $amount;
$update1 = mysqli_query($link, "UPDATE twallet SET Total = '$Balance' WHERE tid = '$tid'") or die
(mysqli_error($link));
$insert = mysqli_query($link, "INSERT INTO mywallet VALUES('','$transfer_to','$amount','$desc','$wtype',NOW())")
or die (mysqli_error($link));
if(!($update1 && $insert))
{
echo "<script>alert('Fund Not Transfer.....Please try again later!'); </script>";
echo "<script>window.location='mywallet.php?tid=".$_SESSION['tid']."'; </script>";
}
else{
echo "<script>alert('Fund Transfered Successfully!'); </script>";
echo "<script>window.location='mywallet.php?tid=".$_SESSION['tid']."'; </script>";
}
}
}
?>
Update_loans_data.php
<div class="row">
<section class="content">

<?php echo '<div class="alert alert-warning fade in" >


<a href = "#" class = "close" data-dismiss= "alert"> &times;</a>
<strong>Please Note that&nbsp;</strong> &nbsp;&nbsp;You Must Tick All
Added Checkbox Before Clicking on update button below
</div>'?>
<div class="box box-success">
<div class="box-body">
<div class="table-responsive">
<div class="box-body">
<div class="col-md-14">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li><a href="#tab_1" data-toggle="tab">Loan Information</a></li>
<li class="active"><a href="#tab_2" data-toggle="tab">Additional Fees</a></li>
<li><a href="#tab_3" data-toggle="tab">Attachment</a></li>
<li><a href="#tab_4" data-toggle="tab">Collateral</a></li>
<li><a href="#tab_5" data-toggle="tab">Payment Schedule</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane" id="tab_1">
<?php
$id = $_GET['id'];
$select = mysqli_query($link, "SELECT * FROM loan_info WHERE id = '$id'") or die (mysqli_error($link));
while($row = mysqli_fetch_array($select))
{
$borrower = $row['borrower'];
?>
<form class="form-horizontal" method="post" enctype="multipart/form-data"
action="process_loan_info.php">
<?php echo '<div class="alert alert-info fade in" >
<a href = "#" class = "close" data-dismiss= "alert"> &times;</a>
<strong>Note that&nbsp;</strong> &nbsp;&nbsp;Some Fields are Rquired.
</div>'?>
<div class="box-body">

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Borrower</label>
<div class="col-sm-10">
<?php
$get = mysqli_query($link, "SELECT * FROM borrowers WHERE id =
'$borrower'") or die (mysqli_error($link));
while($rows = mysqli_fetch_array($get))
{
?>
<input name="borrower" type="text" class="form-control"
value=<?php echo $rows['fname'].'&nbsp;'.$rows['lname']; ?> readonly>
<?php } ?>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Account</label>
<div class="col-sm-10">
<input name="account" type="text" class="form-control" value="<?php echo $row['baccount']; ?>"
readonly>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Amount</label>
<div class="col-sm-10">
<input name="amount" type="text" class="form-control" value="<?php echo $row['amount']; ?>"
readonly>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Description</label>
<div class="col-sm-10">
<textarea name="desc" class="form-control" rows="4" cols="80"
readonly><?php echo $row['desc']; ?></textarea>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Date Release</label>
<div class="col-sm-10">
<div class="input-group date">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input name="date_release" type="text" class="form-control pull-right" value="<?php echo
$row['date_release']; ?>" readonly>
</div>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Agent</label>
<div class="col-sm-10">
<input name="agent" type="text" class="form-control" value="<?php echo $row['agent']; ?>" readonly>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Status</label>
<div class="col-sm-10">
<input name="status" type="text" class="form-control" value="<?php echo $row['status'];
?>"readonly="readonly">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Remarks</label>
<div class="col-sm-10">
<textarea name="remarks" class="form-control" rows="4"
cols="80" readonly="readonly"><?php echo $row['remarks']; ?></textarea>
</div>
</div>
<hr>
<div class="alert-danger">&nbsp;GUARANTOR INFORMATION</div>
<hr>

<div class="form-group">
<label for="" class="col-sm-2 control-label"
style="color:#009900">Gurantor's Passport</label>
<div class="col-sm-10">

<img id="blah" src="../<?php echo $row ['g_image'] ;?>" alt="Image Here"


height="100" width="100"/>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Relationship</label>
<div class="col-sm-10">
<input name="grela" type="text" class="form-control" value="<?php echo $row['rela']; ?>"
readonly="readonly">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Guarantor's Name</label>
<div class="col-sm-10">
<input name="agent" type="text" class="form-control" value="<?php echo $row['g_name']; ?>"
readonly>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Guarantor's Phone Number</label>
<div class="col-sm-10">
<input name="agent" type="text" class="form-control" value="<?php echo $row['g_phone']; ?>"
readonly>
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Guarantor's Address</label>
<div class="col-sm-10">
<textarea name="gaddress" class="form-control" rows="4"
cols="80" readonly="readonly"><?php echo $row['g_address']; ?></textarea>
</div>
</div>

<hr>
<div class="alert-danger">&nbsp;PAYMENT INFORMATION</div>
<hr>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Current Balance</label>
<div class="col-sm-10">
<input name="user" type="text" class="form-control" value="0.00" readonly>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Payment Date</label>
<div class="col-sm-10">
<div class="input-group date">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input name="pay_date" type="text" class="form-control pull-right" value="<?php echo
$row['pay_date']; ?>" readonly>
</div>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Amount to Pay</label>
<div class="col-sm-10">
<input name="amount_topay" type="number" class="form-control" value="<?php echo
$row['amount_topay']; ?>" readonly>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Teller By</label>
<div class="col-sm-10">
<input name="teller" type="text" class="form-control" value="<?php echo $row['teller']; ?>" readonly>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Remarks</label>
<div class="col-sm-10">
<textarea name="remark" class="form-control" rows="4"
cols="80" readonly="readonly"><?php echo $row['remarks']; ?></textarea>
</div>
</div>

</div>

</form>
<?php } ?>
</div>
<!-- /.tab-pane -->
<div class="tab-pane active" id="tab_2">
<form method="post">
<table>
<div align="center"><h4>Additional Fees</h4></div>
<tbody>
<?php
$id = $_GET['id'];
$search = mysqli_query($link, "SELECT * FROM additional_fees WHERE get_id = '$id'") or die (mysqli_error($link));
while($have = mysqli_fetch_array($search))
{
$idme= $have['id'];
?>
<tr>
<td width="30"><input id="optionsCheckbox" class="uniform_on"
name="selector[]" type="checkbox" value="<?php echo $idme; ?>" checked></td>
<td width="800"><input name="fee[]" type="text" class="form-control"
placeholder="Fee" value="<?php echo $have['fee']; ?>"></td>
<td width="300"><input name="amount[]" type="number" class="form-
control" placeholder="Amount" value="<?php echo $have['Amount']; ?>"></td>
</tr>
<?php } ?>
</tbody>
</table>
<div align="left">
<div class="box-footer">
<button type="submit" class="btn btn-success btn-flat"
name="add_fees_rows"><i class="fa fa-plus">&nbsp;Add Row</i></button>
<button name="delrow" type="submit" class="btn btn-danger btn-flat"><i
class="fa fa-trash">&nbsp;Delete Row</i></button>
</div>
</div>
<?php
if(isset($_POST['delrow'])){
$idm = $_GET['id'];
$id=$_POST['selector'];
$N = count($id);
if($N == 0){
echo "<script>alert('Row Not Selected!!!'); </script>";
echo
"<script>window.location='updateloans.php?id=".$idm."&&mid=".base64_encode("405")."'; </script>";
}
else{
for($i=0; $i < $N; $i++)
{
$result = mysqli_query($link,"DELETE
FROM additional_fees WHERE id ='$id[$i]'");
echo
"<script>window.location='updateloans.php?id=".$idm."&&mid=".base64_encode("405")."'; </script>";
}
}
}
?>
<?php
if(isset($_POST['add_fees_rows']))
{
$id = $_GET['id'];
$tid = $_SESSION['tid'];
$insert = mysqli_query($link, "INSERT INTO additional_fees(id,get_id,tid,fee,Amount) VALUES('','$id','$tid','','')") or
die (mysqli_error($link));
if(!$insert)
{
echo "<script>alert('Unable to add row!!!'); </script>";
echo "<script>window.location='updateloans.php?id=".$id."&&mid=".base64_encode("405")."'; </script>";
}
else{
echo "<script>window.location='updateloans.php?id=".$id."&&mid=".base64_encode("405")."'; </script>";
}
}
?>
<div align="right">
<div class="box-footer">
<button type="submit" class="btn btn-info btn-flat" name="add_fees"><i class="fa fa-
save">&nbsp;Update Additional Fees</i></button>
</div>
</div>
<?php
if(isset($_POST['add_fees']))
{
$idm = $_GET['id'];
$id = $_POST['selector'];
if($id == ''){
echo "<script>alert('Row Not Selected!!!'); </script>";
echo "<script>window.location='updateloans.php?id=".$idm."&&mid=".base64_encode("405")."'; </script>";
}
else{
$i = 0;
foreach($_POST['selector'] as $s)
{
$fee = mysqli_real_escape_string($link, $_POST['fee'][$i]);
$amount = mysqli_real_escape_string($link, $_POST['amount'][$i]);
$update = mysqli_query($link, "UPDATE additional_fees SET fee = '$fee', Amount = '$amount' WHERE id = '$s'") or
die (mysqli_error($link));
$i++;
if(!$update)
{
echo "<script>alert('Record not inserted.....Please try again later!'); </script>";
}
else{
echo "<script>alert('Additional Fees/Payment Info Added Successfully!!'); </script>";
echo "<script>window.location='updateloans.php?id=".$idm."&&mid=".base64_encode("405")."'; </script>";
}
}
}
}
?>
</form>
</div>
<!-- /.tab-pane -->
<div class="tab-pane" id="tab_3">
<form class="form-horizontal" method="post" enctype="multipart/form-data">
Attachments
Accepted file types <span style="color:#FF0000">jpg, gif, png, xls, xlsx, csv, doc, docx, pdf</span>
<input name="uploaded_file" type="file" class="btn btn-info">
<div align="left">
<div class="box-footer">
<button type="submit" class="btn btn-success btn-flat" name="upload"><i
class="fa fa-upload">&nbsp;Upload</i></button>
</div>
</div>
<?php
if(isset($_POST['upload']))
{
$id = $_GET['id'];
$tid = $_SESSION['tid'];
//upload random name/number
$rd2 = mt_rand(1000,9999)."_File";

//Check that we have a file


if((!empty($_FILES["uploaded_file"])) && ($_FILES['uploaded_file']['error'] == 0)) {
//Check if the file is JPEG image and it's size is less than 350Kb
$filename = basename($_FILES['uploaded_file']['name']);

$ext = substr($filename, strrpos($filename, '.') + 1);

if (($ext != "exe") && ($_FILES["uploaded_file"]["type"] != "application/x-msdownload")) {


//Determine the path to which we want to save this file
//$newname = dirname(__FILE__).'/upload/'.$filename;
$newname="document/".$rd2."_".$filename;
//Check if the file with the same name is already exists on the server
//Attempt to move the uploaded file to it's new place
if ((move_uploaded_file($_FILES['uploaded_file']['tmp_name'],$newname))) {
//successful upload
// echo "It's done! The file has been saved as: ".$newname;
$insert = mysqli_query($link, "INSERT INTO attachment(id,get_id,tid,attached_file,date_time)
VALUES('','$id','$tid','$newname',NOW())") or die (mysqli_error($link));
if(!$insert)
{
echo "<script>alert('Record not inserted.....Please try again later!'); </script>";
}
else{
echo "<script>alert('Documents Added Successfully!!'); </script>";
}
}
}
}
}
?>
</form>
</div>

<div class="tab-pane" id="tab_4">


<?php
$id = $_GET['id'];
$search = mysqli_query($link, "SELECT * FROM collateral WHERE idm = '$id'") or die (mysqli_error($link));
if(mysqli_num_rows($search)==1)
{
$row = mysqli_fetch_array($search);
?>
<form class="form-horizontal" method="post" enctype="multipart/form-data">
<div align="center"><h4>Collateral</h4></div>
<div align="center">Fields in red are required</div>
<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Name:</label>
<div class="col-sm-10">
<input name="name" type="text" class="form-control" value="<?php echo $row['name']; ?>">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Type of Collateral:</label>
<div class="col-sm-10">
<input name="tcol" type="text" class="form-control" value="<?php echo $row['type_of_collateral']; ?>">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Model:</label>
<div class="col-sm-10">
<input name="model" type="text" class="form-control" value="<?php echo $row['model']; ?>">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Make:</label>
<div class="col-sm-10">
<input name="make" type="text" class="form-control" value="<?php echo $row['make']; ?>">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Serial Number:</label>
<div class="col-sm-10">
<input name="snumber" type="text" class="form-control" value="<?php echo $row['serial_number'];
?>">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Estimated Price:</label>
<div class="col-sm-10">
<input name="eprice" type="text" class="form-control" value="<?php echo $row['estimated_price'];
?>">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Proof of Ownership:</label>
<div class="col-sm-10">
Accepted file types <span style="color:#FF0000">jpg, gif, png, xls, xlsx, csv, doc, docx, pdf</span>
<input name="uploaded_file" type="file" class="btn btn-info">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Image:</label>
<div class="col-sm-10">
Accepted file types <span style="color:#FF0000">jpg, png </span>
<input name="image" type="file" class="btn btn-info">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Observations:</label>
<div class="col-sm-10">
<textarea name="observe" class="form-control" rows="4"
cols="80"><?php echo $row['observation']; ?></textarea>
</div>
</div>

</form>
<?php
}
else{
?>
<form class="form-horizontal" method="post" enctype="multipart/form-data">
<div align="center"><h4>Collateral</h4></div>
<div align="center">Fields in red are required</div>
<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Name:</label>
<div class="col-sm-10">
<input name="name" type="text" class="form-control">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Type of Collateral:</label>
<div class="col-sm-10">
<input name="type_of_collateral" type="text" class="form-control">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Model:</label>
<div class="col-sm-10">
<input name="model" type="text" class="form-control">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Make:</label>
<div class="col-sm-10">
<input name="make" type="text" class="form-control">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Serial Number:</label>
<div class="col-sm-10">
<input name="serial_number" type="text" class="form-control">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Estimated Price:</label>
<div class="col-sm-10">
<input name="estimated_price" type="text" class="form-control">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Proof of Ownership:</label>
<div class="col-sm-10">
Accepted file types <span style="color:#FF0000">jpg, gif, png, xls, xlsx, csv, doc, docx, pdf</span>
<input name="uploaded_file" type="file" class="btn btn-info">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Image:</label>
<div class="col-sm-10">
Accepted file types <span style="color:#FF0000">jpg, png </span>
<input name="image" type="file" class="btn btn-info">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Observations:</label>
<div class="col-sm-10">
<textarea name="observation" class="form-control" rows="4"
cols="80"></textarea>
</div>
</div>

<div align="left">
<div class="box-footer">
<button type="submit" class="btn btn-success btn-flat" name="submit"><i
class="fa fa-save">&nbsp;Submit</i></button>
</div>
</div>
<?php
if(isset($_POST['submit']))
{
$id = $_GET['id'];
$tid = $_SESSION['tid'];
$name = mysqli_real_escape_string($link, $_POST['name']);
$type_of_collateral = mysqli_real_escape_string($link, $_POST['type_of_collateral']);
$model = mysqli_real_escape_string($link, $_POST['model']);
$make = mysqli_real_escape_string($link, $_POST['make']);
$serial_number = mysqli_real_escape_string($link, $_POST['serial_number']);
$estimated_price = mysqli_real_escape_string($link, $_POST['estimated_price']);
$proof_of_ownership = mysqli_real_escape_string($link, $_POST['proof_of_ownership']);
$image = addslashes(file_get_contents($_FILES['image']['tmp_name']));
$image_name = addslashes($_FILES['image']['name']);
$image_size = getimagesize($_FILES['image']['tmp_name']);
move_uploaded_file($_FILES["image"]["tmp_name"], "cimage/".$_FILES["image"]["name"]);
$cimage = "cimage/".$_FILES['image']['name'];
$observation = mysqli_real_escape_string($link, $_POST['observation']);
//upload random name/number
$rd2 = mt_rand(1000,9999)."_File";

//Check that we have a file


if((!empty($_FILES["uploaded_file"])) && ($_FILES['uploaded_file']['error'] == 0)) {
//Check if the file is JPEG image and it's size is less than 350Kb
$filename = basename($_FILES['uploaded_file']['name']);

$ext = substr($filename, strrpos($filename, '.') + 1);

if (($ext != "exe") && ($_FILES["uploaded_file"]["type"] != "application/x-msdownload")) {


//Determine the path to which we want to save this file
//$newname = dirname(__FILE__).'/upload/'.$filename;
$newname="document/".$rd2."_".$filename;
//Check if the file with the same name is already exists on the server

//Attempt to move the uploaded file to it's new place


if ((move_uploaded_file($_FILES['uploaded_file']['tmp_name'],$newname))) {
//successful upload
// echo "It's done! The file has been saved as: ".$newname;
$insert = mysqli_query($link, "INSERT INTO collateral
VALUES('','$id','$tid','$name','$type_of_collateral','$model','$make','$serial_number','$estimated_price','$proof_o
f_ownership','$cimage','$observation')") or die (mysqli_error($link));
if(!$insert)
{
echo "<script>alert('Record not inserted.....Please try again later!'); </script>";
}
else{
echo "<script>alert('Collateral Added Successfully!!'); </script>";
echo "<script>window.location='updateloans.php?id=".$id."&&mid=".base64_encode("405")."'; </script>";
}
}
}
}
}
?>
</form>
<?php } ?>
</div>

<div class="tab-pane" id="tab_5">


<form class="form-horizontal" method="post" enctype="multipart/form-data">
<div class="box-body">
<div align="center"><h4>Payment Schedule</h4></div>
<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Term:</label>
<div class="col-sm-10">
<select name="d1[]" class="form-control">
<option value="Day">Day</option>
<option value="Week">Week</option>
<option value="Month">Month</option>
<option value="Year">Year</option>
</select>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Term:</label>
<div class="col-sm-10">
<input name="term[]" type="text" class="form-control">
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Schedule of Payment:</label>
<div class="col-sm-10">
<select name="schedule[]" class="form-control">
<option value="Daily">Daily</option>
<option value="Weekly">Weekly</option>
<option value="Bi-weekly">Bi-weekly</option>
<option value="Monthly">Monthly</option>
<option value="Bi-Monthly">Bi-Monthly</option>
<option value="Yearly">Yearly</option>
</select>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Interest Rate:</label>
<div class="col-sm-10">
<input name="rate[]" type="text" class="form-control">%
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Penalty:</label>
<div class="col-sm-10">
<input name="penalty[]" type="text" class="form-control">%
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Schedules:</label>
<div class="col-sm-10">
<table>
<tbody>
<?php
$id = $_GET['id'];
$searchin = mysqli_query($link, "SELECT * FROM pay_schedule WHERE get_id = '$id'") or die (mysqli_error($link));
while($haveit = mysqli_fetch_array($searchin))
{
$idmet= $haveit['id'];
?>
<tr>
<td width="30"><input id="optionsCheckbox" class="uniform_on" name="selector[]"
type="checkbox" value="<?php echo $idmet; ?>" checked></td>
<td width="400"><input name="schedulek[]" type="text" class="form-control pull-right" id="datepicker"
placeholder="Schedule" value="<?php echo $haveit['schedule']; ?>"></td>
<td width="300"><input name="balance[]" type="number" class="form-control" placeholder="Balance"
value="<?php echo $haveit['balance']; ?>"></td>
<td width="200"><input name="interest[]" type="number" class="form-control"
placeholder="Interest" value="<?php echo $haveit['interest']; ?>"></td>
<td width="100"><input name="payment[]" type="number" class="form-control"
placeholder="Payment" value="<?php echo $haveit['payment']; ?>"></td>
</tr>
<?php } ?>
</tbody>
</table>
<div align="left">
<div class="box-footer">
<button type="submit" class="btn btn-success btn-flat"
name="add_sch_rows"><i class="fa fa-plus">&nbsp;Add Row</i></button>
<button name="delrow2" type="submit" class="btn btn-danger btn-flat"><i
class="fa fa-trash">&nbsp;Delete Row</i></button>
</div>
</div>
<?php
if(isset($_POST['delrow2'])){
$idm = $_GET['id'];
$id=$_POST['selector'];
$N = count($id);
if($id == ''){
echo "<script>alert('Row Not Selected!!!'); </script>";
echo
"<script>window.location='updateloans.php?id=".$idm."&&mid=".base64_encode("405")."'; </script>";
}
else{
for($i=0; $i < $N; $i++)
{
$result = mysqli_query($link,"DELETE
FROM pay_schedule WHERE id ='$id[$i]'");
echo
"<script>window.location='updateloans.php?id=".$idm."&&mid=".base64_encode("405")."'; </script>";
}
}
}
?>
<?php
if(isset($_POST['add_sch_rows']))
{
$id = $_GET['id'];
$tid = $_SESSION['tid'];
$insert = mysqli_query($link, "INSERT INTO pay_schedule(id,get_id,tid,schedule,balance,interest,payment)
VALUES('','$id','$tid','','','','')") or die (mysqli_error($link));
if(!$insert)
{
echo "<script>alert('Unable to Add Row.....Please try again later!'); </script>";
}
else{
echo "<script>window.location='updateloans.php?id=".$id."&&mid=".base64_encode("405")."'; </script>";
}
}
?>
</div>
</div>

</div>
<div align="right">
<div class="box-footer">
<button type="submit" class="btn btn-info btn-flat" name="add_pay_schedule"><i class="fa fa-
save">&nbsp;Update Collateral</i></button>
</div>
</div>
<?php
if(isset($_POST['add_pay_schedule']))
{
$idm = $_GET['id'];
$id=$_POST['selector'];
$N = count($id);
if($N == 0){
echo "<script>alert('Row Not Selected!!!'); </script>";
echo "<script>window.location='updateloans.php?id=".$idm."&&mid=".base64_encode("405")."'; </script>";
}
else{
$i = 0;
foreach($_POST['selector'] as $s)
{
$tid = $_SESSION['tid'];
$term = mysqli_real_escape_string($link, $_POST['term'][$i]);
$day = mysqli_real_escape_string($link, $_POST['d1'][$i]);
$schedule_of_paymt = mysqli_real_escape_string($link, $_POST['schedule'][$i]);
$interest = mysqli_real_escape_string($link, $_POST['interest'][$i]);
$penalty = mysqli_real_escape_string($link, $_POST['penalty'][$i]);
$schedule = mysqli_real_escape_string($link, $_POST['schedulek'][$i]);
$balance = mysqli_real_escape_string($link, $_POST['balance'][$i]);
$interest = mysqli_real_escape_string($link, $_POST['interest'][$i]);
$payment = mysqli_real_escape_string($link, $_POST['payment'][$i]);
$update = mysqli_query($link, "UPDATE pay_schedule SET schedule = '$schedule', balance = '$balance', interest =
'$interest', payment = '$payment' WHERE id = '$s'") or die (mysqli_error($link));
$insert = mysqli_query($link, "INSERT INTO payment_schedule
VALUES('','$s','$tid','$term','$day','$schedule_of_paymt','$interest','$penalty')") or die (mysqli_error($link));
$insert = mysqli_query($link, "UPDATE loan_info SET upstatus = 'Completed' WHERE id = '$idm'") or die
(mysqli_error($link));
if(!($update && $insert))
{
echo "<script>alert('Record not inserted.....Please try again later!'); </script>";
}
else{
echo "<script>alert('Payment Scheduled Successfully!!'); </script>";
echo "<script>window.location='listloans.php?id=".$idm."&&mid=".base64_encode("405")."'; </script>";
}
}
}
}
?>
</form>
</div>
<!-- /.tab-pane -->
</div>
<!-- /.tab-content -->
</div>
</div> </div>
</div>
</div>
</div>
</div>

Update_borrowers_data.php
<div class="row">

<section class="content">

<?php echo '<div class="alert alert-warning fade in" >


<a href = "#" class = "close" data-dismiss= "alert"> &times;</a>
<strong>Please Note that&nbsp;</strong> &nbsp;&nbsp;You Must Tick All
Added Checkbox Before Clicking on update button below
</div>'?>
<div class="box box-success">
<div class="box-body">
<div class="table-responsive">
<div class="box-body">

<div class="col-md-14">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li><a href="#tab_1" data-toggle="tab">Personal Information</a></li>
<li class="active"><a href="#tab_2" data-toggle="tab">Financial Information</a></li>
<li><a href="#tab_3" data-toggle="tab">Attachment</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane" id="tab_1">
<?php
$id = $_GET['id'];
$select = mysqli_query($link, "SELECT * FROM borrowers WHERE id = '$id'") or die (mysqli_error($link));
while($row = mysqli_fetch_array($select))
{
?>
<form class="form-horizontal" method="post" enctype="multipart/form-data">
<div class="box-body">
<div class="form-group">
<label for="" class="col-sm-2 control-label">Your Image</label>
<div class="col-sm-10">
<input type='file' name="image" onChange="readURL(this);" />
<img id="blah" src="../<?php echo $row['image']; ?>" alt="Image Here"
height="100" width="100"/>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">First Name</label>
<div class="col-sm-10">
<input name="fname" type="text" class="form-control" value="<?php echo $row['fname']; ?>"
readonly>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Last Name</label>
<div class="col-sm-10">
<input name="lname" type="text" class="form-control" value="<?php echo $row['lname']; ?>"
readonly>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Email</label>
<div class="col-sm-10">
<input type="email" name="email" type="text" class="form-control" value="<?php echo $row['email'];
?>" readonly>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Mobile Number</label>
<div class="col-sm-10">
<input name="mnumber" type="text" class="form-control" value="<?php echo $row['phone']; ?>"
readonly>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Address 1</label>
<div class="col-sm-10">
<textarea name="ad1" class="form-control" rows="4" cols="80"
readonly><?php echo $row['addrs1']; ?></textarea>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Address 2</label>
<div class="col-sm-10">
<textarea name="ad2" class="form-control" rows="4" cols="80"
readonly><?php echo $row['fname']; ?></textarea>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">City</label>
<div class="col-sm-10">
<input name="city" type="text" class="form-control" value="<?php echo $row['city']; ?>" readonly>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">State</label>
<div class="col-sm-10">
<input name="state" type="text" class="form-control" value="<?php echo $row['state']; ?>" readonly>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Zip Code</label>
<div class="col-sm-10">
<input name="zip" type="text" class="form-control" value="<?php echo $row['zip']; ?>" readonly>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">State</label>
<div class="col-sm-10">
<select name="country" class="form-control" required>
class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Comment</label>
<div class="col-sm-10">
<textarea name="comment" class="form-control" rows="4"
cols="80" readonly><?php echo $row['comment']; ?></textarea>
</div>
</div>

<div class="form-group">
<label for="" class="col-sm-2 control-label" style="color:#009900">Account Number</label>
<div class="col-sm-10">
<input name="account_no" type="text" class="form-control" value="<?php echo $row['account']; ?>"
readonly>
</div>
</div>
</div>

<div align="right">
<div class="box-footer">
<button type="reset" class="btn btn-primary btn-flat"><i class="fa fa-
times">&nbsp;Reset</i></button>
<button name="save" type="submit" class="btn btn-success btn-flat"><i
class="fa fa-save">&nbsp;Save</i></button>
</div>
</div>

</form>
<?php } ?>
</div>
<!-- /.tab-pane -->
<div class="tab-pane active" id="tab_2">
<form method="post">
<table>
<th></th>
<th align="center" width="400">Occupation</th>
<th align="center" width="300">Monthly Income</th>
<tbody>
<?php
$id = $_GET['id'];
$search = mysqli_query($link, "SELECT * FROM fin_info WHERE get_id = '$id'") or die (mysqli_error($link));
while($have = mysqli_fetch_array($search))
{
$idme= $have['id'];
?>
<tr>
<td width="30"><input id="optionsCheckbox" class="uniform_on"
name="selector[]" type="checkbox" value="<?php echo $idme; ?>" checked></td>
<td width="800"><input name="occupation[]" type="text" class="form-control"
placeholder="Occupation" value="<?php echo $have['occupation']; ?>"></td>
<td width="300"><input name="mincome[]" type="number" class="form-control" placeholder="Amount"
value="<?php echo $have['mincome']; ?>"></td>
</tr>
<?php } ?>
</tbody>
</table>
<div align="left">
<div class="box-footer">
<button type="submit" class="btn btn-success btn-flat"
name="add_fees_rows"><i class="fa fa-plus">&nbsp;Add Row</i></button>
<button name="delrow" type="submit" class="btn btn-danger btn-flat"><i
class="fa fa-trash">&nbsp;Delete Row</i></button>
</div>
</div>
<?php
if(isset($_POST['delrow'])){
$idm = $_GET['id'];
$id=$_POST['selector'];
$N = count($id);
if($N == 0){
echo "<script>alert('Row Not Selected!!!'); </script>";
echo
"<script>window.location='updateborrowers.php?id=".$idm."&&mid=".base64_encode("403")."'; </script>";
}
else{
for($i=0; $i < $N; $i++)
{
$result = mysqli_query($link,"DELETE
FROM fin_info WHERE id ='$id[$i]'");
echo
"<script>window.location='updateborrowers.php?id=".$idm."&&mid=".base64_encode("403")."'; </script>";
}
}
}
?>
<?php
if(isset($_POST['add_fees_rows']))
{
$id = $_GET['id'];
$tid = $_SESSION['tid'];
$insert = mysqli_query($link, "INSERT INTO fin_info(id,get_id,tid,occupation,mincome) VALUES('','$id','$tid','','')")
or die (mysqli_error($link));
if(!$insert)
{
echo "<script>alert('Unable to add row!!!'); </script>";
echo "<script>window.location='updateborrowers.php?id=".$id."&&mid=".base64_encode("403")."'; </script>";
}
else{
echo "<script>window.location='updateborrowers.php?id=".$id."&&mid=".base64_encode("403")."'; </script>";
}
}
?>
<div align="right">
<div class="box-footer">
<button type="submit" class="btn btn-info btn-flat" name="add_fees"><i class="fa fa-
save">&nbsp;Update Additional Fees</i></button>
</div>
</div>
<?php
if(isset($_POST['add_fees']))
{
$idm = $_GET['id'];
$id = $_POST['selector'];
if($id == ''){
echo "<script>alert('Row Not Selected!!!'); </script>";
echo "<script>window.location='updateborrowers.php?id=".$idm."&&mid=".base64_encode("403")."'; </script>";
}
else{
$i = 0;
foreach($_POST['selector'] as $s)
{
$fee = mysqli_real_escape_string($link, $_POST['occupation'][$i]);
$amount = mysqli_real_escape_string($link, $_POST['mincome'][$i]);
$update = mysqli_query($link, "UPDATE fin_info SET occupation = '$fee', mincome = '$amount' WHERE id = '$s'") or
die (mysqli_error($link));
$i++;
if(!$update)
{
echo "<script>alert('Record not inserted.....Please try again later!'); </script>";
}
else{
echo "<script>alert('Additional Fees/Payment Info Added Successfully!!'); </script>";
echo "<script>window.location='updateborrowers.php?id=".$idm."&&mid=".base64_encode("403")."'; </script>";
}
}
}
}
?>
</form>
</div>
<!-- /.tab-pane -->
<div class="tab-pane" id="tab_3">
<form class="form-horizontal" method="post" enctype="multipart/form-data">
Attachments
Accepted file types <span style="color:#FF0000">jpg, gif, png, xls, xlsx, csv, doc, docx, pdf</span>
<input name="uploaded_file" type="file" class="btn btn-info">
<div align="left">
<div class="box-footer">
<button type="submit" class="btn btn-success btn-flat" name="upload"><i
class="fa fa-upload">&nbsp;Upload</i></button>
</div>
</div>
<?php
if(isset($_POST['upload']))
{
$id = $_GET['id'];
$tid = $_SESSION['tid'];
//upload random name/number
$rd2 = mt_rand(1000,9999)."_File";

//Check that we have a file


if((!empty($_FILES["uploaded_file"])) && ($_FILES['uploaded_file']['error'] == 0)) {
//Check if the file is JPEG image and it's size is less than 350Kb
$filename = basename($_FILES['uploaded_file']['name']);

$ext = substr($filename, strrpos($filename, '.') + 1);

if (($ext != "exe") && ($_FILES["uploaded_file"]["type"] != "application/x-msdownload")) {


//Determine the path to which we want to save this file
//$newname = dirname(__FILE__).'/upload/'.$filename;
$newname="bdocument/".$rd2."_".$filename;
//Check if the file with the same name is already exists on the server
//Attempt to move the uploaded file to it's new place
if ((move_uploaded_file($_FILES['uploaded_file']['tmp_name'],$newname))) {
//successful upload
// echo "It's done! The file has been saved as: ".$newname;
$insert = mysqli_query($link, "INSERT INTO battachment(id,get_id,tid,attached_file,date_time)
VALUES('','$id','$tid','$newname',NOW())") or die (mysqli_error($link));
$insert = mysqli_query($link, "UPDATE borrowers SET status = 'Completed' WHERE id = '$id'") or die
(mysqli_error($link));
if(!$insert)
{
echo "<script>alert('Record not inserted.....Please try again later!'); </script>";
}
else{
echo "<script>alert('Documents Added Successfully!!'); </script>";
echo "<script>window.location='listborrowers.php?id=".$_SESSION['tid']."'; </script>";
}
}
}
}
}
?>
</form>
</div>
<!-- /.tab-pane -->
</div>
<!-- /.tab-content -->
</div>

</div>

</div>

</div>
</div>
</div>
</div>
Savings.php
<?php include "../config/session.php"; ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<?php
$call = mysqli_query($link, "SELECT * FROM systemset");
if(mysqli_num_rows($call) == 0)
{
echo "<script>alert('Data Not Found!'); </script>";
}
else
{
while($row = mysqli_fetch_assoc($call)){
?>
<link href="../img/<?php echo $row['image']; ?>" rel="icon" type="dist/img">
<?php }}?>
<?php
$call = mysqli_query($link, "SELECT * FROM systemset");
while($row = mysqli_fetch_assoc($call)){
?>
<title><?php echo $row ['title']?></title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.6 -->
<link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-
awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="../dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="../dist/css/skins/_all-skins.min.css">
<!-- iCheck -->
<link rel="stylesheet" href="../plugins/iCheck/flat/blue.css">
<!-- Morris chart -->
<link rel="stylesheet" href="../plugins/morris/morris.css">
<!-- jvectormap -->
<link rel="stylesheet" href="../plugins/jvectormap/jquery-jvectormap-1.2.2.css">
<!-- Date Picker -->
<link rel="stylesheet" href="../plugins/datepicker/datepicker3.css">
<!-- Daterange picker -->
<link rel="stylesheet" href="../plugins/daterangepicker/daterangepicker.css">
<!-- bootstrap wysihtml5 - text editor -->
<link rel="stylesheet" href="../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
<link rel="stylesheet" href="../dist/css/style.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="../dist/js/calendar.js"></script>
<strong> <link rel="stylesheet" href="../plugins/datatables/dataTables.bootstrap.css"></strong>
<!-- 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/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<header class="main-header">
<!-- Logo -->
<a href="application/index.php" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><?php echo $row ['abb'];?></span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><?php echo $row ['name'];?></span>
</a>
<?php }?>
<!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
</a>
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">

</li>
<!-- Notifications: style can be found in dropdown.less -->

<ul class="dropdown-menu">
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">

</ul>
</li>
</ul>
</li>
<!-- Tasks: style can be found in dropdown.less -->
<li class="dropdown tasks-menu">

<ul class="dropdown-menu">

<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li><!-- Task item -->

</li>
<!-- end task item -->
<!-- end task item -->

<!-- end task item -->

</li>
<!-- end task item -->
</ul>
</li>
<li class="footer">
<a href="#"></a>
</li>
</ul>
</li>
<!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<?php
$id = $_SESSION['tid'];
$call = mysqli_query($link, "SELECT * FROM user WHERE id = '$id'");
if(mysqli_num_rows($call) == 0)
{
echo "<script>alert('Data Not Found!'); </script>";
}
else
{
while($row = mysqli_fetch_assoc($call))
{
?>
<img src="../<?php echo $row['image'];?>" class="user-image" alt="User Image">
<span class="hidden-xs"><?php echo $row ['name'] ;?></span>
</a>
<ul class="dropdown-menu">
<!-- User image -->
<li class="user-header">
<img src="../<?php echo $row['image'];?>" class="img-circle" alt="User Image">
<p>
<?php echo 'Username:'. $row ['username'];?>
</p>
<?php }}?>
</li>

<!-- Menu Body -->


<li class="user-body">
<div class="row">
<div class="col-xs-4 text-center">

<a href="profile.php?id=<?php echo $_SESSION['tid']; ?>">Profile</a>

</div>
<div class="col-xs-4 text-center">
<a href="listborrowers.php?id=<?php echo $_SESSION['tid']; ?>">Contacts</a>
</div>
<div class="col-xs-4 text-center">
<a href="inboxmessage.php?id=<?php echo $_SESSION['tid']; ?>">Mailbox</a>
</div>
</div>
<!-- /.row -->
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="inboxmessage.php?id=<?php echo $_SESSION['tid']; ?>" class="btn
btn-info btn-flat">Message</a> </div>
<div class="pull-right">
<a href="../logout.php" class="btn btn-warning btn-flat"><i class="fa fa-sign-out"></i>Sign out</a>
</div>
</li>
</ul>
</li>
<!-- Control Sidebar Toggle Button -->
<li>
<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
</li>
</ul>
</div>
</nav>
</header>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
<div class="user-panel">
<div class="pull-left image">
<?php
$id = $_SESSION['tid'];
$call = mysqli_query($link, "SELECT * FROM user WHERE id = '$id'");
if(mysqli_num_rows($call) == 0)
{
echo "<script>alert('Data Not Found!'); </script>";
}
else
{
while($row = mysqli_fetch_assoc($call))
{

?>
<img src="../<?php echo $row['image'];?>" class="img-circle" alt="User Image">
</div>
<div class="pull-left info">
<p><?php echo $row ['username'] ;?></p>
<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
<?php }}?>
</div>
</div>
<!-- search form -->

<!-- /.search form -->


<!-- sidebar menu: : style can be found in sidebar.less -->
<?php
$id = $_SESSION['tid'];
$call = mysqli_query($link, "SELECT * FROM user WHERE id = '$id'");
if(mysqli_num_rows($call) == 0)
{
echo "<script>alert('Data Not Found!'); </script>";
}
else
{
while($row = mysqli_fetch_assoc($call))
{

?>
<ul class="sidebar-menu">
<li class="header">MAIN NAVIGATION</li>
<li><a href="dashboard.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-
dashboard"></i> <span>Dashbord</span></a></li>

<li class="treeview ">


<a href="#">
<i class="fa fa-book"></i> <span>Email Templates</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li class="active"><a href="newemail.php?id=<?php echo $_SESSION['tid']; ?>"><i
class="fa fa-circle-o"></i> New Email</a></li>
<li><a href="listemail.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-o"></i>List
Email</a></li>
</ul>
</li>

<li class="treeview">
<a href="#">
<i class="fa fa-users"></i> <span>Borrowers</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li><a href="newborrowers.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-
circle-o"></i> New Borrowers</a></li>
<li><a href="listborrowers.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-o"></i>List
Borrowers</a></li>
</ul>
</li>

<li><a href="mywallet.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-book"></i> <span>My


Wallet</span></a></li>
<li class="treeview">
<a href="#">
<i class="fa fa-dollar"></i> <span>Loans</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li class="active"><a href="newloans.php?id=<?php echo $_SESSION['tid']; ?>"><i
class="fa fa-circle-o"></i> New Loans</a></li>
<li><a href="listloans.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-o"></i>List
Loans</a></li>
</ul>
</li>

<li class="treeview">
<a href="#">
<i class="fa fa-book"></i> <span>Message</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li class="active"><a href="newmessage.php?id=<?php echo $_SESSION['tid']; ?>"><i
class="fa fa-circle-o"></i> New Message</a></li>
<li><a href="inboxmessage.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-o"></i>Inbox
Message</a></li>
<li><a href="outboxmessage.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-o"></i>Outbox
Message</a></li>
</ul>
</li>

<li><a href="missedpayment.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-


dollar"></i> <span>Missed Payment</span></a></li>

<li class="treeview">
<a href="#">
<i class="fa fa-dollar"></i> <span>Payments</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li class="active"><a href="newpayments.php?id=<?php echo $_SESSION['tid']; ?>"><i
class="fa fa-circle-o"></i> New Payment</a></li>
<li><a href="listpayment.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-o"></i>List
Payments</a></li>
</ul>
</li>

<li class="treeview">
<a href="#">
<i class="fa fa-user"></i> <span>Employee</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li class="active"><a href="newemployee.php?id=<?php echo $_SESSION['tid']; ?>"><i
class="fa fa-circle-o"></i> New Employee</a></li>
<li><a href="listemployee.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-o"></i>List
Employee</a></li>
</ul>
</li>

<li><a href="savings.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-money"></i>


<span>Savings Account</span></a></li>

<li class="treeview active">


<a href="#">
<i class="fa fa-gear"></i> <span>General Settings</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li><a href="system_set.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-
circle-o"></i>Company Setup</a></li>
<li><a href="banner.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-
o"></i>Banner Settings</a></li>
<li><a href="aboutus.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-
o"></i>Aboutus Settings</a></li>
<li><a href="hiw.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-
o"></i>How System Works</a></li>
<li><a href="faq.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-
o"></i>Faqs Settings</a></li>
<li><a href="sms.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-circle-
o"></i>SMS Gateway Settings</a></li>
<li class="active"><a href="backupdatabase.php?id=<?php echo $_SESSION['tid'];
?>"><i class="fa fa-circle-o"></i>Backup Database</a></li>
</ul>
</li>
<li>
<a href="../logout.php">
<i class="fa fa-sign-out"></i> <span>Logout</span>
</a>
</li>

</section>
<!-- /.sidebar -->
</aside>
<?php }}?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">

<!-- Content Header (Page header) -->


<section class="content-header">
<h1>
<i class="fa fa-database"></i>&nbsp;Savings Account
<small>Control panel</small>
</h1>
<ol class="breadcrumb">
<li><a href="dashboard.php?id=<?php echo $_SESSION['tid']; ?>"><i class="fa fa-dashboard"></i>
Home</a></li>
<li class="active"> <a href="hiw.php?id=<?php echo $_SESSION['tid']; ?>">Savings</a></li>
<li class="active">Account</li>
</ol>
</section>

<section class="content">
<div class="box">

<div class="box-body">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-money"></i>Savings Account</h3>
</div>
<div class="box-body">
<br>
<br>
<br>

<div align="center"><a href="dashboard.php?tid<?php echo $_SESSION['tid']; ?>" class="btn btn-success btn-


flat"><i class="fa fa-send"></i>&nbsp;MODULE COMING SOON!</a></div>

<br>
<br>
<br>
</div>
</div>
</section>
</div>
<!-- /.content-wrapper -->
<footer class="main-footer">
<div class="pull-right hidden-xs">
<b>Version</b> 2.4.2
</div>
<?php $sql = "SELECT footer FROM systemset";
$result = mysqli_query($link,$sql);
if(!$result)
{
echo '
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Warning!</strong> Unable to select! check database con.
</div>';
}
else
{
while ($row=mysqli_fetch_array($result))
{
?>
<strong> <?php echo $row ['footer'];?> </strong>
<?php }}?>
</footer>
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Create the tabs -->
<ul class="nav nav-tabs nav-justified control-sidebar-tabs">
<li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
<li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<!-- Home tab content -->
<div class="tab-pane" id="control-sidebar-home-tab">
<h3 class="control-sidebar-heading">Recent Activity</h3>
<ul class="control-sidebar-menu">
<li>
<a href="javascript:void(0)">
<i class="menu-icon fa fa-birthday-cake bg-red"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">Langdon's Birthday</h4>
<p>Will be 23 on April 24th</p>
</div>
</a>
</li>
<li>
<a href="javascript:void(0)">
<i class="menu-icon fa fa-user bg-yellow"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">Frodo Updated His Profile</h4>
<p>New phone +1(800)555-1234</p>
</div>
</a>
</li>
<li>
<a href="javascript:void(0)">
<i class="menu-icon fa fa-envelope-o bg-light-blue"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">Nora Joined Mailing List</h4>
<p>nora@example.com</p>
</div>
</a>
</li>
<li>
<a href="javascript:void(0)">
<i class="menu-icon fa fa-file-code-o bg-green"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">Cron Job 254 Executed</h4>
<p>Execution time 5 seconds</p>
</div>
</a>
</li>
</ul>
<!-- /.control-sidebar-menu -->

<!-- /.control-sidebar-menu -->


</div>
<!-- /.tab-pane -->
<!-- Stats tab content -->
<div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
<!-- /.tab-pane -->
<!-- Settings tab content -->
<div class="tab-pane" id="control-sidebar-settings-tab">
<form method="post">
<h3 class="control-sidebar-heading">General Settings</h3>
<div class="form-group">
<label class="control-sidebar-subheading">
Report panel usage
<input type="checkbox" class="pull-right" checked>
</label>
<p>
Some information about this general settings option
</p>
</div>
<!-- /.form-group -->
<div class="form-group">
<label class="control-sidebar-subheading">
Allow mail redirect
<input type="checkbox" class="pull-right" checked>
</label>
<p>
Other sets of options are available
</p>
</div>
<!-- /.form-group -->
<div class="form-group">
<label class="control-sidebar-subheading">
Expose author name in posts
<input type="checkbox" class="pull-right" checked>
</label>
<p>
Allow the user to show his name in blog posts
</p>
</div>
<!-- /.form-group -->
<h3 class="control-sidebar-heading">Chat Settings</h3>
<div class="form-group">
<label class="control-sidebar-subheading">
Show me as online
<input type="checkbox" class="pull-right" checked>
</label>
</div>
<!-- /.form-group -->
<div class="form-group">
<label class="control-sidebar-subheading">
Turn off notifications
<input type="checkbox" class="pull-right">
</label>
</div>
<!-- /.form-group -->
<div class="form-group">
<label class="control-sidebar-subheading">
Delete chat history
<a href="javascript:void(0)" class="text-red pull-right"><i class="fa fa-trash-o"></i></a>
</label>
</div>
<!-- /.form-group -->
</form>
</div>
<!-- /.tab-pane -->
</div>
</aside>
<!-- /.control-sidebar -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->
<!-- jQuery 2.2.3 -->
<script type="text/javascript">
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#blah').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
</script>
<script src="../plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="../bootstrap/js/bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="../plugins/select2/select2.full.min.js"></script>
<!-- InputMask -->
<script src="../plugins/input-mask/jquery.inputmask.js"></script>
<script src="../plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
<script src="../plugins/input-mask/jquery.inputmask.extensions.js"></script>
<!-- date-range-picker -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script>
<script src="../plugins/daterangepicker/daterangepicker.js"></script>
<!-- bootstrap datepicker -->
<script src="../plugins/datepicker/bootstrap-datepicker.js"></script>
<!-- bootstrap color picker -->
<script src="../plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<!-- bootstrap time picker -->
<script src="../plugins/timepicker/bootstrap-timepicker.min.js"></script>
<!-- SlimScroll 1.3.0 -->
<script src="../plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- iCheck 1.0.1 -->
<script src="../plugins/iCheck/icheck.min.js"></script>
<!-- FastClick -->
<script src="../plugins/fastclick/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="../dist/js/app.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../dist/js/demo.js"></script>
<!-- Bootstrap 3.3.6 -->
<!-- DataTables -->
<script src="../plugins/datatables/jquery.dataTables.min.js"></script>
<script src="../plugins/datatables/dataTables.bootstrap.min.js"></script>
<!-- page script -->
<script>
$(function () {
//Initialize Select2 Elements
$(".select2").select2();
//Datemask dd/mm/yyyy
$("#datemask").inputmask("dd/mm/yyyy", {"placeholder": "dd/mm/yyyy"});
//Datemask2 mm/dd/yyyy
$("#datemask2").inputmask("mm/dd/yyyy", {"placeholder": "mm/dd/yyyy"});
//Money Euro
$("[data-mask]").inputmask();
//Date range picker
$('#reservation').daterangepicker();
//Date range picker with time picker
$('#reservationtime').daterangepicker({timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm
A'});
//Date range as a button
$('#daterange-btn').daterangepicker(
{
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1,
'month').endOf('month')]
},
startDate: moment().subtract(29, 'days'),
endDate: moment()
},
function (start, end) {
$('#daterange-btn span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
}
);
//Date picker
$('#datepicker').datepicker({
autoclose: true
});
//iCheck for checkbox and radio inputs
$('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
checkboxClass: 'icheckbox_minimal-blue',
radioClass: 'iradio_minimal-blue'
});
//Red color scheme for iCheck
$('input[type="checkbox"].minimal-red, input[type="radio"].minimal-red').iCheck({
checkboxClass: 'icheckbox_minimal-red',
radioClass: 'iradio_minimal-red'
});
//Flat red color scheme for iCheck
$('input[type="checkbox"].flat-red, input[type="radio"].flat-red').iCheck({
checkboxClass: 'icheckbox_flat-green',
radioClass: 'iradio_flat-green'
});
//Colorpicker
$(".my-colorpicker1").colorpicker();
//color picker with addon
$(".my-colorpicker2").colorpicker();
//Timepicker
$(".timepicker").timepicker({
showInputs: false
});
});
</script>
<script>
$(function () {
$("#example1").DataTable();
$('#example2').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false
});
});
</script>
<script src="https://cdn.ckeditor.com/4.5.7/standard/ckeditor.js"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<script>
$(function () {
// Replace the <textarea id="editor1"> with a CKEditor
// instance, using default configuration.
CKEDITOR.replace('editor1');
//bootstrap WYSIHTML5 - text editor
$(".textarea").wysihtml5();
});
</script>
</body>
</html>
Permission_list_data.php
<div class="row">

<section class="content">
<div class="box box-success">
<div class="box-body">
<div class="table-responsive">
<div class="box-body">
<form method="post">
<a href="dashboard.php?id=<?php echo $_SESSION['tid']; ?>&&mid=<?php echo
base64_encode("401"); ?>"><button type="button" class="btn btn-flat btn-warning"><i class="fa fa-mail-reply-
all"></i>&nbsp;Back</button> </a>
<button type="submit" class="btn btn-flat btn-danger" name="delete"><i class="fa fa-
times"></i>&nbsp;Delete</button>
<a href="add_permission.php?id=<?php echo $_SESSION['tid']; ?>&&mid=<?php echo
base64_encode("413"); ?>"><button type="button" class="btn btn-flat btn-info"><i class="fa fa-
cogs"></i>&nbsp;Add Permission</button></a>

<hr>

<table id="example1" class="table table-bordered table-striped">


<thead>
<tr>
<th><input type="checkbox" id="select_all"/></th>
<th>User Name</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
$select = mysqli_query($link, "SELECT DISTINCT(tid) FROM emp_permission") or die (mysqli_error($link));
if(mysqli_num_rows($select)==0)
{
echo "<div class='alert alert-info'>No data found yet!.....Check back later!!</div>";
}
else{
while($row = mysqli_fetch_array($select))
{
//$id = $row['id'];
$tid = $row['tid'];
$getin = mysqli_query($link, "SELECT name FROM user WHERE id = '$tid'") or die (mysqli_error($link));
$have = mysqli_fetch_array($getin);
$name = $have['name'];
?>
<tr>
<td><input id="optionsCheckbox" class="checkbox" name="selector[]" type="checkbox" value="<?php
echo $tid; ?>"></td>
<td><?php echo $name; ?></td>
<td>
<a rel="tooltip" title="View" href="view_perm.php?id=<?php echo
$tid;?>&&mid=<?php echo base64_encode("413"); ?>"><button type="button" class="btn btn-flat btn-success"><i
class="fa fa-eye"></i></button></a>
<a rel="tooltip" title="Update" href="edit_perm.php?id=<?php echo
$tid;?>&&mid=<?php echo base64_encode("413"); ?>"><button type="button" class="btn btn-flat btn-info"><i
class="fa fa-edit"></i></button></a>
<a rel="tooltip" title="Delete" href="del_perm.php?id=<?php echo
$tid;?>&&mid=<?php echo base64_encode("413"); ?>"><button type="button" class="btn btn-flat btn-danger"><i
class="fa fa-trash"></i></button></a>
</td>
</tr>
<?php } } ?>
</tbody>
</table>

<?php
if(isset($_POST['delete'])){
$idm = $_GET['id'];
$id=$_POST['selector'];
$N = count($id);
if($id == ''){
echo "<script>alert('Row Not Selected!!!'); </script>";
echo
"<script>window.location='permission_list.php?id=".$_SESSION['tid']."&&mid=".base64_encode("413")."';
</script>";
}
else{
for($i=0; $i < $N; $i++)
{
$result = mysqli_query($link,"DELETE
FROM emp_permission WHERE tid ='$id[$i]'");
echo "<script>alert('Row Delete
Successfully!!!'); </script>";
echo
"<script>window.location='permission_list.php?id=".$_SESSION['tid']."&&mid=".base64_encode("413")."';
</script>";
}
}
}
?>

</form>
</div>

</div>
</div>

</div>

</div>
Transation.php
<div class="row">

<section class="content">
<div class="box box-success">
<div class="box-body">
<div class="table-responsive">
<div class="box-body">
<form method="post">
<a href="dashboard.php?id=<?php echo $_SESSION['tid']; ?>&&mid=<?php echo
base64_encode("401"); ?>"><button type="button" class="btn btn-flat btn-warning"><i class="fa fa-mail-reply-
all"></i>&nbsp;Back</button> </a>
<button type="submit" class="btn btn-flat btn-danger" name="delete"><i class="fa fa-
times"></i>&nbsp;Multiple Delete</button>
<a href="deposit.php?id=<?php echo $_SESSION['tid']; ?>&&mid=<?php echo base64_encode("410");
?>"><button type="button" class="btn btn-flat btn-success"><i class="fa fa-plus"></i>&nbsp;Make
Deposit</button></a>
<a href="withdraw.php?id=<?php echo $_SESSION['tid']; ?>&&mid=<?php echo base64_encode("410");
?>"><button type="button" class="btn btn-flat btn-success"><i class="fa fa-plus"></i>&nbsp;Withdraw
Money</button></a>
<a href="send_smsloan.php?id=<?php echo $_SESSION['tid']; ?>&&mid=<?php echo
base64_encode("406"); ?>"><button type="button" class="btn btn-flat btn-info"><i class="fa fa-
envelope"></i>&nbsp;Send SMS</button></a>

<a href="printtransaction.php" target="_blank" class="btn btn-primary btn-flat"><i class="fa fa-


print"></i>&nbsp;Print</a>
<a href="transactionexcel.php" target="_blank" class="btn btn-success btn-flat"><i class="fa fa-
send"></i>&nbsp;Export Excel</a>
<a href="pdftransaction.php" target="_blank" class="btn btn-info btn-flat"><i class="fa fa-file-pdf-
o"></i>&nbsp;Export PDF</a>

<hr>

<table id="example1" class="table table-bordered table-striped">


<thead>
<tr>
<th><input type="checkbox" id="select_all"/></th>
<th>TxID</th>
<th>T_Type</th>
<th>AcctNo.</th>
<th>FName</th>
<th>LName</th>
<th>Email</th>
<th>Phone</th>
<th>Amount</th>
<th>Date/Time</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
$select = mysqli_query($link, "SELECT * FROM transaction") or die (mysqli_error($link));
if(mysqli_num_rows($select)==0)
{
echo "<div class='alert alert-info'>No data found yet!.....Check back later!!</div>";
}
else{
while($row = mysqli_fetch_array($select))
{
$id = $row['id'];
$txid = $row['txid'];
$t_type = $row['t_type'];
$acctno = $row['acctno'];
$ln = $row['ln'];
$fn = $row['fn'];
$em = $row['email'];
$ph = $row['phone'];
$amt = $row['amount'];
$dt = $row['date_time'];
?>
<tr>
<td><input id="optionsCheckbox" class="checkbox" name="selector[]"
type="checkbox" value="<?php echo $id; ?>"></td>
<td><?php echo $row ['txid'];?></td>
<td><?php echo $row ['t_type'];?></td>
<td><?php echo $acctno; ?></td>
<td><?php echo $fn; ?></td>
<td><?php echo $ln; ?></td>
<td><?php echo $em; ?></td>
<td><?php echo $ph; ?></td>
<?php
$query = mysqli_query($link, "SELECT * FROM systemset");
$get_query = mysqli_fetch_array($query);
?>
<td><?php echo $get_query['currency'].number_format($amt,2,'.',',');
?></td>
<td><?php echo $dt; ?></td>
<td align="center"><a href="#myModal <?php echo $id; ?>"> <button
type="button" class="btn btn-primary btn-flat" data-target="#myModal<?php echo $id; ?>" data-
toggle="modal"><i class="fa fa-print"></i> Receipt</button></a></td>
</tr>
<?php } } ?>
</tbody>
</table>
<?php
if(isset($_POST['delete'])){
$idm = $_GET['id'];
$id=$_POST['selector'];
$N = count($id);
if($id == ''){
echo "<script>alert('Row Not Selected!!!'); </script>";
echo
"<script>window.location='listborrowers.php?id=".$_SESSION['tid']."'; </script>";
}
else{
for($i=0; $i < $N; $i++)
{
$result = mysqli_query($link,"DELETE
FROM borrowers WHERE id ='$id[$i]'");
echo "<script>alert('Row Delete
Successfully!!!'); </script>";
echo
"<script>window.location='listborrowers.php?id=".$_SESSION['tid']."'; </script>";
}
}
}
?>
</form>

</div>
</div>
</div>
</div>

<div class="box box-info">


<div class="box-body">
<div class="alert alert-info" align="center" class="style2" style="color: #FFFFFF">NUMBER OF
TRANSACTION:&nbsp;
<?php
$call3 = mysqli_query($link, "SELECT * FROM transaction ");
$num3 = mysqli_num_rows($call3);
?>
<?php echo $num3; ?>

</div>

<div id="chartdiv2"></div>

</div>
</div>

</div>

END

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy