<?php session_start(); 
if($_SESSION["username"]=="")
{
 	echo "You are not Logged in Please <a href='signin.php'>Sign in </a> First ";
}
elseif($_SESSION["usertype"]=="Parents")
{
 	echo "You are not Authorized This Page <a href='parents.php'>Back </a> ";
}
elseif($_SESSION["usertype"]=="Teacher")
{
 	echo "You are not Authorized This Page <a href='admission_form_raheem.php'>Back </a> ";
}
elseif($_SESSION["usertype"]=="User")
{
 	echo "You are not Authorized This Page <a href='admission_form_raheem.php'>Back </a> ";
}
elseif($_SESSION["usertype"]=="Sub User")
{
 	echo "You are not Authorized This Page <a href='admission_form_raheem.php'>Back </a> ";
}
else
{
?>
<HTML>
<HEAD>
<TITLE>MIND TECH SOLUTION</TITLE>
<link rel="stylesheet" type="text/css" href="ddlevelsfiles/ddlevelsmenu-base.css" />
<link rel="stylesheet" type="text/css" href="ddlevelsfiles/ddlevelsmenu-topbar.css" />
<link rel="stylesheet" type="text/css" href="ddlevelsfiles/ddlevelsmenu-sidebar.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

<style type="text/css">
<!--
.style1 {font-weight: bold}
.style2 {color: #FFFFFF}
.style3 {font-size: 36px}
.style4 {
	font-family: Tahoma;
	font-size: 12px;
	font-weight: bold;
}
-->
</style>
<script type="text/javascript" src="ddlevelsfiles/ddlevelsmenu.js">

/***********************************************
* All Levels Navigational Menu- (c) Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<!-- ImageReady Slices (home final.psd) -->
<TABLE WIDTH=1000 BORDER=0 CELLPADDING=0 CELLSPACING=0 align=center>
  <TR>
    <TD COLSPAN=3 bgcolor="#2365ED"><div align="center"><img src="logo copy.jpg" width="134" height="130"></div></TD>
    <TD COLSPAN=9 bgcolor="#2365ED"><table width="561" border="0" align="left">
	
      <tr>
        <td width="555" height="123" align="center" valign="middle"><p align="center" class="style28"><span class="style37 style3"><strong><h1><font face="Palatino Linotype" color="#FFFFFF"><? echo "" . $_SESSION["userid"]; ?></font></h1></strong></span></p></td>
      </tr>
    </table></TD>
    <TD COLSPAN=2><a href="http://www.facebook.com"></a></TD>
    <TD bgcolor="#2365ED"><a href="signin.php">Signout</a><a href="http://www.twitter.com"></a></TD>
    <TD><a href="http://www.youtube.com"></a></TD>
  </TR>
  <TR>
    <TD COLSPAN=16 bgcolor="#2365ED"><div id="ddtopmenubar" class="mattblackmenu">
<?php include("includes/menu.php") ?></TD>
  </TR>
  <TR>
    <TD COLSPAN=16 align=center></TD>
  </TR>
  <TR>
    <TD COLSPAN=16 bgcolor="#2365ED">&nbsp;</TD>
  </TR>
  <TR>
    <TD height="26" COLSPAN=16 bgcolor="#000045"><p align="center" class="style36 style2"><strong> DAILY FEE COLLECTION REPORT </strong></p></TD>
  </TR>
<TR>
    <TD height="26" COLSPAN=16><h1 align="center">Allied School Classic Campus</h1></TD>
  </TR>
<?php
include 'dbc.php';


$userid=$_SESSION["userid"];
$from_date=$_POST["from_date"];
$to_date=$_POST["to_date"];
$tstd=0;
$today=date("d-m-Y");
 
          

$sql = "select * from rec_fee where date between '$from_date' and '$to_date' and user_id='Allied School Classic Campus' order by date,rec_no";
$rec_fee=mysql_query($sql) or die("Error : " . mysql_error());
   
echo "<table border=1 width=78% align=center bgcolor=#FFFF66>";
echo "<tr>";
echo "<th bgcolor=yellow> Challan No </th>";
echo "<th bgcolor=yellow> Receipt No </th>";
echo "<th bgcolor=yellow> Date </th>";
echo "<th bgcolor=yellow> Admission No </th>";
echo "<th bgcolor=yellow> Student Name </th>";
echo "<th bgcolor=yellow> Class Name </th>";
echo "<th bgcolor=yellow> Month Name </th>";
echo "<th bgcolor=yellow> Total Payable </th>";
echo "<th bgcolor=yellow> Fee Received </th>";
echo "<th bgcolor=yellow> Received In </th>";
echo "<th bgcolor=yellow> Balance </th>";
echo "<th bgcolor=yellow> Fine </th>";
echo "<th bgcolor=yellow> Id </th>";

echo "</tr>";
while($ppp=mysql_fetch_array($rec_fee))
{
    $id = $ppp['id'];	
   echo "<tr>";
   echo "<td width=20%>"  .$ppp["fine"] . "</td>" ;
   echo "<td width=20%>"  .$ppp["rec_no"] . "</td>" ;
   echo "<td width=20%>"  .$ppp["date"] . "</td>" ;
   echo "<td width=20%>"  .$ppp["std_rollno"] . "</td>" ;
   echo "<td width=15%>"  .$ppp["std_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp["class_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp["month_name"] . "</td>" ;
   echo "<td width=10%>"  .$ppp["total_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp["paid_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp["rt"] . "</td>" ;
   echo "<td width=20%>"  .$ppp["bal_fee"] . "</td>" ;
   echo "<td width=10%>"  .$ppp["stdfine"] . "</td>" ;
     echo "<td>" .$ppp['id'] . "</td>";
	 
	  
	   
	   echo"<td> <a href ='std_ledger2.php?id=$id'>Ledger</a>";
	  
   echo "</tr>";
  $amounts=$amounts + $ppp["paid_fee"];
   $fine=$fine + $ppp["stdfine"];
     $tstd=$tstd + 1;

 }
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl Fee Collection    :     " .$amounts . "</th>";
 echo "</tr>";
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Student    :     " .$tstd . "</th>";
 echo "</tr>";
  echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Fine    :     " .$fine . "</th>";
 echo "</tr>";
   echo "</table>";
   
   
   
   echo "<h1 align=center colspan=4>Allied School Salamat pura Campus </h1>";
   $sql1 = "select * from rec_fee where date between '$from_date' and '$to_date' and user_id='Allied School Salamat pura Campus' order by date,std_rollno";
$rec_fee1=mysql_query($sql1) or die("Error : " . mysql_error());
   
echo "<table border=1 width=78% align=center bgcolor=#FFFF66>";
echo "<tr>";
echo "<th bgcolor=yellow> Challan No </th>";
echo "<th bgcolor=yellow> Receipt No </th>";
echo "<th bgcolor=yellow> Date </th>";
echo "<th bgcolor=yellow> Admission No </th>";
echo "<th bgcolor=yellow> Student Name </th>";
echo "<th bgcolor=yellow> Class Name </th>";
echo "<th bgcolor=yellow> Month Name </th>";
echo "<th bgcolor=yellow> Total Payable </th>";
echo "<th bgcolor=yellow> Fee Received </th>";
echo "<th bgcolor=yellow> Received In </th>";
echo "<th bgcolor=yellow> Balance </th>";
echo "<th bgcolor=yellow> Fine </th>";
echo "<th bgcolor=yellow> Id </th>";

echo "</tr>";
while($ppp1=mysql_fetch_array($rec_fee1))
{
    $id = $ppp1['id'];	
   echo "<tr>";
   echo "<td width=20%>"  .$ppp1["fine"] . "</td>" ;
   echo "<td width=20%>"  .$ppp1["rec_no"] . "</td>" ;
   echo "<td width=20%>"  .$ppp1["date"] . "</td>" ;
   echo "<td width=20%>"  .$ppp1["std_rollno"] . "</td>" ;
   echo "<td width=15%>"  .$ppp1["std_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp1["class_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp1["month_name"] . "</td>" ;
   echo "<td width=10%>"  .$ppp1["total_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp1["paid_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp1["rt"] . "</td>" ;
   echo "<td width=20%>"  .$ppp1["bal_fee"] . "</td>" ;
   echo "<td width=10%>"  .$ppp1["stdfine"] . "</td>" ;
     echo "<td>" .$ppp1['id'] . "</td>";
	  
	 
	   
	   echo"<td> <a href ='std_ledger2.php?id=$id'>Ledger</a>";
	   
   echo "</tr>";
  $amounts1=$amounts1 + $ppp1["paid_fee"];
   $fine1=$fine1 + $ppp1["stdfine"];
     $tstd1=$tstd1 + 1;

 }
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl Fee Collection    :     " .$amounts1 . "</th>";
 echo "</tr>";
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Student    :     " .$tstd1 . "</th>";
 echo "</tr>";
  echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Fine    :     " .$fine1 . "</th>";
 echo "</tr>";
   echo "</table>";


echo "<h1 align=center colspan=4>Allied School Fatehghar Campus</h1>";
$sql2 = "select * from rec_fee where date between '$from_date' and '$to_date' and user_id='Allied School Fatehghar Campus' order by date,std_rollno";
$rec_fee2=mysql_query($sql2) or die("Error : " . mysql_error());
   
echo "<table border=1 width=78% align=center bgcolor=#FFFF66>";
echo "<tr>";
echo "<th bgcolor=yellow> Challan No </th>";
echo "<th bgcolor=yellow> Receipt No </th>";
echo "<th bgcolor=yellow> Date </th>";
echo "<th bgcolor=yellow> Admission No </th>";
echo "<th bgcolor=yellow> Student Name </th>";
echo "<th bgcolor=yellow> Class Name </th>";
echo "<th bgcolor=yellow> Month Name </th>";
echo "<th bgcolor=yellow> Total Payable </th>";
echo "<th bgcolor=yellow> Fee Received </th>";
echo "<th bgcolor=yellow> Received In </th>";
echo "<th bgcolor=yellow> Balance </th>";
echo "<th bgcolor=yellow> Fine </th>";
echo "<th bgcolor=yellow> Id </th>";

echo "</tr>";
while($ppp2=mysql_fetch_array($rec_fee2))
{
    $id = $ppp2['id'];	
   echo "<tr>";
   echo "<td width=20%>"  .$ppp2["fine"] . "</td>" ;
   echo "<td width=20%>"  .$ppp2["rec_no"] . "</td>" ;
   echo "<td width=20%>"  .$ppp2["date"] . "</td>" ;
   echo "<td width=20%>"  .$ppp2["std_rollno"] . "</td>" ;
   echo "<td width=15%>"  .$ppp2["std_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp2["class_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp2["month_name"] . "</td>" ;
   echo "<td width=10%>"  .$ppp2["total_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp2["paid_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp2["rt"] . "</td>" ;
   echo "<td width=20%>"  .$ppp2["bal_fee"] . "</td>" ;
   echo "<td width=10%>"  .$ppp2["stdfine"] . "</td>" ;
     echo "<td>" .$ppp2['id'] . "</td>";
	  
	   
	   
	   echo"<td> <a href ='std_ledger2.php?id=$id'>Ledger</a>";
	  
   echo "</tr>";
  $amounts2=$amounts2 + $ppp2["paid_fee"];
   $fine2=$fine2 + $ppp2["stdfine"];
     $tstd2=$tstd2 + 1;

 }
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl Fee Collection    :     " .$amounts2 . "</th>";
 echo "</tr>";
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Student    :     " .$tstd2 . "</th>";
 echo "</tr>";
  echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Fine    :     " .$fine2 . "</th>";
 echo "</tr>";
   echo "</table>";




echo "<h1 align=center colspan=4>Allied School Alwahid Campus</h1>";
$sql3 = "select * from rec_fee where date between '$from_date' and '$to_date' and user_id='Allied School Alwahid Campus' order by date,std_rollno";
$rec_fee3=mysql_query($sql3) or die("Error : " . mysql_error());
   
echo "<table border=1 width=78% align=center bgcolor=#FFFF66>";
echo "<tr>";
echo "<th bgcolor=yellow> Challan No </th>";
echo "<th bgcolor=yellow> Receipt No </th>";
echo "<th bgcolor=yellow> Date </th>";
echo "<th bgcolor=yellow> Admission No </th>";
echo "<th bgcolor=yellow> Student Name </th>";
echo "<th bgcolor=yellow> Class Name </th>";
echo "<th bgcolor=yellow> Month Name </th>";
echo "<th bgcolor=yellow> Total Payable </th>";
echo "<th bgcolor=yellow> Fee Received </th>";
echo "<th bgcolor=yellow> Received In </th>";
echo "<th bgcolor=yellow> Balance </th>";
echo "<th bgcolor=yellow> Fine </th>";
echo "<th bgcolor=yellow> Id </th>";

echo "</tr>";
while($ppp3=mysql_fetch_array($rec_fee3))
{
    $id = $ppp3['id'];	
   echo "<tr>";
   echo "<td width=20%>"  .$ppp3["fine"] . "</td>" ;
   echo "<td width=20%>"  .$ppp3["rec_no"] . "</td>" ;
   echo "<td width=20%>"  .$ppp3["date"] . "</td>" ;
   echo "<td width=20%>"  .$ppp3["std_rollno"] . "</td>" ;
   echo "<td width=15%>"  .$ppp3["std_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp3["class_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp3["month_name"] . "</td>" ;
   echo "<td width=10%>"  .$ppp3["total_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp3["paid_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp3["rt"] . "</td>" ;
   echo "<td width=20%>"  .$ppp3["bal_fee"] . "</td>" ;
   echo "<td width=10%>"  .$ppp3["stdfine"] . "</td>" ;
     echo "<td>" .$ppp3['id'] . "</td>";
	  
	   
	   
	   echo"<td> <a href ='std_ledger2.php?id=$id'>Ledger</a>";
	  
   echo "</tr>";
  $amounts3=$amounts3 + $ppp3["paid_fee"];
   $fine3=$fine3 + $ppp3["stdfine"];
     $tstd3=$tstd3 + 1;

 }
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl Fee Collection    :     " .$amounts3 . "</th>";
 echo "</tr>";
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Student    :     " .$tstd3 . "</th>";
 echo "</tr>";
  echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Fine    :     " .$fine3 . "</th>";
 echo "</tr>";
   echo "</table>";
   
   
   
   echo "<h1 align=center colspan=4>Allied School Park Veiw Campus</h1>";
$sql4 = "select * from rec_fee where date between '$from_date' and '$to_date' and user_id='Allied School Park Veiw Campus' order by date,std_rollno";
$rec_fee4=mysql_query($sql4) or die("Error : " . mysql_error());
   
echo "<table border=1 width=78% align=center bgcolor=#FFFF66>";
echo "<tr>";
echo "<th bgcolor=yellow> Challan No </th>";
echo "<th bgcolor=yellow> Receipt No </th>";
echo "<th bgcolor=yellow> Date </th>";
echo "<th bgcolor=yellow> Admission No </th>";
echo "<th bgcolor=yellow> Student Name </th>";
echo "<th bgcolor=yellow> Class Name </th>";
echo "<th bgcolor=yellow> Month Name </th>";
echo "<th bgcolor=yellow> Total Payable </th>";
echo "<th bgcolor=yellow> Fee Received </th>";
echo "<th bgcolor=yellow> Received In </th>";
echo "<th bgcolor=yellow> Balance </th>";
echo "<th bgcolor=yellow> Fine </th>";
echo "<th bgcolor=yellow> Id </th>";

echo "</tr>";
while($ppp4=mysql_fetch_array($rec_fee4))
{
    $id = $ppp4['id'];	
   echo "<tr>";
   echo "<td width=20%>"  .$ppp4["fine"] . "</td>" ;
   echo "<td width=20%>"  .$ppp4["rec_no"] . "</td>" ;
   echo "<td width=20%>"  .$ppp4["date"] . "</td>" ;
   echo "<td width=20%>"  .$ppp4["std_rollno"] . "</td>" ;
   echo "<td width=15%>"  .$ppp4["std_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp4["class_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp4["month_name"] . "</td>" ;
   echo "<td width=10%>"  .$ppp4["total_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp4["paid_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp4["rt"] . "</td>" ;
   echo "<td width=20%>"  .$ppp4["bal_fee"] . "</td>" ;
   echo "<td width=10%>"  .$ppp4["stdfine"] . "</td>" ;
     echo "<td>" .$ppp4['id'] . "</td>";
	  
	   
	   
	   echo"<td> <a href ='std_ledger2.php?id=$id'>Ledger</a>";
	  
   echo "</tr>";
  $amounts4=$amounts4 + $ppp4["paid_fee"];
   $fine4=$fine4 + $ppp4["stdfine"];
     $tstd4=$tstd4 + 1;

 }
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl Fee Collection    :     " .$amounts4 . "</th>";
 echo "</tr>";
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Student    :     " .$tstd4 . "</th>";
 echo "</tr>";
  echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Fine    :     " .$fine4 . "</th>";
 echo "</tr>";
   echo "</table>";
   
   
   
   echo "<h1 align=center colspan=4>Allied School Q Block Campus</h1>";
$sql5 = "select * from rec_fee where date between '$from_date' and '$to_date' and user_id='Allied School Q Block Campus' order by date,std_rollno";
$rec_fee5=mysql_query($sql5) or die("Error : " . mysql_error());
   
echo "<table border=1 width=78% align=center bgcolor=#FFFF66>";
echo "<tr>";
echo "<th bgcolor=yellow> Challan No </th>";
echo "<th bgcolor=yellow> Receipt No </th>";
echo "<th bgcolor=yellow> Date </th>";
echo "<th bgcolor=yellow> Admission No </th>";
echo "<th bgcolor=yellow> Student Name </th>";
echo "<th bgcolor=yellow> Class Name </th>";
echo "<th bgcolor=yellow> Month Name </th>";
echo "<th bgcolor=yellow> Total Payable </th>";
echo "<th bgcolor=yellow> Fee Received </th>";
echo "<th bgcolor=yellow> Received In </th>";
echo "<th bgcolor=yellow> Balance </th>";
echo "<th bgcolor=yellow> Fine </th>";
echo "<th bgcolor=yellow> Id </th>";

echo "</tr>";
while($ppp5=mysql_fetch_array($rec_fee5))
{
    $id = $ppp5['id'];	
   echo "<tr>";
   echo "<td width=20%>"  .$ppp5["fine"] . "</td>" ;
   echo "<td width=20%>"  .$ppp5["rec_no"] . "</td>" ;
   echo "<td width=20%>"  .$ppp5["date"] . "</td>" ;
   echo "<td width=20%>"  .$ppp5["std_rollno"] . "</td>" ;
   echo "<td width=15%>"  .$ppp5["std_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp5["class_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp5["month_name"] . "</td>" ;
   echo "<td width=10%>"  .$ppp5["total_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp5["paid_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp5["rt"] . "</td>" ;
   echo "<td width=20%>"  .$ppp5["bal_fee"] . "</td>" ;
   echo "<td width=10%>"  .$ppp5["stdfine"] . "</td>" ;
     echo "<td>" .$ppp5['id'] . "</td>";
	  
	   
	   
	   echo"<td> <a href ='std_ledger2.php?id=$id'>Ledger</a>";
	  
   echo "</tr>";
  $amounts5=$amounts5 + $ppp5["paid_fee"];
   $fine5=$fine5 + $ppp5["stdfine"];
     $tstd5=$tstd5 + 1;

 }
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl Fee Collection    :     " .$amounts5 . "</th>";
 echo "</tr>";
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Student    :     " .$tstd5 . "</th>";
 echo "</tr>";
  echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Fine    :     " .$fine5 . "</th>";
 echo "</tr>";
   echo "</table>";
   
   
   
   echo "<h1 align=center colspan=4>Allied School Defence Campus</h1>";
$sql6 = "select * from rec_fee where date between '$from_date' and '$to_date' and user_id='Allied School Defence Campus' order by date,std_rollno";
$rec_fee6=mysql_query($sql6) or die("Error : " . mysql_error());
   
echo "<table border=1 width=78% align=center bgcolor=#FFFF66>";
echo "<tr>";
echo "<th bgcolor=yellow> Challan No </th>";
echo "<th bgcolor=yellow> Receipt No </th>";
echo "<th bgcolor=yellow> Date </th>";
echo "<th bgcolor=yellow> Admission No </th>";
echo "<th bgcolor=yellow> Student Name </th>";
echo "<th bgcolor=yellow> Class Name </th>";
echo "<th bgcolor=yellow> Month Name </th>";
echo "<th bgcolor=yellow> Total Payable </th>";
echo "<th bgcolor=yellow> Fee Received </th>";
echo "<th bgcolor=yellow> Received In </th>";
echo "<th bgcolor=yellow> Balance </th>";
echo "<th bgcolor=yellow> Fine </th>";
echo "<th bgcolor=yellow> Id </th>";

echo "</tr>";
while($ppp6=mysql_fetch_array($rec_fee6))
{
    $id = $ppp6['id'];	
   echo "<tr>";
   echo "<td width=20%>"  .$ppp6["fine"] . "</td>" ;
   echo "<td width=20%>"  .$ppp6["rec_no"] . "</td>" ;
   echo "<td width=20%>"  .$ppp6["date"] . "</td>" ;
   echo "<td width=20%>"  .$ppp6["std_rollno"] . "</td>" ;
   echo "<td width=15%>"  .$ppp6["std_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp6["class_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp6["month_name"] . "</td>" ;
   echo "<td width=10%>"  .$ppp6["total_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp6["paid_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp6["rt"] . "</td>" ;
   echo "<td width=20%>"  .$ppp6["bal_fee"] . "</td>" ;
   echo "<td width=10%>"  .$ppp6["stdfine"] . "</td>" ;
     echo "<td>" .$ppp6['id'] . "</td>";
	  
	   
	   
	   echo"<td> <a href ='std_ledger2.php?id=$id'>Ledger</a>";
	  
   echo "</tr>";
  $amounts6=$amounts6 + $ppp6["paid_fee"];
   $fine6=$fine6 + $ppp6["stdfine"];
     $tstd6=$tstd6 + 1;

 }
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl Fee Collection    :     " .$amounts6 . "</th>";
 echo "</tr>";
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Student    :     " .$tstd6 . "</th>";
 echo "</tr>";
  echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Fine    :     " .$fine6 . "</th>";
 echo "</tr>";
   echo "</table>";
   
   
   
   
   echo "<h1 align=center colspan=4>Efa School Classic Campus</h1>";
$sql7 = "select * from rec_fee where date between '$from_date' and '$to_date' and user_id='Efa School Classic Campus' order by date,std_rollno";
$rec_fee7=mysql_query($sql7) or die("Error : " . mysql_error());
   
echo "<table border=1 width=78% align=center bgcolor=#FFFF66>";
echo "<tr>";
echo "<th bgcolor=yellow> Challan No </th>";
echo "<th bgcolor=yellow> Receipt No </th>";
echo "<th bgcolor=yellow> Date </th>";
echo "<th bgcolor=yellow> Admission No </th>";
echo "<th bgcolor=yellow> Student Name </th>";
echo "<th bgcolor=yellow> Class Name </th>";
echo "<th bgcolor=yellow> Month Name </th>";
echo "<th bgcolor=yellow> Total Payable </th>";
echo "<th bgcolor=yellow> Fee Received </th>";
echo "<th bgcolor=yellow> Received In </th>";
echo "<th bgcolor=yellow> Balance </th>";
echo "<th bgcolor=yellow> Fine </th>";
echo "<th bgcolor=yellow> Id </th>";

echo "</tr>";
while($ppp7=mysql_fetch_array($rec_fee7))
{
    $id = $ppp7['id'];	
   echo "<tr>";
   echo "<td width=20%>"  .$ppp7["fine"] . "</td>" ;
   echo "<td width=20%>"  .$ppp7["rec_no"] . "</td>" ;
   echo "<td width=20%>"  .$ppp7["date"] . "</td>" ;
   echo "<td width=20%>"  .$ppp7["std_rollno"] . "</td>" ;
   echo "<td width=15%>"  .$ppp7["std_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp7["class_name"] . "</td>" ;
   echo "<td width=15%>"  .$ppp7["month_name"] . "</td>" ;
   echo "<td width=10%>"  .$ppp7["total_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp7["paid_fee"] . "</td>" ;
   echo "<td width=20%>"  .$ppp7["rt"] . "</td>" ;
   echo "<td width=20%>"  .$ppp7["bal_fee"] . "</td>" ;
   echo "<td width=10%>"  .$ppp7["stdfine"] . "</td>" ;
     echo "<td>" .$ppp7['id'] . "</td>";
	  
	   
	   
	   echo"<td> <a href ='std_ledger2.php?id=$id'>Ledger</a>";
	  
   echo "</tr>";
  $amounts7=$amounts7 + $ppp7["paid_fee"];
   $fine7=$fine7 + $ppp7["stdfine"];
     $tstd7=$tstd7 + 1;

 }
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl Fee Collection    :     " .$amounts7 . "</th>";
 echo "</tr>";
 echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Student    :     " .$tstd7 . "</th>";
 echo "</tr>";
  echo "<tr>";
 echo "<th width=20% colspan=8>" ."Toatl  Fine    :     " .$fine7 . "</th>";
 echo "</tr>";
   echo "</table>";
?>
<table width="78%" align="center">
<tr>
  <td height="46" colspan="2" bgcolor="#010044">&nbsp;</td>
  <td width="580" rowspan="2" bgcolor="#010044">&nbsp;</td>
</tr>
      <tr>
        <td height="52" bgcolor="#010044">&nbsp;</td>
        <td bgcolor="#010044">&nbsp;</td>
      </tr>
</table>
</body>
</html>
<?php
}
?>