<?php include "header_with_out_nav.php"; 

if($login_type!=''){

echo $pay_date=$_GET['pay_date'];

echo $code=$_GET['code'];

echo $college_type=$_GET['college_type'];

echo $sv=$_GET['sv'];

echo $sem_yer=$_GET['sem_yer'];

?>

</Br></Br></Br></Br>

<table width="100%" border="1" cellspacing="2" cellpadding="2" class="table table-bordered table-striped">

  <tr>

    <td >&nbsp;</td>

    <td >&nbsp;</td>

    <td >&nbsp;</td>

    <td >&nbsp;</td>

    <td >&nbsp;</td>

    <td >&nbsp;</td>

    <td >&nbsp;</td>

    <td >&nbsp;</td>

    <td >&nbsp;</td>

    <td >&nbsp;</td>

    <td colspan="7" ><strong>Pay Fees Details</strong></td>

    <td colspan="7" >&nbsp;</td>

    <td >&nbsp;</td>
  </tr>

  <tr>

    <td ><span class="style3 style1">S.No.</span></td>

    <td ><span class="style3 style1">F.No.</span></td>

    <td >R.No.</td>

    <td ><span class="style3 style1">Pay Date</span></td>

    <td ><span class="style3 style1">Course Type</span></td>

    <td ><span class="style3 style1">Course</span></td>

    <td ><span class="style3 style1">Year</span></td>

    <td ><span class="style3 style1">Student Name</span></td>

    <td ><span class="style3 style1">Fathers Name</span></td>

    <td ><span class="style3 style1">Mothers Name</span></td>

    <td bgcolor="#FFFFFF" ><strong>Admission Fee</strong></td>

    <td bgcolor="#FFFFFF" ><strong>Practical Fee</strong></td>

    <td bgcolor="#FFFFFF" ><strong>Practical File Fee</strong></td>

    <td bgcolor="#FFFFFF" ><strong>UIN Fee</strong></td>

    <td bgcolor="#FFFFFF" ><strong>Other Fee</strong></td>

    <td bgcolor="#FFFFFF" ><strong>Other Fee - 2</strong></td>

    <td ><span class="style3 style1">Pay Fees</span></td>

    <td bgcolor="#FFFFFF" ><strong>Admission Fee</strong></td>

    <td bgcolor="#FFFFFF" ><strong>Practical Fee</strong></td>

    <td bgcolor="#FFFFFF" ><strong>Practical File Fee</strong></td>

    <td bgcolor="#FFFFFF" ><strong>UIN Fee</strong></td>

    <td bgcolor="#FFFFFF" ><strong>Other Fee</strong></td>

    <td bgcolor="#FFFFFF" ><strong>Other Fee - 2</strong></td>

    <td ><span class="style3 style1">Discount Amount</span></td>

    <td ><span class="style3 style1">Checked By</span></td>
  </tr>

  

    

     <?php

    if(($sv!="")&&($login_type=='admin')){

	 

$query = "SELECT * FROM pay_fees WHERE code='$code' and `college_type`='$college_type' and `sv`='$sv' and `sem_yer`='$sem_yer' and pay_date LIKE '%$pay_date%'  and pay_amount!='' and session='$session' and code='$code' order by id";

$numresults=mysql_query($query);

 $numrows=mysql_num_rows($numresults);

$result = mysql_query($query) or die("Couldn't execute query");

}elseif(($sv!="")&&($login_session!='admin')){

	 

$query = "SELECT * FROM pay_fees WHERE code='$code' and `college_type`='$college_type' and `sv`='$sv' and `sem_yer`='$sem_yer' and pay_date LIKE '%$pay_date%'  and pay_amount!='' and checked_by='$login_session' and session='$session' and code='$code' order by id";

$numresults=mysql_query($query);

 $numrows=mysql_num_rows($numresults);

$result = mysql_query($query) or die("Couldn't execute query");

}elseif($login_type=='admin'){

$query = "SELECT * FROM pay_fees WHERE  pay_date LIKE '%$pay_date%'  and pay_amount!='' and session='$session' and code='$code' order by checked_by";

$numresults=mysql_query($query);

 $numrows=mysql_num_rows($numresults);

$result = mysql_query($query) or die("Couldn't execute query");

}elseif($login_type!='admin'){

$query = "SELECT * FROM pay_fees WHERE pay_date LIKE '%$pay_date%'  and pay_amount!='' and checked_by='$login_session' and session='$session' and code='$code' order by id";

$numresults=mysql_query($query);

$numrows=mysql_num_rows($numresults);

$result = mysql_query($query) or die("Couldn't execute query");

}

?>

<?php 

$counter = 1;?>

 <?php

while ( $a_row = mysql_fetch_array( $result ) )

 {

 $sv=$a_row[9];

 $code=$a_row[7];

  $payy1+=$a_row[13];

  $payy2+=$a_row[14];

  $payy3+=$a_row[15];

   $payy4+=$a_row[16];

   $payy5+=$a_row[17];

   $payy6+=$a_row[18];

   $duee1+=$a_row[19];

   $duee2+=$a_row[20];

   $duee3+=$a_row[21];

   $duee4+=$a_row[22];

   $duee5+=$a_row[23];

   $duee6+=$a_row[24];

 ?>

   <tr>

    <td><?php echo $counter; ?></td>

    <td><?php echo $a_row['roll_no']; ?></td>

    <td><?php echo $code.'-'.$a_row['id']; ?></td>

    <td><?php echo $a_row['pay_date']; ?></td>

    <td><?php echo $a_row['college_type']; ?></td>

    <td> <?php 

											$queryy = "SELECT * FROM course_name where college_id='$code' && id='$sv' and session='$session' and code='$code'";

$numresultsy=mysql_query($queryy);

$resulty= mysql_query($queryy) or die("Couldn't execute query");

 ?>

	                 

	                 <?php

while ( $a_roww = mysql_fetch_row( $resulty ) )

 {?>

	                 <?php 

				  

				 $course_namei=$a_row['sv'];

				//echo $course_namei;

				

				 $Course_id=$a_roww[0];

				 if($Course_id==$course_namei){

				  ?> 

	                 <?php echo $a_roww[1];?>

	                 <?php } ?> 

                     <?php } ?></td>

    <td><?php echo $a_row['sem_yer']; ?></td>

    <td><?php

	$roll_no=$a_row['roll_no'];

	$queryy = "SELECT * FROM class2 where fno='$roll_no' and session='$session' and code='$code'";

$numresultsy=mysql_query($queryy);

$resulty= mysql_query($queryy) or die("Couldn't execute query");

$a_rowop = mysql_fetch_array($resulty );

	

	 echo $a_rowop['StudentName']; ?></td>

    <td><?php echo $a_rowop['FatherName']; ?></td>

    <td><?php echo $a_rowop['MotherName']; ?></td>

    

    <td bgcolor="#FFFFFF"><?php echo $payy1;?></td>

    <td bgcolor="#FFFFFF"><?php echo $payy2;?></td>

    <td bgcolor="#FFFFFF"><?php echo $payy3;?></td>

    <td bgcolor="#FFFFFF"><?php echo $payy4;?></td>

    <td bgcolor="#FFFFFF"><?php echo $payy5;?></td>

    <td bgcolor="#FFFFFF"><?php echo $payy6;?></td>

    <td><div align="right"><?php echo $a_row['pay_amount']; ?></div></td>

    <td bgcolor="#FFFFFF"><?php echo $duee1;?></td>

    <td bgcolor="#FFFFFF"><?php echo $duee2;?></td>

    <td bgcolor="#FFFFFF"><?php echo $duee3;?></td>

    <td bgcolor="#FFFFFF"><?php echo $duee4;?></td>

    <td bgcolor="#FFFFFF"><?php echo $duee5;?></td>

    <td bgcolor="#FFFFFF"><?php echo $duee6;?></td>

    <td><div align="right"><?php echo $a_row['dis_amount']; ?></div></td>

    <td><?php echo $a_row['checked_by']; ?></td>
  </tr>

  

  

  <?php $counter++;

   $pay_amount2+=$a_row['pay_amount'];

  $dis_amount2+=$a_row['dis_amount'];

   $payy11+=$payy1;

  $payy22+=$payy2;

  $payy33+=$payy3;

   $payy44+=$payy4;

   $payy55+=$payy5;

   $payy66+=$payy6;

   $duee11+=$duee1;

   $duee22+=$duee2;

   $duee33+=$duee3;

   $duee44+=$duee4;

   $duee55+=$duee5;

   $duee66+=$duee6;

    $duee1=0;

    $duee2=0;

    $duee3=0;

    $duee4=0;

    $duee5=0;

    $duee6=0;

    $payy1=0;

    $payy2=0;

    $payy3=0;

    $payy4=0;

    $payy5=0;

    $payy6=0;

  } ?>

  <tr>

    <td>&nbsp;</td>

    <td>&nbsp;</td>

    <td>&nbsp;</td>

    <td>&nbsp;</td>

    <td>&nbsp;</td>

    <td>&nbsp;</td>

    <td>&nbsp;</td>

    <td>&nbsp;</td>

    <td>&nbsp;</td>

    <td>&nbsp;</td>

    <td bgcolor="#FFFF00"><?php echo $payy11;?></td>

    <td bgcolor="#FFFF00"><?php echo $payy22; ?></td>

    <td bgcolor="#FFFF00"><?php echo $payy33;?></td>

    <td bgcolor="#FFFF00"><?php echo $payy44;?></td>

    <td bgcolor="#FFFF00"><?php echo $payy55;?></td>

    <td bgcolor="#FFFF00"><?php echo $payy66;?></td>

    <td><div align="right"><strong><?php echo $pay_amount2; ?></strong></div></td>

    <td bgcolor="#FFFF00"><?php echo $duee11;?></td>

    <td bgcolor="#FFFF00"><?php echo $duee22;?></td>

    <td bgcolor="#FFFF00"><?php echo $duee33;?></td>

    <td bgcolor="#FFFF00"><?php echo $duee44;?></td>

    <td bgcolor="#FFFF00"><?php echo $duee55;?></td>

    <td bgcolor="#FFFF00"><?php echo $duee66;?></td>

    <td><div align="right"><strong><?php echo $dis_amount2; ?></strong></div></td>

    <td>&nbsp;</td>
  </tr>
</table>







<?php  }

include "footer.php"; ?>