MMCT TEAM
Server IP : 2a02:4780:11:1359:0:1d43:a566:2  /  Your IP : 216.73.216.31
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/code/img/../../mjcacademy/app/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u490972518/domains/ppschool.org.in/public_html/code/img/../../mjcacademy/app/app_fees.php
<?php
	include('php-includes/connect.php');
include('php-includes/check-login.php');
 $userid = $_SESSION['userid'];
$search = $userid;

	$sel4="select * from  registration where application='$userid'  order by id desc";
	$res4=mysqli_query($con,$sel4);
	
	
	
	$sel41="select * from  studentfees where search='$userid' and year='$session'  ";
	$res41=mysqli_query($con,$sel41);
	
	$rowt1=mysqli_fetch_array($rest1,MYSQLI_BOTH);
	
	
	$sel411="select * from  fees_paid where sch='$search' and session='$session' and status='' order by id desc  ";
	$res411=mysqli_query($con,$sel411);
	
	$row411=mysqli_fetch_array($res411,MYSQLI_BOTH);
?>


<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Panel </title>

  <!-- Google Font: Source Sans Pro -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  <!-- Font Awesome Icons -->
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css">
  <!-- overlayScrollbars -->
  <link rel="stylesheet" href="plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/adminlte.min.css">
</head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/croppie/2.6.5/croppie.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/croppie/2.6.5/croppie.min.css" />
<body class="hold-transition dark-mode sidebar-mini layout-fixed layout-navbar-fixed layout-footer-fixed">
<div class="wrapper">

  <style>
 body {
  padding: 0;
  margin: 0;
  font-family: 'Lato', sans-serif;
  color: #000;
}

.student-profile .card {
  border-radius: 10px;
}

.student-profile .card .card-header .profile_img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  margin: 10px auto;
  border: 10px solid #ccc;
  border-radius: 50%;
}

.student-profile .card h3 {
  font-size: 20px;
  font-weight: 700;
}

.student-profile .card p {
  font-size: 16px;
  color: white;
}

.student-profile .table th,
.student-profile .table td {
  font-size: 14px;
  padding: 5px 10px;
  color: white;
}
  </style>

  <!-- Navbar -->
 <?php include('link/menu.php')?>
  <!-- /.navbar -->

  

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    
    <!-- /.content-header -->

    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
       <!-- Student Profile -->
<div class="student-profile py-4">
  <div class="container">
    <div class="row">
      <div class="col-lg-4">
        <div class="card shadow-sm">
          <div class="card-header bg-transparent text-center">
            <img class="profile_img" src="../code/img/<?php echo $rowt['picture'] ?>" alt="">	
            <h3><?php echo $rowt['name']?></h3>
          </div>
          <div class="card-body">
            <p class="mb-0"><strong class="pr-1">Student ID:</strong><?php echo $rowt['application']?></p>
            <p class="mb-0"><strong class="pr-1">Class:</strong><?php echo $rowt['subject']?></p>
            <p class="mb-0"><strong class="pr-1">Section:</strong><?php echo $rowt['section']?></p>
          </div>
        </div>
      </div>
      <div class="col-lg-8">
        <div class="card shadow-sm">
          <div class="card-header bg-transparent border-0">
            <h3 class="mb-0"><i class="far fa-clone pr-1"></i>Fees Records</h3>
          </div>
          <div class="card-body pt-0">
            <table class="table table-bordered">
              <tr style='background-color:#763716'>
                <th width="30%">Records</th>
                <td width="2%">:</td>
                <td>Paid</td>
                <td>Date</td>
                <td>Dues</td>
              </tr>
			  <?php 
			  $t_p=0;
$sel2="select * from  fees_paid where sch='$search' and session='$session' and status=''";
$res2=mysqli_query($conn,$sel2);
while($row2=mysqli_fetch_array($res2,MYSQLI_BOTH))
{
	$tot=$row2['total'];
	$paid13=$row2['paid'];
	
	$remain12=$row2['remain'];
	$sum=$tot+$sum;
	$sum1=$paid13+$sum1;
	$remain1=$remain12+$remain1;
	$tags = explode(',',$row2['month']);
	$m='';
foreach($tags as $key) {    
     $key;    
	
	$sel4="select * from  plan where id ='$key'";
$res4=mysqli_query($conn,$sel4);
$row4=mysqli_fetch_array($res4,MYSQLI_BOTH);
$m1=$row4['month'];
$m=$m1.','.$m;
} ?> <tr>
                <th width="30%"><?php echo $m;?></th>
                <td width="2%">:</td>
                <td><?php echo $row2['paid'];?></td>
				<td><?php $daten=$row2['date'];
echo $date1=date("d-m-Y",strtotime($daten));  ?></td>
				  <td>--</td>
              </tr>
			  <?php 
			  
			  $t_p=$t_p+$row2['paid'];
			  
			  }?>
          <tr style='background-color:#763716;font-weight:bold'>
                <th width="30%">Total</th>
                <td width="2%">:</td>
                <td><?php echo $t_p?></td>
                <td></td>
				<td><?php echo $row411['remain']; ?></td>
              </tr>
			  
            </table>
          </div>
		  </div>
		  
		  <?php
	
	  $month1=date('m');
	  	
	  if($month1=='4' or $month1=='5')
	  {
		 $month=3; 
	  }
	   if($month1=='6' or $month1=='7')
	  {
		 $month=4; 
	  }
	   if($month1=='8' )
	  {
		 $month=5; 
	  }
	   if($month1=='9')
	  {
		  $month=6; 
	  }
	   if($month1=='10')
	  {
		 $month=7; 
	  }
	 if($month1=='11')
	  {
		 $month=8; 
	  }
	   if($month1=='12' or $month1=='1')
	  {
		 $month=9; 
	  }
	   if($month1=='2' or $month1=='3')
	  {
		 $month=10; 
	  }
	   
	// $monthNum  = 3;
$sel215="select * from plan where id='$month1' ";
	$res215=mysqli_query($conn,$sel215);
	 $row45=mysqli_fetch_array($res215,MYSQLI_BOTH);

    $sel1="select * from registration where session='$session' and application='$search'  order by id asc ";

  
	$res1=mysqli_query($conn,$sel1);
?>
	 
<style>
    
  td{font-size:12px}  
    
</style>


<tbody>		
  <?php
   $sel24="select * from  session order by id desc limit 1,1";
	$res24=mysqli_query($conn,$sel24);
	$row24=mysqli_fetch_array($res24,MYSQLI_BOTH);
	 $session_old=$row24['session'];
	 
  $s=1;
  $toamount=0;
  $re_fee1=0;
  $re_van1=0;
  $re_dues=0;
  $re_remain=0;
  $re_exam=0;
  $total1=0;
  $van_fee1=0;
  $remain1=0;
  $tpaid1=0;
  $comp_fee_c1=0;
  $free1=0;
  $total_fee=0;
  $total_conv=0;
  $total=0;
  $re1=0;
 $late_total=0;
 $total_k=0;
$row=mysqli_fetch_array($res1,MYSQLI_BOTH);
  
  $app=$row['application'];
  $application=$row['application'];
  $code=$row['code'];
  
  $subject=$row['subject'];
   $class=$row['subject'];
 
  ////////////for month show///////////
  	  //echo $conc;
	  
	   $sel248="select * from registration where session='$old_session' and application='$app' and status='' ";
	$res248=mysqli_query($conn,$sel248);
	/////for fees paid 
	$row248=mysqli_fetch_array($res248,MYSQLI_BOTH);
	
  $sel21="select * from plan where id<='$month'  ";
	$res21=mysqli_query($conn,$sel21);
	/////for fees paid 
	$mk=0;
	$fees=0;$s=0;
	$con_count=0;
	$r=1;
	$n='';
	$t1=0;
	 $m_name='';
	 $m1=array();

	while($row21=mysqli_fetch_array($res21,MYSQLI_BOTH))
	{
		 
		 $p_order= $row21['p_order'];
		 
		$m= $row21['id'];
		$sel244="select * from fees where session='$session' and class='$class' and month='$m'  ";
	$res244=mysqli_query($conn,$sel244);
	/////for fees paid 
	$row2=mysqli_fetch_array($res244,MYSQLI_BOTH);
	
		 $sel24="select * from fees_data where session='$session' and app='$app' and month_name='$m' and status='Yes'  ";
	$res24=mysqli_query($conn,$sel24);
	/////for fees paid 
	$row24=mysqli_fetch_array($res24,MYSQLI_BOTH);
	
	if(!$row24)
	{
	   if($row21['id']>2) {$month12=array_push($m1,$m);};
		if($m!='2')
		{
					$m_name=$row21['month'].','.$m_name;
		}
		//echo $m;
        if($m==1)
        {
            if($row248)
            {
                $k1=0;
                $k2=$row2['fees'];;
            }
            else
            {
                $k1=$row2['exam'];
                $k2=$row2['fees'];
            }
        }
		
	//	echo '<br/>';
		$n=$m.','.$n;
		$con_count1=$row21['month_count'];
		$con_count=$con_count+$con_count1;
		$sel2="select * from fees where session='$session' and class='$class' and month='$m'   ";
	$res2=mysqli_query($conn,$sel2);
	/////for fees paid 
	//echo $m;
	// echo '<br/>';
	$row2=mysqli_fetch_array($res2,MYSQLI_BOTH);
	$mk1=$row2['exam']+$row2['fees'];
	$mk=$mk1+$mk;
	$sel23="select * from free where session='$session' and  sch='$app'  ";
	$res23=mysqli_query($conn,$sel23);
	/////for fees paid 
	$row23=mysqli_fetch_array($res23,MYSQLI_BOTH);
	$fix=$row23['fix'];
	$fee_free=$row23['fee'];
	$conv_free=$code;
	
	if($fix>0)
	{
	    $f_fix=$fix;
	}
	else
	{
	    $f_fix=0;
	}
	$f=$con_count*$f_fix;
	$t1=$mk-$f;
	if($t1>0){$t1=$t1;}else{$t1=0;}
	}
	else
	{
	//	echo 'No';
	}
		//echo $con_count;
		
	}
	///////////
 $conv_fees=$code*$con_count;
  
  //echo'<br/>';
 // echo $fees;
		


	$fees=$row2['fees'];
	/////
	///
	$application=$app;
	$sel241="select * from fees_paid where session='$session' and sch='$app'  and status='' order by id desc ";
	$res241=mysqli_query($conn,$sel241);
	/////for fees paid 
	$row241=mysqli_fetch_array($res241,MYSQLI_BOTH);
	$re=$row241['remain'];
	$all_fees=$t1;
	$to=$conv_fees+$all_fees+$re;
 //echo $conc;
	  $total_fee=$t1+$total_fee;
	  $total_conv=$conv_fees+$total_conv;
	$total=$to+$total;
	$re1=$re+$re1;
//////////
$class=$row['subject'];
$mn=min($m1);
$sel2482="select * from fees where session='$session' and month='$mn' and class='$class'  ";
	$res2482=mysqli_query($conn,$sel2482);
	/////for fees paid 
	$row2482=mysqli_fetch_array($res2482,MYSQLI_BOTH);
	$du_date=$row2482['date'];
	
	$now = time(); // or your date as well
$your_date = strtotime("$du_date");
$datediff = $now - $your_date;

$days= round($datediff / (60 * 60 * 24));
if($days>0){if($days>1000){$days= '0';}else{  $days=$days;}}else{$days=0;};

$late=5*$days;
$k=$to+$late;
	$total_k=$total_k+$k;
	$late_total=$late_total+$late;



		?>
		 
	
	

	
	<div class="card shadow-sm">
          <div class="card-header bg-transparent border-0">
            <h3 class="mb-0"><i class="far fa-clone pr-1"></i>Dues Fee Records<span style='font-size:25px;font-weight:bold;color:'>&#8594;</span></h3>
          </div>
          <div class="card-body pt-0">
            <table class="table table-bordered">
              <tr style='background-color:#765716'>
               
               
                <td> Fee Dues To  <span style='background-color:red'><?php echo date('M')?> </a></td>
                <td> Convience Dues To  <span style='background-color:red'><?php echo date('M')?></span></td>
                <td> Old Dues </td>
                <td> Late Charge </td>
                <td>Total Amount</td>
                
              </tr>
			  <tr>
                <th ><?php echo $all_fees?></th>
                <th ><?php echo $conv_fees?></th>
               
                <td><?php echo $re?></td>
                <td><?php echo $late?></td>
				<td><?php echo $to; ?></td>
				  
              </tr>
			  
         
			  
            </table>
          </div>
		  </div>
	
        </div>
      </div>
    </div>
  </div>
</div>

            <!-- /.info-box -->
          </div>
		  <style>
.button {
  border: none;
  color: white;
  padding: 16px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
}

.button1 {
  background-color: white; 
  color: black; 
  border: 2px solid #04AA6D;
}

.button1:hover {
  background-color: #04AA6D;
  color: white;
}

.button2 {
  background-color: white; 
  color: black; 
  border: 2px solid #008CBA;
}

.button2:hover {
  background-color: #008CBA;
  color: white;
}

</style>
		  
<center><a href='app.php'><button class="button button2">Click For Back</button></a></center>
          <!-- /.col -->
        </div>
        <!-- /.row -->

       
        <!-- /.row -->

        <!-- Main row -->
        <div class="row">
          <!-- Left col -->
          
  <!-- /.content-wrapper -->

  <!-- Control Sidebar -->

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

  <!-- Main Footer -->
  <?php include('link/footer.php');?>
</div>
<!-- ./wrapper -->

<!-- REQUIRED SCRIPTS -->
<?php include('link/jquery.php')?>
</body>
</html>

MMCT - 2023