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

$userid=$_SESSION["userid"];
$cname=$_POST["class_name"];
$month_name=$_POST["month_name"];
$id =$_REQUEST['id'];
$sql="select * from admission where id='$id' and user_id='$userid'";
$issueslip=mysql_query($sql) or die("Error : " . mysql_error());
while($ppp=mysql_fetch_array($issueslip))


{

    echo "<h1 align=center>$userid </h1>";
 echo "<h2 align=center>Book Shop </h2>";
echo "<table border=1 width=90% align=center bgcolor=white>";
echo "<tr>";
echo "<th bgcolor=white align=center colspan=4> Allied Bank Ltd Allama Iqbal Town(BR Code 0688) </th>";
echo "</tr>";
echo "<tr>";
  
 echo "<th bgcolor=white align=left> Credit A/C #: </th>";
  echo "<td>  0010036767810017 </td>" ; 
  echo "</tr>";
  
echo "</table>";

echo "<table border=1 width=90% align=center bgcolor=white>";

echo "<tr>";
echo "<th bgcolor=white align=left> Slip No </th>";
  echo "<td>"  .$ppp["id"] . "</td>" ;
  echo "<th bgcolor=white align=left> Issue Date </th>";
  echo "<td>"  .$ppp["date"] . "</td>" ;  
  echo "<th bgcolor=white align=left> Due Date </th>";
  echo "<td>"  .$ppp["due_date"] . "</td>" ;
   echo "<th bgcolor=white align=left> Class Name </th>";
 echo "<td>"  .$ppp["class_name"] . "</td>" ;
  echo "</tr>";
  echo "<tr>";
echo "<th bgcolor=white align=left> Roll No </th>";
echo "<td>"  .$ppp["code"] . "</td>" ;
 echo "<td>"  .$ppp["std_rollno"] . "</td>" ;
 
 echo "<th bgcolor=white align=left> Student Name </th>";
  echo "<td>"  .$ppp["std_name"] . "</td>" ;
  echo "<th bgcolor=white align=left> Father Name </th>";
 echo "<td>"  .$ppp["father_name"] . "</td>" ;

 echo "</tr>";
echo "</table>";
echo "<table border=1 width=90% align=center bgcolor=white>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2 width=30%> Course Name </th>";
  echo "<td width=10%>"  .$ppp["class_name"] . "</td>" ;
 
  echo "<th bgcolor=white align=center> Note </th>";

echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=2 width=20%> Pack Price </th>";
 echo "<td>"  .$ppp["balbook"] . "</td>" ;
 echo "<td bgcolor=white align=left rowspan=3> 
Parents are required to pay the amount in the bank
 and show the Parents copy to school office to collect the books.
 </td>";
echo "</tr>";

 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2> Balance </th>";
 echo "<td>"  . 0 . "</td>" ;
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2> Fine </th>";
 echo "<td>"  . 0 . "</td>" ;
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2> G. Total </th>";
 echo "<td>"  .$ppp["balbook"] . "</td>" ;
 echo "</tr>";
  echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2> Total Payable after due Date </th>";
 echo "<td bgcolor=white align=center>  </td>";

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


//echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  echo "<h1 align=center>$userid </h1>";
 echo "<h2 align=center>Book Shop </h2>";
echo "<table border=1 width=90% align=center bgcolor=white>";
echo "<tr>";
echo "<th bgcolor=white align=center colspan=4> Allied Bank Ltd Allama Iqbal Town(BR Code 0688) </th>";
echo "</tr>";
echo "<tr>";
  
 echo "<th bgcolor=white align=left> Credit A/C #: </th>";
  echo "<td>  0010036767810017 </td>" ; 
  echo "</tr>";
  
echo "</table>";


echo "<table border=1 width=90% align=center bgcolor=white>";

echo "<tr>";
echo "<th bgcolor=white align=left> Slip No </th>";
  echo "<td>"  .$ppp["id"] . "</td>" ;
  echo "<th bgcolor=white align=left> Issue Date </th>";
  echo "<td>"  .$ppp["date"] . "</td>" ;  
  echo "<th bgcolor=white align=left> Due Date </th>";
  echo "<td>"  .$ppp["due_date"] . "</td>" ;
   echo "<th bgcolor=white align=left> Class Name </th>";
 echo "<td>"  .$ppp["class_name"] . "</td>" ;
  echo "</tr>";
  echo "<tr>";
echo "<th bgcolor=white align=left> Roll No </th>";
echo "<td>"  .$ppp["code"] . "</td>" ;
 echo "<td>"  .$ppp["std_rollno"] . "</td>" ;
 
 echo "<th bgcolor=white align=left> Student Name </th>";
  echo "<td>"  .$ppp["std_name"] . "</td>" ;
  echo "<th bgcolor=white align=left> Father Name </th>";
 echo "<td>"  .$ppp["father_name"] . "</td>" ;

 echo "</tr>";
echo "</table>";
echo "<table border=1 width=90% align=center bgcolor=white>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2 width=30%> Course Name </th>";
  echo "<td width=10%>"  .$ppp["class_name"] . "</td>" ;
 
  echo "<th bgcolor=white align=center> Note </th>";

echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=2 width=20%> Pack Price </th>";
 echo "<td>"  .$ppp["balbook"] . "</td>" ;
 echo "<td bgcolor=white align=left rowspan=3> 
Parents are required to pay the amount in the bank
 and show the Parents copy to school office to collect the books.
 </td>";
echo "</tr>";

 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2> Balance </th>";
 echo "<td>"  . 0 . "</td>" ;
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2> Fine </th>";
 echo "<td>"  . 0 . "</td>" ;
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2> G. Total </th>";
 echo "<td>"  .$ppp["balbook"] . "</td>" ;
 echo "</tr>";
  echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2> Total Payable after due Date </th>";
 echo "<td bgcolor=white align=center>  </td>";

echo "<th bgcolor=white align=center> School Copy </th>";
 echo "</tr>";
echo "</table>";

//echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
   echo "<h1 align=center>$userid </h1>";
 echo "<h2 align=center>Book Shop </h2>";
echo "<table border=1 width=90% align=center bgcolor=white>";
echo "<tr>";
echo "<th bgcolor=white align=center colspan=4> Allied Bank Ltd Allama Iqbal Town(BR Code 0688) </th>";
echo "</tr>";
echo "<tr>";
  
 echo "<th bgcolor=white align=left> Credit A/C #: </th>";
  echo "<td>  0010036767810017 </td>" ; 
  echo "</tr>";
  
echo "</table>";


echo "<table border=1 width=90% align=center bgcolor=white>";

echo "<tr>";
echo "<th bgcolor=white align=left> Slip No </th>";
  echo "<td>"  .$ppp["id"] . "</td>" ;
  echo "<th bgcolor=white align=left> Issue Date </th>";
  echo "<td>"  .$ppp["date"] . "</td>" ;  
  echo "<th bgcolor=white align=left> Due Date </th>";
  echo "<td>"  .$ppp["due_date"] . "</td>" ;
   echo "<th bgcolor=white align=left> Class Name </th>";
 echo "<td>"  .$ppp["class_name"] . "</td>" ;
  echo "</tr>";
  echo "<tr>";
echo "<th bgcolor=white align=left> Roll No </th>";
echo "<td>"  .$ppp["code"] . "</td>" ;
 echo "<td>"  .$ppp["std_rollno"] . "</td>" ;
 
 echo "<th bgcolor=white align=left> Student Name </th>";
  echo "<td>"  .$ppp["std_name"] . "</td>" ;
  echo "<th bgcolor=white align=left> Father Name </th>";
 echo "<td>"  .$ppp["father_name"] . "</td>" ;

 echo "</tr>";
echo "</table>";
echo "<table border=1 width=90% align=center bgcolor=white>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2 width=30%> Course Name </th>";
  echo "<td width=10%>"  .$ppp["class_name"] . "</td>" ;
 
  echo "<th bgcolor=white align=center> Note </th>";

echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=2 width=20%> Pack Price </th>";
 echo "<td>"  .$ppp["balbook"] . "</td>" ;
 echo "<td bgcolor=white align=left rowspan=3> 
Parents are required to pay the amount in the bank
 and show the Parents copy to school office to collect the books.
 </td>";
echo "</tr>";

 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2> Balance </th>";
 echo "<td>"  . 0 . "</td>" ;
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2> Fine </th>";
 echo "<td>"  . 0 . "</td>" ;
 echo "</tr>";
 echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2> G. Total </th>";
 echo "<td>"  .$ppp["balbook"] . "</td>" ;
 echo "</tr>";
  echo "<tr>";
 echo "<th bgcolor=white align=left colspan=2> Total Payable after due Date </th>";
 echo "<td bgcolor=white align=center>  </td>";

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

}
?>