
PK 
<?php
ob_start();
//error_reporting(E_ALL ^ E_NOTICE);
@session_start();
ini_set('allow_url_include',1);
date_default_timezone_set("Asia/Kolkata");
set_time_limit(600);
ini_set('max_execution_time',600);
include '../includes/settings/constant.php';
//include '../includes/settings/db.php';
require_once '../includes/settings/PDODB.php';
include '../includes/modules/functions.php';
$function = new FUNCTIONS();
if(empty($_SESSION['adminId'])){
header("Location: ../index.php");
exit();
}
$pdodb = PDODB::getInstance();
$studentdata = $function->getStudent($id=$_GET['id'],$isActive=1,$orderBy='DESC');
$name = $studentdata[0]['username'];
$email = $studentdata[0]['uemail'];
$mobileno = $studentdata[0]['mobileno'];
$joincoursedata = $function->getStudentJoinCourseList($id=NULL,$studentId=$_GET['id'],$isActive=1,$orderBy='DESC');
//print_r($joincoursedata[0]);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>INSPINIA | Basic Form</title>
<?php include_once '../layout/style.php'; ?>
</head>
<body>
<div id="wrapper">
<?php $currentPage = 'student-list'; include_once '../layout/side-bar.php'; ?>
<div id="page-wrapper" class="gray-bg">
<?php include_once '../layout/header.php'; ?>
<div class="row wrapper border-bottom white-bg page-heading">
<div class="col-lg-8">
<h2><?=$name;?></h2>
<h3>Email ID : <?=$email;?></h3>
<h3>Mobile No. : <?=$mobileno;?></h3>
</div>
<div class="col-sm-4">
<button class="btn btn-primary btn-md pull-right" onclick="history.go(-1);"><i class="fa fa-arrow-circle-left"></i> BACK </button>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5><?=$name;?>'s Accounts Details</h5>
</div>
<div class="ibox-content">
<div class="table-responsive">
<?php if ($joincoursedata[0]['isInstallment']==1){ ?>
<table class="table table-striped table-bordered table-hover dataTables-example" id="editable">
<thead>
<tr>
<th colspan="2">Installment List</th>
<th style="width: 150px;"><a class="btn btn-primary btn-xs" href="edit-installment.php?uid=<?=$joincoursedata[0]['studentId'];?>&oid=<?=$joincoursedata[0]['id'];?>"><i class="fa fa-pencil"></i> Edit Installment</a></th>
</tr>
</thead>
<thead>
<tr style="color:#e91e1e;">
<th colspan="3"><h5>Course Total Fee : <?=$joincoursedata[0]['totalFee'];?></h5></th>
</tr>
<tr>
<th scope="col">S.no.</th>
<th scope="col">Due Date :</th>
<th scope="col">Amt. Due</th>
</tr>
</thead>
<tbody>
<?php $getDueDate = $function->getInstallmentList($id=NULL,$uId=$joincoursedata[0]['studentId'],$orderId=$joincoursedata[0]['id'],$isActive=NULL);
for($i=0;$i<count($getDueDate);$i++){ ?>
<tr>
<th scope="row"><?=$i+1;?></th>
<td><?=date('jS M, Y', strtotime($getDueDate[$i]['dueDate']));?></td>
<td><?=$getDueDate[$i]['amount'];?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
</div>
</div>
<div class="ibox-content">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover dataTables-example" id="editable">
<thead>
<tr>
<th scope="col">S.no.</th>
<th scope="col">Particular</th>
<th scope="col">Amt. Due</th>
<th scope="col">Amount Paid</th>
<th scope="col">Balance Amt.</th>
<th scope="col">Demand/<br>Clearing<br>Date</th>
<th scope="col">Pay Mode</th>
<th scope="col">Invoice</th>
<th scope="col">Against By</th>
<th scope="col">PDF</th>
</tr>
</thead>
<tbody>
<?php
$pdodb = PDODB::getInstance();
$sql = "SELECT * FROM `tn_accounts` WHERE uid = '".$_GET['id']."' AND isActive =1 ORDER BY `tn_accounts`.`date` ASC"; //exit;
//print_r($accountdata[0]);
$accountdata = $pdodb->query($sql);
$bal = 0;
$i=0;
foreach ($accountdata as $key => $value) {
$i++;
$bal += (int)$value['debit']-(int)$value['credit'];
if ($value['isActive']==1) {
if (!empty($value['orderid'])) {
$courselistdata = $function->getStudentJoinCourseList($id=$value['orderid'],$studentId=$_GET['id'],$isActive=NULL,$orderBy='ASC');
$courseEndDate = $courselistdata[0]['endDate'];
}else {
$courselistdata = $function->getStudentJoinCourseList($id=$value['demand_id'],$studentId=$_GET['id'],$isActive=NULL,$orderBy='ASC');
$courseEndDate = $courselistdata[0]['endDate'];
}
$todayDate = date('Y-m-d'); // Get today's date
?>
<tr style="<?php if($todayDate > $courseEndDate){ echo "background-color: rgba(255, 0, 0, 0.2); color: #000;"; }else { echo "background-color: rgba(117, 164, 127, 0.4); color: #000;"; } ?>">
<th scope="row"><?=$i;?></th>
<td><?=$value['particular'];?></td>
<td><?=!empty($value['debit'])?$value['debit']:'';?></td>
<td><?=!empty($value['credit'])?$value['credit']:'';?></td>
<td><?=$bal;?></td>
<td><?=date('jS M, Y', strtotime($value['date']));?></td>
<td><?=!empty($value['paymentMode'])?$value['paymentMode']:'';?></td>
<td><?=!empty($value['invoice'])?$value['invoice']:'';?></td>
<td><?=$value['againstBy'];?></td>
<td>
<?php if($todayDate > $courseEndDate){ }else {
if(!empty($value['invoice'])) {
if(!empty($value['orderid'])) { ?>
<a href="receipt.php?uid=<?=$value['uid'];?>&id=<?=$value['ac_id'];?>&invoicetype=Paid" target="_blank">
<i class="fa fa-file-pdf-o" aria-hidden="true"></i>
</a>
<?php } elseif($value['is_adjustment']==2) { ?>
<a href="invoice.php?uid=<?=$value['uid'];?>&id=<?=$value['ac_id'];?>&invoicetype=Paid" target="_blank">
<i class="fa fa-file-pdf-o" aria-hidden="true"></i>
</a>
<?php }else { ?>
<a href="invoice-design.php?uid=<?=$value['uid'];?>&id=<?=$value['ac_id'];?>&invoicetype=Unpaid" target="_blank">
<i class="fa fa-file-pdf-o" aria-hidden="true"></i>
</a>
<?php } } } ?>
</td>
</tr>
<?php } } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include_once '../layout/script.php'; ?>
<script>
$(document).ready(function () {
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
});
</script>
<script>
function tossterMsgAlert(msg='Welcome',title='') {
toastr.options = {
closeButton: true,
//debug: false,
newestOnTop: false,
//progressBar: false,
positionClass: 'toast-top-center',
preventDuplicates: true,
//onclick: null,
//showDuration: 300,
//hideDuration: 1000,
timeOut: 2000,
//extendedTimeOut: 1000,
//showEasing: 'swing',
//hideEasing: 'linear',
//showMethod: 'fadeIn',
hideMethod: 'fadeOut'
};
toastr.warning(title,msg);
}
</script>
</body>
</html>


PK 99