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

$userid=$_SESSION['userid'];

$id=$_REQUEST["id"];

 $sqlcus1 = "SELECT * FROM admission WHERE id  = '$id'";
$result1=$conn->query($sqlcus1);
$ppp = $result1 ->fetch_assoc();
				
				$app_file=$ppp['app_file'] ;

 	    
		
echo "<table border=0 width=100% align=center bgcolor=white>";
echo "<tr>";
echo "<td bgcolor=white align=left colspan=2>" ."<img src='logo1.jpg' />" . "</td>";
echo "<td bgcolor=white align=center colspan=2><font color=black size=2pt face=Arial><h1>"  .$userid . "</h1><font color=blue face=Arial><h3>A PROJECT OF PUNJAB GROUP OF COLLEGES </h3></font>" .  "</font></td>";
echo "<td  align=right bgcolor=white>" ."<img src='app_images1/".$ppp[app_file]."' width='100' height='130' />" . "</td>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=6> <hr></th>";
echo "</tr>";
echo "</table>";

echo "<table border=1 style=border:solid black width=100% align=center bgcolor=white>";
echo "<tr height=30>";
echo "<th bgcolor=white align=left style=border:solid black> Admission No: </th>";
  echo "<td style=border:solid black>"  .$ppp["adm_no"] . "</td>" ;
  echo "<th bgcolor=white align=left style=border:solid black> Roll No: </th>";
  echo "<td style=border:solid black>"  .$ppp["std_rollno"] . "</td>" ;
  echo "</tr>";
 echo "<tr height=30>";
  echo "<th bgcolor=white align=left style=border:solid black> B-Form #: </th>";
  echo "<td colspan=3 style=border:solid black>"  .$ppp["portal_id"] . "</td>" ;
  echo "</tr>";
  echo "<tr height=30>";
echo "<th bgcolor=white align=left style=border:solid black> Student's Name: </th>";
  echo "<td style=border:solid black>"  .$ppp["std_name"] . "</td>" ;
echo "<th bgcolor=white align=left style=border:solid black> Date of Birth : </th>";
  echo "<td style=border:solid black>"  .$ppp["dob"] . "</td>" ;
  echo "</tr>";
   echo "<tr height=30>";
    echo "<th bgcolor=white align=left style=border:solid black> Admission required in class : </th>";
  echo "<td style=border:solid black>"  .$ppp["class_name"]  . "</td>" ;

  echo "<th bgcolor=white align=left style=border:solid black> Class Section : </th>";
  echo "<td style=border:solid black>"  .$ppp["cls_sec"] . "</td>" ;
  echo "</tr>";
  echo "<tr height=30>";
  echo "<th bgcolor=white align=left style=border:solid black> Previous Class: </th>";
  echo "<td style=border:solid black>"  .$ppp["pclass"] . "</td>" ;
   echo "<th bgcolor=white align=left style=border:solid black> Previous School: </th>";
  echo "<td style=border:solid black>"  .$ppp["pschool"] . "</td>" ;
  echo "</tr>";
   echo "<tr height=30>";
  echo "<th bgcolor=white align=left style=border:solid black> Gender: </th>";
  echo "<td style=border:solid black>"  .$ppp["gender"] . "</td>" ;
   echo "<th bgcolor=white align=left style=border:solid black> Religion: </th>";
  echo "<td style=border:solid black>"  .$ppp["religion"] . "</td>" ;
  echo "</tr>";
  echo "<tr height=30>";
  echo "<th bgcolor=white align=left style=border:solid black> Address: </th>";
  echo "<td colspan=3 style=border:solid black>"  .$ppp["address"] . "</td>" ;
  echo "</tr>";
 echo "<tr height=30>";
  echo "<th bgcolor=white align=left style=border:solid black> Fee Status: </th>";
  echo "<td style=border:solid black>"  .$ppp["feestatus"] . "</td>" ;
  echo "<th bgcolor=white align=left style=border:solid black> Paid By: </th>";
  echo "<td style=border:solid black>"  .$ppp["paidby"] . "</td>" ;
  echo "</tr>";
 
 
  echo "<tr height=50>";
echo "<th bgcolor=yellow align=left colspan=4><font color=black size=4pt face=Arial>PARENTS /GUARDIAN</font></th>";
echo "</tr>";
  echo "<tr height=30>";
   echo "<th bgcolor=white align=left style=border:solid black> Father's Name:  </th>";
  echo "<td style=border:solid black colspan=3>"  .$ppp["fname"] . "</td>" ;
 
  echo "</tr>";
   echo "<tr height=30>";
  echo "<th bgcolor=white align=left style=border:solid black>Father Qualification: </th>";
  echo "<td colspan=3 style=border:solid black>"  .$ppp["qualification"] . "</td>" ;
  echo "</tr>";
  echo "<tr height=30>";
   echo "<th bgcolor=white align=left style=border:solid black> Father's Cnic No:  </th>";
  echo "<td style=border:solid black>"  .$ppp["fnic"] . "</td>" ;
  echo "<th bgcolor=white align=left style=border:solid black>  Mother Nic No:  </th>";
  echo "<td style=border:solid black>"  .$ppp["gnic"] . "</td>" ; 
  echo "</tr>";
 
   echo "<tr height=30>";
   echo "<th bgcolor=white align=left style=border:solid black> Father Cell #:  </th>";
  echo "<td style=border:solid black>"  .$ppp["cell_1"] . "</td>" ;
  echo "<th bgcolor=white align=left style=border:solid black>  Whatsapp #:  </th>";
  echo "<td style=border:solid black>"  .$ppp["cell_2"] . "</td>" ; 
  echo "</tr>";
   echo "<tr height=30>";
   echo "<th bgcolor=white align=left style=border:solid black> Mother's Name:  </th>";
  echo "<td style=border:solid black>"  .$ppp["mnic"] . "</td>" ;
  echo "<th bgcolor=white align=left style=border:solid black>  Mother's Cell No:  </th>";
  echo "<td style=border:solid black>"  .$ppp["cell_3"] . "</td>" ; 
  echo "</tr>";
   echo "<tr height=30>";
  echo "<th bgcolor=white align=left style=border:solid black>Mother Qualification: </th>";
  echo "<td colspan=3 style=border:solid black>"  .$ppp["gname"] . "</td>" ;
  echo "</tr>";
   echo "<tr height=30>";
   echo "<th bgcolor=white align=left style=border:solid black> Caste:  </th>";
  echo "<td style=border:solid black>"  .$ppp["caste"] . "</td>" ;
  echo "<th bgcolor=white align=left style=border:solid black>  Qabeela:  </th>";
  echo "<td style=border:solid black>"  .$ppp["qabeela"] . "</td>" ; 
  echo "</tr>";
  echo "<tr height=30>";
   echo "<th bgcolor=white align=left style=border:solid black> Business / Job:  </th>";
  echo "<td style=border:solid black>"  .$ppp["job"] . "</td>" ;
  echo "<th bgcolor=white align=left style=border:solid black>  Income/Salary:  </th>";
  echo "<td style=border:solid black>"  .$ppp["income"] . "</td>" ; 
  echo "</tr>";

 echo "<tr height=65>";
 echo "<th align=left colspan=2 style=border:solid black><font color=black size=3pt face=Arial> Parent's Signature:</font></th>";
echo "<th bgcolor=white align=left style=border:solid black>  Admission Date:  </th>";
  echo "<td style=border:solid black>"  .$ppp["adm_date"] . "</td>" ; 

echo "</tr>";
 
  
//$result = mysql_query("SELECT * FROM instalfee where rollno='$std_rollno' and user_id='$userid' ORDER BY date");
echo "<tr height=50>";
echo "<th bgcolor=red align=left colspan=4><font color=black size=4pt face=Arial> OFFICE USE ONLY</font></th>";
echo "</tr>";

	 echo "<tr height=30>";
  echo "<th bgcolor=white align=left style=border:solid black> Session: </th>";
  echo "<td style=border:solid black>"  .$ppp["sess1"] . "</td>" ;
   echo "<th bgcolor=white align=left style=border:solid black> Month:  </th>";
  echo "<td style=border:solid black>"  .$ppp["month"] . "</td>" ;
  echo "</tr>";
	 echo "<tr height=30>";
  echo "<th bgcolor=white align=left style=border:solid black> Form #: </th>";
  echo "<td style=border:solid black>"  .$ppp["id"] . "</td>" ;
   echo "<th bgcolor=white align=left style=border:solid black> Admission #:  </th>";
  echo "<td style=border:solid black>"  .$ppp["adm_no"] . "</td>" ;
  echo "</tr>";
  
   echo "<tr height=30>";
  echo "<th bgcolor=white align=left style=border:solid black> Roll #: </th>";
  echo "<td style=border:solid black>"  .$ppp["std_rollno"] . "</td>" ;
   echo "<th bgcolor=white align=left style=border:solid black> Monthly Fee:  </th>";
  echo "<td style=border:solid black>"  .$ppp["mfee"] . "</td>" ;
  echo "</tr>";
   echo "<tr height=30>";
  echo "<th bgcolor=white align=left style=border:solid black> Remarks by Principal: </th>";
  echo "<td colspan=3 style=border:solid black>"  .$ppp["remarks"] . "</td>" ;

  echo "</tr>";
	

 echo "<tr height=75>";

 echo "<td align=left colspan=4 style=border:solid black>" . "<br><br> Principal:__________________  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenor:.__________________ " . "</td>";

  echo "</tr>";
echo "</table>";
	 
 
?>



