<?php
session_start();
$app1=$_REQUEST['flag'];
$session=$_REQUEST['flag2'];
include("link/databaseconnection.php");
$sel="select * from  registration2 where mobile ='$app1'  and session='$session' order by id desc";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);

$session_year='24';
$class=$row['class'];
if($row['class']=='Ph.D' )
{
	$class_add='5';
}

if($row['class']=='Ph.D')
{
	$class_year='0';
}
$sel121="select * from  registration2 where  class='$class' and alot_number!='' and session='$session' order by id desc ";
$res121=mysqli_query($conn,$sel121);
$s=0;
$row121=mysqli_fetch_array($res121,MYSQLI_BOTH);
$al=$row121['alot_number'];
$alot_number=$al+1;
// echo $alot_number;
$sel1245="select * from  registration2 where mobile ='$app1' and session='$session' ";
$res1245=mysqli_query($conn,$sel1245);
$row1245=mysqli_fetch_array($res1245,MYSQLI_BOTH);

$sel124513="select * from  registration2 where alot_number ='$alot_number' and session='$session' ";
$res124513=mysqli_query($conn,$sel124513);
$row124513=mysqli_fetch_array($res124513,MYSQLI_BOTH);
if($row1245['alot_number']=='' and !$row124513)
{
$up="update registration2 set alot_number='$alot_number',idcard='Yes' where mobile='$app1'and session='$session' ";
mysqli_query($conn,$up);
}
$sel12451="select * from  registration2 where mobile ='$app1' and session='$session' ";
$res12451=mysqli_query($conn,$sel12451);
$row12451=mysqli_fetch_array($res12451,MYSQLI_BOTH);
//echo"$app1";
?>

<html>
<head>
     <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link href="https://fonts.googleapis.com/css?family=Mukta&display=swap" 

    rel="stylesheet">
 <script src="js/jquery-3.2.1.min.js"></script>  <!--jquery-->
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
 <style>
 #name2{font-weight:bold}
 @media print {
 #name2{font-weight:bold;font-size:13px}
 #name3{font-size:13px}

  body{
  -webkit-print-color-adjust:exact;
}
  p{font-size:11px}
  td{font-size:12px}
 }
 #gh{transform-origin: 0 0;
  transform: rotate(-45deg);;
    position: absolute;
    top: 580;
  left: 240;
  font-size:50px;
  color:GREEN;
    
    
}
 </style>
<script>
$(document).ready(function(){
	$("#pay").click(function(){
		window.location.href='bil.php';
	});
});
$(document).ready(function(){

	$("#print").click(function(){
		$("#pay").css("visibility","hidden");
		$("#back").css("visibility","hidden");
		$("#print").css("visibility","hidden");
		window.print();
		window.location.href='index.php';
	});
	$("#back").click(function(){
		window.location.href='index.php';
	});
});

</script>
<link href="css/student_print.css" rel="stylesheet" type="text/css">
</head>
<body>
<h3 id='gh'>FINAL PRINT</h3>
<table frame="border" width="100%" >
<caption style="font-size:25px;font-weight:bold">Admission Form (<?php echo $row['session'];?>)</caption>

<tr>
<td colspan='2' style='background-color:black;color:white'><span><img src="images/name.png" height="110px" width="100%"/></span></td>
</tr>
</table>
<table cellspacing="0" width="100%" border="1px">

<tr>
<td ><span id="name2">Sr. No. (Form No.)</span></td><td ><span id="name3" style='font-weight:bold'><?php echo $row12451['alot_number'];?>&emsp;(<?php echo $row['id'];?>)</span></td><td><span id="name2">Course</span></td><td ><span id="name2"><?php echo $row['class'];?></span></td><td align="right" rowspan="3"width="10%"><span><img src="code/img/<?php echo $row['picture'];?>" height="150" ></span></td>
</tr>
<tr>
<td width="20%"><span id="name2">Student's Name</span></td><td width=""><span id="name3"><?php echo $row['name'];?></span></td><td width="20%"><span id="name2">Father's Name</span></td><td width=""><span id="name3"><?php echo $row['fname'];?></span></td>
</tr>
<tr>
<td width="20%"><span id="name2"> Mother's Name</span></td><td><span id="name3"><?php echo $row['mname'];?></span></td><td width="20%"><span id="name2"> DOB</span></td><td><span id="name3"><?php echo $row['dob'];?></span></td>
</tr>


</table>
<table cellspacing="0" width="100%" border="1px">
<tr>
<td width="30%"><span id="name2">Gender</span></td><td width="30%"><span id="name3"><?php echo $row['gender'];?></span></td><td width="20%"> <span id="name2">Sport</span></td><td width="30%"><span id="name3"><?php echo $row['game'];?></span></td>
</tr>
<tr>
<td width="30%"><span id="name2">Aadhaar Number</span></td><td width="30%"><span id="name3"><?php echo $row['adhar'];?></span></td><td width="20%"><span id="name2">NCC</span></td><td width="20%"><span id="name3"><?php echo $row['ncc'];?></span></td>
</tr>
<tr>
<td width="30%"><span id="name2">Category</span></td><td width="20%"><span id="name3"><?php echo $row['category'];?></span>  </td><td width="20%"><span id="name2">Rovers/Ranger</span></td><td width="20%"><span id="name3"><?php echo $row['rovers'];?></span></td>
</tr>
<tr>
<td width="30%"><span id="name2">Caste</span></td><td width="30%"><span id="name3"><?php echo $row['sub_category'];?></span></td><td width="20%"><span id="name2">NSS</span></td><td width="20%"><span id="name3"><?php echo $row['nss'];?></span></td>
</tr>
<tr>
<td width="30%"><span id="name2">Religion</span></td><td width="30%"><span id="name3"><?php echo $row['religion'];?></span></td><td width="20%"><span id="name2">Handicapped</span></td><td width="20%"><span id="name3"><?php echo $row['handicapped'];?></span></td>
</tr>
<tr>
<td width="30%"><span id="name2">Subject</span></td><td width="30%"><span id="name3" style ='color:black'><?php echo $row['choose_subject2'];?></span></td><td width="20%"><span id="name2">Ele For Ph.D</span></td><td width="20%"><span id="name3"><?php echo $row['choose_subject1'];?></span></td>
</tr>
<tr>
<td width="30%"><span id="name2">Nationality</span></td><td width="30%"><span id="name3"><?php echo $row['nationality'];?></span></td><td width="20%"><span id="name2">Marrital Status</span></td><td width="20%"><span id="name3"><?php echo $row['marrital'];?></span></td>
</tr>
<tr>
<td width="30%"><span id="name2">Email Id</span></td><td width="30%"><span id="name3"><?php echo $row['email'];?></span></td><td width="20%"><span id="name2"> Date</span></td><td width="20%"><span id="name3"><?php echo $row['datetime']?></span></td>
</tr>

</table>
<table cellspacing="0" width="100%" border="1px">
<tr>
<td colspan='11' align="center" style='background-color:black;color:white'><span id="name2">Education Eligibility</span></td>

</tr
<tr>

<tr align="center">
<td><span id="name2">Examination</span></td>
<td><span id="name2">Roll Number</span></td>
<td><span id="name2">Board/Uni</span></td>
<td><span id="name2">College</span></td>
<td><span id="name2">Subject</span></td>
<td><span id="name2">Year</span></td>
<td><span id="name2">Total Mark</span></td>
<td><span id="name2">Obtain Mark</span></td>
<td><span id="name2">Per</span></td>
<td><span id="name2">Regu/Priv</span></td>
<td><span id="name2">Grade</span></td>

</tr>
<tr align="center">
<td><span id="name3"><?php echo $row['high_school'];?></span></td>
<td><span id="name3"><?php echo $row['rol_10'];?></span></td>
<td><span id="name3"><?php echo $row['university'];?></span></td>
<td><span id="name3"><?php echo $row['college'];?></span></td>
<td><span id="name3"><?php echo $row['subject_pass'];?></span></td>
<td><span id="name3"><?php echo $row['year'];?></span></td>
<td><span id="name3"><?php echo $row['tmark'];?></span></td>
<td><span id="name3"><?php echo $row['omark'];?></span></td>
<td><span id="name3"><?php echo $row['per'];?></span></td>
<td><span id="name3"><?php echo $row['reg_10'];?></span></td>
<td><span id="name3"><?php echo $row['grade'];?></span></td>
</tr>
<tr align="center">
<td><span id="name3"><?php echo $row['intermediate'];?></span></td>
<td><span id="name3"><?php echo $row['rol_12'];?></span></td>
<td><span id="name3"><?php echo $row['university_12'];?></span></td>
<td><span id="name3"><?php echo $row['college_12'];?></span></td>
<td><span id="name3"><?php echo $row['subject_pass_12'];?></span></td>
<td><span id="name3"><?php echo $row['year_12'];?></span></td>
<td><span id="name3"><?php echo $row['tmark_12'];?></span></td>
<td><span id="name3"><?php echo $row['omark_12'];?></span></td>
<td><span id="name3"><?php echo $row['per_12'];?></span></td>
<td><span id="name3"><?php echo $row['reg_12'];?></span></td>
<td><span id="name3"><?php echo $row['grade_12'];?></span></td>
</tr>
<tr align="center">
<td><span id="name3"><?php echo $row['ba1'];?></span></td>
<td><span id="name3"><?php echo $row['rol_ba1'];?></span></td>
<td><span id="name3"><?php echo $row['university_ba1'];?></span></td>
<td><span id="name3"><?php echo $row['college_ba1'];?></span></td>
<td><span id="name3"><?php echo $row['subject_pass_ba1'];?></span></td>
<td><span id="name3"><?php echo $row['year_ba1'];?></span></td>
<td><span id="name3"><?php echo $row['tmark_ba1'];?></span></td>
<td><span id="name3"><?php echo $row['omark_ba1'];?></span></td>
<td><span id="name3"><?php echo $row['per_ba1'];?></span></td>
<td><span id="name3"></span></td>
<td><span id="name3"><?php echo $row['grade_ba1'];?></span></td>
</tr>
<tr align="center">
<td><span id="name3"><?php echo $row['ba2'];?></span></td>
<td><span id="name3"><?php echo $row['rol_ba2'];?></span></td>
<td><span id="name3"><?php echo $row['university_ba2'];?></span></td>
<td><span id="name3"><?php echo $row['college_ba2'];?></span></td>
<td><span id="name3"><?php echo $row['subject_pass_ba2'];?></span></td>
<td><span id="name3"><?php echo $row['year_ba2'];?></span></td>
<td><span id="name3"><?php echo $row['tmark_ba2'];?></span></td>
<td><span id="name3"><?php echo $row['omark_ba2'];?></span></td>
<td><span id="name3"><?php echo $row['per_ba2'];?></span></td>
<td><span id="name3"></span></td>
<td><span id="name3"><?php echo $row['grade_ba2'];?></span></td>
</tr>
</table>
<table  cellspacing="0" width="100%" border="1px">
<tr>
<td align="center" style='background-color:black;color:white'><span id="name2">Corresponding Address</span></td><td align="center" style='background-color:black;color:white'><span id="name2">Permanent Address
</span></td>
</tr>
<tr align="center">
<td><span id="name3"><?php echo $row['village'];?></br><?php echo $row['postoffice'];?> </br><?php echo $row['dist'];?></br><?php echo $row['state'];?></br><?php echo $row['mobile'];?></br><?php echo $row['pincode'];?></span></td>
<td><span id="name3"><?php echo $row['village1'];?></br><?php echo $row['postoffice1'];?> </br><?php echo $row['dist1'];?></br><?php echo $row['state1'];?></br><?php echo $row['mobile1'];?></br><?php echo $row['pincode1'];?></span></td>

</tr>
</table>

<p>मैं घोषणा करता / करती हूँ  कि मेरा पुत्र / पुत्री <b> <?php echo $row['name']?></b> महाविद्यालय के समस्त नियमो का पालन करते हुए अनुशासनबद्ध रहेगा / रहेगी  वह अपने अध्ययन काल में अपना सच्चरित्र व सदव्यहार  बनाये  रखेगा / रखेगी , अन्यथा वह महाविद्यालय के नियमानुसार निष्कासन या दण्ड का भागी  होगा / होगी  | मैं उसके शुल्क निर्धारित समय पर भुगतान करने का उत्तरदायित्व लेता / लेती  हूँ |</p>

<table width="100%" >
<tr align="center">
<td width="35%" ></td><td width="30" style='font-weight:bold'></td><td width="35%"><span id="name3" style='font-weight:bold'> Guardian's Signature</span></td>
</tr>
<tr>
<td align="center"></td><td></td><td align="center"><span></span></td>
</tr>
</table>
<p>मैं महाविद्यालय में  <b> <?php echo $row['class']?>  </b>कक्षा का प्रवेशार्थी हूँ  | आवेदन पत्र में समस्त सूचनायें अपने पूर्ण विश्वास के साथ सही भरी है | कोई भी तथ्य असत्य पाए जाने पर या जान बूझ कर  छिपाने जाने पर मेरा प्रवेश निरस्त कर दिए  जाने पर मुझे कोई  आपत्ति नहीं  होगी  | महाविद्यालय के छात्र  / छात्रा के रूप में सदैव अनुशासनबद्ध रहकर  मैं अपना व्यवहार और आचरण सही रखूँगा / रखूँगी | </p>

<table width="100%" >
<tr align="center">
<td width="35%" ></td><td width="30" style='font-weight:bold'></td><td width="35%"><span id="name3" style='font-weight:bold'> Student's Signature</span></td>
</tr>
<tr>
<td align="center"><p><u>अनिवार्यता </u>-: अंको , प्रमाण -पत्र ,शुल्क रसीद ,आवेदन फॉर्म की सत्यापित प्रतिलिपिया   कॉलेज में जमा करे  |</p></td><td></td><td align="center"><span><img src="code/img/<?php echo $row['signature'];?>" height="50" ></span></td>
</tr>
</table>
<p>------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>

<br/></br/><br/>

    <table border='1px solid' width='100%'>
<tr align="center">
    <?php
    
    
    ?>
<td colspan='4'><span id="name25"><b>**** शुल्क  रसीद  ****</b></span></td>

</tr>
<tr align="left">
<td><span id="name2">एडमिशन संख्या </span></td>
<td><span id="name3"><?php echo $row['alot_number'];?></span></td>
<td><span id="name2">कक्षा</span></td>

<td><span id="name3"><?php echo $row['class'];?></span></td>
</tr>
<tr align="left">
<td><span id="name2">प्रवेशार्थी </span></td>
<td><span id="name3"><?php echo $row['name'];?></span></td>
<td><span id="name2">विषय</span></td>

<td><span id="name3"><?php echo $row['choose_subject2']?> </span></td>
</tr>
<tr>
<td><span id="name2">पिता / पति का नाम </span></td>
<td><span id="name3"><?php echo $row['fname'];?></span></td>
<td><span id="name2">जन्मतिथि</span></td>
<td><span id="name3"><?php echo $row['dob'];?></span></td>
</tr>
<tr>
<td><span id="name2">रजिस्ट्रेशन दिनांक</span></td>
<td><span id="name3"><?php echo $row['date']?></span></td>
<td><span id="name2">रजिस्ट्रेशन समय</span></td>
<td><span id="name3"><?php echo $row['date']?></span></td>
</tr>
<tr align='center'>
<td colspan='4'><span id="name25" style='font-weight:bold'>********* बैंक  ******* </span></td>
<?php
$sel12="select * from  payment_fees where billing_tel ='$app1' and order_status='Success' and amount>=2000";
$res12=mysqli_query($conn,$sel12);
$row12=mysqli_fetch_array($res12,MYSQLI_BOTH);



?>
</tr>
<tr>
<td><span id="name2">Order ID</span></td>
<td><span id="name3"><?php echo $row12['order_id']?></span></td>
<td><span id="name2">Email<span></td>
<td><span id="name3"><?php echo $row12['billing_email']?></span></td>
</tr>
<tr>
<td><span id="name2">पी० आर० नं०/TID</span></td>
<td><span id="name3"><?php echo $row12['tracking_id']?></span></td>
<td><span id="name2">बैंक  रेफ ० नं०</span></td>
<td><span id="name3"><?php echo $row12['bank_ref_no']?></span></td>
</tr>
<tr>
<td><span id="name2">शुल्क जमा दिनांक</span></td>
<td><span id="name3"><?php echo $row12['date']?></span></td>
<td><span id="name2">शुल्क जमा समय </span></td>
<td><span id="name3"><?php echo $row12['time']?></span></td>
</tr>
<tr>
<td><span id="name2"> फीस</span></td>
<td><span id="name3"><?php echo $row12['amount']?></span></td>
<td><span id="name2">स्थिति  </span></td>
<td><span id="name3"><?php echo $row12['order_status']?></span></td>
</tr>
<tr>
</table>
<div class='row'><br/>
<table cellspacing="0" width="100%" border="1px">
<tr>
<td colspan='9' align="center" style='background-color:black;color:white'><span id="name2">Proof Of Unversity Fees</span></td>

</tr></table>
<center><img src="code/img/<?php echo $row['proof'];?>" height="300" ></span></center></div>
<br/></br/>
<p>------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>

<br/></br/><br/>
<table cellspacing="0" width="100%" border="1px">
<tr>
<td colspan='9' align="center" style='background-color:black;color:white'><span id="name2">Receipt</span></td>

</tr>
<tr align="left">
<td><span id="name2">एडमिशन संख्या </span></td>
<td><span id="name3"><?php echo $row['alot_number'];?></span></td>
<td><span id="name2">कक्षा</span></td>

<td><span id="name3"><?php echo $row['class'];?></span></td>
</tr>
<tr align="left">
<td><span id="name2">प्रवेशार्थी </span></td>
<td><span id="name3"><?php echo $row['name'];?></span></td>
<td><span id="name2">विषय</span></td>

<td><span id="name3"><?php echo $row['choose_subject2'];?></span></td>
</tr>
<tr>
<td><span id="name2">पिता / पति का नाम </span></td>
<td><span id="name3"><?php echo $row['fname'];?></span></td>
<td><span id="name2">जन्मतिथि</span></td>
<td><span id="name3"><?php echo $row['dob'];?></span></td>
</tr>
<tr>
<td><span id="name2">दिनांक</span></td>
<td><span id="name3"><?php echo $row['datetime']?></span></td>
<td><span id="name2">मोबाइल</span></td>
<td><span id="name3"><?php echo $row['mobile']?></span></td>
</tr>

</table>

<table width="100%" >
<tr align="center">
<td width="35%" ></td><td width="30" style='font-weight:bold'></td><td width="35%"><span id="name3" style='font-weight:bold'> हस्ताक्षर प्राप्तकर्ता </span><br/><br/></td>
</tr>
<td align="center"></td><td></td><td align="center"><span></span></td>
</tr>
</table><br/><br/>
<button id="print" style="margin-left:500px;" >Click For Print</button>&emsp;&emsp;&emsp;&emsp;&emsp;

</body>
</html>