<?php
session_start();
include 'dbc.php';

$userid=$_SESSION["userid"];
$blnk=0;
$result = mysql_query("SELECT * FROM users WHERE userid  = '$userid'");
$test = mysql_fetch_array($result);
if (!$result) 
		{
		die("Error: Data not found..");
		}
				$accno=$test['accno'] ;
				$bankname=$test['address'] ;
				$bname=$test['bankname'] ;
				$cell=$test['cell'] ;
$id=$_POST["id"];
$today=date("d-m-Y");
$std_rollno=$_POST["std_rollno"];
$std_name=$_POST["std_name"];
$father_name=$_POST["father_name"];

$class_name=$_POST["class_name"];

$code=$_POST["code"];
$bal=$_POST["bal"];
$due_date=$_POST["due_date"];
$months=$_POST["months"];
$fine=$_POST["fine"];
$tbal=$bal + $fine;
   echo "<table border=1 width=33% align=left bgcolor=white>";
	?>
<tr>
<td align="center" colspan="4"><img src="logo1.jpg" /></td>

</tr>
<?php
	echo "<tr>";
	echo "<td colspan=4>";
	
	echo "<h1 align=center colspan=4>$userid </h1>";
	
	  echo "<h4 align=center colspan=4>$bankname </h4>";
	 echo "<h4 align=center colspan=4>$cell </h4>";
	 echo "</td>";
echo "</tr>";
 echo "<tr>";
  echo "<th bgcolor=white align=left > Issue Date </th>";
  echo "<td>"  .$date . "</td>" ;
  echo "<th bgcolor=white align=center > Slip No </th>";
  echo "<td>"  .$id . "</td>" ;
  echo "</tr>";

echo "<tr>";
echo "<th bgcolor=white align=left  width=30% >Bank / Branch </th>";
echo "<td bgcolor=white align=left colspan=3 width=70%>$bname </td>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left width=30% >Acc# </th>";
echo "<td bgcolor=white align=left colspan=3 width=70%>$accno </td>";
echo "</tr>";
  




echo "<tr>";
 echo "<th bgcolor=white align=left>Student Name </th>";
  echo "<th colspan=3>"  .$std_name . "</th>" ;
  
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left>Father Name </th>";
  echo "<th colspan=3>"  .$father_name . "</th>" ;
  
 echo "</tr>";
echo "<tr>";
  echo "<th bgcolor=white align=left> Student ID </th>";

 echo "<th colspan=3>"  .$std_rollno . "</th>" ;
  echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=left> Class  </th>";
 echo "<td colspan=3 align=center>"  .$class_name . "</td>" ;
  echo "</tr>";
 

 echo "<tr>";
 echo "<th bgcolor=white align=left width=30%> Fee Period </th>";
  echo "<td width=10% colspan=3>"  .$months . "</td>" ;
 
  

echo "</tr>";
echo "<tr>";
 echo "<th bgcolor=white align=left width=30%> Due Date </th>";
  echo "<td width=10% colspan=3>"  .$due_date . "</td>" ;
 
  

echo "</tr>";
echo "</tr>";
echo "<tr>";
 echo "<th bgcolor=white align=center colspan=3 > Particulars </th>";
echo "<th bgcolor=white align=center > Rs. </th>";


echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3 > Tuition Fee </th>";
 echo "<td width=40%>" ."Rs." .$bal .".00". "</td>" ;
 
 echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Late Payment Fine </th>";
 echo "<td width=40%>" ."Rs." .$fine . ".00"."</td>" ;
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=3> With Due Date </th>";
  echo "<td width=40%>" ."Rs." .$tbal . ".00"."</td>" ;
 echo "</tr>";
 

 
 
  
 
 
  echo "<tr>";
echo "<td bgcolor=white align=left colspan=4><b> Dear Parents,<br>A Fine of Rs. 20 per day will be charged after the Due Date. Student will not be allowed to attend the classes, if the fee is not deposited within 2 weeks of the due date. Due date is applicable only for the current Fee bill. In case of Balance pay it immediately.</b>

 </td>";
 echo "</tr>";
 
  echo "<tr>";
echo "<th bgcolor=white align=center colspan=4> School Copy </th>";
 echo "</tr>";

echo "</table>";


echo "<table border=1 width=33% align=left bgcolor=white>";
?>
<tr>
<td align="center" colspan="4"><img src="logo1.jpg" /></td>

</tr>
<?php
	echo "<tr>";
	echo "<td colspan=4>";
	
	echo "<h1 align=center colspan=4>$userid </h1>";
	
	  echo "<h4 align=center colspan=4>$bankname </h4>";
	 echo "<h4 align=center colspan=4>$cell </h4>";
	 echo "</td>";
echo "</tr>";
 echo "<tr>";
  echo "<th bgcolor=white align=left > Issue Date </th>";
  echo "<td>"  .$date . "</td>" ;
  echo "<th bgcolor=white align=center > Slip No </th>";
  echo "<td>"  .$id . "</td>" ;
  echo "</tr>";

echo "<tr>";
echo "<th bgcolor=white align=left  width=30% >Bank / Branch </th>";
echo "<td bgcolor=white align=left colspan=3 width=70%>$bname </td>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left width=30% >Acc# </th>";
echo "<td bgcolor=white align=left colspan=3 width=70%>$accno </td>";
echo "</tr>";
  




echo "<tr>";
 echo "<th bgcolor=white align=left>Student Name </th>";
  echo "<th colspan=3>"  .$std_name . "</th>" ;
  
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left>Father Name </th>";
  echo "<th colspan=3>"  .$father_name . "</th>" ;
  
 echo "</tr>";
echo "<tr>";
  echo "<th bgcolor=white align=left> Student ID </th>";

 echo "<th colspan=3>"  .$std_rollno . "</th>" ;
  echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=left> Class  </th>";
 echo "<td colspan=3 align=center>"  .$class_name . "</td>" ;
  echo "</tr>";
 

 echo "<tr>";
 echo "<th bgcolor=white align=left width=30%> Fee Period </th>";
  echo "<td width=10% colspan=3>"  .$months . "</td>" ;
 
  

echo "</tr>";
echo "<tr>";
 echo "<th bgcolor=white align=left width=30%> Due Date </th>";
  echo "<td width=10% colspan=3>"  .$due_date . "</td>" ;
 
  

echo "</tr>";
echo "</tr>";
echo "<tr>";
 echo "<th bgcolor=white align=center colspan=3 > Particulars </th>";
echo "<th bgcolor=white align=center > Rs. </th>";


echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3 > Tuition Fee </th>";
 echo "<td width=40%>" ."Rs." .$bal .".00". "</td>" ;
 
 echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Late Payment Fine </th>";
 echo "<td width=40%>" ."Rs." .$fine . ".00"."</td>" ;
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=3> With Due Date </th>";
  echo "<td width=40%>" ."Rs." .$tbal . ".00"."</td>" ;
 echo "</tr>";
 

 
 
  
 
 
  echo "<tr>";
echo "<td bgcolor=white align=left colspan=4><b>Dear Parents,<br>A Fine of Rs. 20 per day will be charged after the Due Date. Student will not be allowed to attend the classes, if the fee is not deposited within 2 weeks of the due date. Due date is applicable only for the current Fee bill. In case of Balance pay it immediately.</b>

 </td>";
 echo "</tr>";
  echo "<tr>";


echo "<th bgcolor=white align=center colspan=4> Bank Copy </th>";
 echo "</tr>";

echo "</table>";


echo "<table border=1 width=33% align=left bgcolor=white>";
?>
<tr>
<td align="center" colspan="4"><img src="logo1.jpg" /></td>

</tr>
<?php
	echo "<tr>";
	echo "<td colspan=4>";
	
	echo "<h1 align=center colspan=4>$userid </h1>";
	
	  echo "<h4 align=center colspan=4>$bankname </h4>";
	 echo "<h4 align=center colspan=4>$cell </h4>";
	 echo "</td>";
echo "</tr>";
 echo "<tr>";
  echo "<th bgcolor=white align=left > Issue Date </th>";
  echo "<td>"  .$date . "</td>" ;
  echo "<th bgcolor=white align=center > Slip No </th>";
  echo "<td>"  .$id . "</td>" ;
  echo "</tr>";

echo "<tr>";
echo "<th bgcolor=white align=left  width=30% >Bank / Branch </th>";
echo "<td bgcolor=white align=left colspan=3 width=70%>$bname </td>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left width=30% >Acc# </th>";
echo "<td bgcolor=white align=left colspan=3 width=70%>$accno </td>";
echo "</tr>";
  




echo "<tr>";
 echo "<th bgcolor=white align=left>Student Name </th>";
  echo "<th colspan=3>"  .$std_name . "</th>" ;
  
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left>Father Name </th>";
  echo "<th colspan=3>"  .$father_name . "</th>" ;
  
 echo "</tr>";
echo "<tr>";
  echo "<th bgcolor=white align=left> Student ID </th>";

 echo "<th colspan=3>"  .$std_rollno . "</th>" ;
  echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=left> Class  </th>";
 echo "<td colspan=3 align=center>"  .$class_name . "</td>" ;
  echo "</tr>";
 

 echo "<tr>";
 echo "<th bgcolor=white align=left width=30%> Fee Period </th>";
  echo "<td width=10% colspan=3>"  .$months . "</td>" ;
 
  

echo "</tr>";
echo "<tr>";
 echo "<th bgcolor=white align=left width=30%> Due Date </th>";
  echo "<td width=10% colspan=3>"  .$due_date . "</td>" ;
 
  

echo "</tr>";
echo "</tr>";
echo "<tr>";
 echo "<th bgcolor=white align=center colspan=3 > Particulars </th>";
echo "<th bgcolor=white align=center > Rs. </th>";


echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3 > Tuition Fee </th>";
 echo "<td width=40%>" ."Rs." .$bal .".00". "</td>" ;
 
 echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Late Payment Fine </th>";
 echo "<td width=40%>" ."Rs." .$fine . ".00"."</td>" ;
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=3> With Due Date </th>";
  echo "<td width=40%>" ."Rs." .$tbal . ".00"."</td>" ;
 echo "</tr>";
 

 
 
  echo "<tr>";
echo "<td bgcolor=white align=left colspan=4><b>Dear Parents,<br>A Fine of Rs. 20 per day will be charged after the Due Date. Student will not be allowed to attend the classes, if the fee is not deposited within 2 weeks of the due date. Due date is applicable only for the current Fee bill. In case of Balance pay it immediately.</b>

 </td>";
 echo "</tr>";
  echo "<tr>";
 

echo "<th bgcolor=white align=center colspan=4> Parents Copy </th>";
 echo "</tr>";

echo "</table>";
echo "_______________________________________________________________________________________________________________________";


?>