<?php
session_start();
$app1=$_REQUEST['flag'];
include("link/databaseconnection.php");
$sel12="select * from  payment_fees where order_id ='$app1' ";
$res12=mysqli_query($conn,$sel12);
$row12=mysqli_fetch_array($res12,MYSQLI_BOTH);
$mob=$row12['billing_tel'];
$sel="select * from  registration2 where mobile ='$mob' order by id desc";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);


//echo"$app1";
?>

<html>
<head>
 <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}
 #name25{font-weight:bold;font-size:16px}
 @media print {
 #name2{font-weight:bold;font-size:13px}
 #name25{font-weight:bold;font-size:14px}
 #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: 280;
  left: 400;
  font-size:55px;
  color:red;
    
    
}
 </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='adm_process.php';
	});
	$("#back").click(function(){
		window.location.href='index.php';
	});
});

</script>
<link href="css/student_print.css" rel="stylesheet" type="text/css">
</head>
<body >
    <?php
    if($row12['order_status']=='Success')
    {
    
    ?>
<h3 id='gh'>Success</h3>
<table frame="border" width="100%" >


<tr style='background-color:black;color:white'>
<td colspan='2'><span><img src="images/slip.png" height="110px" width="100%"/></span></td>
</tr>
</table>
<table border='1px solid' width='100%'>
<tr align="center">
<td colspan='4'><span id="name25">**** शुल्क  रसीद( Adjustment Improvment)  ****</span></td>
</tr>
<tr align="left">
<td><span id="name2">फॉर्म संख्या </span></td>
<td><span id="name3"><?php echo $row['id'];?></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_subject1']?>,<?php echo $row['choose_subject2']?> , <?php echo $row['choose_subject3']?></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">********* बैंक  ******* </span></td>

</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>
<br/><br/>
<button id="print" style="margin-left:500px;" >प्रिंट करने के लिए क्लिक करें</button>&emsp;&emsp;&emsp;&emsp;&emsp;

</body>
</html>
<?php

}

?>
 <?php
    if($row12['order_status']!='Success')
    {
    
    ?>
<h3 id='gh'>Cancel</h3>
<table frame="border" width="100%" >


<tr style='background-color:black;color:white'>
<td colspan='2'><span><img src="images/slip.png" height="110px" width="100%"/></span></td>
</tr>
</table>
<table border='1px solid' width='100%'>
<tr align="center">
<td colspan='4'><span id="name25">**** शुल्क  रसीद( Adjustment Improvment)  ****</span></td>>

</tr>
<tr align="left">
<td><span id="name2">फॉर्म संख्या </span></td>
<td><span id="name3"><?php echo $row['id'];?></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_subject1']?>,<?php echo $row['choose_subject2']?> , <?php echo $row['choose_subject3']?></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">********* बैंक  ******* </span></td>

</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>
<br/><br/>
<button id="print" style="margin-left:500px;" >प्रिंट करने के लिए क्लिक करें</button>&emsp;&emsp;&emsp;&emsp;&emsp;

</body>
</html>
<?php

}

?>