<html>
			<head>
				<?php 
				include("../link/databaseconnection.php"); 
				session_start();
		
			$form=$_REQUEST['form'];
			$game=$_REQUEST['game'];
			
		
				
				?>
				<link href="../css1/dashboard.css" rel="stylesheet" type="text/css"/>
				<link href="../css1/dashboardmenu.css" rel="stylesheet" type="text/css"/>
				<link href="../css1/student_details_side_menu.css" rel="stylesheet" type="text/css"/>
				<link href="../css1/student_details.css" rel="stylesheet" type="text/css"/>
				<link rel="stylesheet" href="libs/css/bootstrap.min.css">
	<link rel="stylesheet" href="libs/style.css">
	<script src="libs/navbarclock.js"></script>
					<style>



.top-left {
  position: absolute;
  top: 170px;
  left: 19px;
  font-size:12px;
  font-weight:bold;
 
} 
#pic {
  position: absolute;
  top: 288px;
  left: 920px;
  border:1px solid;
  
}
#qr {
  position: absolute;
  top: 288px;
  left: 100px;
  
}
#principal {
  position: absolute;
  top: 300px;
  left: 195px;
  
}
#depart {
  position: absolute;
  top: 295px;
  left: 95px;
  
}
#stu_sign {
  position: absolute;
  top: 305px;
  left: 15px;
  
}
#student_sign {
  position: absolute;
  top: 327px;
  left: 21px;
  font-size:9px;
  
}
#cheif_sign {
  position: absolute;
  top: 327px;
  left: 90px;
  font-size:9px;
  
}

#principal_sign {
  position: absolute;
  top: 327px;
  left: 190px;
  font-size:9px;
  
}
#sch {
  position: absolute;
  top: 138px;
  left: 190px;
  font-size:12px;
  color:green;
  font-weight:bold;
}
#session {
  position: absolute;
  top: 400px;
  left: 520px;
  font-size:25px;
  color:red;
  font-weight:bold;
}
#data {
  position: absolute;
  top: 460px;
  left: 180px;
  font-size:22px;
  color:black !important;
  font-weight:bold;
  letter-spacing: 2px;
  text-align:center;
  text-transform:uppercase;
}

#k {
  position: absolute;
  top: 750px;
  left: 110px;
  font-size:22px;
  color:red !important;
  font-weight:bold;
  letter-spacing: 2px;
  text-align:center;
  text-transform:uppercase;
}
#c {
  
  color:red !important;
  
}
#p {
  position: absolute;
  top: 750px;
  left: 930px;
  font-size:22px;
  color:red !important;
  font-weight:bold;
  letter-spacing: 2px;
  text-align:center;
  text-transform:uppercase;
}

#game {
  position: absolute;
  top: 315px;
  left: 460px;
  font-size:35px;
  color:#f8fc07 !important;
  font-weight:bold;
  letter-spacing: 2px;
  text-align:center;
  text-transform:uppercase;
}

@media print {
    
    #game {
  
  color:#f8fc07 !important;
 
}
    
            }
					</style>

			</head>
<body>
<div class="container-fluid">
		<div class="row">
		
		</div>
		<div class="row">
		<!--menu-->
		
		<!--menu--close-->
		<?php
		
		$f = "visit.php";
if(!file_exists($f)){
	touch($f);
	$handle =  fopen($f, "w" ) ;
	fwrite($handle,0) ;
	fclose ($handle);
}
 
include('libs/phpqrcode/qrlib.php'); 

$sel3="select * from  sanskritik_reg1 where game ='$game' and form_no='$form'";
	$res3=mysqli_query($conn,$sel3);
$row3=mysqli_fetch_array($res3,MYSQLI_BOTH);

$sel32="select * from  sanskritik where id ='$game'";
	$res32=mysqli_query($conn,$sel32);
$row32=mysqli_fetch_array($res32,MYSQLI_BOTH);
$gname=$row32['name'];
$apply=$row3['apply'];

if($apply!='')
{
    if($apply=='First')
    {
        $apply='प्रथम';
    }
    if($apply=='Second')
    {
        $apply='द्वितीय';
    }
    if($apply=='Third')
    {
        $apply='तृतीय';
    }
$session=$row3['session'];
		 $sel="select * from  registration2 where session ='$session' and id='$form' ";
	$res=mysqli_query($conn,$sel);
	$s=1;
$row=mysqli_fetch_array($res,MYSQLI_BOTH);
		
	
		$name=$row['name'];
		$alot_number=$row['alot_number'];
		$class=$row['class'];

		$link="https://sgngovtcollegemau.org/admin/print_vibha.php?game=$game&&form=$form";
	$email = $row['alot_number'];
	$subject =  $row['name'];
	$filename = $row['alot_number'].$row3['id'];
	$body =  $row['class'].'  '.$cl.$link;
	//$link =  $cl;
	$tempDir = 'temp1/'; 
	$codeContents = 'mailto:'.$email.'?subject='.urlencode($subject).'&body='.urlencode($body); 
	QRcode::png($codeContents, $tempDir.''.$filename.'.png', QR_ECLEVEL_L, 5);
	
	if($session=='2024-2025')
	{
	    $session1='2024-25';
	}
			?>
		
<div class='row' id='div' style='border-bottom: 35px solid white ;height:830px;width:1200px'><img src='../images/game1.jpg' style='height:840px;width:1200px'><img src='../code/img/<?php echo $row['picture'];?>' style='height:150px;width:130px' id='pic'><img src="temp1/<?php echo $filename.'.png';?>" style='height:150px;width:150px' id='qr'><p id='session'>सत्र - <?php  echo $session1;?></p>
	<p id='data'>प्रमाणित किया जाता है  कि श्री / श्रीमती /  कु  ०     <span id='c'>     &emsp;<?php echo $row['name']?> </span><br/> <br/>  आत्मज / आत्मजा श्री  &emsp; <span id='c'> <?php echo $row['fname']?>  </span>&emsp; कक्षा &emsp; <span id='c'> <?php echo $row['class']?> </span>
	
	&emsp;ने <br/> <br/> परिषद द्वारा आयोजित  &emsp; <span id='c'><?php echo $gname?>  </span>&emsp;  <br/> <br/> प्रतियोगिता में    &emsp;<span id='c'>  <?php echo $apply ?> </span>&emsp; स्थान प्राप्त किया । 
<br/></br> आयोजित तिथि- <span id='c'>	<?php echo $row32['date'];?> </span>	</p>
		<p id='k'>संयोजक
		<p id='p'>प्राचार्य</p>
			<p id='game'>सांस्कृतिक परिषद</p>
		
		</p>
		
		</div>
	<?php } else { 	echo"<script>alert('Invailid');window.location.href='https://www.sgngovtcollegemau.org/';</script>"; }?>
		
	
		
	
		</div>
		
		</div>
		</html>