<?php 
include("../db.php");
?>
<form  method="post">
<table border="0" width="100%" class="tc">
  <tr>
    <td colspan="3" align="center" style="color:blue;"><h1>TRANSFER CERTIFICATE </h1></td>
    </tr>
  <tr>
    <td colspan="3">
    <div style="margin:3px; padding:5px 5px; width:235px; float:right">
    Admission No. <span ><input type="text" name="adminno" value="<?php echo $_POST['adminno'] ?>"></span><br />
    Date. <span ><input type="text" name="date" value="<?php echo $_POST['date'] ?>"></span><br />

</div>

   <!-- <div style="margin:3px; padding:	5px 5px; width:200px"> TC-No. <span class="span" style="width:100px"> !-->
      
    
    </td>
    </tr>
  
  <tr>
  <?php
    
  $detail=$db->getVal("SELECT max(tc_number) FROM newtc");
 // echo $ss="SELECT max(tc_number) FROM newtc";
    ?>
	<td colspan="3"> 
	<span class="name"> Sr-No :</span> <span class="txt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" readonly name="tcnumber" value="<?php echo $detail+1; ?> " /></span></span><br /> </br>
    <span class="name">1- Name Of Pupil :</span> <span class="txt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="nameofpupil" value="<?php echo $_POST['nameofpupil'] ?>" /></span><br /> </br>
    <span class="name">2- Father's/Guardien's Name : </span><span class="txt"><input type="text" value="<?php echo $_POST['nameofGuardien'] ?>" name="nameofGuardien"></span><br/></br> 
   <span class="name"> 3- Mother's Name : </span> <span class="txt"><input type="text" value="<?php echo $_POST['nameofmother'] ?>" name="nameofmother"></span><br /></br>
   <span class="name"> 4- Nationality : </span> <span class="txt">INDIAN</span><br /> </br>
   <span class="name"> 5- Whether The condidate belongs to Scheduled caste or Scheduled Tribe : </span> <span class="txt"><input type="text" value="<?php echo $_POST['cast'] ?>" name="cast"></span><br /></br>
   <span class="name"> 6- Date of  First  Admission in the School with Class : </span><input type="text" value="<?php echo $_POST['admission_class'] ?>" class="txt" name="admission_class"  />   <br /></br>
   <span class="name"> 7- Date Of Birth(in Christian Fra) according to admission Register(in Fig.) : </span> <span class="txt"><input type="date" value="<?php echo $_POST['DOB'] ?>" name="DOB">(In words): <input type="text" value="<?php echo $_POST['dobinwords'] ?>" class="txt" name="dobinwords"  /></span><br /></br>
   <span class="name"> 8- Class in which pupil last studied(in figure) : </span><input type="text" value="<?php echo $_POST['last_class'] ?>" class="txt" name="last_class" value="<?php echo $idata["last_class"] ?>" /><br /></br>
   <span class="name"> 9- School/Board annual examination last taken with result : </span><input type="text" value="<?php echo $_POST['fails'] ?>" class="txt" name="result" value="<?php echo $_POST["result"] ?>" /><br /></br>
   <span class="name"> 10- Whether failed,if so once/twice,in the same class : </span><input type="text" value="<?php echo $_POST['fails'] ?>" class="txt" name="fails" value="<?php echo $_POST["fails"] ?>" /><br /></br>
   <span class="name"> 11- Subjects Offered : </span><textarea name="subject" ><?php echo $_POST['subject'] ?></textarea> <br /></br>
   
    <span class="name"> 12- Whether qualified for promotion to the higher class, if so to which class : : </span><input type="text" value="<?php echo $_POST['qualified'] ?>" class="txt" name="qualified"  /> <br /></br>
    <span class="name"> 13- Month upto which the (pupil has paid) school dues paid : </span><input type="text" value="<?php echo $_POST['dues'] ?>" class="txt" name="dues" /> <br /></br>
    <span class="name"> 14- Any Fee Concession availed of : if so, the nature of such concession : </span><input type="text" value="<?php echo $_POST['concession'] ?>" class="txt" name="concession"  /> <br /></br>
	 <span class="name"> 15- Total no. of  working days : </span><input type="text" value="<?php echo $_POST['totalworking'] ?>" class="txt" name="totalworking"  /> <br></br>
	 
	 <span class="name">16-Total no. of  working days Presents: <input type="text" class="txt" name="totalpresent" value="<?php echo $res["totalpresent"] ?>" />  <br /></br>
	  <span class="name"> 17- Whether NCC cadet/boy scout/girl Guide(details may be given) : </span><input type="text" value="<?php echo $_POST['ncc'] ?>" class="txt" name="ncc"  /> <br /></br>
    <span class="name"> 18- Games played or extra curricular activities in which the pupil Usually took part (Mentioned achivement level therein) : </span><input type="text" class="txt" value="<?php echo $_POST['activities'] ?>" name="activities"  /> <br /></br>
          <span class="name"> 19- General Conduct : </span><input type="text" value="<?php echo $_POST['Conduct'] ?>" class="txt" name="Conduct"  /> <br /></br>
       
			<span class="name"> 20- Date of application of certificate : </span><input type="text" value="<?php echo $_POST['date_of_application'] ?>" class="txt" name="date_of_application" /> <br /></br>
      <span class="name"> 21- Date of issue of certificate : </span><input type="text" value="<?php echo $_POST['issue_date'] ?>" class="txt" name="issue_date"  /> <br /></br>
     <span class="name"> 22- Reason for leaving the school : </span><input type="text" value="<?php echo $_POST['reason'] ?>" class="txt" name="reason" /> <br /></br>
     <span class="name"> 23- Any other Remark : </span><input type="text" value="<?php echo $_POST['remark'] ?>" class="txt" name="remark"  /> <br /></br>
 <?PHP    


session_start();


 if (isset($_POST['SUBMIT'])) {

 
 $_SESSION['adminno1'] = $_POST['adminno'];
 $_SESSION['nameofpupil1'] = $_POST['nameofpupil'];
 
$value=array(
"adminno"=>$_POST['adminno'],
"date"=>$_POST['date'],
"tc_number"=>$_POST['tcnumber'],
"nameofpupil"=>$_POST['nameofpupil'],
"nameofGuardien"=>$_POST['nameofGuardien'],
"nameofmother"=>$_POST['nameofmother'],
"cast"=>$_POST['cast'],
"Nationality"=>"indian",
"admission_class"=>$_POST['admission_class'],
"DOB"=>$_POST['DOB'],
"dobininwords"=>$_POST['dobinwords'],
"last_class"=>$_POST['last_class'],
"result"=>$_POST['result'],
"failds"=>$_POST['fails'],
"subject"=>$_POST['subject'],
"qualified"=>$_POST['qualified'],
"dues"=>$_POST['dues'],
"concession"=>$_POST['concession'],
"totalworking"=>$_POST['totalworking'],
"totalpresent"=>$_POST['totalpresent'],
"ncc"=>$_POST['ncc'],
"activities"=>$_POST['activities'],
"date_of_application"=>$_POST['date_of_application'],
"issue_date"=>$_POST['issue_date'],
"reason"=>$_POST['reason'],
"Conduct"=>$_POST['Conduct'],
"remark"=>$_POST['remark'],

); 

$flgIn=$db->insertAry("newtc",$value); 
// print_r($value);
 } 

if($flgIn>0)
{
?>
	echo "<script>window.location = 'print/?page_id=newtc&action=print&id=<?php echo $detail+1 ?>';</script>";
<?php
}
else

{
?>
<input type="submit" name="SUBMIT">
<?php
}	
 ?>
</td>
    </tr>
 

</table>
</form>
<style>
.button {
    display: block;
    width: 115px;
    height: 25px;
    background: #4E9CAF;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    color: white;
    font-weight: bold;
}
</style>
<style>
input[type="text"]
{
    border: 0;
  outline: 0;
  background: transparent;
  border-bottom: 1px solid black;
}

input[type="date"]
{
    border: 0;
  outline: 0;
  background: transparent;
  border-bottom: 1px solid black;
}
textarea name[type="address"]
{
    border: 0;
  outline: 0;
  background: transparent;
  border-bottom: 1px solid black;
}
</style>
<?php

 
//print_r($value);

?>
<SCRIPT>
$(document).ready(function(){
    $("a.submit").click(function(){
        document.getElementById("myForm").submit();
    }); 
});
</SCRIPT>
