    
	<?php
	include("link/databaseconnection.php");
            session_start();
$flag=$_REQUEST['flag'];
$session=$_REQUEST['flag2'];
 //$mobile=$_SESSION['mobile']=$flag;
 

 
	
	$sel2="select * from registration2 where application='$flag' and session='$session'  ";
	$res2=mysqli_query($conn,$sel2);
	
	$row2=mysqli_fetch_array($res2,MYSQLI_BOTH);
	$alot=$row2['alot_number'];
	$class_s=$row2['class'];
	$choose_subject1=$row2['choose_subject1'];
		$choose_subject2=$row2['choose_subject2'];
	
	
		if($class_s=='B.Sc I')
	{
           if($choose_subject1=='ZOOLOGY' or $choose_subject2=='BOTANY' or  $choose_subject1=='BOTANY' or $choose_subject2=='ZOOLOGY' )
          {
             $c_sub= 'ZOOLOGY';
          }
        
          if($choose_subject1=='MATHEMATICS' or $choose_subject2=='MATHEMATICS'  )
          {
            $c_sub= 'MATHEMATICS';
          }
          
          if($choose_subject1=='PHYSICS' or $choose_subject2=='CHEMISTRY' or  $choose_subject1=='CHEMISTRY' or $choose_subject2=='PHYSICS'  )
          {
            $c_sub= 'PHYSICS';
          }
          
          
           $c_sub;
          	$sel5="select * from on_of where class='$class_s' and subject='$c_sub'";
	$res5=mysqli_query($conn,$sel5);
	$row5=mysqli_fetch_array($res5,MYSQLI_BOTH);
           $succ=$row5['adm'];
          
          
          
           	$sel52="select * from on_of where class='$class_s' and subject='$c_sub'";
	$res52=mysqli_query($conn,$sel52);
	$row52=mysqli_fetch_array($res52,MYSQLI_BOTH);
          $succ_reg=$row52['reg'];
	}
	if($class_s=='BA I')
	{
	    $c_sub='BA I';
	    
	    $sel53="select * from on_of where class='$class_s' ";
	$res53=mysqli_query($conn,$sel53);
	$row53=mysqli_fetch_array($res53,MYSQLI_BOTH);
          $succ=$row53['adm'];
          
          
           	$sel524="select * from on_of where class='$class_s' ";
	$res524=mysqli_query($conn,$sel524);
	$row524=mysqli_fetch_array($res524,MYSQLI_BOTH);
          $succ_reg=$row524['reg'];
          
	}
       	if($class_s=='M.Sc I')
	{
	    $c_sub='M.Sc I';
	    
	    $sel53="select * from on_of where class='$class_s' and subject='$choose_subject1' ";
	$res53=mysqli_query($conn,$sel53);
	$row53=mysqli_fetch_array($res53,MYSQLI_BOTH);
          $succ=$row53['adm'];
          
          
           	$sel524="select * from on_of where class='$class_s' and subject='$choose_subject1'";
	$res524=mysqli_query($conn,$sel524);
	$row524=mysqli_fetch_array($res524,MYSQLI_BOTH);
          $succ_reg=$row524['reg'];
          
	} 
	
	
	   	if($class_s=='MA I')
	{
	    $c_sub='M.A I';
	    
	    $sel53="select * from on_of where class='$class_s' and subject='$choose_subject1' ";
	$res53=mysqli_query($conn,$sel53);
	$row53=mysqli_fetch_array($res53,MYSQLI_BOTH);
          $succ=$row53['adm'];
          
          
           	$sel524="select * from on_of where class='$class_s' and subject='$choose_subject1'";
	$res524=mysqli_query($conn,$sel524);
	$row524=mysqli_fetch_array($res524,MYSQLI_BOTH);
          $succ_reg=$row524['reg'];
          
	} 
       
       
	//echo $row2['picture'];
	$mobile=$row2['mobile'];
	$id=$row2['id'];
	if($row2 )
	{
	    $sel="select * from payment_fees where billing_tel='$mobile' and order_status='Success' and form_id='$id' and amount =50 and session='$session'";
	$res=mysqli_query($conn,$sel);
	
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$sel25="select * from payment_fees_computer where billing_tel='$mobile' and order_status='Success' and form_id='$id'  and session='$session'";
	$res25=mysqli_query($conn,$sel25);
	
	$row25=mysqli_fetch_array($res25,MYSQLI_BOTH);
	$mob=$row['billing_tel'];
?>
<!DOCTYPE html>
<html> 


<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->
<head>
<title>Welcome To SGN Govt. P. G. College Muhammdabad Gohana Mau</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<meta name="keywords" content="Curative a Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" media="all">
<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" media="all">
<link rel="stylesheet" href="css/owl.carousel.css" type="text/css" media="all">
<link href="css/owl.theme.css" rel="stylesheet">
<link rel="stylesheet" href="css/jquery-ui.css" type="text/css" media="all" />
<link type="text/css" rel="stylesheet" href="css/cm-overlay.css" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="all"/>
<link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link href="http://fonts.googleapis.com/css?family=Abel" rel="stylesheet">
<link href="http://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="../cdn.datatables.net/1.10.19/css/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css">
</head>
<body>

<style>
	.marginBottom-0 {margin-bottom:0;}

.dropdown-submenu{position:relative;}
.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;}
.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#cccccc;margin-top:5px;margin-right:-10px;}
.dropdown-submenu:hover>a:after{border-left-color:#555;}
.dropdown-submenu.pull-left{float:none;}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;}
</style>
<!-- Header -->
	<!--<div class="header-top">
		<div class="container">
			<div class="bottom_header_left">
			<div class="w3_fr">
				<a href="#">Email Us</a>
				<a href="#contact" class="scroll">How to find us</a>
				
				</div>
			</div>
			<div class="bottom_header_right">
				<div class="bottom-social-icons">
					<a class="facebook" href="#">
						<span class="fa fa-facebook"></span>
					</a>
					<a class="twitter" href="#">
						<span class="fa fa-twitter"></span>
					</a>
					<a class="pinterest" href="#">
						<span class="fa fa-pinterest-p"></span>
					</a>
					<a class="linkedin" href="#">
						<span class="fa fa-linkedin"></span>
					</a>
				</div>
				<div class="head-search">
				<form action="#" method="post">
					<div class="formborder">
						<input type="text" placeholder="Search..." name="Search..." required="">
						<input type="submit" value="">
					</div>
				</form>
			</div>


				
				
				<div class="clearfix"> </div>
			</div>
			<div class="clearfix"> </div>
		</div>
	</div>-->
	<script>

	$(document).ready(function(){
	//alert('ok');
	$("#myform").submit(function(e){
		var app1=$("#app1").val();
		e.preventDefault();	
		$("#btn").prop("disabled",true);
		$.ajax({
					url:"code/registrationcode.php?flag=5",
					type:"POST",
					data:new FormData(this),
					contentType:false,
					processData:false,
					success:function(res){
						alert(res);
						if(res=="Submit")
						{
						window.location.href="student_print1.php?flag="+app1;
						$("#myform").trigger("reset");
						}
					},
					error:function(){
						alert("error");
					}
				
				});
	});
	
	
});
$(document).ready(function(){
		$("#course").change(function(){
			//alert('ok');
			var classc =$(this).val();
		$.ajax({
			url:"code/registrationcode.php?flag=4",
			type:"POST",
			data: {class12:classc},
			success:function(res){
			//	alert(res);
				$("#subject1").html(res);
				
			},
			error:function(){
				alert("error");
			}
		});
		});
	});
	</script>
	<div class="header" style="background:url(images/ch13.jpg) repeat;">
		<div class="content white">
			<nav class="navbar navbar-default">
				<div class="container">
					<div class="navbar-header">
						
						
								<img src="images/name.png" width="100%">
						
					</div>
					
					<!--/.navbar-->
				</div>
			</nav>
		</div>
	</div>
	<div class="headerdown">
	<div class="container">
    
<?php include('link/menu.php');?>
        
	<div class="clearfix"></div>
	</div>
	</div>
<!-- /Header--> 
<!-- banner-->

<!--/banner-->
   <div class="gallery" id="gallery">
         <div class="container">
         <h3>DASHBOARD OF <span style='color:green'><?php echo $row2['name'];?> </span> <span><img src="code/img/<?php echo $row2['picture'];?>" height="40px" width="40px;"></span><span><a href='logout_student.php'><button>Logout</button></a></span> </h3>
            <div class="about-bottom  w3ls-team-info">
		             
           
          <div class="col-md-12 w3ls_ar" style="background-color:#FFFFFF; padding:30px;">
		  <?php if(!$row)
		  {
			  echo "<marquee style='color:red'> Your Registration Fees not Submit</marquee>";
		  }
		  else
		  {
			  echo "<marquee style='color:green'> Your Registration Fees  Submit Successfully</marquee>";
		  }
		  ;?>
		  <div class='row'>
		   <script>
  function readURL(input) {
  if (input.files && input.files[0]) {
    var reader = new FileReader();
    
    reader.onload = function(e) {
      $('#blah').attr('src', e.target.result);
    }
    
    reader.readAsDataURL(input.files[0]);
  }
}

$("#sign").change(function() {
  readURL(this);
});</script>
 <script>
  function readURL(input) {
  if (input.files && input.files[0]) {
    var reader = new FileReader();
    
    reader.onload = function(e) {
      $('#blah').attr('src', e.target.result);
    }
    
    reader.readAsDataURL(input.files[0]);
  }
}

$("#sign").change(function() {
  readURL(this);
});</script>
<form action="photo_change.php" method="post" enctype="multipart/form-data">
	<div class='row' >
	    
		  <div class='col-sm-6'>
		  <div class="col-sm-4"><span style='font-weight:bold'>Old Photo <br/></span><span><img src="code/img/<?php echo $row2['picture'];?>" height="90px" width="90px;"></span></div>
		  <div class="col-sm-4"><span style='font-weight:bold'>Choose New Photo <br/></span> <img id="blah" alt="Student Picture" width="100" height="100" /> </span></div>
  
    <input type="hidden" class="form-control" id="" placeholder="Nationality" value='<?php echo $flag;?>'name="flag"  >
	 <input type="hidden" class="form-control" id="" placeholder="Nationality" value='<?php echo $session;?>'name="session"  >

<input type="file" name="picture" required   data-validation="mime size" data-validation-allowing="jpg, png, jpeg"  data-validation-max-size="50kb" data-validation-error-msg-size="You can not upload Picture larger than 50kb" onchange="document.getElementById('blah').src = window.URL.createObjectURL(this.files[0])" required><span style='color:red'>Max Size 50KB</span>

	  </div>
  <div class='col-sm-6'>
   <div class="col-sm-4"><span style='font-weight:bold'>Old Signature <br/></span><img src="code/img/<?php echo $row2['signature'];?>" height="70px" width="100px;"></span></div>
		  <div class="col-sm-4"><span style='font-weight:bold'>Choose New Signature <br/></span> </span><span> New Signature <br/> <img id="sign" alt="Student Signature" width="100" height="70" /></div>
  
	   

<input type="file" name="signature" data-validation="mime size" data-validation-allowing="jpg, png, jpeg"  data-validation-max-size="50kb" data-validation-error-msg-size="You can not upload Signature larger than 50kb" required onchange="document.getElementById('sign').src = window.URL.createObjectURL(this.files[0])"><span style='color:red'>Max Size 50KB</span>

	  
	  </div>
	  <br/>
	  <center><button class='btn btn-danger'>Change Signature & Photo</button></center>
	  <br/>
	  <h6 style='color:red'>यदि आपका  Photo , Signature  नहीं  दिखा रहा है तो आप इसको  Change कर दें |</h6>
	  </div>
	  <br/>
	  <div class='row' style='background-color:purple;height:15px'></div>
	  </form>
	  </div>
	  <?php
	   $file1=$row2['picture'];
$scan = scandir('code/img');
$available='';
foreach($scan as $file) {
   
      if($file==$file1)
      {
          //echo $file;
          $available=1;
          break;
      }
      else
      {
         // echo 'no';
         $available=0;
          
      }

}
//echo $available;
	  
	  ?>
  <br/>
  <?php
  if($available==1)
  {
  
  ?>
		   	<div class="form-group">
    <label  class="col-sm-4 control-label">मोबाइल नंबर<span style="color:red"></span></label>
    <div class="col-sm-4">
      <input type="number" style='color:black' class="form-control" id="app1" value='<?php echo $row2['mobile'];?>' readonly />
    </div>
	 <div class="col-sm-4">
      
    </div>
  </div><br/><br/>
         	<div class="form-group">
    <label  class="col-sm-4 control-label">फॉर्म नंबर<span style="color:red"></span></label>
    <div class="col-sm-4">
      <input type="number" style='color:black' class="form-control" id="app1" value='<?php echo $row2['id'];?>' readonly />
    </div>
	 <div class="col-sm-4">
       <a href='registration _slip_area1.php?flag=<?php echo $row2['id'];?>&&flag2=<?php echo $session;?>' target='_blank'><button type='button' class='btn btn-primary'>Click For Registration Slip</button></a>
    </div>
  </div>
  <br/>
  <br/>
  	<div class="form-group">
    <label  class="col-sm-4 control-label">शुल्क  रसीद  Payment(Order Id)<span style="color:red"></span></label>
    <div class="col-sm-4">
      <input type="number" style='color:black' class="form-control"  value='<?php echo $row['order_id'];?>' readonly />
    </div>
	 <div class="col-sm-4">
	 <?php 
	
	 if(!$row)
	 {
	     if($succ_reg==1)
	     {
	          echo " <a href='chech22.php?flag=". $flag."&&flag2=". $session."' button type='button' class='btn btn-primary'>Click For Payment (Registration Fees)</button></a>";
	     }
	     else
	     {
	         echo "<span style='color:red'> Registration Closed</span>";
	     }
		
	 }
	 else
	 {
		 echo " <a href='student_print11.php?flag=".$id."&&flag2=". $session."' button type='button' class='btn btn-primary'>Click For Registration Submit Form For College</button></a>";
	 }
	 
	 ?>
     <br/>
	</div>
  </div>
  <br/><br/>
  

  <?php
  if($row)
  {
  
  ?>
  	<div class="form-group" >
	<?php
	 $sel4="select * from payment_fees where billing_tel='$mobile' and order_status='Success' and session='$session' and form_id='$id' and amount >50 order by id desc";
	$res4=mysqli_query($conn,$sel4);
	
	$row4=mysqli_fetch_array($res4,MYSQLI_BOTH);
	
	if($row2['counsiling']=='Yes' and $row)
	{
	?>
    <label  class="col-sm-4 control-label">शुल्क  रसीद  एडमिशन(Order Id)<span style="color:red"></span></label>
    <div class="col-sm-4">
      <input type="number" style='color:black' class="form-control"  value='<?php echo $row4['order_id'];?>' readonly />
    </div>
	 <div class="col-sm-4">
	 <?php 
	
	 if(!$row4)
	 { 
	     
	    if($succ==1)
	    {
	         
		 echo " <a href='admission_shulk_ba.php?flag=".$row2['mobile']."&&flag2=". $session."&&flag3=". $row2['id']."' button type='button' class='btn btn-danger'>Click For Admission Payment</button></a>";
	    }
	    else
	    {
	        echo '<span style="color:red">Admission Close</span>';
	    }
	    
         
	 }
	 else
	 {
		 echo " <a href='student_print13.php?flag=".$row2['mobile']."&&flag2=". $session."&&flag3=". $row2['id']."' button type='button' class='btn btn-primary'>Click For Admission Submit Form For College</button></a>";
	 }
	}
	else
	{
		echo "<font style='color:red'>Your counselling is not Complete Contact College or Fees Not Submit </font>'";
	}
	 ?>
     
	</div>
	<br/>
	<?php }?>
	 <?php
  if($row2['idcard']=='Yes' and $row2['alot_number']!='')
  {
      ?>
      	<div class="form-group" >
    <label  class="col-sm-4 control-label">परिचय पत्र  (I-Card)<span style="color:red"></span></label>
    <div class="col-sm-4">
      <input type="text" style='color:black' class="form-control"  value='I-Card Generate Successfully' readonly />
    </div>
	 <div class="col-sm-4">
	 <?php 
	 
		
	 
		 echo " <a href='admin/single_idprint.php?flag=". $row2['application']."&&flag2=". $session."' button type='button' class='btn btn-primary' target='_blank'>Click For Print I-Card</button></a>";
	 
	 
	 
	 ?>
     
	</div>
  </div>
  <br/><br/>
  <?php if($row2['skill']=='Basic Computer Application') {?>
      	<div class="form-group" style='display:none'>
    <label  class="col-sm-4 control-label">Computer Fees<span style="color:red"></span></label>
    <div class="col-sm-4">
      <input type="text" style='color:black' class="form-control"  value='350.0 Rs' readonly />
    </div>
	 <div class="col-sm-4">
	 <?php 
	 
		if(!$row25)
		{
	 
		 echo " <a href='fees_computer.php?flag=". $row2['id']."&&flag2=". $session."' button type='button' class='btn btn-primary' target='_blank'>Click For Payment Computer Fees</button></a>";
	 
		}
		else
		{
		     echo " <a href='improment_print_computer.php?flag=". $row2['id']."&&flag2=". $session."' button type='button' class='btn btn-primary' target='_blank'> Slip Computer Fees</button></a>";
		}
	 
	 ?>
     
	</div>
  </div>
      
      
      <?php
  }
  }
  
  
  ?>
  </div>
  
    
  <BR/>
  <BR/>
  <?php 
 
  if($row2['amount']!=0)
  {
	  $amn=$row2['amount'];
	  $amn1=$amn.'.00';
	  $sel251="select * from payment_fees where billing_tel='$mobile' and amount='$amn' and form_id='$id' and order_status='Success' and session='$session' or billing_tel='$mobile' and amount='$amn1' and form_id='$id' and order_status='Success' and session='$session' order by id desc  ";
	$res251=mysqli_query($conn,$sel251);
	
	$row251=mysqli_fetch_array($res251,MYSQLI_BOTH);
	
	  if(!$row251)
	  {
		  
  ?>
   	<div class="form-group">
    <label  class="col-sm-4 control-label"><span style="color:red">Adjust Amount</span></label>
    <div class="col-sm-4">
      <input type="number" style='color:black' class="form-control"  value='<?php echo $row2['amount'];?>' readonly />
    </div>
	 <div class="col-sm-4">
	 <?php 
	 if($row2)
	 {
		
		
	 if($row2['amount']!=0)
	 {
		 echo " <a href='pay_extra.php?flag=".$row2['id']."&&flag2=". $session."' button type='button' class='btn btn-danger'>Click Pay</button></a>";
	 }		
		
	 }
	 
	 
	 ?>
     
	</div>
  </div>
  <?php
  
  }
  }
  }
  else
  {
     echo '<ol style="font-weight:bold">
 <li>कृपया अपना फोटो , सिग्नेचर साफ अपलोड करें |</li>
 <li>अपलोड होने के बाद ही आप  आगे  जा सकते हैं |</li>
 
 </ol>';
  }
  ?>
  
  
          </div>
       
		  
            </div>
            </div>
        </div>
	</div>

<!-- footer -->
	<?php include('link/footer.php');?>
	<!-- //footer -->
	
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>

<script src="../cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script src="../cdn.datatables.net/1.10.19/js/dataTables.bootstrap.min.js"></script>

<script  src="js/move-top.js"></script>
<script  src="js/easing.js"></script>
<script  src="js/SmoothScroll.min.js"></script>	
	<!-- for testimonials slider-js-file-->
			<script src="js/owl.carousel.js"></script>
	<!-- //for testimonials slider-js-file-->
		<script>
		$(document).ready(function() { 
		$("#owl-demo").owlCarousel({
 
			autoPlay: 3000, //Set AutoPlay to 3 seconds
			autoPlay:true,
			items : 3,
			itemsDesktop : [640,5],
			itemsDesktopSmall : [414,4]
		});
		}); 
</script>
<!-- for testimonials slider-js-script-->

 <!--script-->
<script src="js/easyResponsiveTabs.js" type="text/javascript"></script>
		    <script type="text/javascript">
			    $(document).ready(function () {
			        $('#horizontalTab').easyResponsiveTabs({
			            type: 'default', //Types: default, vertical, accordion           
			            width: 'auto', //auto or any width like 600px
			            fit: true   // 100% fit in a container
			        });
			    });
				
</script>
<!--script-->
<!-- Calendar -->
<script src="js/jquery-ui.js"></script>
	<script>
		$(function() {
		$( "#datepicker,#datepicker1" ).datepicker();
		});
	</script>
<!-- //Calendar -->
<!-- /gallery -->
    <script src="js/jquery.tools.min.js"></script>
    <script src="js/jquery.mobile.custom.min.js"></script>
    <script src="js/jquery.cm-overlay.js"></script>

	<!--multi level menu-->
    	<script>
			$(document).ready(function(){
			$('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) {
			  event.preventDefault(); 
			  event.stopPropagation(); 
			  $(this).parent().siblings().removeClass('open');
			  $(this).parent().toggleClass('open');
			});
		  });

		</script>
    <!--multi level menu end-->

    <script>
        $(document).ready(function () {
            $('.cm-overlay').cmOverlay();
        });
    </script>
    <!-- //gallery -->
<!-- start-smoth-scrolling -->
	<script type="text/javascript">
		$(document).ready(function() {
			/*
				var defaults = {
				containerID: 'toTop', // fading element id
				containerHoverID: 'toTopHover', // fading element hover id
				scrollSpeed: 1200,
				easingType: 'linear' 
				};
			*/
								
			$().UItoTop({ easingType: 'easeOutQuart' });
								
			});
	</script>
<!-- scrolling script -->
<script type="text/javascript">
	jQuery(document).ready(function($) {
		$(".scroll").click(function(event){		
			event.preventDefault();
			$('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
		});
	});
</script> 
<!-- //scrolling script -->
<!--//start-smoth-scrolling -->

</body>


</html> 
<?php
	}
else
{
	echo"<script>alert('Mobile No./Order Id not Exist/Payment Failed this Order Id');window.location.href='login_student.php';</script>";
}


?>