|
Server IP : 2a02:4780:11:1359:0:1d43:a566:2 / Your IP : 216.73.216.60 Web Server : LiteSpeed System : Linux in-mum-web1259.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64 User : u490972518 ( 490972518) PHP Version : 5.6.40 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : ON | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u490972518/domains/ppschool.org.in/public_html/mjcacademy/admin/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
include("../link/databaseconnection.php");
session_start();
$lg=$_SESSION['admin'];
if(!$lg)
{
header("location:../admin/index.php");
}
$sdate1=$_POST['sdate'];
//echo $sdate1;
$email=$_POST['email'];
$sdate=date("d-m-Y",strtotime($sdate1));
//echo $sdate;
$edate1=$_POST['edate'];
//echo $edate1;
$edate=date("d-m-Y",strtotime($edate1));
//echo $edate;
$sum=0;
$sum1=0;
$cons1=0;
$remain1=0;
if($email=='All')
{
$sel1="select * from fees_paid where date between '$sdate1' and '$edate1' and status='' order by id asc ";
}
else
{
$sel1="select * from fees_paid where date between '$sdate1' and '$edate1' and status='' and email='$email' order by id asc ";
}
$res1=mysqli_query($conn,$sel1);
while($row1=mysqli_fetch_array($res1,MYSQLI_BOTH))
{
$tot=$row1['total'];
$con=$row1['cons'];
$paid=$row1['paid'];
$remain12=$row1['remain'];
//$sum=$tot+$sum;
$sum1=$paid+$sum1;
$cons1=$con+$cons1;
}
?>
<?php
$date=date("d/m/Y");
date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");
$datetime=$date." ".$time;
//echo"$app1";
?>
<html>
<head>
<style>
#name2
{
font-weight:bold;
}
</style>
<script src="../js/jquery-3.2.1.min.js"></script> <!--jquery-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#print").click(function(){
$("#pay").css("visibility","hidden");
$("#back").css("visibility","hidden");
$("#print").css("visibility","hidden");
window.print();
});
$("#back").click(function(){
window.location.href='student_showfees.php';
});
});
</script>
<link href="css/student_print.css" rel="stylesheet" type="text/css">
</head>
<body>
<table border="1px" width="100%" cellspacing="0">
<caption style="text-align:center;font-size:25px;font-weight:bold">FEE RECORD DATE WISE </caption>
<tr>
<td style="font-weight:bold;"> Start Date</td><td style="text-align:center;font-weight:bold"><?php echo $sdate;?></td><td style="font-weight:bold"> End Date</td><td style="text-align:center;font-weight:bold"><?php echo $edate;?></td>
</tr>
<tr align="center">
<td><span id="name2">Sr.No.</span></td>
<td><span id="name2">Paid</span></td>
<td><span id="name2">Cons</span></td>
<td><span id="name2">Date</span></td>
</tr><?php
// Declare two dates
$Date1 = '01-10-2010';
$Date2 = '05-10-2010';
// Declare an empty array
$array = array();
// Use strtotime function
$Variable1 = strtotime($sdate1);
$Variable2 = strtotime($edate1);
// Use for loop to store dates into array
// 86400 sec = 24 hrs = 60*60*24 = 1 day
$sum=0;
$sum1=0;
$cons1=0;
$remain1=0;
if($email=='All')
{
$sel1="select * from fees_paid where date between '$sdate1' and '$edate1' and status='' order by id asc ";
}
else
{
$sel1="select * from fees_paid where date between '$sdate1' and '$edate1' and status='' and email='$email' order by id asc ";
}
$res1=mysqli_query($conn,$sel1);
while($row1=mysqli_fetch_array($res1,MYSQLI_BOTH))
{
$tot=$row1['total'];
$con=$row1['cons'];
$paid=$row1['paid'];
$remain12=$row1['remain'];
//$sum=$tot+$sum;
$sum1=$paid+$sum1;
$cons1=$con+$cons1;
}
$r=1;
$total=0;
$tcons=0;
for ($currentDate = $Variable1; $currentDate <= $Variable2;
$currentDate += (86400)) {
$Store = date('Y-m-d', $currentDate);
//$array[] = $Store;
$date13=$Store;
//echo $date13;
$sel12="select * from fees_paid where date = '$date13' and status='' ";
$res12=mysqli_query($conn,$sel12);
$tot=0;
$conto=0;
$cash=0;
$upi=0;
$bank=0;
$check=0;
while($row12=mysqli_fetch_array($res12,MYSQLI_BOTH))
{
$paid12=$row12['paid'];
$con12=$row12['cons'];
//echo $paid12;
//echo '<br/>';
$tot=$tot+$paid12;
$conto=$conto+$con12;
$total=$total+$tot;
$tcons=$tcons+$conto;
//echo '<br/>';
//echo $tot;
if($row1['mode']=='Cash')
{
$cash=$cash+$paid;
}
if($row12['mode']=='UPI')
{
$upi=$upi+$paid;
}
if($row12['mode']=='BANK')
{
$bank=$bank+$paid;
}
if($row12['mode']=='CHECK')
{
$check=$check+$paid;
}
}
?>
<tr align="center">
<td><span id="name3"><?php echo $r++;?></span></td>
<td><span id="name3"><?php echo $tot;?></span></td>
<td><span id="name3"><?php echo $conto;?></span></td>
<td><span id="name3"><?php echo $date13;?></span></td>
</tr>
<?php
}
// Display the dates in array format
//print_r($array);
?>
<tr align="center">
<td><span id="name3" STYLE="COLOR:GREEN;font-weight:bold">TOTAL</span></td>
<td><span id="name3"STYLE="COLOR:red;font-weight:bold"><?php echo $sum1;?></span></td>
<td><span id="name3"STYLE="COLOR:blue;font-weight:bold"><?php echo $cons1;?></span></td>
<td></td>
</tr>
</table>
(Amount of Email Id-<span style='color:red'><?php echo $email?></span>)
<button onclick="window.print()">Print this page</button>
</body>
</html>