|
Server IP : 2a02:4780:3:1493:0:3736:a38e:7 / Your IP : 216.73.216.60 Web Server : LiteSpeed System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.77.1.lve.el8.x86_64 #1 SMP Wed Oct 8 14:21:00 UTC 2025 x86_64 User : u926327694 ( 926327694) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u926327694/domains/smsoft.in/public_html/demo/fonts/../ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
// First we execute our common code to connection to the database and start the session
require("common.php");
// At the top of the page we check to see whether the user is logged in or not
if(!isset($_SESSION['user']) && !isset($_SESSION['Mng_User']))
{
// If they are not, we redirect them to the login page.
header("Location: login.php");
// Remember that this die statement is absolutely critical. Without it,
// people can view your members-only content without logging in.
die("Redirecting to login.php");
}
include("config/dbconnect.php");
$SchoolCode=$_SESSION['code'];
$sel_school=mysqli_query($con,"select * from schools where schoolCode='$SchoolCode'");
$SchoolRePrintFile="reprint.php";
$SchoolRePrintFile1="re-print-receipt.php";
while($school_row=mysqli_fetch_array($sel_school))
{
$SchoolRePrintFile=$school_row['Reprint_file'];
$SchoolRePrintFile1=$school_row['ReceiptHeadReportFIle'];
}
if(isset($_SESSION['Mng_User']))
{
$SchoolRePrintFile="#";
}
mysqli_close($con);
// Everything below this point in the file is secured by the login system
// We can display the user's username to them by reading it from the session array. Remember that because
// a username is user submitted content we must use htmlentities on it before displaying it to the user.
?>
<?php include "config/config.php";
$key=$_REQUEST['key'];
$sql1=mysqli_query($con,"select * from `stud_basic` where `Stud_Id` = '$key'");
$sql2=mysqli_query($con,"select DISTINCT `Head_Id` from `stud_basic2` where `Stud_Id` = '$key'");
$sql3=mysqli_query($con,"select * from `paid_fees` where `Stud_Id` = '$key'");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- start: Meta -->
<meta charset="utf-8">
<title>Fees Managment</title>
<meta name="description" content="Bootstrap Metro Dashboard">
<meta name="author" content="Dennis Ji">
<meta name="keyword" content="Metro, Metro UI, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
<!-- end: Meta -->
<!-- start: Mobile Specific -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- end: Mobile Specific -->
<!-- start: CSS -->
<link id="bootstrap-style" href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
<link id="base-style" href="css/style.css" rel="stylesheet">
<link id="base-style-responsive" href="css/style-responsive.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&subset=latin,cyrillic-ext,latin-ext' rel='stylesheet' type='text/css'>
<!-- end: CSS -->
<!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<link id="ie-style" href="css/ie.css" rel="stylesheet">
<![endif]-->
<!--[if IE 9]>
<link id="ie9style" href="css/ie9.css" rel="stylesheet">
<![endif]-->
<!-- start: Favicon -->
<link rel="shortcut icon" href="img/favicon.ico">
<!-- end: Favicon -->
<style type="text/css">
<!--
.style1 {
color: #3300CC;
font-weight: bold;
}
.style2 {
color: #FF0000;
font-weight: bold;
}
.style4 {
color: #CC00FF;
font-weight: bold;
}
-->
</style>
</head>
<body onLoad="myFunction()">
<!-- start: Header -->
<?php
$_SESSION['ReciptList'];
include "menu_f.php"; ?>
<!-- start: Header -->
<div class="container-fluid-full">
<div class="row-fluid">
<!-- start: Main Menu -->
<div id="sidebar-left" class="span2">
<div class="nav-collapse sidebar-nav">
<ul class="nav nav-tabs nav-stacked main-menu">
<li><a href="dashboard.php"><i class="icon-bar-chart"></i><span class="hidden-tablet"> Dashboard</span></a></li>
<?php include "menu.php"; ?>
</ul>
</div>
</div>
<!-- end: Main Menu -->
<noscript>
<div class="alert alert-block span10">
<h4 class="alert-heading">Warning!</h4>
<p>You need to have <a href="http://en.wikipedia.org/wiki/JavaScript" target="_blank">JavaScript</a> enabled to use this site.</p>
</div>
</noscript>
<!-- start: Content -->
<div id="content" class="span10">
<ul class="breadcrumb">
<li>
<i class="icon-home"></i>
<a href="dashboard.php">Home</a>
<i class="icon-angle-right"></i>
</li>
<li><a href="#">Student View</a></li>
</ul>
<div class="box-content">
<div class="row-fluid sortable">
<div class="box span12">
<div class="box-header" data-original-title>
<h2><i class="halflings-icon white th"></i><span class="break"></span>Student Info. </h2>
<div class="box-icon">
</div>
</div>
<p align="center">Basic Information</p>
<div class="table-responsive" style="overflow-x:scroll;">
<table id="example" class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Class/Div</th>
<th>Gender</th>
<th>Register No.</th>
<th>Phone</th>
<th>Delete Student</th>
</tr>
</thead>
<?php
$res1=mysqli_fetch_array($sql1);
?>
<tbody>
<td><?php echo "$res1[Name]";?> </td>
<td><?php echo "$res1[Class]"."/"."$res1[Division]";?> </td>
<td><?php echo "$res1[Gender]";?> </td>
<td><?php echo "$res1[Reg_No]";?> </td>
<td><?php echo "$res1[Phone]";?> </td>
<td>
<a class="btn btn-danger btnDeleteStud" data-id="<?php echo $key; ?>" data-name="<?php echo $res1['Name']; ?>">
<i class="halflings-icon white trash"></i>
</a>
</td>
</tbody>
</table>
</div>
<p align="center">Applied Fees Codes</p>
<div class="table-responsive" style="overflow-x:scroll;">
<table id="example" class="table table-striped table-bordered">
<thead>
<tr>
<th>Applied Fees Codes</th>
<th>Total Amount</th>
<th>Paid</th>
<th> Balance</th>
</tr>
</thead>
<tbody>
<?php
while($res11=mysqli_fetch_array($sql2))
{
$res22=mysqli_query($con,"select SUM(`Total_Amount`),SUM(`Paid`),SUM(`Balance`) from `stud_basic2` where `Head_Id` = '$res11[Head_Id]' and `Stud_Id` = '$key'");
$res2=mysqli_fetch_array($res22);
$hres=mysqli_query($con,"select * from `head` where `Head_Id` = '$res11[Head_Id]'");
$hr=mysqli_fetch_array($hres);
?>
<tr>
<td><?php echo $hr["Name"];?></td>
<td><?php echo "$res2[0]";?></td>
<td><?php echo "$res2[1]";?></td>
<td><?php echo "$res2[2]";?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<p align="center">Payment Details</p>
<form action="#" target="_blank" name="frm" method="post">
<div class="table-responsive" style="overflow-x:scroll;">
<table id="example" class="table table-striped table-bordered">
<thead>
<tr>
<th>Date</th>
<th><input type="checkbox" id="select_all" checked/>Receipt Number</th>
<th>Fees Code</th>
<th>Fees Mode</th>
<th>Total</th>
<th>Delete / Edit</th>
</tr>
</thead>
<tbody>
<?php
while($res3=mysqli_fetch_array($sql3))
{
$hres=mysqli_query($con,"select * from `head` where `Head_Id` = '$res3[Head_Id]'");
$hr=mysqli_fetch_array($hres);
?>
<tr>
<td><?php echo "$res3[Paid_date]";?></td>
<td>
<input type="checkbox" name="chkReceiptId[]" value="<?php echo $res3['Fees_id'];?>" checked class="chk_receipt" />
<a href="<?php echo $SchoolRePrintFile; ?>?key=<?php echo $res3['Fees_id'];?>"><?php echo "$res3[Recipt_No]";?></a></td>
<td><?php echo "$hr[Name]";?></td>
<td><?php echo $res3['Mode']=="Cash" ? $res3['Mode'] : $res3['Mode']." (".$res3['DateNumber'].")"; ?></td>
<td><?php echo "$res3[Grand_Total]";?></td>
<td><a class="btn btn-danger btnDelete" data-sid="<?php echo $key; ?>" data-id="<?php echo $res3['Fees_id'];?>">
<i class="halflings-icon white trash"></i>
</a>
<a class="btn btn-info btnEditPaid" data-sid="<?php echo $key; ?>" data-id="<?php echo $res3['Fees_id'];?>" data-date="<?php echo $res3['Paid_date'];?>" data-recipt="<?php echo $res3['Recipt_No'];?>" data-counter="<?php echo $res3['ReciptCounter'];?>" data-mode="<?php echo $res3['Mode'];?>" data-modedetails="<?php echo $res3['DateNumber'];?>">
<i class="halflings-icon white edit"></i>
</a> </td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<div class="col-lg-4" style="margin-left:20px;">
<div class="form-group">
<label>Receipt Head</label>
<select name="ReceiptHead" required="required">
<?php
$qq=mysqli_query($con,"select * from Receipt_Head");
while($qq1=mysqli_fetch_array($qq))
{
?>
<option value="<?php echo $qq1['ID']; ?>"><?php echo $qq1['Section']; ?></option>
<?php
}
?>
</select>
</div>
</div>
<div class="col-lg-4" style="margin-left:20px;">
<div class="form-group">
<button class="btn btn-primary" name="btnviewreceipt" type="submit">Submit</button>
</div>
</div>
</form>
</div></div></div></div>
</div><!--/.fluid-container-->
<!-- end: Content -->
</div><!--/#content.span10-->
</div></div><!--/fluid-row-->
<div id="EditReceiptModel" class="modal fade hide" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<form action="stud_profile.php?key=<?php echo $_GET['key']; ?>" method="POST" name="frmedit">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Edit Receipt</h4>
</div>
<div class="modal-body">
<input type="hidden" name="hdStud_id" class="hdStud_id" />
<input type="hidden" name="hdFees_id" class="hdFees_id" />
<div class="form-group">
<label>Paid Date(YYYY-MM-DD)</label>
<input type="text" class="form-control paid_date" name="paid_date" />
</div>
<div class="form-group">
<label>Receipt Number</label>
<input type="text" class="form-control receipt_number" name="receipt_number" />
</div>
<div class="form-group">
<label>Counter(both are same)</label>
<input type="text" class="form-control receipt_counter" name="receipt_counter" />
</div>
<div class="form-group">
<label>Payment Mode</label>
<select name="paymentmode" class="form-control" id="paymentmode" onChange="onPaymentModeChange()" required="required">
<option value="Cash">Cash</option>
<option value="Cheque">Cheque</option>
<option value="DD">DD</option>
<option value="Challan">Challan (Paid)</option>
<option value="ChallanTP">Challan (To Pay)</option>
<option value="Online">Online</option>
</select>
</div>
<div class="form-group" id="paymentmode1">
<label>Alternative Receipt Number</label>
<input name="cash_details" class="form-control cash_details" placeholder="Receipt Number" type="text" />
</div>
<div class="form-group" id="paymentmode2">
<label>Challan Date/Number</label>
<input name="Challan_date_number" class="form-control Challan_date_number" placeholder="Challan Date/Number" type="text" />
</div>
<div class="form-group" id="paymentmode3">
<label>DD Date/Number</label>
<input name="DD_date_number" class="form-control DD_date_number" placeholder="DD Date/Number" type="text" />
</div>
<div class="form-group" id="paymentmode4">
<label>Cheque Date/Number</label>
<input name="Cheque_date_number" class="form-control Cheque_date_number" placeholder="Cheque Date/Number" type="text" />
</div>
<div class="form-group" id="paymentmode5">
<label>Transaction ID/Date</label>
<input name="transaction_id_date" class="form-control transaction_id_date" placeholder="Transaction ID/Date" type="text" />
</div>
</div>
<div class="modal-footer">
<button type="submit" name="btnEdit_receipt" class="btn btn-primary" >Submit</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</form>
</div>
</div>
<div class="clearfix"></div>
<footer>
<p>
<span style="text-align:left;float:left">© 2018 <a href="http://evisioninfotech.in" alt="Bootstrap_Metro_Dashboard">e vision infotech</a></span>
</p>
</footer>
<script>
</script>
<!-- end: JavaScript-->
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery-migrate-1.0.0.min.js"></script>
<script src="js/jquery-ui-1.10.0.custom.min.js"></script>
<script src="js/jquery.ui.touch-punch.js"></script>
<script src="js/modernizr.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.cookie.js"></script>
<script src='js/fullcalendar.min.js'></script>
<script src='js/jquery.dataTables.min.js'></script>
<script src="js/excanvas.js"></script>
<script src="js/jquery.flot.js"></script>
<script src="js/jquery.flot.pie.js"></script>
<script src="js/jquery.flot.stack.js"></script>
<script src="js/jquery.flot.resize.min.js"></script>
<script src="js/jquery.chosen.min.js"></script>
<script src="js/jquery.uniform.min.js"></script>
<script src="js/jquery.cleditor.min.js"></script>
<script src="js/jquery.noty.js"></script>
<script src="js/jquery.elfinder.min.js"></script>
<script src="js/jquery.raty.min.js"></script>
<script src="js/jquery.iphone.toggle.js"></script>
<script src="js/jquery.uploadify-3.1.min.js"></script>
<script src="js/jquery.gritter.min.js"></script>
<script src="js/jquery.imagesloaded.js"></script>
<script src="js/jquery.masonry.min.js"></script>
<script src="js/jquery.knob.modified.js"></script>
<script src="js/jquery.sparkline.min.js"></script>
<script src="js/counter.js"></script>
<script src="js/retina.js"></script>
<script src="js/custom.js"></script>
<?php if(isset($_SESSION['user'])) { ?>
<script>
$(".btnDelete").click(function(){
var Fees_id=$(this).data("id");
var Stud_id=$(this).data("sid");
if(confirm ("Are you sure delete Recipt ?"))
{
$.ajax({
url: 'Delete_Fees.php',
type: 'POST',
data: "Fees_id="+Fees_id,
success: function(response) {
//console.log(response);
window.location='stud_profile.php?key='+Stud_id;
}
});
}
});
$(".btnEditPaid").click(function(){
var PaidDate=$(this).data("date");
var Recipt=$(this).data("recipt");
var counter=$(this).data("counter");
var Stud_id=$(this).data("sid");
var Fees_id=$(this).data("id");
var Mode = $(this).data("mode");
var ModeDetails = $(this).data("modedetails");
$(".paid_date").val(PaidDate);
$(".receipt_number").val(Recipt);
$(".receipt_counter").val(counter);
$(".hdStud_id").val(Stud_id);
$(".hdFees_id").val(Fees_id);
$("#paymentmode").val(Mode);
$("#EditReceiptModel").modal("show");
onPaymentModeChange(ModeDetails);
});
</script>
<script>
$(".btnDeleteStud").click(function(){
var stud_id=$(this).data("id");
var stud_name=$(this).data("name");
if(confirm ("Are you sure delete "+stud_name+" student ?"))
{
$.ajax({
url: 'DeleteById.php',
type: 'POST',
data: "key="+stud_id,
success: function(response) {
//console.log(response==-909); return false;
if(response==-909)
{
alert("First will be receipt delete then delete student.");
return false;
}
else
{
window.location="Student_view.php";
}
}
});
}
});
function onPaymentModeChange(detailsVal = '')
{
$(".cash_details").val('');
$(".DD_date_number").val('');
$(".Challan_date_number").val('');
$(".transaction_id_date").val('');
$(".Cheque_date_number").val('');
var freq = document.getElementById("paymentmode").value;
console.log(freq);
if(freq == "Cash")
{
$(".cash_details").val(detailsVal);
document.getElementById("paymentmode1").style.display = "block";
document.getElementById("paymentmode2").style.display = "none";
document.getElementById("paymentmode3").style.display = "none";
document.getElementById("paymentmode4").style.display = "none";
document.getElementById("paymentmode5").style.display = "none";
}
else if(freq == "DD")
{
$(".DD_date_number").val(detailsVal);
document.getElementById("paymentmode3").style.display = "block";
document.getElementById("paymentmode1").style.display = "none";
document.getElementById("paymentmode2").style.display = "none";
document.getElementById("paymentmode4").style.display = "none";
document.getElementById("paymentmode5").style.display = "none";
}
else if(freq == "Challan" || freq == "ChallanTP")
{
$(".Challan_date_number").val(detailsVal);
document.getElementById("paymentmode2").style.display = "block";
document.getElementById("paymentmode1").style.display = "none";
document.getElementById("paymentmode3").style.display = "none";
document.getElementById("paymentmode4").style.display = "none";
document.getElementById("paymentmode5").style.display = "none";
}
else if(freq == "Online")
{
$(".transaction_id_date").val(detailsVal);
document.getElementById("paymentmode5").style.display = "block";
document.getElementById("paymentmode1").style.display = "none";
document.getElementById("paymentmode3").style.display = "none";
document.getElementById("paymentmode4").style.display = "none";
document.getElementById("paymentmode2").style.display = "none";
}
else if(freq == "Cheque")
{
$(".Cheque_date_number").val(detailsVal);
document.getElementById("paymentmode5").style.display = "none";
document.getElementById("paymentmode4").style.display = "block";
document.getElementById("paymentmode3").style.display = "none";
document.getElementById("paymentmode1").style.display = "none";
document.getElementById("paymentmode2").style.display = "none";
}
else
{
document.getElementById("paymentmode1").style.display = "none";
document.getElementById("paymentmode2").style.display = "none";
document.getElementById("paymentmode3").style.display = "none";
document.getElementById("paymentmode4").style.display = "none";
document.getElementById("paymentmode5").style.display = "none";
}
}
</script>
<?php } ?>
</body>
</html>
<?php
if(isset($_POST['btnviewreceipt']))
{
$ReceiptIds=0;
if(isset($_POST['chkReceiptId']))
{
$ReceiptIds=implode(',',$_POST['chkReceiptId']);
}
$_SESSION['sid_receipt']=$ReceiptIds;
$_SESSION['receipt_sid']=$_GET['key'];
$_SESSION['ReceiptHead']=$_POST['ReceiptHead'];
echo"<script>window.location='".$SchoolRePrintFile1."';</script>";
}
if(isset($_POST['btnEdit_receipt']))
{
$Stud_id=$_POST['hdStud_id'];
$Fees_id=$_POST['hdFees_id'];
$paid_date=$_POST['paid_date'];
$receipt_number=$_POST['receipt_number'];
$receipt_counter=$_POST['receipt_counter'];
$paymentmode=$_POST["paymentmode"];
$dn = '';
if($paymentmode == "Cash")
{
$dn = $_POST["cash_details"];
}
else if($paymentmode == "Online") {
$dn = $_POST["transaction_id_date"];
}
else if($paymentmode == "Cheque") {
$dn = $_POST["Cheque_date_number"];
}
else if($paymentmode == "DD") {
$dn = $_POST["DD_date_number"];
}
else if($paymentmode == "Challan" || $paymentmode == "ChallanTP") {
$dn = $_POST["Challan_date_number"];
}
$upd=mysqli_query($con,"update paid_fees set Recipt_No='$receipt_number',Recp_Book_No='$receipt_number',Paid_date='$paid_date',ReciptCounter=$receipt_counter,Recp_Book_Counter=$receipt_counter, Mode='$paymentmode', DateNumber='$dn' where Stud_id=$Stud_id and Fees_id=$Fees_id");
if($upd)
{
echo"<script>alert('Receipt has been updated...'); window.location='stud_profile.php?key=".$Stud_id."';</script>";
}
else
{
echo"<script>alert('Unable to update Receipt...'); window.location='stud_profile.php?key=".$Stud_id."';</script>";
}
}
?>
<script>
$("#select_all").change(function(){
var status = $(this).prop("checked");
$('.chk_receipt').each(function(){
$(this).prop("checked",status);
if(status)
{
$(this).parents("span").addClass("checked");
}
else
{
$(this).parents("span").removeClass("checked");
}
});
});
$('.chk_receipt').change(function(){
if($(this).prop("checked") == false){
$("#select_all").prop("checked",false);
$("#select_all").parents("span").removeClass("checked");
}
if ($('.chk_receipt:checked').length ==$('.chk_receipt').length ){
$("#select_all").prop("checked",true);
$("#select_all").parents("span").addClass("checked");
}
});
</script>