<?php 
session_start();
//mysql_connect("localhost","root","vertrigo") or die("Error Connecting Server");
//mysql_select_db("sm") or die("Error Opening Database");
include 'dbc.php';


$today=date("Y-m-d");
$month_name=$_POST["month_name"];

if($_POST['delete']) // from button name="delete"
	{
		$checkbox = $_POST['checkbox']; //from name="checkbox[]"
		$countCheck = count($_POST['checkbox']);
		
		for($i=0;$i<$countCheck;$i++)
		{
			$del_id  = $checkbox[$i];
			$userid=$_SESSION["userid"];
			$today=date("Y-m-d");
			$sqlp14 = "select * from admission where id='$del_id' and user_id='$userid'";
 							$finishstock=mysql_query($sqlp14) or die("Error : " . mysql_error());
   							$app1=mysql_fetch_array($finishstock);
   							$std_rollno=$app1["std_rollno"];
							$std_name=$app1["std_name"];
							$class_name=$app1["class_name"];
							$father_name=$app1["father_name"];
							$code=$app1["code"];
							$id=$app1["id"];
			
							$monthly_fee=$app1["monthly_fee"];
							$bal=$app1["bal"];
					 $tbal=$monthly_fee + $bal;


  
	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 "<h2 align=center colspan=4>Pakpattan Bypass Depalpur.</h2>";
	 
	 echo "<h2 align=center colspan=4>www.allahconcerns.com </h2>";
	 echo "</td>";
echo "</tr>";
 echo "<tr>";
  echo "<th bgcolor=white align=left width=30%> Issue Date </th>";
  echo "<td>"  .$today . "</td>" ;
  echo "<th bgcolor=white align=center width=30%> Slip No </th>";
  echo "<td>"  .$id . "</td>" ;
  echo "</tr>";

echo "<tr>";
echo "<th bgcolor=white align=left colspan=4 width=50% >Bank Alfalah Branch Ketchahry Chowk </th>";
echo "</tr>";
echo "<tr>";
echo "<td bgcolor=white align=left colspan=4 width=50%>Bank Acc. No. 0192-1003302369 </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> 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>"  .$class_name. "</td>" ;
  echo "</tr>";
 

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

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

echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3 > Tuition Fee </th>";
 echo "<td width=40%>" ."Rs." .$monthly_fee .".00". "</td>" ;
 
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Arrears </th>";
echo "<td width=40%>" ."Rs." .$bal .".00"."</td>" ;
 
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Annual Charges </th>";
 echo "<td width=40%>" ."Rs.00"."</td>" ;
 echo "</tr>";
 echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Genrator Charges </th>";
 echo "<td width=40%>" ."Rs.00"."</td>" ;
 echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Books Charges </th>";
 echo "<td width=40%>" . " Rs.0.00 " . "</td>" ;
 echo "</tr>";
  echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Ac Charges </th>";
 echo "<td width=40%>" . " Rs.0.00 " . "</td>" ;
 echo "</tr>";
  echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Discount if any</th>";
 echo "<td width=40%>" . " Rs.0.00 " . "</td>" ;
 echo "</tr>";
 echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Misc </th>";
 echo "<td width=40%>" . " Rs.0.00 " . "</td>" ;
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=3> G. Total </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. 10 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 "<h2 align=center colspan=4>Pakpattan Bypass Depalpur.</h2>";
	 
	 echo "<h2 align=center colspan=4>www.allahconcerns.com </h2>";
	 echo "</td>";
echo "</tr>";
 echo "<tr>";
  echo "<th bgcolor=white align=left width=30%> Issue Date </th>";
  echo "<td>"  .$today . "</td>" ;
  echo "<th bgcolor=white align=center width=30%> Slip No </th>";
  echo "<td>"  .$id . "</td>" ;
  echo "</tr>";

echo "<tr>";
echo "<th bgcolor=white align=left colspan=4 width=50% >Bank Alfalah Branch Ketchahry Chowk </th>";
echo "</tr>";
echo "<tr>";
echo "<td bgcolor=white align=left colspan=4 width=50%>Bank Acc. No. 0192-1003302369 </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> 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>"  .$class_name. "</td>" ;
  echo "</tr>";
 

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

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

echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3 > Tuition Fee </th>";
 echo "<td width=40%>" ."Rs." .$monthly_fee .".00". "</td>" ;
 
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Arrears </th>";
echo "<td width=40%>" ."Rs." .$bal .".00"."</td>" ;
 
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Annual Charges </th>";
 echo "<td width=40%>" ."Rs.00"."</td>" ;
 echo "</tr>";
 echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Genrator Charges </th>";
 echo "<td width=40%>" ."Rs.00"."</td>" ;
 echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Books Charges </th>";
 echo "<td width=40%>" . " Rs.0.00 " . "</td>" ;
 echo "</tr>";
  echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Ac Charges </th>";
 echo "<td width=40%>" . " Rs.0.00 " . "</td>" ;
 echo "</tr>";
  echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Discount if any</th>";
 echo "<td width=40%>" . " Rs.0.00 " . "</td>" ;
 echo "</tr>";
 echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Misc </th>";
 echo "<td width=40%>" . " Rs.0.00 " . "</td>" ;
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=3> G. Total </th>";
  echo "<td width=40%>" ."Rs." .$tabl . ".00"."</td>" ;
 echo "</tr>";

 
 
  
 
 
  echo "<tr>";
echo "<td bgcolor=white align=left colspan=4><b>Dear Parents,<br>A Fine of Rs. 10 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 "<h2 align=center colspan=4>Pakpattan Bypass Depalpur.</h2>";
	 
	 echo "<h2 align=center colspan=4>www.allahconcerns.com </h2>";
	 echo "</td>";
echo "</tr>";
 echo "<tr>";
  echo "<th bgcolor=white align=left width=30%> Issue Date </th>";
  echo "<td>"  .$today . "</td>" ;
  echo "<th bgcolor=white align=center width=30%> Slip No </th>";
  echo "<td>"  .$id . "</td>" ;
  echo "</tr>";

echo "<tr>";
echo "<th bgcolor=white align=left colspan=4 width=50% >Bank Alfalah Branch Ketchahry Chowk </th>";
echo "</tr>";
echo "<tr>";
echo "<td bgcolor=white align=left colspan=4 width=50%>Bank Acc. No. 0192-1003302369 </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> 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>"  .$class_name. "</td>" ;
  echo "</tr>";
 

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

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

echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3 > Tuition Fee </th>";
 echo "<td width=40%>" ."Rs." .$monthly_fee .".00". "</td>" ;
 
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Arrears </th>";
echo "<td width=40%>" ."Rs." .$bal .".00"."</td>" ;
 
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Annual Charges </th>";
 echo "<td width=40%>" ."Rs.00"."</td>" ;
 echo "</tr>";
 echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Genrator Charges </th>";
 echo "<td width=40%>" ."Rs.00"."</td>" ;
 echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Books Charges </th>";
 echo "<td width=40%>" . " Rs.0.00 " . "</td>" ;
 echo "</tr>";
  echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Ac Charges </th>";
 echo "<td width=40%>" . " Rs.0.00 " . "</td>" ;
 echo "</tr>";
  echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Discount if any</th>";
 echo "<td width=40%>" . " Rs.0.00 " . "</td>" ;
 echo "</tr>";
 echo "<tr>";
echo "<th bgcolor=white align=left colspan=3> Misc </th>";
 echo "<td width=40%>" . " Rs.0.00 " . "</td>" ;
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=3> G. Total </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. 10 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 "_______________________________________________________________________________________________________________________";



//echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
 

		}
			
	}
?>
