MMCT TEAM
Server IP : 2a02:4780:11:1359:0:1d43:a566:2  /  Your IP : 216.73.216.199
Web Server : LiteSpeed
System : Linux in-mum-web1259.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64
User : u490972518 ( 490972518)
PHP Version : 5.6.40
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u490972518/domains/swrampyarejan.in/public_html/code/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u490972518/domains/swrampyarejan.in/public_html/code/student_detailscode5 (1).php
<?php 
include("../link/databaseconnection.php");
$flag=$_REQUEST['flag'];
if(!$flag)
			{
				header("location:../index.php");
			}
	
switch($flag)
{
    case 101010:
	$year1=$_POST['session'];
  $sel1="select * from  registration where session ='$year1' and status='' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: []
    });
	
});
</script>



	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">Sch No.</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class<span style="color:red">/Trans.</span></th><th  style="text-align:center">Address</th><th  style="text-align:center">Action</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">App. No.</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class<span style="color:red">/Trans.</span></th><th  style="text-align:center">Address</th><th  style="text-align:center">Action</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  $year=$_POST['session'];
  $sel="select * from  registration where session ='$year1' and status='' order by id desc";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		$a=$row['village'];
			$id_new=$row['id'];
		$app=$row['application'];
	$b=$row['postoffice'];
	$scholar=$row['application'];
	$name=$row['name'];
	$c=$row['dist'];
	$e=$row['mobile'];
	$d=$a." ".$c;
	$sel1="select * from  studentfees where year ='$year1' and search='$app' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	while($row1=mysqli_fetch_array($res1,MYSQLI_BOTH))
	{
	    $f=$row1['id'];
	    echo $row1['id'].'id-'.$row['id'].'sch-'.$app;
	    echo '<br/>';
	  //  $up="update studentfees set search='$id_new' where id='$f' and year='$year1'";
	  //  mysqli_query($conn,$up);
	}


//$up="update sales set name='$name' where scholar='$scholar' and name=''";
//mysqli_query($conn,$up);
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['application'];?></td><td><img src="../code/img/<?php echo $row['picture'];?>" height="90px" width="90px;"></td><td><?php echo $row['name']."<br/>"." <b>Father-</b>".$row['fname']."<br/>"." <b>Mother-</b>".$row['mname']."<br/>". "<b>D.O.B-</b>".$row['dob']."<br/>"."<b>Adh-</b>".$row['adhar'];?></td><td><?php echo $row['subject']."<br/>"."<font color=red size=2pt>".$row['trans'].'</font>';?></td><td><?php echo "<b>Vill-</b>".$a."<br/>"."<b>Post-</b>".$b."<br/>"."<b>Dist-</b>".$c."<br/>"."<b>Mob-</b>".$row['mobile'];?></td>
	
	
	<td><a href="javascript:;" onclick="editrow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-pencil"></span></a>
	
	&emsp;<a href="javascript:;" onclick="messagerow(<?php echo $row['id'];?>)"> <span class="glyphicon glyphicon-envelope"></span></a>
	
	<br/><br/>&emsp;<a href="registration_print.php?flag=<?php echo $row['id'];?>"><span class="fa fa-print"></span></a>
	&emsp;<a href="javascript:;" onclick="transferrow(<?php echo $row['id'];?>)"> <span class=""></span>Trans</a>
	&emsp;<a href="javascript:;" onclick="deleterow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-trash"></span></a></td>
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
    
	case 1:
	$year1=$_POST['session'];
  $sel1="select * from  registration where session ='$year1' and status='' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: []
    });
	
});
</script>



	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">Sch No.</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class<span style="color:red">/Trans.</span></th><th  style="text-align:center">Address</th><th  style="text-align:center">Action</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">App. No.</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class<span style="color:red">/Trans.</span></th><th  style="text-align:center">Address</th><th  style="text-align:center">Action</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  $year=$_POST['session'];
  $sel11="select * from  session  order by id desc limit 1,1";
	$res11=mysqli_query($conn,$sel11);
	$row11=mysqli_fetch_array($res11,MYSQLI_BOTH);
	$old=$row11['session'];
	
	 $sel114="select * from  session  order by id desc";
	$res114=mysqli_query($conn,$sel114);
	$row114=mysqli_fetch_array($res114,MYSQLI_BOTH);
	$new=$row114['session'];
	
  $sel="select * from  registration where session ='$year1' and status='' order by id desc";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		$a=$row['village'];
	$b=$row['postoffice'];
	$scholar=$row['application'];
	$name=$row['name'];
	$c=$row['dist'];
	$e=$row['mobile'];
	$d=$a." ".$c;
	$reg_id=$row['id'];
		$class=$row['subject'];
	/*
	$sel1="select * from  studentfees where year ='$year1' and status='' and sch='$scholar' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$dues=$row1['remain'];
		$date=$row1['date'];
	$ins="INSERT INTO `fees_paid` (`session`, `month`, `sch`, `reg_id`, `name`, `class`, `fees`, `exam`, `conv`, `other`, `remark`, `pre_dues`, `total`, `cons`, `cons_remark`, `payable`, `paid`, `remain`, `mode`, `date`, `time`, `status`, `email`, `pr`, `late`) VALUES ( '$year1', '$month', '$scholar', '$reg_id', '$name', '$class', '0', '0', '0', '0', '', '', '', '', '$cons_remark', '$payable', '$paid', '$dues', '$mode', '$date', '$time', '', '$email','$pr','$late')";

	mysqli_query($conn,$ins);
	*/
	
if($year==$old)
{
$sel1="select * from  registration where session ='$new' and status='' and application='$scholar' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
}

//$up="update sales set name='$name' where scholar='$scholar' and name=''";
//mysqli_query($conn,$up);
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['application'];?></td><td><img src="../code/img/<?php echo $row['picture'];?>" height="90px" width="90px;"></td><td><?php echo $row['name']."<br/>"." <b>Father-</b>".$row['fname']."<br/>"." <b>Mother-</b>".$row['mname']."<br/>". "<b>D.O.B-</b>".$row['dob']."<br/>"."<b>Adh-</b>".$row['adhar'];?></td><td><?php echo $row['subject']."<br/>"."<font color=red size=2pt>".$row1['subject'].'</font>';?></td><td><?php echo "<b>Vill-</b>".$a."<br/>"."<b>Post-</b>".$b."<br/>"."<b>Dist-</b>".$c."<br/>"."<b>Mob-</b>".$row['mobile'];?></td>
	
	
	<td><a href="javascript:;" onclick="editrow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-pencil"></span></a>
	
	&emsp;<a href="javascript:;" onclick="messagerow(<?php echo $row['id'];?>)"> <span class="glyphicon glyphicon-envelope"></span></a>
	
	<br/><br/>&emsp;<a href="registration_print.php?flag=<?php echo $row['id'];?>"><span class="fa fa-print"></span></a>
	&emsp;<a href="javascript:;" onclick="transferrow(<?php echo $row['id'];?>)"> <span class=""></span>Trans</a>
	&emsp;<a href="javascript:;" onclick="deleterow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-trash"></span></a></td>
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
	
	case 5189:
	$session=$_POST['session'];
	$board=$_POST['board'];
	$class=$_POST['class'];
  $sel1="select * from  registration where session ='$session' and status=''  and subject='$class' ";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: []
    });
	
});
</script>

<?php 
		 $sel="select * from  registration where session ='$session' and status='' and subject='$class' order by id asc";
	$res=mysqli_query($conn,$sel);
	$s=1;
		while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
			
		{	
		
		?>
				<div class="col-sm-4 col-xs-4 " style="margin-top:12px" id="set" >
					<div  style="border-style:solid"> 
					<table >
					<tr><td colspan="4">.</td></tr>
					<th  colspan="4" style="text-align:center">* DESK SLIP *</th>
					</tr>
					<tr>
					<td style="font-weight:bold">Sit No.:-&nbsp;</td><td><?php echo $s++ ;?></td><td style="font-weight:bold;text-align:center">&nbsp;&nbsp;Class:-&nbsp;&nbsp;</td><td style="text-align:right" id="classset"><?php echo $row['subject'];?></td>
					</tr>
					<tr>
					<td style="font-weight:bold">Student's Name:-&nbsp;</td><td  colspan="3"><?php echo $row['name'];?></td>
					</tr>
					<tr>
					<td style="font-weight:bold">Father's Name:-&nbsp;</td><td colspan="3" ><?php echo $row['fname'];?></td>
					</tr>
					<tr><td colspan="4">.</td></tr>
					</table>
						
					</div>
				</div>
				
				<?php
			
		}
		?></br><?php
			?>
				
	
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
		case 568956:
	
  

$session='2021-2022';

		 $sel="select * from  studentfees where year ='2020-2021'";
	$res=mysqli_query($conn,$sel);
	$s=1;
		while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
			
		{	
		$id=$row['search'];
		$sel1="select * from  registration where id='$id' ";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$sch=$row1['application'];
	$up="update studentfees set sch='$sch' where year='2020-2021' and search='$id'";
	   if(mysqli_query($conn,$up))
	   {
	       echo $s++;
	   }
	   else
	   {
	       echo 'not';
	   }
	    
		}
		
			
	
	break;
	
	case 2:
	$id=$_POST['rowid'];
	$sel="select * from  registration where id='$id'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$photo=$row['picture'];
	$location="../code/img/".$photo;
	$application=$row['application'];
	$del="update registration set status='Delete' where id='$id'";
	if(mysqli_query($conn,$del))
	{
		echo"deleted Successfully";
		unlink($location);
		$up="update registration set trans='' where session='2018-2019' and application='$application'";
		mysqli_query($conn,$up);
	}
	else
	{
		echo"Not Deleted";
	}
	break;
	
	case 3:
	
	$eid=$_REQUEST['id'];
	//echo"$eid";
	$sel="select * from  registration where id='$eid'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$application=$row['application'];
	
	?>
	
	
	<div class="panel-group">
				<div class="panel panel-primary">
				
				
				<div class="panel-body">
				

<script>
$(document).ready(function(){
	
	$("#myform").submit(function(e){
		
		e.preventDefault();	
		$("#btn").prop("disabled",true);
		$.ajax({
					url:"../code/registrationcode.php?flag=1",
					type:"POST",
					data:new FormData(this),
					contentType:false,
					processData:false,
					success:function(res){
						alert(res);
						if(res=="Submit")
						{
						window.location.href="student_print.php";
						$("#myform").trigger("reset");
						}
					},
					error:function(){
						alert("error");
					}
				
				});
	});
	
	
});
</script>
		
<script>
$(document).ready(function(){
	
	$("#check").change(function(){
		var c=$("#city").val();
		var v=$("#village").val();
		var po=$("#postoffice").val();
		var d=$("#dist").val();
		var s=$("#state").val();
		var m=$("#mobile").val();
		var pi=$("#pincode").val();
		if($(this).prop("checked")==true)
		{
			$("#city1").val(c);
			$("#village1").val(v);
			$("#postoffice1").val(po);
			$("#dist1").val(d);
			$("#state1").val(s);
			$("#mobile1").val(m);
			$("#pincode1").val(pi);
		}
		else
		{
			$("#city1").val("");
			$("#village1").val("");
			$("#postoffice1").val("");
			$("#dist1").val("");
			$("#state1").val("");
			$("#mobile1").val("");
			$("#pincode1").val("");
		}
		
	});
	
	
	
	
});
$(document).ready(function(){
	$("#chek").change(function(){
		
		if($(this).prop("checked")==true)
		{
			$("#show").css("display","none");
		    $("#btn").prop("disabled",false);
		
		}
		else
		{
			$("#show").css("display","inline-block");
			$("#btn").prop("disabled",true);
		
		}
	
	});

		
	});
	$(document).ready(function(){
		$("#per").focus(function(){
			
			var o=$("#omark").val();
			var t=$("#tmark").val();
			var result1=o/t*100;
			var result=parseInt(result1);
			$("#per").val(result);
		});
		
		
		
	});
	$(document).ready(function(){
		
		$("#select").change(function(){
			var a=$("#select").val();
			if(a=="high")
			{
				$("#inter1").attr("disabled","true");
				$("#high1").removeAttr("disabled");
			}
			else if(a=="inter")
			{
				$("#high1").attr("disabled","true");
				$("#inter1").removeAttr("disabled");
				
			}
			else if(a=="L.K.G"||a=="U.K.G"||a=="1"||a=="2"||a=="3"||a=="4"||a=="5"||a=="6"||a=="7"||a=="8")
			{
				$("#high1").attr("disabled","true");
				$("#inter1").attr("disabled","true");
				
			}
			
			else
			{
				$("#high1").removeAttr("disabled");
				$("#inter1").removeAttr("disabled");
			}
		});
		
		
		
	});
	
	$(document).ready(function(){
		$("#select").change(function(){
			var classc =$(this).val();
		$.ajax({
			url:"../code/registrationcode.php?flag=4",
			type:"POST",
			data: {class12:classc},
			success:function(res){
				//alert(res);
				$("#sel12").html(res);
			},
			error:function(){
				alert("error");
			}
		});
		});
	});
</script>


		



	<!-- header -->
	
	<!-- //header -->
		<!-- gallery -->
		<div >
	<div id="lab" class="">
		<div class="container-fluid">
		<MARQUEE>जो जो लडके गाड़ी से आ रहे है  उनका  Conv Code एंट्री कर दीजिये | या जो लड़के  गाड़ी से नहीं आ रहे है  उनका conv  Code  " 0" Entry करें |</MARQUEE>
			<div class="row">
			<div class="panel-group">
    <div class="panel panel-primary">
      
      <div class="panel-body">
	 <form class="form-horizontal" onsubmit="return updaterow(this)">
	 <!--phli row open--->
	  <div class="col-sm-6">
	   
  <div class="form-group">
    <label  class="col-sm-4 control-label">Your Name<span style="color:red">*</span></label>
    <div class="col-sm-8">
      <input type="text" class="form-control" id="name" value="<?php echo $row['name'];?>" name="name" style="color:black" data-validation="custom" data-validation-regexp="^([a-zA-Z\s]+)$" data-validation-error-msg="Use Only Alphabet" />
    </div>
  </div>
	  <div class="form-group">
    <label  class="col-sm-4 control-label">Mother Name<span style="color:red">*</span></label>
    <div class="col-sm-8">
      <input type="text" class="form-control" id="mother" value="<?php echo $row['mname'];?>" name="mother" data-validation="custom" data-validation-regexp="^([a-zA-Z\s]+)$" data-validation-error-msg="Use Only Alphabet" >
    </div>
  </div>
	  
	   <div class="form-group">
    <label  class="col-sm-4 control-label">Gender<span style="color:red">*</span></label>
    <div class="col-sm-8">
     <input type="radio" value="male" <?php if($row['gender']=='male'){echo'checked';}?> name="gnd">&nbsp;Male&nbsp;
     <input type="radio" value="female" <?php if($row['gender']=='female'){echo'checked';}?> name="gnd">&nbsp;Female
    </div>
  </div>
	  <div class="form-group">
    <label  class="col-sm-4 control-label">Adhar card<span style="color:red"></span></label>
    <div class="col-sm-8">
      <input type="text" class="form-control" id="mother" value="<?php echo $row['adhar'];?>" name="adhar"  >
    </div>
  </div>
	  <div class="form-group">
  
    <label  class="col-sm-4 control-label">Category<span style="color:red">*</span></label>
    <div class="col-sm-8">
	
	<select class="form-control"  name="caste" required>
	<option value="">---select---</option>
	<option <?php if($row['caste']=='GEN'){echo'selected';}?>>GEN</option>
	<option <?php if($row['caste']=='OBC'){echo'selected';}?>>OBC</option>
	<option <?php if($row['caste']=='ST'){echo'selected';}?>>ST</option>
	<option <?php if($row['caste']=='SC'){echo'selected';}?>>SC</option>
			
	
	
	
	</select>
	</div>
	</div>
	<div class="form-group">
    <label  class="col-sm-4 control-label">Conv Code<span style="color:red"></span></label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="code" value="<?php echo $row['code'];?>" name="code" title="Van Rent" >
    </div>
  </div>
	  </div>
	  <!--phli row close--->
	  <!--dusri row open--->
	  <div class="col-sm-6">
	  <div class="form-group">
    <label  class="col-sm-4 control-label">Father Name<span style="color:red">*</span></label>
    <div class="col-sm-8">
      <input type="text" class="form-control" id="father" value="<?php echo $row['fname'];?>" name="father" data-validation="custom" data-validation-regexp="^([a-zA-Z\s]+)$" data-validation-error-msg="Use Only Alphabet">
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Date Of Birth<span style="color:red">*</span></label>
    <div class="col-sm-8">
      <input type="text" class="form-control" id="dob" value="<?php echo $row['dob']?>" name="dob"> <span><p style="color:blue">DD-MM-YYYY</p></span>
    </div>
  </div>
  
  <div class="form-group">
  <br/>
    <label  class="col-sm-4 control-label">Session <span style="color:red">*</span></label>
    <div class="col-sm-8">
	
	<select class="form-control"  name="session" data-validation="required">
	<option value="">---select---</option>
				<option <?php if($row['session']=='2018-2019'){echo'selected';}?>>2018-2019</option>
				<option <?php if($row['session']=='2019-2020'){echo'selected';}?>>2019-2020</option>
				<option <?php if($row['session']=='2020-2021'){echo'selected';}?>>2020-2021</option>
				<option <?php if($row['session']=='2021-2022'){echo'selected';}?>>2021-2022</option>
				<option <?php if($row['session']=='2022-2023'){echo'selected';}?>>2022-2023</option>
	</select>
	</div>
	</div>
	<div class="form-group">
  <br/>
    <label  class="col-sm-4 control-label">Minority<span style="color:red">*</span></label>
    <div class="col-sm-8">
	
	<select class="form-control"  name="minority" data-validation="required">
	<option value="">---select---</option>

				<option <?php if($row['minority']=='HINDU'){echo'selected';}?>>HINDU</option>
				<option <?php if($row['minority']=='MUSLIM'){echo'selected';}?>>MUSLIM</option>
				<option <?php if($row['OTHER']=='OTHER'){echo'selected';}?>>OTHER</option>
			
	</select>
	</div>
	</div>
  <div class="form-group">
  <br/>
    <label  class="col-sm-4 control-label"><span style="color:red">*</span></label>
    <div class="col-sm-8">
	
	<input type="hidden" class="form-control" value="<?php echo $application;?>"  name="app" required />
	<input type="hidden" class="form-control" value="<?php echo $eid;?>"  name="id1234" required />
	
	</div>
	</div>
	  <!--dusri row close--->
	  
	<input type="hidden" value="<?php echo strtoupper(substr(md5(uniqid()),0,10));?>" name="app1">
			
			</div>
			
	  <div class="form-group">
  
    <label  class="col-sm-4 control-label"> <span style="color:red"></span></label>
    <div class="col-sm-6">
	
	
	
	
	</div>
	</div>
	  <hr/>
	  <!-- one div-subject open--->
	  <!-- one div-subject close--->
	  
	  <!-- second div-subject open--->
	    <div class="col-sm-4">
	  
  <div class="form-group">
  
    <label  class="col-sm-4 control-label">Board <span style="color:red">*</span></label>
    <div class="col-sm-8">
	
	<select class="form-control"  name="mediam" data-validation="required">
	<option value="">---select---</option>
	<option <?php if($row['mediam']=='UP BOARD'){echo'selected';}?>>UP BOARD</option>
	<option <?php if($row['mediam']=='CBSE BOARD'){echo'selected';}?>>CBSE BOARD</option>
	
	
	</select>
	</div>
	</div>
	
	  
	  </div>
	
	  <div class="col-sm-4">
	
  <div class="form-group">
 
    <label  class="col-sm-4 control-label">Class <span style="color:red">*</span></label>
      
	<div class="col-sm-8">
	
<select class="form-control"  name="subject" required>
	<option value="">---select---</option>
	<option <?php if($row['subject']=='NURSERY'){echo'selected';}?>>NURSERY</option>
	<option <?php if($row['subject']=='LKG'){echo'selected';}?>>LKG</option>
	<option <?php if($row['subject']=='UKG'){echo'selected';}?>>UKG</option>
	<option <?php if($row['subject']=='PLAY GROUP'){echo'selected';}?>>PLAY GROUP</option>
	<option <?php if($row['subject']=='FIRST'){echo'selected';}?>>FIRST</option>
	<option <?php if($row['subject']=='SECOND'){echo'selected';}?>>SECOND</option>
	<option <?php if($row['subject']=='THIRD'){echo'selected';}?>>THIRD</option>
	<option <?php if($row['subject']=='FOURTH'){echo'selected';}?>>FOURTH</option>
	<option <?php if($row['subject']=='FIFTH'){echo'selected';}?>>FIFTH</option>
	<option <?php if($row['subject']=='SIXTH'){echo'selected';}?>>SIXTH</option>
	<option <?php if($row['subject']=='SEVENTH'){echo'selected';}?>>SEVENTH</option>
	<option <?php if($row['subject']=='EIGHTH'){echo'selected';}?>>EIGHTH</option>
	<option <?php if($row['subject']=='NINTH'){echo'selected';}?>>NINTH</option>
	<option <?php if($row['subject']=='NINTH CBSE'){echo'selected';}?>>NINTH CBSE</option>
	<option <?php if($row['subject']=='TENTH'){echo'selected';}?>>TENTH</option>
	<option <?php if($row['subject']=='ELEVENTH'){echo'selected';}?>>ELEVENTH</option>
		<option <?php if($row['subject']=='TWELFTH'){echo'selected';}?>>TWELFTH</option>
		
		</select>	
	</div>
	</div>
	
	 
	  </div>
	  <div class="row">
	  
	 <center> <h4 style="color:black"></h4></center>
	 <div class="table table-responsive">
	 <table class="table" border="1px">
	 <tr class="text-center">
	 <th>Previous Eligibility<span style="color:red">*</span></th><th>Board/Uni/Inst.<span style="color:red">*</span></th><th>Year<span style="color:red">*</span></th><th>Total Marks<span style="color:red">*</span></th><th>Obtain Marks<span style="color:red">*</span></th><th>Per</th><th>Grade</th>
	 </tr>
	 <tr>
	 <td><input type="text" class="form-control" value="<?php echo $row['ele'];?>"name="ele"/></td><td><input type="text" value="<?php echo $row['board'];?>"class="form-control" name="board" required="required" maxlength="8"/></td><td><input type="number" value="<?php echo $row['year'];?>" class="form-control" name="year"/></td><td><input type="number" value="<?php echo $row['total'];?>"class="form-control"name="tmark" id="tmark"/></td><td><input type="number" class="form-control" value="<?php echo $row['obtain'];?>" name="omark" id="omark"/></td><td><input type="number" class="form-control" value="<?php echo $row['per'];?>" name="per" id="per"/></td><td><input type="text"class="form-control" value="<?php echo $row['grade'];?>"name="grade"></td>
	 </tr>
	 </table>
	 </div>
	   <hr/>
	  
	  </div>
	  <!-- second div-subject close--->
	  <input type="hidden" value="<?php echo rand(10000,99999);?>">
	  
	  <div class="col-sm-6">
	  <h4 class="text-center" style="color:black">Corresponding Address</h4>
	  <hr/>
  <div class="form-group">
    <label  class="col-sm-4 control-label">City<span style="color:red"></span></label>
    <div class="col-sm-8">
      <input type="text" class="form-control" id="city" value="<?php echo $row['city'];?>" name="city">
    </div>
  </div>
	  <div class="form-group">
    <label  class="col-sm-4 control-label">Village<span style="color:red">*</span></label>
    <div class="col-sm-8">
      <input type="text" class="form-control" id="village" value="<?php echo $row['village'];?>" name="village" data-validation="custom" data-validation-regexp="^([a-zA-Z\s]+)$" data-validation-error-msg="Use Only Alphabet">
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Post Office<span style="color:red"></span></label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="postoffice" value="<?php echo $row['postoffice'];?>" name="postoffice">
    </div>
  </div>
	  
	   <div class="form-group">
    <label  class="col-sm-4 control-label">Dist<span style="color:red">*</span></label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="dist" value="<?php echo $row['dist'];?>" name="dist" data-validation="custom" data-validation-regexp="^([a-zA-Z\s]+)$" data-validation-error-msg="Use Only Alphabet">
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">State<span style="color:red">*</span></label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="state" value="<?php echo $row['state'];?>" name="state" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Mobile<span style="color:red"  >*</span></label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="mobile" value="<?php echo $row['mobile'];?>" data-validation="number"required="required" maxlength="10" name="mobile" data-validation-error-msg="Only Use Number" />
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Pincode</label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="pincode" value="<?php echo $row['pincode'];?>" name="pincode"  data-validation="number"required="required" maxlength="7"  data-validation-error-msg="Only Use Number" required>
    </div>
  </div>
  <img src="../code/img/<?php echo $row['picture'];?>" style="height:70px;width:70px"/><span>Old Image</span>
	  <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]);
  }
}

$("#imgInp").change(function() {
  readURL(this);
});</script>

	  <div class="form-group">
    <label  class="col-sm-4 control-label">Picture<span style="color:red"></span></label>
    <div class="col-sm-8">
     <img id="blah" alt="your image" width="100" height="100" />

<input type="file" name="picture"  onchange="document.getElementById('blah').src = window.URL.createObjectURL(this.files[0])"  
		>
    </div>
  </div>
	  
	  </div>
	  
	   <div class="col-sm-6">
	  <h4 class="text-center" style="color:black">Personally Address</h4>
	  <hr/>
  <div class="form-group">
    <label  class="col-sm-4 control-label"><span><input type="checkbox" id="check">&nbsp;Same address&emsp;</span>City</label>
    <div class="col-sm-8">
      <input type="text" class="form-control" value="<?php echo $row['city1'];?>"id="city1"  name="city1">
    </div>
  </div>
	  <div class="form-group">
    <label  class="col-sm-4 control-label">Village</label>
    <div class="col-sm-8">
      <input type="text" class="form-control" id="village1" value="<?php echo $row['village1'];?>" name="village1">
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Post Office</label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="postoffice1" value="<?php echo $row['postoffice1'];?>" name="postoffice1">
    </div>
  </div>
	  
	   <div class="form-group">
    <label  class="col-sm-4 control-label">Dist</label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="dist1" value="<?php echo $row['dist1'];?>" name="dist1">
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">State</label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="state1" value="<?php echo $row['state1'];?>" name="state1">
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Mobile</label>
    <div class="col-sm-8">
     <input type="number" class="form-control" id="mobile1" value="<?php echo $row['mobile'];?>" name="mobile1" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Pincode</label>
    <div class="col-sm-8">
     <input type="number" class="form-control" id="pincode1" value="<?php echo $row['pincode1'];?>" name="pincode1">
    </div>
  </div>
  
 
  </div><br/><br/>
  <span style="margin-left:100px;font-size:17px"><input type="checkbox" id="chek"/>&emsp;I have read and agree to the <a href="#">terms and conditions.</a></span><br/>
	  <center>
	
	 <button class="btn btn-success"  id="btn" disabled id="sub" >Submit</button>&emsp;&emsp;
	 
	  </form>
	  </center>
			
			
			</div>
			
		</div>
	</div>
	<!-- //gallery -->

	<!-- footer
	<!-- //footer -->

	
</div>
</div>
</div>
</div>
	


	</div>
	</div>
	
	
	
	
	
	
	
	
	
	
	<?php
	break;
	
		case 5:
	$eid=$_REQUEST['id'];
//echo"$eid";
	$sel="select * from  registration where id='$eid'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$application=$row['application'];
	?>
<form class="form-horizontal" onsubmit="return updaterow(this)">
	    <div class="row">
	        <div class="col-sm-6">
	<div class="form-group">
		
	<label class="col-sm-4 control-label"> Student Name </label>
		<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['name'];?>" name="name" ></div>
	
	</div>
	
	<div class="form-group">
		<br/>
	<label class="col-sm-4 control-label">Father Name</label>
		<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['fname'];?>" name="fname" ></div>
	
	</div>
	
	<div class="form-group">
		<br/>
	<label class="col-sm-4 control-label">Mother Name </label>
		<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['mname'];?>" name="mname" ></div>
	
	</div>
	 <div class="form-group">
    <label  class="col-sm-4 control-label">Gender<span style="color:red">*</span></label>
    <div class="col-sm-8">
     <input type="radio" value="male" <?php if($row['gender']=='male'){echo'checked';}?> name="gnd">&nbsp;Male&nbsp;
     <input type="radio" value="female" <?php if($row['gender']=='female'){echo'checked';}?> name="gnd">&nbsp;Female
    </div>
  </div>
	<div class="form-group">
		<br/>
	<label class="col-sm-4 control-label">class </label>
		<div class="col-sm-8"><select class="form-control"  name="subject" required>
	<option value="">---select---</option>
	<option <?php if($row['subject']=='P.G.'){echo'selected';}?>>P.G.</option>
	<option <?php if($row['subject']=='Jr.K.G.'){echo'selected';}?>>Jr.K.G.</option>
	<option <?php if($row['subject']=='Sr.K.G.'){echo'selected';}?>>Sr.K.G.</option>
	<option <?php if($row['subject']=='1st'){echo'selected';}?>>1st</option>
	<option <?php if($row['subject']=='2nd'){echo'selected';}?>>2nd</option>
	<option <?php if($row['subject']=='3rd'){echo'selected';}?>>3rd</option>
	<option <?php if($row['subject']=='4th'){echo'selected';}?>>4th</option>
	<option <?php if($row['subject']=='5th'){echo'selected';}?>>5th</option>
	<option <?php if($row['subject']=='6th'){echo'selected';}?>>6th</option>
	<option <?php if($row['subject']=='7th'){echo'selected';}?>>7th</option>
	<option <?php if($row['subject']=='8th'){echo'selected';}?>>8th</option>
	<option <?php if($row['subject']=='9th'){echo'selected';}?>>9th</option>
	<option <?php if($row['subject']=='10th'){echo'selected';}?>>10th</option>

		
		</select></div>
	
	</div>
	 <div class="form-group">
  
    <label  class="col-sm-4 control-label">Board <span style="color:red">*</span></label>
    <div class="col-sm-8">
	
	<select class="form-control"  name="mediam" >
	<option value="">---select---</option>
	<option <?php if($row['mediam']=='ICSE BOARD'){echo'selected';}?>>ICSE BOARD</option>
	<option <?php if($row['mediam']=='CBSE BOARD'){echo'selected';}?>>CBSE BOARD</option>
	
	
	</select>
	</div>
	</div>
	<div class="form-group">
    <label  class="col-sm-4 control-label">Nationality<span style="color:red"></span></label>
    <div class="col-sm-8">
      <input type="text" class="form-control"  value="<?php echo $row['nationality'];?>" name="nationality" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Last Educa.<span style="color:red"></span></label>
    <div class="col-sm-8">
      <input type="text" class="form-control"  value="<?php echo $row['last'];?>" name="last" >
    </div>
  </div>
	  <div class="form-group">
	      <h4 class="text-center" style="color:black">Corresponding Address</h4>
    <label  class="col-sm-4 control-label">City<span style="color:red"></span></label>
    <div class="col-sm-8">
      <input type="text" class="form-control" id="city" value="<?php echo $row['city'];?>" name="city">
    </div>
  </div>
	  <div class="form-group">
    <label  class="col-sm-4 control-label">Village<span style="color:red">*</span></label>
    <div class="col-sm-8">
      <input type="text" class="form-control" id="village" value="<?php echo $row['village'];?>" name="village" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Post Office<span style="color:red"></span></label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="postoffice" value="<?php echo $row['postoffice'];?>" name="postoffice">
    </div>
  </div>
   <div class="form-group">
    <label  class="col-sm-4 control-label">Tahsil</label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="tahsil" value="<?php echo $row['tahsil'];?>" name="tahsil">
    </div>
  </div>
	  
	   <div class="form-group">
    <label  class="col-sm-4 control-label">Dist<span style="color:red">*</span></label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="dist" value="<?php echo $row['dist'];?>" name="dist" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">State<span style="color:red">*</span></label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="state" value="<?php echo $row['state'];?>" name="state" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Mobile<span style="color:red"  >*</span></label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="mobile" value="<?php echo $row['mobile'];?>"  name='mobile'>
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Pincode</label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="pincode" value="<?php echo $row['pincode'];?>" name="pincode"  >
    </div>
  </div>
  
	  <div class="form-group">
	  <img src="../code/img/<?php echo $row['picture'];?>" style="height:70px;width:70px"/>
    <label  class="col-sm-4 control-label">Picture<span style="color:red">*</span></label>
    <div class="col-sm-8">
     <input type="file" class="form-control" id="pic"  name="picture" >
    </div>
  </div>
	</div>

	<div class="col-sm-6">
 <div class="form-group">
    <label  class="col-sm-4 control-label">Adhar card<span style="color:red"></span></label>
    <div class="col-sm-8">
      <input type="text" class="form-control" id="mother" value="<?php echo $row['adhar'];?>" name="adhar"  >
    </div>
  </div>
	
	 <div class="form-group">
  
    <label  class="col-sm-4 control-label">Category<span style="color:red">*</span></label>
    <div class="col-sm-8">
	
	<select class="form-control"  name="caste" required>
	<option value="">---select---</option>
	<option <?php if($row['caste']=='GEN'){echo'selected';}?>>GEN</option>
	<option <?php if($row['caste']=='OBC'){echo'selected';}?>>OBC</option>
	<option <?php if($row['caste']=='ST'){echo'selected';}?>>ST</option>
	<option <?php if($row['caste']=='SC'){echo'selected';}?>>SC</option>
			
	
	
	
	</select>
	</div>
	</div>
	 <div class="form-group">
    <label  class="col-sm-4 control-label">Date Of Birth<span style="color:red">*</span></label>
    <div class="col-sm-8">
      <input type="text" class="form-control" id="dob" value="<?php echo $row['dob']?>" name="dob"> <span><p style="color:blue">DD-MM-YYYY</p></span>
    </div>
  </div>
	
	<div class="form-group">
    <label  class="col-sm-4 control-label">Conv Code<span style="color:red"></span></label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="code" value="<?php echo $row['code'];?>" name="code" title="Van Rent" >
    </div>
  </div>
	 <div class="form-group">
  <br/>
    <label  class="col-sm-4 control-label">Session <span style="color:red">*</span></label>
    <div class="col-sm-8">
	<?php 
	$selc="select * from session";
	$resc=mysqli_query($conn,$selc);
	?>
	<select class="form-control" style="font-weight:bold" id="select" name="session" required>
	
	  <option value=''>--Select--</option>
	  <?php 
	  
	  while($rowc=mysqli_fetch_array($resc,MYSQLI_BOTH))
	  {
	  ?>
	  <option <?php if($row['session']==$rowc['session']){echo'selected';}?>><?php echo $rowc['session'];?></option>
	  <?php
	  }
	  
	  ?>
	  </select>
	
	
	</div>
	</div>
	 <div class="form-group">
  <br/>
    <label  class="col-sm-4 control-label">Sch. No.<span style="color:red">*</span></label>
    <div class="col-sm-8">
	
	<input type="text" class="form-control" value="<?php echo $application;?>"  name="app" readonly required />
	<input type="hidden" class="form-control" value="<?php echo $eid;?>"  name="id1234" required />
	
	</div>
	</div>
	<div class="form-group">
    <label  class="col-sm-4 control-label">Sub Category<span style="color:red">*</span></label>
    <div class="col-sm-8">
      <input type="text" class="form-control"  value="<?php echo $row['subcategory'];?>" name="subcategory" >
    </div>
  </div> <br/>
	 <h4 class="text-center" style="color:black">Personally Address</h4>
	  <hr/>
  <div class="form-group">
    <label  class="col-sm-4 control-label">City</label>
    <div class="col-sm-8">
      <input type="text" class="form-control" value="<?php echo $row['city1'];?>"id="city1"  name="city1">
    </div>
  </div>
	  <div class="form-group">
    <label  class="col-sm-4 control-label">Village</label>
    <div class="col-sm-8">
      <input type="text" class="form-control" id="village1" value="<?php echo $row['village1'];?>" name="village1">
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Post Office</label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="postoffice1" value="<?php echo $row['postoffice1'];?>" name="postoffice1">
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Tahsil</label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="tahsil" value="<?php echo $row['tahsil'];?>" name="tahsil">
    </div>
  </div>
	  
	   <div class="form-group">
    <label  class="col-sm-4 control-label">Dist</label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="dist1" value="<?php echo $row['dist1'];?>" name="dist1">
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">State</label>
    <div class="col-sm-8">
     <input type="text" class="form-control" id="state1" value="<?php echo $row['state1'];?>" name="state1">
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Mobile</label>
    <div class="col-sm-8">
     <input type="number" class="form-control" id="mobile1" value="<?php echo $row['mobile'];?>" name="mobile1" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Pincode</label>
    <div class="col-sm-8">
     <input type="number" class="form-control" id="pincode1" value="<?php echo $row['pincode1'];?>" name="pincode1">
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Adm Date</label>
    <div class="col-sm-8">
     <input type="text" class="form-control"  value="<?php echo $row['date'];?>" name="date">
    </div>
  </div>
	</div>
	
	</div>
	 <button class="btn btn-success" >Update</button>&emsp;&emsp;
	</form>
	
<?php 
	break;
		case 4:
	$name=$_POST['name'];
$code=$_POST['code'];
$adhar=$_POST['adhar'];
$mediam=$_POST['mediam'];
$caste=$_POST['caste'];
$minority=$_POST['minority'];
$subcategory=$_POST['subcategory'];
$date=$_POST['date'];
$nationality=$_POST['nationality'];
$tahsil=$_POST['tahsil'];
//echo"$name";
//echo"<br/>";
$father=$_POST['fname'];
//echo"$father";
$mother=$_POST['mname'];
//echo"$mother";
//echo"<br/>";
$app=$_POST['app'];
$id=$_POST['id1234'];
//echo"$app";
//echo"<br/>";

$gender=$_POST['gnd'];
$session=$_POST['session'];
//echo"$gender";
$dob1=$_POST['dob'];
//echo"$dob";
$dob=date("d-m-Y",strtotime($dob1));

//echo"$class";



//echo"$high1";


$subject=$_POST['subject'];
//echo"$inter1";

$city=$_POST['city'];
//echo"$city";
$city1=$_POST['city1'];
//echo"$city";
$village=$_POST['village'];
//echo"$village";
$village1=$_POST['village1'];
//echo"$village1";
$postoffice=$_POST['postoffice'];
//echo"$postoffice";
$postoffice1=$_POST['postoffice1'];
//echo"$postoffice1";
$dist=$_POST['dist'];
//echo"$dist";
$dist1=$_POST['dist1'];
//echo"$dist1";
$state=$_POST['state'];
//echo"$state";
$state1=$_POST['state1'];
//echo"$state1";
$mobile=$_POST['mobile'];
//echo"$mobile";
$mobile1=$_POST['mobile1'];
//echo"$mobile1";
$pincode=$_POST['pincode'];
//echo"$pincode";
$pincode1=$_POST['pincode1'];
//echo"$pincode1";
$imgname=$_FILES['picture']['name'];
//echo"$imgname";
$size=$_FILES['picture']['size'];
//echo"$size";
$type=$_FILES['picture']['type'];
//echo"$type";
$tempname=$_FILES['picture']['tmp_name'];
//echo"$tempname";
$pathinfo=pathinfo($imgname,PATHINFO_EXTENSION);
  //echo"$pathinfo";
  if($pathinfo!=""|| $pathinfo!=null)
  {
	  $newimgname=time()."_".$name.".".$pathinfo;
	  //echo$newimgname;
  }
  else
  {
	  $newimgname="";
  }
//echo $newimgname;
$date=date("d/m/Y");
date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");
$datetime=$date." ".$time;
$location="img/";
$location1="img/";
$size=$size/1024;


			
//--------------------------------------------------------------------
				$sel12="select * from registration where id='$id'";
				$res12=mysqli_query($conn,$sel12);
				$row12=mysqli_fetch_array($res12,MYSQLI_BOTH);
				$app12=$row12['application'];
				//echo "<br/>";
			//	echo $app12;
				$pic=$row12['picture'];
	$location1="../code/img/".$pic;
	$location="../code/img/";
				
				// for updation and image 
				
				
	if($imgname=="" || $imgname==null)
	{
	$up="update registration set application='$app',name='$name',fname='$father',mname='$mother',dob='$dob1',gender='$gender',subject='$subject',city='$city',village='$village',postoffice='$postoffice',dist='$dist',state='$state',mobile='$mobile',pincode='$pincode',city1='$city1',village1='$village1',postoffice1='$postoffice1',dist1='$dist1', state1='$state1',mobile1='mobile1',pincode1='$pincode1',session='$session',mediam='$mediam',adhar='$adhar',datetime='$datetime',caste='$caste',code='$code',tahsil='$tahsil',subcategory='$subcategory',last='$last',nationality='$nationality' where id='$id' ";
	if(mysqli_query($conn,$up))
	{
	
	 echo"Update";
	}
	else
	{
		echo"not update";
	}
	}
	else
	{
		$up1="update registration set application='$app',name='$name',picture='$newimgname',fname='$father',mname='$mother',dob='$dob1',gender='$gender',subject='$subject',city='$city',village='$village',postoffice='$postoffice',dist='$dist',state='$state',mobile='$mobile',pincode='$pincode',city1='$city1',village1='$village1',postoffice1='$postoffice1',dist1='$dist1', state1='$state1',mobile1='mobile1',pincode1='$pincode1',session='$session',mediam='$mediam',adhar='$adhar',datetime='$datetime',caste='$caste',code='$code',tahsil='$tahsil',subcategory='$subcategory',last='$last',nationality='$nationality' where id='$id'  ";
	if(mysqli_query($conn,$up1))
	{
		//unlink($location1);
		move_uploaded_file($tempname,$location.$newimgname);
	
		echo"Update";
	}
	else
	{
		echo"not update";
	}
	}
				// for updation and image 
				//
			
//-------------------------------------------------------------
	break;
	
	case 6:
	
	$name=$_POST['name'];
	$fname=$_POST['fname'];
	$mname=$_POST['mname'];
	$dob=$_POST['dob'];
	
	$mark1=$_POST['mark1'];
	$mark2=$_POST['mark2'];
	$mark3=$_POST['mark3'];
	$mark4=$_POST['mark4'];
	$mark5=$_POST['mark5'];
	$mark6=$_POST['mark6'];
	$mark7=$_POST['mark7'];
	$mark8=$_POST['mark8'];
	$class=$_POST['class'];
	$session=$_POST['session'];
	$ins1="insert into result(name,fname,mname,dob,sub1,sub2,sub3,sub4,sub5,sub6,sub7,sub8,mark1,mark2,mark3,mark4,mark5,mark6,mark7,mark8,session,class) values('$name','$fname','$mname','$dob','HINDI','ENGLISH','MATHEMATICS','SCIENCE','SOCIAL SCIENCE','AGRICULTURE','SANSKRIT','ART','$mark1','$mark2','$mark3','$mark4','$mark5','$mark6','$mark7','$mark8','$session','$class')";
	if(mysqli_query($conn,$ins1))
	{
		echo"ok";
	}
	else
	{
		echo"not ok";
	}
	
	
	break;
	
	
	case 7:
	$eid=$_REQUEST['id'];
	//echo"$eid";
	$sel="select * from  registration where id='$eid'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	
	?>
	
	
	<div class="panel-group">
				<div class="panel panel-primary">
				
				
				<div class="panel-body">
				<form class="form-horizontal" id="myform21" action="../code/student_detailscode.php?flag=8" method="post" >
				<div class="form-group">
				<input type="hidden" value="<?php echo $row['id'];?>" name="id"/>
					<input type="hidden" value="<?php echo $row['session'];?>" name="session"/>
				<label class="col-sm-3 control-label">Name</label>
				<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['name'];?>" name="name"/></div>
				</div>
				<br/>
				
				<div class="form-group">
				<label class="col-sm-3 control-label">Mobile</label>
				<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['mobile'];?>" name="mobile"/></div>
				<br/>
				</div>
				
				
				<br/>
				<div class="form-group">
				<label class="col-sm-3 control-label">Message</label>
				<div class="col-sm-8"><textarea class="form-control"  name="message"/ required></textarea></div>
				<br/>
				</div>
				<center><button class="btn btn-primary">Send</button>
				 &emsp;&emsp;&emsp;<button class="btn btn-danger" data-dismiss="modal"> Close</button>
				</center>
				</div>
				</form>
	</div>
	</div>
	
	<?php
	break;
	
	case 8:
	
	
	
	$number=$_POST['mobile'];
	$session=$_POST['session'];
//echo"$number";

$message=$_POST['message'];
//echo"$message";
$date=date("d-m-Y");
$username="AwadheshYadav";
$password="AwadheshYadav";
$senderid="GCSNNJ";
$to=$number;
$msg=urlencode($message);


$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=KHISWP&receiver=$to&route=TA&msgtype=1&sms=$msg";

$result=file_get_contents($api);
if($result)
{
	$ins="insert into message (message,count,session) value('$message','1','$session')";
	$res=mysqli_query($conn,$ins);
	$insme="insert into message1 (message,date,session) value('$message','$date','$session')";
	$resme=mysqli_query($conn,$insme);
	echo"<script>alert('sms send');window.location.href='../admin/student_details.php';</script>";
}
else
{
	echo"<script>alert('sms not send');window.location.href='../admin/student_details.php';</script>";
}
	break;
	
	case 88:
	
	
	
	$number=$_POST['mobile'];
//echo"$number";

$message=$_POST['message'];
//echo"$message";
$date=date("d-m-Y");
$username="AwadheshYadav";
$password="AwadheshYadav";
$senderid="GCSNNJ";
$to=$number;
$msg=urlencode($message);


$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=KHISWP&receiver=$to&route=TA&msgtype=3&sms=$msg";

$result=file_get_contents($api);
if($result)
{
	$ins="insert into message (message,count) value('$message','1')";
	$res=mysqli_query($conn,$ins);
	$insme="insert into message1 (message,date) value('$message','$date')";
	$resme=mysqli_query($conn,$insme);
	echo"Sms Send";
}
else
{
	echo"sms not send";
}
	break;
	
	
	
	case 9:
	?>
<script>

    $("#con").focus(function(){
        $("#remark").toggle('show');
    });
	$(document).ready(function(){
		$("#remark").toggle("hide");
});
</script>
<script>

    
	$(document).ready(function(){
		
		$("#con").change(function(){
        var co=$("#con").val();
		
        var re=$("#remark").val();
		if(co!='0')
		{
			$("#remark").attr("required", "true");
		}
		else
		{
			$("#remark").removeAttr('required');
		}
    });
		
});

$(document).ready(function(){
		
	
		$(".option").change(function(){
        var month=$("#month").val();
        var app=$("#app").val();
        var pr=$("#pr").val();
        var session=$("#session").val();
        var id=$("#id").val();
		
		 let checkboxes = document.querySelectorAll('input[name="choice[]"]:checked');
            let values = [];
            checkboxes.forEach((checkbox) => {
                values.push(checkbox.value);
            });
          //  alert(values);
		   
		   $.ajax({
					
					url:"../code/student_detailscode5.php?flag=105",
					type:"POST",
					data:{values:values,app:app,pr:pr,session:session,id:id},
					
					success:function(res){
						//alert(res);
						$("#mo").html(res);
						var tot=$("#tot").val();
		var dew=$("#dew").val();
		var late=$("#late").val();
	var all =parseInt(tot)+parseInt(dew)+parseInt(late);
			$("#total").val(all);
			
			var con14=$("#con").val();
			var payble1=parseInt(all)-parseInt(con14);
			$("#payble").val(payble1);
					},
					error:function(){
						alert("error");
					}
					
					
					
					
				});
    });
	
		
});
$("document").ready(function(){
		
			$("#other").keyup(function(){
		//	alert("ok");
		
			var fees1=$("#fee").val();
		var conv1=$("#conv").val();
	
			var paid1=$("#paid").val();
				
			var other1=$("#other").val();
			var late1=$("#late").val();
			var dew=$("#dew").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(fees1) + parseInt(conv1) + parseInt(exam1) +  parseInt(other1)+  parseInt(dew)+parseInt(late1);
			var totalg= parseInt(fees1) + parseInt(conv1) + parseInt(exam1) +  parseInt(other1)+  parseInt(dew)+parseInt(late1);
			
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	$("document").ready(function(){
		
			$("#late").keyup(function(){
		//	alert("ok");
		
			var fees1=$("#fee").val();
		var conv1=$("#conv").val();
	
			var paid1=$("#paid").val();
				
			var other1=$("#other").val();
				var late1=$("#late").val();
			var dew=$("#dew").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(fees1) + parseInt(conv1) + parseInt(exam1) +  parseInt(other1)+  parseInt(dew)+parseInt(late1);
			var totalg= parseInt(fees1) + parseInt(conv1) + parseInt(exam1) +  parseInt(other1)+  parseInt(dew)+parseInt(late1);
			
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	$("document").ready(function(){
		
			$("#con").keyup(function(){
		//	alert("ok");
		
			var fees1=$("#fee").val();
		var conv1=$("#conv").val();
	
			var paid1=$("#paid").val();
				
			var other1=$("#other").val();
			var dew=$("#dew").val();
			var exam1=$("#exam").val();
			var late1=$("#late").val();
			var totalm= parseInt(fees1) + parseInt(conv1) + parseInt(exam1) +  parseInt(other1)+  parseInt(dew)+parseInt(late1);
			var totalg= parseInt(fees1) + parseInt(conv1) + parseInt(exam1) +  parseInt(other1)+  parseInt(dew)+parseInt(late1);
			
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	$("document").ready(function(){
		
		$("#paid").keyup(function(){
			
		
				var paidd=$("#paid").val();
				var conn=$("#con").val();
				var total12=$("#total").val();
		
			
		
			var total121= parseInt(total12) - parseInt(paidd)- parseInt(conn) ;
			
			$("#ndew").val(total121);
		});
		
		
	});
</script>
<script>

	$(document).ready(function(){
		
		$("#con").keyup(function(){
			$con1=$("#con").val();
			if($con1=="0")
		{
			
			$("#con").css("border-color","green");
			
		}
		
		
        
    });
		$("#paid").keyup(function(){
			$con1=$("#con").val();
			$rem12=$("#remark").val();
			if($con1!="0")
		{
			if($rem12=="")
			{
			$("#con").css("border-color","red");
			}
			else
			{
				$("#con").css("border-color","green");
			}
		}
		else
		{
			$("#con").css("border-color","green");
			
		}
		
        
    });
		
});
//////////////////////////////////////////////////////////////////////for remark required
</script>
	<?php
	$eid=$_REQUEST['id'];
	//echo"$eid";
	$sel="select * from  registration where id='$eid'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$board=$row['mediam'];
	$class=$row['subject'];
	$village=$row['village'];
	$code=$row['code'];
	$application=$row['application'];
	$session=$row['session'];
	/// for transfer value set//
	
	$selc="select * from  fix where sch='$application' and session='$session' ";
	$resc=mysqli_query($conn,$selc);
	$rowc=mysqli_fetch_array($resc,MYSQLI_BOTH);
	$fix=$rowc['fees'];
	
	$reason=$rowc['reason'];
	//echo $fix;
	//echo $reason;
	/// for consession
	///////////////fees
	
		
	////for free fee
	$sel1f="select * from free where sch='$application' and session='$session' ";
	$res1f=mysqli_query($conn,$sel1f);
	$row1f=mysqli_fetch_array($res1f,MYSQLI_BOTH);
	$feef=$row1f['fee'];
	if($feef=='YES')
	{
		$F=$fees;
		
	}
	else
	{
		$F='0';
	}
	
	////for free fee
	
	///////////////convence
	
	
	$sel2c="select * from free where sch='$application' and session='$session'";
	$res2c=mysqli_query($conn,$sel2c);
	$row2c=mysqli_fetch_array($res2c,MYSQLI_BOTH);
	$convc=$row2c['conv'];
	if($convc=='YES')
	{
		$G=$code;
		//echo $G;
	}
	else
	{
		$G='0';
	}
	/////for free conv
	
	
	///// for fix free
	$sel2cf="select * from free where sch='$application' and session='$session'";
	$res2cf=mysqli_query($conn,$sel2cf);
	$row2cf=mysqli_fetch_array($res2cf,MYSQLI_BOTH);
	$H=$row2cf['fix'];
	$note=$row2cf['reason'];
	
	$fixf=$F+$G+$H;
//	echo $fixf;

	///////////////studentfees1
	$sel41="select * from fees_paid where sch='$application' and session='$session' and status='' ";
	$res41=mysqli_query($conn,$sel41);
	$row41=mysqli_fetch_array($res41,MYSQLI_BOTH);
	
		
	
	
		$sel42="select * from fees_paid where sch='$application' and status=''  order by id desc";
	$res42=mysqli_query($conn,$sel42);
	$row42=mysqli_fetch_array($res42,MYSQLI_BOTH);
	//$search=$row42['search'];
	
	$remain42=$row42['remain'];
	
	?>
	
	<div class="panel-group">
				<div class="panel panel-primary">
				
				
		<?php
	
			$conc='';
			$datec='';
	  $selc="select * from fees_paid where sch='$application' and session='$session' and cons!='0' and status=''   order by id desc";
	$resc=mysqli_query($conn,$selc);
	while($rowc=mysqli_fetch_array($resc,MYSQLI_BOTH))
	{
		$dates=$rowc['date'];
		$concs=$rowc['cons'];
		$conc=$concs.",";
			$datec=$dates.",";
			echo "<font color=red size=2pt> Cons-".$conc."</font>";
		
	}
	
	  
	  ?>
		
	
				<div class="panel-body">
				<center><h2 class="modal-title" style="color:green;background-color:yellow"> CASH RECEIPT (<?php echo $session;?>) </h2> </center>
				<div style="background-color:yellow">
			
			
			</div>
				<form class="form-horizontal" onsubmit="return feesdata(this)" >
				
				 
			<center>	
			<?php
			 $sel24="select * from  session order by id desc limit 1,1";
	$res24=mysqli_query($conn,$sel24);
	$row24=mysqli_fetch_array($res24,MYSQLI_BOTH);
	  $session_old=$row24['session'];
	 
	  $sel244="select * from  registration where application='$application' and session='$session_old' and status='' ";
	$res244=mysqli_query($conn,$sel244);
	$row244=mysqli_fetch_array($res244,MYSQLI_BOTH);
	if($row244)
	{
	    	$selc="select * from plan where id!=1 ";
	}
	else
	{
	    	$selc="select * from plan where id!=2";
	}
		
	$resc=mysqli_query($conn,$selc);
	while($rowc=mysqli_fetch_array($resc,MYSQLI_BOTH))
	{
	
		$month=$rowc['id'];
	$selc1="select * from fees_data where month_name='$month' and app='$application' and  session='$session' and status='Yes' ";
	$resc1=mysqli_query($conn,$selc1);
			$rowc1=mysqli_fetch_array($resc1,MYSQLI_BOTH);
			if(!$rowc1)
			{
			?>
			
			
			<input type="checkbox" name="choice[]" class="option" id='month' value="<?php echo $rowc['id']?>"><?php echo $rowc['month']?>&emsp;<?php } }


?>
	<input type="checkbox" name="choice[]" class="option" id='month' value="15"
		>Dues	
		<?php 	$selt4="select * from  paid where session='$session' and sch='$application' order by id desc ";
	$rest4=mysqli_query($conn,$selt4);
	$rowt4=mysqli_fetch_array($rest4,MYSQLI_BOTH);
	  if($rowt4['remain']>0)
	  {
	     ?><marquee behavior="alternate" <marquee onMouseOver="this.stop()" onMouseOut="this.start()" style='font-weight:bold' scrollamount="13"><span style='color:red'>Books Dues - <?php echo $rowt4['remain'] ;?></span> </marquee><?php
	  }
	 
	  ?>
		</center>
				 <!----phli row-->
				 
				<div class="col-sm-6">
				    <br/>
					     <div class="form-group">
    <label  class="col-sm-4 control-label">Scho.-</label>
    <div class="col-sm-8">
      <input type="number" class="form-control"  value="<?php echo $application;?>" style="background-color:green;color:yellow"readonly >
    </div>
  </div>
				<div class="form-group">
				<input type="hidden" value="<?php echo $row['application'];?>" name="sch" id="app"/>
					<input type="hidden" value="<?php echo rand(10000,500000);?>" name="pr" id="pr"/>
					<input type="hidden" value="<?php echo $row['mobile'];?>" name="mobile1" />
					<input type="hidden" value="<?php echo $eid;?>" name="reg_id" id="id"/>
					<input type="hidden" value="<?php echo $session;?>" name="session" id="session"/>
					<input type="hidden" value="<?php echo $email;?>" name="email" />
				<input type="hidden" value="<?php echo $board ;?>" name="board"/>
				<label class="col-sm-2 control-label">Name</label>
				<div class="col-sm-10"><input type="text" class="form-control" value="<?php echo $row['name'];?>" name="name" readonly style="background-color:pink;color:black" /></div>
				</div>
				<div class="form-group">
				<label class="col-sm-4 control-label">Father Name</label>
				<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['fname'];?>"  style="background-color:gray;color:yellow" readonly></div>
				
				</div> 
			    <div class="form-group">
				<label class="col-sm-4 control-label">Class</label>
				<div class="col-sm-5"><input type="text" class="form-control" value="<?php echo $row['subject'];?>" id="class" name="class" style="background-color:#FF8800;color:#0099CC" readonly></div>
				<div class="col-sm-3"><input type="text" class="form-control" value="<?php echo $row['section'];?>"  name="section" style="background-color:#FF8800;color:#0099CC" readonly></div>
				</div> 
			
  <input type="hidden" class="form-control" value="<?php echo $row['session'];?>" name="year"  />
  
					<div id='mo'>
 </div>
				   
			
			 </div>
			  <!----dusari row-->
				<div class="col-sm-6">
				    <br/>
				

  <div class="form-group">
    <label  class="col-sm-4 control-label">Others</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" value='0' id="other" placeholder="Other Charge" name="other" required>
    </div>
  </div>
  
    <div class="form-group">
    <label  class="col-sm-4 control-label">Remark</label>
    <div class="col-sm-8">
      <input type="text" class="form-control"  placeholder="Remark" name="remark" >
    </div>
  </div>
  
  	
				 
				    
			
  
   
 
 
  <div class="form-group">
    <label  class="col-sm-4 control-label">PreDues</label>
    <div class="col-sm-8">
      <input type="number" readonly style="color:red" id="dew" name="pre_dues" value="<?php 
	  
	  if($search!='' or $search!=NULL)
	  {
	  if($remain!='')
	  { echo $remain;} 
  else{echo '0';}
	  }
	  else
	  {
		 if($remain42!='')
	  { echo $remain42;} 
  else{echo '0';} 
	  }
	 
	  
	  
	  ?>" class="form-control"  required>
    </div>
  </div>
 
  <div class="form-group">
     <label  class="col-sm-4 control-label" STYLE="FONT-SIZE:13PX;FONT-WEIGHT:BOLD;color:blue;">GRAND TOTAL</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="total" style="font-size:18px;font-weight:bold;color:blue;background-color:#f06292" name="total" readonly required>
    </div>
  </div>
   <div class="form-group">
    <label  class="col-sm-4 control-label">Consession</label>
    <div class="col-sm-8">
        <input type="hidden" class="form-control" id="con1"  value="<?php echo $fixf ?>" >
         <input type="hidden" class="form-control" id="convcons1"  value="<?php echo $conv;?>">
      
      <input type="number" class="form-control" id="con" value="<?php echo $fixf ?>" name="cons" required>
      <textarea id="remark" rows="4" cols="32" style="resize:none" name="cons_remark" ><?php echo $note;?></textarea>
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Payable Amount</label>
    <div class="col-sm-8">
      <input type="number" style="color:green; font-weight:bold;font-size:19px"class="form-control" id="payble" name='payable'  required readonly>
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Paid</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="paid"  name="paid" required>
    </div>
  </div>
 
			<div class="form-group">
    <label  class="col-sm-4 control-label">New Dues</label>
    <div class="col-sm-8">
      <input type="number" style="color:red" class="form-control" id="ndew"  name="remain" readonly required>
    </div>
  </div>  	
    	
		
    		<div class="form-group">
    <label  class="col-sm-4 control-label">Paid Mode</label>
    <div class="col-sm-8">
    <select class='form-control' name='mode'><option>Cash</option><option>UPI</option><option>CHECK</option><option>BANK</option></select>
      
    </div>
  </div>	

  
				</div>
				
				<!----dusari row-->
				
				
				
				
  <div class="form-group">
    
    <div class="col-sm-5">
      
	   <br/>
				<center><button class="btn btn-primary" id="btn">Submit</button>
				 &emsp;&emsp;&emsp;<button class="btn btn-danger" data-dismiss="modal"> Close</button>
				</center>
				</div>
				</form>
	</div>
	</div>
	</div>
	
	
	
	<?php
	break;
case 105:
	
	
	 $pr=$_POST['pr'];
	 $app=$_POST['app'];
	 $session=$_POST['session'];
	 $id=$_POST['id'];
	  $month=$_POST['values'];

	
	
	$sel3="select * from registration where id='$id' ";
	$res3=mysqli_query($conn,$sel3);
	$row3=mysqli_fetch_array($res3,MYSQLI_BOTH);
	$class=$row3['subject'];
	$session=$row3['session'];
	$code=$row3['code'];
	$late=$row3['late'];
	
	
	$sel36="select * from convence where code='$code' and session='$session' ";
	$res36=mysqli_query($conn,$sel36);
	$row36=mysqli_fetch_array($res36,MYSQLI_BOTH);
	$code=$row36['conv'];
	
	$date=date('Y-m-d');
	$month_count=0;
	$fees=$row31['fees'];
	$exam=$row31['exam'];
	$sel313="delete from fees_data where session='$session' and reg_id='$id'  and pr='$pr' ";
	$res313=mysqli_query($conn,$sel313);
	
		  foreach ($month as $x) {
  
 $sel31="select * from fees where session='$session' and class='$class' and month='$x' ";
	$res31=mysqli_query($conn,$sel31);
	$row31=mysqli_fetch_array($res31,MYSQLI_BOTH);
	$fees=$row31['fees'];
	$exam=$row31['exam'];
	$ins="insert into fees_data(app,reg_id,month_name,month_count,fees,exam,pr,date,session,status) values('$app','$id','$x','$month_count','$fees','$exam','$pr','$date','$session','')";

	if(mysqli_query($conn,$ins))
	{
	    
		
		//	echo"Fees Submit";
		
	}
	else
	{
		//echo"Fees Not Submit";
	}
	}
	$fee=0;
	$ex=0;
	$count=0;
	$s=1;
	$sel3132="select * from fees_data where session='$session' and reg_id='$id'  and pr='$pr' ";
	$res3132=mysqli_query($conn,$sel3132);
	while($row3132=mysqli_fetch_array($res3132,MYSQLI_BOTH))
	{
		$mo=$row3132['month_name'];
		$fee=$row3132['fees']+$fee;
		$ex=$row3132['exam']+$ex;
		
	
	
	 $sel315="select * from plan where id='$mo' ";
	$res315=mysqli_query($conn,$sel315);
	$row315=mysqli_fetch_array($res315,MYSQLI_BOTH);
	
	$count=$row315['month_count']+$count;
	$con=$count*$code;
	?>
	<table class="table table-striped" style='font-size:10px'>
  
  <tbody>
    
     <tr>
	<td><?php echo $s++;?></td>
	<td><?php echo $row315['month'];?></td>
	<td><?php echo $row3132['fees'];?></td>
	<td><?php echo $row3132['exam'];?></td>
	</tr>
    
    
  </tbody>
</table>
	
	<?php 
	}
	$sel414="select * from fees_data where app='$app' and session='$session' and status='Yes' order by id desc ";
	$res414=mysqli_query($conn,$sel414);
	$row414=mysqli_fetch_array($res414,MYSQLI_BOTH);
	$p_date=$row414['date'];
		$m_name=$row414['month_name'];
		
		
	
	?>
	 <div class="form-group">
    <label  class="col-sm-4 control-label">Tution Fee</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="fee" value="<?php echo $fee;?>" name="fees"  readonly required>
     
    </div>
  </div>
   <div class="form-group">
    <label  class="col-sm-4 control-label">Exam/Dev Fee</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id='exam' value="<?php echo $ex;?>" name="exam"  readonly required>
     
    </div>
  </div>
   <div class="form-group">
    <label  class="col-sm-4 control-label">Conveyance</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id='conv' value="<?php echo $con;?>" name="conv"  readonly required>
      <input type="hidden" class="form-control" id='tot' value="<?php echo $con+$fee+$ex;?>"   readonly required>
     
    </div>
  </div>
   <div class="form-group">
    <label  class="col-sm-4 control-label">Late Charge</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id='late' value="0" name="late"  readonly required>
     
    </div>
  </div>
	<?php
	
	break;
	
	
	case 10:
	
	 
	 $month=implode(',',$_POST['choice']);
//	echo $ch;
	$name=$_POST['name'];
		$cons_remark1=$_POST['cons_remark'];
			$remark1=$_POST['remark'];
			
			$cons_remark=addslashes($cons_remark1);
				$remark=addslashes($remark1);
	$exam=$_POST['exam'];
	$other=$_POST['other'];
	
	$paid=$_POST['paid'];
	
		$pre_dues=$_POST['pre_dues'];
	
	$conv=$_POST['conv'];
	$cons=$_POST['cons'];
	$class=$_POST['class'];
	
	$sch=$_POST['sch'];
	$reg_id=$_POST['reg_id'];
	
		 $payable=$_POST['payable'];
	$total=$_POST['total'];
	
	$mode=$_POST['mode'];
	$fees=$_POST['fees'];
		$pr=$_POST['pr'];
		
	date_default_timezone_set("asia/kolkata");
	$time=date("h:i:sa");
			$date=date('Y-m-d');
	$session=$_POST['session'];
	$email=$_POST['email'];
	$late=$_POST['late'];
	$remain=$total-$paid-$cons;
	
	$sel1="select * from  fees_paid where pr='$pr' and status='' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	if($row1)
	{
	    echo "  Paid Allready";
	}
	else
	{
$ins="INSERT INTO `fees_paid` (`session`, `month`, `sch`, `reg_id`, `name`, `class`, `fees`, `exam`, `conv`, `other`, `remark`, `pre_dues`, `total`, `cons`, `cons_remark`, `payable`, `paid`, `remain`, `mode`, `date`, `time`, `status`, `email`, `pr`, `late`) VALUES ( '$session', '$month', '$sch', '$reg_id', '$name', '$class', '$fees', '$exam', '$conv', '$other', '$remark', '$pre_dues', '$total', '$cons', '$cons_remark', '$payable', '$paid', '$remain', '$mode', '$date', '$time', '', '$email','$pr','$late')";

	if(mysqli_query($conn,$ins))
	{
	    
		$up="update  fees_data set status='Yes' where pr='$pr' and reg_id='$reg_id' and session='$session' order by id desc";
	mysqli_query($conn,$up);
	


			echo"Fees Submit";
		
	}
	else
	{
		echo"Fees Not Submit";
	}
	}
	
	break;
	
	//=========================================================message==//
	case 1109:
	
$year=$_POST['year'];
	$length1=$_POST['length'];
	$length=$length1/69;
	//$len=(int)$le;
	if($length<1)
	{
		$len=1;
	}
	if($length>1 && $length<=2)
	{
		$len=2;
	}
	if($length>2 && $length<=3)
	{
		$len=3;
	}
	if($length>3 && $length<=4)
	{
		$len=4;
	}
	if($length>4 && $length<=5)
	{
		$len=5;
	}
	if($length>5 && $length<=6)
	{
		$len=6;
	}
	$selm="select * from message where session='$year' ";
	$resm=mysqli_query($conn,$selm);
	
	$count1=0;
	while($rowm=mysqli_fetch_array($resm,MYSQLI_BOTH))
	{
		$count1=$rowm['count']+$count1;
		
		
	}
	//$class=$_POST['class'];
	$date=date("d-m-Y");
	$message=$_POST['message'];
	$sel="select * from registration where session='$year'";
	$res=mysqli_query($conn,$sel);
	$mob="";
	$mess=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$mobile1=$row['mobile'];
		$mob= $mobile1.",".$mob;
		$mess++;
	}
	
	$mess1=$mess*$len;
	$username="AwadheshYadav";
$password="AwadheshYadav";
$senderid="GCSNNJ";

$msg=urlencode($message);
$rest=substr($mob,0,-1);
$to=$rest;

//echo $length;
//echo $mess1;
if($count1<10000)
{
	$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=KHISWP&receiver=$to&route=TA&msgtype=3&sms=$msg";

$result=file_get_contents($api);
if($result)
{
	$ins="insert into message (message,count,session) value('$message','$mess1','$year')";
	$res=mysqli_query($conn,$ins);
	$insme="insert into message1 (message,class,date,session) value('$message','$class','$date','$year')";
	$resme=mysqli_query($conn,$insme);
	echo"sms send";
}
else
{
	echo"sms not send";
}
}
else
{
	echo 'SMS PACK FINISHED';
}

	
	break ;
	case 11:
	
	$year=$_POST['year'];
	$length1=$_POST['length'];
	$length=$length1/160;
	//$len=(int)$le;
	if($length<1)
	{
		$len=1;
	}
	if($length>1 && $length<=2)
	{
		$len=2;
	}
	if($length>2 && $length<=3)
	{
		$len=3;
	}
	if($length>3 && $length<=4)
	{
		$len=4;
	}
	if($length>4 && $length<=5)
	{
		$len=5;
	}
	if($length>5 && $length<=6)
	{
		$len=6;
	}
	$selm="select * from message where session='$year' ";
	$resm=mysqli_query($conn,$selm);
	
	$count1=0;
	while($rowm=mysqli_fetch_array($resm,MYSQLI_BOTH))
	{
		$count1=$rowm['count']+$count1;
		
		
	}
	//$class=$_POST['class'];
	$date=date("d-m-Y");
	$message=$_POST['message'];
	$sel="select * from registration where session='$year' ";
	$res=mysqli_query($conn,$sel);
	$mob="";
	$mess=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$mobile1=$row['mobile'];
		$mob= $mobile1.",".$mob;
		$mess++;
	}
	
	$mess1=$mess*$len;
	$username="AwadheshYadav";
$password="AwadheshYadav";
$senderid="GCSNNJ";

$msg=urlencode($message);
$rest=substr($mob,0,-1);
$to=$rest;

//echo $length;
//echo $mess1;
if($count1<10000)
{
	$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=KHISWP&receiver=$to&route=TA&msgtype=1&sms=$msg";

$result=file_get_contents($api);
if($result)
{
	$ins="insert into message (message,count,session) value('$message','$mess1','$year')";
	$res=mysqli_query($conn,$ins);
	$insme="insert into message1 (message,class,date,session) value('$message','$class','$date','$year')";
	$resme=mysqli_query($conn,$insme);
	echo"sms send";
}
else
{
	echo"sms not send";
}
}
else
{
	echo 'SMS PACK FINISHED';
}

	break ;
		case 1112:
	
$year=$_POST['year'];
	$length1=$_POST['length'];
	$length=$length1/69;
	//$len=(int)$le;
	if($length<1)
	{
		$len=1;
	}
	if($length>1 && $length<=2)
	{
		$len=2;
	}
	if($length>2 && $length<=3)
	{
		$len=3;
	}
	if($length>3 && $length<=4)
	{
		$len=4;
	}
	if($length>4 && $length<=5)
	{
		$len=5;
	}
	if($length>5 && $length<=6)
	{
		$len=6;
	}
	$selm="select * from message where session='$year' ";
	$resm=mysqli_query($conn,$selm);
	
	$count1=0;
	while($rowm=mysqli_fetch_array($resm,MYSQLI_BOTH))
	{
		$count1=$rowm['count']+$count1;
		
		
	}
	//$class=$_POST['class'];
	$date=date("d-m-Y");
	$message=$_POST['message'];
	$sel="select * from registration where session='$year' ";
	$res=mysqli_query($conn,$sel);
	$mob="";
	$mess=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$mobile1=$row['mobile'];
		$mob= $mobile1.",".$mob;
		$mess++;
	}
	
	$mess1=$mess*$len;
	$username="AwadheshYadav";
$password="AwadheshYadav";
$senderid="GCSNNJ";

$msg=urlencode($message);
$rest=substr($mob,0,-1);
$to=$rest;

//echo $length;
//echo $mess1;
if($count1<10000)
{
	$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=KHISWP&receiver=$to&route=TA&msgtype=1&sms=$msg";

$result=file_get_contents($api);
if($result)
{
	$ins="insert into message (message,count,session) value('$message','$mess1','$year')";
	$res=mysqli_query($conn,$ins);
	$insme="insert into message1 (message,class,date,session) value('$message','$class','$date','$year')";
	$resme=mysqli_query($conn,$insme);
	echo"sms send";
}
else
{
	echo"sms not send";
}
}
else
{
	echo 'SMS PACK FINISHED';
}

	
	break ;

	case 111:
	
$year=$_POST['year'];
	$length1=$_POST['length'];
	$length=$length1/160;
	//$len=(int)$le;
	if($length<1)
	{
		$len=1;
	}
	if($length>1 && $length<=2)
	{
		$len=2;
	}
	if($length>2 && $length<=3)
	{
		$len=3;
	}
	if($length>3 && $length<=4)
	{
		$len=4;
	}
	if($length>4 && $length<=5)
	{
		$len=5;
	}
	if($length>5 && $length<=6)
	{
		$len=6;
	}
	$selm="select * from message where session='$year' ";
	$resm=mysqli_query($conn,$selm);
	
	$count1=0;
	while($rowm=mysqli_fetch_array($resm,MYSQLI_BOTH))
	{
		$count1=$rowm['count']+$count1;
		
		
	}
	$class=$_POST['class'];
	$date=date("d-m-Y");
	$message=$_POST['message'];
	$sel="select * from registration where session='$year' and subject='$class'";
	$res=mysqli_query($conn,$sel);
	$mob="";
	$mess=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$mobile1=$row['mobile'];
		$mob= $mobile1.",".$mob;
		$mess++;
	}
	
	$mess1=$mess*$len;
	$username="AwadheshYadav";
$password="AwadheshYadav";
$senderid="GCSNNJ";

$msg=urlencode($message);
$rest=substr($mob,0,-1);
$to=$rest;

//echo $length;
//echo $mess1;
if($count1<10000)
{
	$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=KHISWP&receiver=$to&route=TA&msgtype=1&sms=$msg";

$result=file_get_contents($api);
if($result)
{
	$ins="insert into message (message,count,session) value('$message','$mess1','$year')";
	$res=mysqli_query($conn,$ins);
	$insme="insert into message1 (message,class,date,session) value('$message','$class','$date','$year')";
	$resme=mysqli_query($conn,$insme);
	echo"sms send";
}
else
{
	echo"sms not send";
}
}
else
{
	echo 'SMS PACK FINISHED';
}

	
	
	break ;
	case 112:
	
	$year=$_POST['year'];
	$length1=$_POST['length'];
	$length=$length1/69;
	//$len=(int)$le;
	if($length<1)
	{
		$len=1;
	}
	if($length>1 && $length<=2)
	{
		$len=2;
	}
	if($length>2 && $length<=3)
	{
		$len=3;
	}
	if($length>3 && $length<=4)
	{
		$len=4;
	}
	if($length>4 && $length<=5)
	{
		$len=5;
	}
	if($length>5 && $length<=6)
	{
		$len=6;
	}
	$selm="select * from message where session='$year' ";
	$resm=mysqli_query($conn,$selm);
	
	$count1=0;
	while($rowm=mysqli_fetch_array($resm,MYSQLI_BOTH))
	{
		$count1=$rowm['count']+$count1;
		
		
	}
	$class=$_POST['class'];
	$date=date("d-m-Y");
	$message=$_POST['message'];
	$sel="select * from registration where session='$year' and subject='$class'";
	$res=mysqli_query($conn,$sel);
	$mob="";
	$mess=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$mobile1=$row['mobile'];
		$mob= $mobile1.",".$mob;
		$mess++;
	}
	
	$mess1=$mess*$len;
	$username="AwadheshYadav";
$password="AwadheshYadav";
$senderid="GCSNNJ";

$msg=urlencode($message);
$rest=substr($mob,0,-1);
$to=$rest;

//echo $length;
//echo $mess1;
if($count1<10000)
{
	$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=KHISWP&receiver=$to&route=TA&msgtype=3&sms=$msg";

$result=file_get_contents($api);
if($result)
{
	$ins="insert into message (message,count,session) value('$message','$mess1','$year')";
	$res=mysqli_query($conn,$ins);
	$insme="insert into message1 (message,class,date,session) value('$message','$class','$date','$year')";
	$resme=mysqli_query($conn,$insme);
	echo"sms send";
}
else
{
	echo"sms not send";
}
}
else
{
	echo 'SMS PACK FINISHED';
}

	
	
	break ;
	
	case 13:
	$year=$_POST['year'];
	$class=$_POST['class'];
  $sel="select * from  studentfees where year='$year' and class='$class' and status='' order by date desc ";
	$res=mysqli_query($conn,$sel);
	$sel1="select * from  studentfees where year='$year' and class='$class' and status='' ";
	$res1=mysqli_query($conn,$sel1);
	$row2=mysqli_num_rows($res1);
	if($row2!=" ")
	{
	
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th>Sr.</th><th>Sch No.</th><th>Session</th><th>Name</th><th>Class</th><th> Month</th><th>Month Fee</th><th>Annual Fee</th><th>Exam Fee</th><th>Conveyance </th><th>Admission.</th><th>Dues Charge</th><th>Other Charge</th><th> Total</th><th>DateTime</th><th>Update</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                 <th>Sr.</th><th>Sch No.</th><th>Session</th><th>Name</th><th>Class</th><th> Month</th><th>Month Fee</th><th>Annual Fee</th><th>Exam Fee</th><th>Conveyance </th><th>Admission.</th><th>Dues Charge</th><th>Other Charge</th><th> Total</th><th>DateTime</th><th>Update</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['search'];?></td><td><?php echo $row['year'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['class'];?></td><td><?php echo $row['month'];?></td><td><?php echo $row['fee'];?></td><td><?php echo $row['ann'];?></td><td><?php echo $row['exam'];?></td><td><?php echo $row['van'];?></td><td><?php echo $row['addm'];?></td><td><?php echo $row['remain'];?></td><td><?php echo $row['other'];?></td><td><?php echo $row['total'];?></td><td><?php echo $row['date'];?></td>
	
	
	<td><a href="javascript:;" onclick="feeuprow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-pencil"></span></a></td>
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt>Not Record Available.</font>";
	}
	break;
	
	case 14:
	$id=$_POST['rowid'];
	
	$del="update studentfees set status='Delete' where id='$id'";
	if(mysqli_query($conn,$del))
	{
		echo"deleted Successfully";
		
	}
	else
	{
		echo"Not Deleted";
	}
	break;
	
	
	
	case 15:
	
	$rol=$_POST['rol'];
	
	
	
	$sel="select * from  studentfees where search='$rol' order by date desc";
	
	$res=mysqli_query($conn,$sel);
	$sel1="select * from  studentfees where search='$rol'";
	
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_num_rows($res1);
	if($row1==" ")
	{
		echo"<font color=red size=6pt>Not Fees Submit Or Invailid Session and Application Number.</font>";
	}
else
{
	
	?>
	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: [ 'pdf', 'print']
    });
	
});
</script>
		<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr >
                <th style="text-align:center">Session</th><th style="text-align:center">Month</th><th style="text-align:center">Name</th><th style="text-align:center">Class</th><th style="text-align:center">Fees</th><th style="text-align:center">Exam</th><th style="text-align:center">Van</th><th style="text-align:center">Admission</th><th style="text-align:center">Total</th><th style="text-align:center">Date</th>
            </tr>
        </thead>
<tfoot>
            <tr>
               <th style="text-align:center">Session</th><th style="text-align:center">Month</th><th style="text-align:center">Name</th><th style="text-align:center">Class</th><th style="text-align:center">Fees</th><th style="text-align:center">Exam</th><th style="text-align:center">Van</th><th style="text-align:center">Admission</th><th style="text-align:center">Total</th><th style="text-align:center">Date</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
		?>
		 
	<tr class="text-center">
	</td><td><?php echo $row['year'];?></td><td><?php echo $row['month'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['class'];?></td><td><?php echo $row['fee'];?></td><td><?php echo $row['exam'];?></td><td><?php echo $row['van'];?></td><td><?php echo $row['other'];?></td><td><?php echo $row['total'];?></td><td><?php echo $row['date'];?></td>
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	
	<?php
		
}
	



	

	
	break;
	// contact---
	case 16:
$name=$_POST['name'];
$message1=$_POST['message'];
$mobile=$_POST['mobile'];
$subject=$_POST['subject'];
$email=$_POST['email'];

	$from=$email;
	
	$to="fmazm.meyer14@gmail.com";

$message=$name." mob-".$mobile." "."Msg-".$message1;
//echo"$message";
//echo"<br/>";

$headers="MIME-Version:1.0"."\r\n";  // header ko call krta hai header path
$headers=
"Content-type:text/html;charset:UTF-8"."\r\n";


if(mail($to,$subject,$message,$from))
{
	echo"Submit";
}
else
{
	echo"query not send";
	
}


break;
case 17:
$name=$_POST['name'];
$year=$_POST['year'];
$class=$_POST['class'];
$total=$_POST['total'];
$obtain=$_POST['obtain'];
$per1=$obtain/$total;
$per2=$per1*100;
$per=substr($per2,0,5);

$picture=$_FILES['picture']['name'];
$tempname=$_FILES['picture']['tmp_name'];
$location="img/".$picture;

$ins="insert into topper(name,year,class,total,obtain,picture,per) value('$name','$year','$class','$total','$obtain','$picture','$per')";
if($res=mysqli_query($conn,$ins))
{
	echo "Submit";
	move_uploaded_file($tempname,$location);
}

	else
	{
		echo"not submit";
	}
	


break;
case 18:
	
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th>Sr.</th><th>Photo</th><th>Name</th><th>Year</th><th>class</th><th>Total</th><th>Obtain</th><th>Per</th><th>Delete</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                <th>Sr.</th><th>Photo</th><th>Name</th><th>Year</th><th>class</th><th>Total</th><th>Obtain</th><th>Per</th><th>Delete</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  $sel="select * from  topper order by id desc";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><img src="../code/img/<?php echo $row['picture'];?>" height="60px" width="60px;"></td><td><?php echo $row['name'];?></td><td><?php echo $row['year'];?></td><td><?php echo $row['class'];?></td><td><?php echo $row['total'];?></td><td><?php echo $row['obtain'];?></td><td><?php echo $row['per'];?></td>
	
	
	
	<td><a href="javascript:;" onclick="deleterow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-trash"></span></a></td>
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	
	
	
	
	
	<?php
	break;
	case 22:
	$id=$_POST['rowid'];
	$sel="select * from  topper where id='$id'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$photo=$row['picture'];
	$location="../code/img/".$photo;
	
	$del="delete from topper where id='$id'";
	if(mysqli_query($conn,$del))
	{
		echo"deleted Successfully";
		unlink($location);
	}
	else
	{
		echo"Not Deleted";
	}
	break;
	
	case 23:
	$year=$_POST['year'];
	$slip=$_POST['slip'];
  $sel="select * from  studentfees where year='$year' and search='$slip' ";
	$res=mysqli_query($conn,$sel);
	
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: []
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th>Scho. No.</th><th>Session</th><th>Name</th><th>Class</th><th>Fees Details</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                <th>Scho. No.</th><th>Session</th><th>Name</th><th>Class</th><th>Fees Details</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
	
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
		
	
		
		?>
		 
	<tr class="text-center">
	<td><?php echo $row['search'];?></td><td><?php echo $row['year'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['class'];?></td>
	
	<td><a href="../admin/slip2.php?flag=<?php echo $row['search'];?>"><button class="btn btn-primary">Fees Details</button></a></td>
	
	
	
	</tr>
	
	 </tbody>
    </table>
	
	</div>
	
	
	
	
	
	
	<?php
	break;
	
	case 24:
	
	$sch=$_POST['std'];
	$session=$_POST['year'];
	
	
	
	
	$sel="select * from  registration where application='$sch' and session='$session'  ";
	
	$res=mysqli_query($conn,$sel);
	$sel1="select * from  registration where application='$sch' and session='$session'";
	
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_num_rows($res1);
	if($row1==" ")
	{
		echo"<font color=red size=6pt>Not Admission Submit Or Invailid Session and Application Number.</font>";
	}
else
{
	
	?>
		<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr >
                <th style="text-align:center">Photo</th><th style="text-align:center">Year</th><th style="text-align:center">Name</th><th style="text-align:center">Father Name</th><th style="text-align:center">Mother Name</th><th style="text-align:center"> Class</th><th style="text-align:center">Address</th><th style="text-align:center">Admission Datetime</th>
            </tr>
        </thead>
<tfoot>
            <tr>
              <th style="text-align:center">Photo</th><th style="text-align:center">Year</th><th style="text-align:center">Name</th><th style="text-align:center">Father Name</th><th style="text-align:center">Mother Name</th><th style="text-align:center"> Class</th><th style="text-align:center">Address</th><th style="text-align:center">Admission Datetime</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		$vil=$row['village'];
		$dist=$row['dist'];
		$add=$vil." ".$dist;
		?>
		 
	<tr class="text-center">
	<td><img src="code/img/<?php echo $row['picture'];?>" height="60px" width="60px;"></td><td><?php echo $row['year'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['fname'];?></td><td><?php echo $row['mname'];?></td><td><?php echo $row['subject'];?></td><td><?php echo $add;?></td><td><?php echo $row['datetime'];?></td>
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	
	<?php
		
}

	
	break;
	
	
	case 25:
	
	$rol=$_POST['roll'];
	
	$exam=$_POST['exam'];
	$class=$_POST['class'];
	//echo $class;
	if($class=='LKG'or $class=='UKG' or $class=='PLAY GROUP' or $class=='NURSERY' )
		{
			//echo'ok';
	$sel1="select * from six_eightresult where rol='$rol' and class='$class' and exam='$exam'";
	
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$mark1=$row1['mark1'];
	$mark2=$row1['mark2'];
	$mark3=$row1['mark3'];
	$total=$mark1+$mark2+$mark3;
	$per1=$total/150;
	$per2=$per1*100;
	$per=substr($per2,0,5);
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: [ 'pdf', 'print']
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr class="text-center">
                <th colspan="8" style="text-align:center;font-size:22px">Examination-&emsp;<?php echo $exam;?></th>
            </tr>
        </thead>

<tbody>		
  
		 
	<tr class="text-center">
	<td>Year</td><td style="font-weight:bold"><?php echo $row1['session'];?></td><td>Roll No.</td><td style="font-weight:bold"><?php echo $rol;?></td><td>Name</td><td><?php echo $row1['name'];?></td><td>Class</td><td style="font-weight:bold"><?php echo $row1['class'];?></td>
	
	</tr>
	<tr class="text-center">
                <th colspan="8" style="text-align:center;font-size:22px">Result</th>
            </tr>
			<tr class="text-center">
	<td colspan="2">Subject</td><td>Max Marks</td><td>Obtain Marks</td><td colspan="3">Total</td><td colspan="2">Percentage</td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">HINDI</td><td>50</td><td style="font-weight:bold"><?php echo $row1['mark1'];?></td><td rowspan="3" colspan="3" style="font-weight:bold"><?php echo $total;?>/150</td><td rowspan="3" style="font-weight:bold"><?php echo $per;?>&nbsp;%</td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">ENGLISH</td><td>50</td><td style="font-weight:bold"><?php echo $row1['mark2'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">MATHEMATICS</td><td>50</td><td style="font-weight:bold"><?php echo $row1['mark3'];?></td>
	
	</tr>
	
	 </tbody>
    </table>
	
	</div>
	<button onclick="print('fee')" >print</button>
	<a href="index.php"><button>Back</button></a>
	<?php
	
		}
		/////first//////
		else if($class=='FIRST'or $class=='SECOND' or $class=='THIRD' or $class=='FOURTH' or $class=='FIFTH' )
		{
			//echo'ok';
	$sel1="select * from six_eightresult where rol='$rol' and class='$class' and exam='$exam'";
	
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$mark1=$row1['mark1'];
	$mark2=$row1['mark2'];
	$mark3=$row1['mark3'];
	$mark4=$row1['mark4'];
	$mark5=$row1['mark5'];
	$mark6=$row1['mark6'];
	$mark7=$row1['mark7'];
	$mark8=$row1['mark8'];
	$mark9=$row1['mark9'];
	$total=$mark1+$mark2+$mark3+$mark4+$mark5+$mark6+$mark7+$mark8+$mark9;
	$per1=$total/400;
	$per2=$per1*100;
	$per=substr($per2,0,5);
	?>
	

	


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr class="text-center">
                <th colspan="8" style="text-align:center;font-size:22px">Examination-&emsp;<?php echo $exam;?></th>
            </tr>
        </thead>

<tbody>		
  
		 
	<tr class="text-center">
	<td>Year</td><td style="font-weight:bold"><?php echo $row1['session'];?></td><td>Roll No.</td><td style="font-weight:bold"><?php echo $rol;?></td><td>Name</td><td><?php echo $row1['name'];?></td><td>Class</td><td style="font-weight:bold"><?php echo $row1['class'];?></td>
	
	</tr>
	<tr class="text-center">
                <th colspan="8" style="text-align:center;font-size:22px">Result</th>
            </tr>
			<tr class="text-center">
	<td colspan="2">Subject</td><td>Max Marks</td><td>Obtain Marks</td><td colspan="3">Total</td><td colspan="2">Percentage</td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">HINDI</td><td>50</td><td style="font-weight:bold"><?php echo $row1['mark1'];?></td><td rowspan="9" colspan="3" style="font-weight:bold"><?php echo $total;?>/400</td><td rowspan="9" style="font-weight:bold"><?php echo $per;?>&nbsp;%</td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">ENGLISH READER</td><td>50</td><td style="font-weight:bold"><?php echo $row1['mark2'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">ENGLISH GRAMMAR</td><td>50</td><td style="font-weight:bold"><?php echo $row1['mark3'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">MATHEMATICS</td><td>50</td><td style="font-weight:bold"><?php echo $row1['mark4'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">E.V.S.</td><td>50</td><td style="font-weight:bold"><?php echo $row1['mark5'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">COMPUTER</td><td>50</td><td style="font-weight:bold"><?php echo $row1['mark6'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">G.K.</td><td>50</td><td style="font-weight:bold"><?php echo $row1['mark7'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">ART</td><td>50</td><td style="font-weight:bold"><?php echo $row1['mark8'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">HINDI GRAMMAR</td><td>50</td><td style="font-weight:bold"><?php echo $row1['mark9'];?></td>
	
	</tr>
	
	 </tbody>
    </table>
	
	</div>
	<button onclick="print('fee')" >print</button>
	<a href="index.php"><button>Back</button></a>
	<?php
	
		}
		else if($class=='SIXTH'or $class=='SEVENTH' or $class=='EIGHTH' )
		{
			//echo'ok';
	$sel1="select * from six_eightresult where rol='$rol' and class='$class' and exam='$exam'";
	
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	
	
	$mark1=$row1['mark1'];
	$mark2=$row1['mark2'];
	$mark3=$row1['mark3'];
	$mark4=$row1['mark4'];
	$mark5=$row1['mark5'];
	$mark6=$row1['mark6'];
	$mark7=$row1['mark7'];
	$mark8=$row1['mark8'];
	$mark9=$row1['mark9'];
	$mark10=$row1['mark10'];
	$total=$mark1+$mark2+$mark3+$mark4+$mark5+$mark6+$mark7+$mark8+$mark9+$mark10;
	$per1=$total/500;
	$per2=$per1*100;
	$per=substr($per2,0,5);
	?>
	
<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: [ 'pdf', 'print']
    });
	
});
</script>
	


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr class="text-center">
                <th colspan="8" style="text-align:center;font-size:22px">Examination-&emsp;<?php echo $exam;?></th>
             </tr>
        </thead>

<tbody>		
  <?php
  $sel="select * from six_eightresult where rol='$rol' and class='$class' and exam='$exam' and session='$year'";
	
	$res=mysqli_query($conn,$sel);
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
		?>
		 
	<tr class="text-center">
	<td>Year</td><td style="font-weight:bold"><?php echo $row1['session'];?></td><td>Roll No.</td><td style="font-weight:bold"><?php echo $rol;?></td><td>Name</td><td><?php echo $row['name'];?></td><td>Class</td><td style="font-weight:bold"><?php echo $row['class'];?></td>
	
	</tr>
	<tr class="text-center">
                <th colspan="8" style="text-align:center;font-size:22px">Result</th>
            </tr>
			<tr class="text-center">
	<td colspan="2">Subject</td><td>Max Marks</td><td>Obtain Marks</td><td colspan="3">Total</td><td colspan="2">Percentage</td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">HINDI</td><td>50</td><td style="font-weight:bold"><?php echo $row['mark1'];?></td><td rowspan="10" colspan="3" style="font-weight:bold"><?php echo $total;?>/500</td><td rowspan="10" style="font-weight:bold"><?php echo $per;?>&nbsp;%</td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">HINDI GRAMMAR</td><td>50</td><td style="font-weight:bold"><?php echo $row['mark2'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">ENGLISH READER</td><td>50</td><td style="font-weight:bold"><?php echo $row['mark3'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">ENGLISH GRAMMAR</td><td>50</td><td style="font-weight:bold"><?php echo $row['mark4'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">MATHEMATICS</td><td>50</td><td style="font-weight:bold"><?php echo $row['mark5'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">SCIENCE</td><td>50</td><td style="font-weight:bold"><?php echo $row['mark6'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">SO. SCIENCE</td><td>50</td><td style="font-weight:bold"><?php echo $row['mark7'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">COMPUTER</td><td>50</td><td style="font-weight:bold"><?php echo $row['mark8'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">G.K.</td><td>50</td><td style="font-weight:bold"><?php echo $row['mark9'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">ART</td><td>50</td><td style="font-weight:bold"><?php echo $row['mark10'];?></td>
	
	</tr>
	<?php
	}
	
	
	?>
	 </tbody>
    </table>
	
	</div>
	<button onclick="print('fee')" >print</button>
	<a href="index.php"><button>Back</button></a>
	<?php
	
		}
	/////////////9//////
	
	else if($class=='NINTH'or $class=='TENTH' )
		{
			//echo'ok';
	$sel1="select * from six_eightresult where rol='$rol' and class='$class' and exam='$exam'";
	
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$mark1=$row1['mark1'];
	$mark2=$row1['mark2'];
	$mark3=$row1['mark3'];
	$mark4=$row1['mark4'];
	$mark5=$row1['mark5'];
	$mark6=$row1['mark6'];
	
	
	$total=$mark1+$mark2+$mark3+$mark4+$mark5+$mark6;
	$per1=$total/600;
	$per2=$per1*100;
	$per=substr($per2,0,5);
	?>
	

	


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr class="text-center">
                <th colspan="8" style="text-align:center;font-size:22px">Examination-&emsp;<?php echo $exam;?></th>
            </tr>
        </thead>

<tbody>		
  
		 
	<tr class="text-center">
	<td>Year</td><td style="font-weight:bold"><?php echo $row1['session'];?></td><td>Roll No.</td><td style="font-weight:bold"><?php echo $rol;?></td><td>Name</td><td><?php echo $row1['name'];?></td><td>Class</td><td style="font-weight:bold"><?php echo $row1['class'];?></td>
	
	</tr>
	<tr class="text-center">
                <th colspan="8" style="text-align:center;font-size:22px">Result</th>
            </tr>
			<tr class="text-center">
	<td colspan="2">Subject</td><td>Max Marks</td><td colspan="2">Obtain Marks</td><td colspan="2">Total</td><td colspan="2">Percentage</td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">HINDI</td><td>100</td><td style="font-weight:bold"><?php echo $row1['mark1'];?></td><td></td><td rowspan="6" colspan="2" style="font-weight:bold"><?php echo $total;?>/600</td><td rowspan="6" style="font-weight:bold"><?php echo $per;?>&nbsp;%</td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">ENGLISH </td><td>100</td><td style="font-weight:bold"><?php echo $row1['mark2'];?></td><td style="font-weight:bold"><?php echo $row1['mark3'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">MATHEMATICS</td><td>100</td><td style="font-weight:bold"><?php echo $row1['mark4'];?></td><td rowspan="4"></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">SCIENCE</td><td>100</td><td style="font-weight:bold"><?php echo $row1['mark5'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">SO. SCIENCE</td><td>100</td><td style="font-weight:bold"><?php echo $row1['mark6'];?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">ART</td><td>100</td><td style="font-weight:bold"><?php echo $row1['mark7'];?></td>
	
	</tr>
	
	
	
	
	 </tbody>
    </table>
	
	</div>
	<button onclick="print('fee')" >print</button>
	<a href="index.php"><button>Back</button></a>
	<?php
	
		}
		/////////////11//////
	
	else if($class=='ELEVENTH'or $class=='TWELFTH' )
		{
			//echo'ok';
	$sel1="select * from six_eightresult where rol='$rol' and class='$class' and exam='$exam'";
	
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$mark1=$row1['mark1'];
	$mark12=$row1['mark12'];
	$hindi=$mark1+$mark12;
	$mark2=$row1['mark2'];
	$mark3=$row1['mark3'];
	$english=$mark2+$mark3;///////
	
	$mark4=$row1['mark4'];
	$mark5=$row1['mark5'];
	$math=$mark4+$mark5;
	$mark6=$row1['mark6'];
	$mark7=$row1['mark7'];
	
	$physics=$mark6+$mark7;
	$mark8=$row1['mark8'];
	$mark9=$row1['mark9'];
	
	$chemistry=$mark8+$mark9;
	$mark10=$row1['mark10'];
	$mark11=$row1['mark11'];
	
	$bio=$mark10+$mark11;
	
	$total=$mark1+$mark2+$mark3+$mark4+$mark5;
	$per1=$total/500;
	$per2=$per1*100;
	$per=substr($per2,0,5);
	?>
	

	


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr class="text-center">
                <th colspan="8" style="text-align:center;font-size:22px">Examination-&emsp;<?php echo $exam;?></th>
            </tr>
        </thead>

<tbody>		
  
		 
	<tr class="text-center">
	<td>Year</td><td style="font-weight:bold"><?php echo $row1['session'];?></td><td>Roll No.</td><td style="font-weight:bold"><?php echo $rol;?></td><td>Name</td><td><?php echo $row1['name'];?></td><td>Class</td><td style="font-weight:bold"><?php echo $row1['class'];?></td>
	
	</tr>
	<tr class="text-center">
                <th colspan="8" style="text-align:center;font-size:22px">Result</th>
            </tr>
			<tr class="text-center">
	<td colspan="2">Subject</td><td>Max Marks</td><td colspan="2">Obtain Marks</td><td colspan="2">Total</td><td colspan="2">Percentage</td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">HINDI</td><td>100</td><td style="font-weight:bold"><?php echo $mark1;?></td><td style="font-weight:bold"><?php echo $mark12;?></td><td rowspan="6" colspan="2" style="font-weight:bold"><?php echo $total;?>/600</td><td rowspan="6" style="font-weight:bold"><?php echo $per;?>&nbsp;%</td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">ENGLISH </td><td>100</td><td style="font-weight:bold"><?php echo $mark2;?></td><td style="font-weight:bold"><?php echo $mark3;?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">MATHEMATICS</td><td>100</td><td style="font-weight:bold"><?php echo $mark4;?></td><td style="font-weight:bold"><?php echo $mark5;?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">PHYSICS</td><td>100</td><td style="font-weight:bold"><?php echo $mark6;?></td><td style="font-weight:bold"><?php echo $mark7;?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">CHEMISTRY</td><td>100</td><td style="font-weight:bold"><?php echo $mark8;?></td><td style="font-weight:bold"><?php echo $mark9;?></td>
	
	</tr>
	<tr class="text-center">
	<td colspan="2" style="font-weight:bold">BIOLOGY</td><td>100</td><td style="font-weight:bold"><?php echo $mark10;?></td><td style="font-weight:bold"><?php echo $mark11;?></td>
	
	</tr>
	
	
	
	
	 </tbody>
    </table>
	
	</div>
	<button onclick="print('fee')" >print</button>
	<a href="index.php"><button>Back</button></a>
	<?php
	
		}
	
	break;
	

	case 27:
	?>
	
		<script>

    $("#con").focus(function(){
        $("#remark").toggle('show');
    });
	$(document).ready(function(){
		$("#remark").toggle("hide");
});
</script>
<script>

    
	$(document).ready(function(){
		
		$("#con").change(function(){
        var co=$("#con").val();
		
        var re=$("#remark").val();
		if(co!='0')
		{
			$("#remark").attr("required", "true");
		}
		else
		{
			$("#remark").removeAttr('required');
		}
    });
		
});
</script>
<script>

	$(document).ready(function(){
		
		$("#con").keyup(function(){
			$con1=$("#con").val();
			if($con1=="0")
		{
			
			$("#con").css("border-color","green");
			
		}
		
		
        
    });
		$("#paid").keyup(function(){
			$con1=$("#con").val();
			$rem12=$("#remark").val();
			if($con1!="0")
		{
			if($rem12=="")
			{
			$("#con").css("border-color","red");
			}
			else
			{
				$("#con").css("border-color","green");
			}
		}
		else
		{
			$("#con").css("border-color","green");
			
		}
		
        
    });
		
});
//////////////////////////////////////////////////////////////////////for remark required
</script>

	<script>
	

	
		$("document").ready(function(){
		
		$("#con").keyup(function(){
			
		
				var total12=$("#total").val();
		
			var con12=$("#con").val();
		
			var total121= parseInt(total12) - parseInt(con12) ;
			
			$("#paid").val(total121);
		});
		
		
	});
	
	$("document").ready(function(){
		
		$("#paid").keyup(function(){
			
		
				var paidd=$("#paid").val();
				var conn=$("#con").val();
				var total12=$("#total").val();
		
			
		
			var total121= parseInt(total12) - parseInt(paidd)- parseInt(conn) ;
			
			$("#ndew").val(total121);
		});
		
		
	});
		$("document").ready(function(){
		
		$("#ndew").focus(function(){
			
		
				var paidd=$("#paid").val();
				var conn=$("#con").val();
				var total12=$("#total").val();
		
			
		
			var total121= parseInt(total12) - parseInt(paidd)- parseInt(conn) ;
			
			$("#ndew").val(total121);
		});
		
		
	});
	// for check box coding (JAN)/////
	$("document").ready(function(){
		var totalm=0;
		
		var fees123=$("#feess").val();
		var conv123=$("#conv123").val();
		
		$(".option1").change(function(){
			
			 var m=$(":checkbox").filter(':checked').length;
			 var lem=0;
			 
			 for(i=0;i< m;i++)
			 {
				 lem++;
				 //alert(lem);
			 }
			 
		var fees1=$("#fee").val();
			var fees34=$("#fees34").val();
		var feess1=$("#feess").val();
		var fees12=lem*fees123;
		var conv12=lem*conv123;
			var add1=$("#add").val();
			var conv=$("#conv").val();
			var dew1=$("#dew").val();
			var gen1=$("#gen").val();
			var paid1=$("#paid").val();
			//var conv1=$("#conv").val();
			var con1=$("#con").val();
			var reg1=$("#reg").val();
			var comp1=$("#comp").val();
			var ann1=$("#ann").val();
			var other1=$("#other").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(fees12) + parseInt(add1) + parseInt(gen1) + parseInt(conv12) + parseInt(reg1) + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1);
			var totalg= parseInt(fees12) + parseInt(add1) + parseInt(gen1) + parseInt(conv12) + parseInt(reg1) + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1);
		
			
			if($(this).prop("checked")==true)
		{
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			$("#fee").val(fees12);
			$("#conv").val(conv12);
		}
		else
		{
		var checkbox = document.getElementsByName('choice[]');
			 var n = checkbox.length;
			 var lem=0;
			
			 for(j=0;j< n;j++)
			 {
				 lem++;
				 //alert(lem1);
			 }
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			$("#fee").val(fees12);
			$("#conv").val(conv12);
		
		}
		});
		
		
	});
	
	
	$("document").ready(function(){
		
		$("#other").keyup(function(){
		//	alert("ok");
		
			var fees1=$("#fee").val();
		var conv1=$("#conv").val();
	
			var add1=$("#add").val();
			var dew1=$("#dew").val();
			var gen1=$("#gen").val();
			var paid1=$("#paid").val();
			//var conv1=$("#conv").val();
			var con1=$("#con").val();
			var reg1=$("#reg").val();
			var comp1=$("#comp").val();
			var ann1=$("#ann").val();
			var other1=$("#other").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1) + parseInt(reg1) + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1) + parseInt(reg1) + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
		});
		
		
	});
	
	$("document").ready(function(){
		
		$("#exam").keyup(function(){
		//	alert("ok");
		
			var fees1=$("#fee").val();
		var conv1=$("#conv").val();
	
			var add1=$("#add").val();
			var dew1=$("#dew").val();
			var gen1=$("#gen").val();
			var paid1=$("#paid").val();
			//var conv1=$("#conv").val();
			var con1=$("#con").val();
			var reg1=$("#reg").val();
			var comp1=$("#comp").val();
			var ann1=$("#ann").val();
			var other1=$("#other").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1) + parseInt(reg1) + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1) + parseInt(reg1) + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
		});
		
		
	});
	
	$("document").ready(function(){
		
		$("#add").keyup(function(){
		//	alert("ok");
		
			var fees1=$("#fee").val();
		var conv1=$("#conv").val();
	
			var add1=$("#add").val();
			var dew1=$("#dew").val();
			var gen1=$("#gen").val();
			var paid1=$("#paid").val();
			//var conv1=$("#conv").val();
			var con1=$("#con").val();
			var reg1=$("#reg").val();
			var comp1=$("#comp").val();
			var ann1=$("#ann").val();
			var other1=$("#other").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1) + parseInt(reg1) + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1) + parseInt(reg1) + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
		});
		
		
	});
	
	$("document").ready(function(){
		
		$("#ann").keyup(function(){
		//	alert("ok");
		
			var fees1=$("#fee").val();
		var conv1=$("#conv").val();
	
			var add1=$("#add").val();
			var dew1=$("#dew").val();
			var gen1=$("#gen").val();
			var paid1=$("#paid").val();
			//var conv1=$("#conv").val();
			var con1=$("#con").val();
			var reg1=$("#reg").val();
			var comp1=$("#comp").val();
			var ann1=$("#ann").val();
			var other1=$("#other").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1) + parseInt(reg1) + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1) + parseInt(reg1) + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
		});
		
		
	});
	// for check box coding/////
	</script>
	
	
	<?php
$app=$_REQUEST['application'];
	
	
	
	//echo"$eid";
	$sel="select * from  registration where application='$app' and session='2018-2019'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$board=$row['mediam'];
	$class=$row['subject'];
	$village=$row['village'];
	$code=$row['code'];
	$application=$row['application'];
	$session=$row['session'];
	//echo $session;
	///////////////fees
	$selapp="select * from studentfees where search='$app' order by id desc";
	$resapp=mysqli_query($conn,$selapp);
	$rowapp=mysqli_fetch_array($resapp,MYSQLI_BOTH);
	$idapp=$rowapp['id'];
//	echo $idapp;
	//for search
	
		$sel1="select * from fees where class='$class' ";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$class1=$row1['class'];
	$fees=$row1['fees'];
	$reg=$row1['reg'];
	$add=$row1['addm'];
	$ann=$row1['ann'];
	$comp13=$row1['comp'];
	$gen12=$row1['gen'];
	///////////////convence
	$sel2="select * from convence where code='$code'";
	$res2=mysqli_query($conn,$sel2);
	$row2=mysqli_fetch_array($res2,MYSQLI_BOTH);
	$vill=$row2['vill'];
	$conv=$row2['conv'];
	///////////////studentfees
	$sel3="select * from studentfees where id='$idapp'";
	$res3=mysqli_query($conn,$sel3);
	$row3=mysqli_fetch_array($res3,MYSQLI_BOTH);
	$regs=$row3['reg'];
	$adms=$row3['addm'];
	$comp14=$row3['comp'];
	$anns=$row3['ann'];
		$gen12=$row3['gen'];
			$date12=$row3['date'];
			//echo $date12;
		
	///////////////studentfees1
	$sel4="select * from studentfees where search='$application' and year='$session' order by id desc";
	$res4=mysqli_query($conn,$sel4);
	$row4=mysqli_fetch_array($res4,MYSQLI_BOTH);
	$remain=$row4['remain'];
	$gen12=$row4['gen'];
		$regc=$row4['reg'];
	$hob=explode(",",$row3['month']);
		//echo $hob;
	
	?>
	
	<div class="panel-group">
				<div class="panel panel-primary">
				
				<marquee><span style="color:red"> महीने पर क्लिक करने पर महीने के अनुसार conveyance  और  Month Fees  दोनों एक साथ बढ़ेंगी | किसी छात्र की लास्ट में जमा की गयी फिश ही अपडेट होगी )</span></marquee>
				<div class="panel-body">
				
				<div style="background-color:yellow">
			
			<?php
			$mon='';
	  $selm="select * from studentfees where id='$idapp'  order by id asc";
	$resm=mysqli_query($conn,$selm);
	while($rowm=mysqli_fetch_array($resm,MYSQLI_BOTH))
	{
		$monthm=$rowm['month'];
		$mon=$monthm.",";
		echo "<font color=red size=2pt>".$mon."</font>";
	}
	  
	  
	  ?>
			
			</div>
				<form class="form-horizontal" onsubmit="return feesdatanew(this)" >
				
				 
			<center>	<input type="checkbox" name="choice[]" class="option1" value="April"
				<?php foreach($hob as $h){if($h=='April'){echo' checked';}}?>>Apr&emsp;
				<input type="checkbox" name="choice[]" class="option1" value="May"
				<?php foreach($hob as $h){if($h=='May'){echo' checked';}}?>>May&emsp;
				<input type="checkbox" name="choice[]" class="option1" value="Jun"
				<?php foreach($hob as $h){if($h=='Jun'){echo' checked';}}?>>Jun&emsp;
				<input type="checkbox" name="choice[]" class="option1" value="July"
				<?php foreach($hob as $h){if($h=='July'){echo' checked';}}?>>Jul&emsp;
				<input type="checkbox" name="choice[]" class="option1" value="August"
				<?php foreach($hob as $h){if($h=='August'){echo'checked';}}?>>Aug&emsp;
				<input type="checkbox" name="choice[]" class="option1" value="September"
				<?php foreach($hob as $h){if($h=='September'){echo' checked';}}?>>Sep&emsp;
				<input type="checkbox" name="choice[]" class="option1" value="October"
				<?php foreach($hob as $h){if($h=='October'){echo'checked';}}?>>Oct&emsp;
				<input type="checkbox" name="choice[]" class="option1" value="November"
				<?php foreach($hob as $h){if($h=='November'){echo' checked';}}?>>Nov&emsp;
				<input type="checkbox" name="choice[]" class="option1" value="December"
				<?php foreach($hob as $h){if($h=='December'){echo'checked';}}?>>Dec&emsp;
				<input type="checkbox" name="choice[]" class="option1" value="January" 
				 <?php foreach($hob as $h){if($h=='January'){echo' checked';}}?> >Jan &emsp;
				<input type="checkbox" name="choice[]" class="option1" value="February"
				<?php foreach($hob as $h){if($h=='February'){echo' checked';}}?>>Feb&emsp;
				<input type="checkbox" name="choice[]" class="option1" value="March"
				<?php foreach($hob as $h){if($h=='March'){echo' checked';}}?>>Mar</center>
				
				 <!----phli row-->
				 
				<div class="col-sm-6">
				    <br/>
				    <div class="form-group">
    <label  class="col-sm-4 control-label">Scho.-</label>
    <div class="col-sm-8">
      <input type="number" class="form-control"  value="<?php echo $app;?>" name="scho" style="background-color:green;color:yellow"readonly >
    </div>
  </div>
				<div class="form-group">
				<input type="hidden" value="<?php echo $idapp;?>" name="idapp" />
					<input type="hidden" value="<?php echo $row3['paid'];?>" name="opaid" />
						<input type="hidden" value="<?php echo $row3['total'];?>" name="ototal" />
							<input type="hidden" value="<?php echo $row3['date'];?>" name="odate" />
								<input type="hidden" value="<?php echo $row3['month'];?>" name="omonth" />
				<input type="hidden" value="<?php echo $board ;?>" name="board"/>
					<input type="hidden" value="<?php echo $fees ;?>" id="fees34"/>
						<input type="hidden" value="<?php echo $conv ;?>" id="conv34"/>
				<label class="col-sm-2 control-label">Name</label>
				<div class="col-sm-10"><input type="text" class="form-control" value="<?php echo $row['name'];?>" name="name" readonly style="background-color:pink;color:black" /></div>
				</div>
				<div class="form-group">
				<label class="col-sm-4 control-label">Father Name</label>
				<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['fname'];?>"  style="background-color:gray;color:yellow" readonly></div>
				
				</div> 
			    <div class="form-group">
				<label class="col-sm-4 control-label">Class</label>
				<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['subject'];?>" name="class" style="background-color:#FF8800;color:#0099CC" readonly></div>
				
				</div> 
			
  <input type="hidden" class="form-control" value="<?php echo $row['session'];?>" name="year"  />
  
  <div class="form-group">
    <label  class="col-sm-4 control-label">Admission</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="add"  value="<?php echo $row3['addm'];?>" name="add" required>
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Annual</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="ann" value="<?php echo $row3['ann'];?>" name="ann" required >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Exam</label>
    <div class="col-sm-8">
      <input type="number" class="form-control"value="<?php echo $row3['exam'];?>" id="exam"  name="exam" required>
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Computer</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="comp" name="comp" value="<?php echo $row3['comp'];?>" required>
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Generator</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="gen" value="<?php echo $row3['gen'];?>"  name="gen"  required>
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Maint/Med</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="reg" value="<?php echo $row3['reg'];?>" name="reg" required>
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-4 control-label">Others</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" value="<?php echo $row3['other'];?>" id="other"  name="other" required>
    </div>
  </div>
  
			
  
  
  

  
			 </div>
			  <!----dusari row-->
				<div class="col-sm-6">
				    <br/>
				    	<div class="form-group">
				    	    <span style="color:blue">&emsp;Pre Date-<?php echo $row3['date'];?></span>
    <label  class="col-sm-4 control-label ">Date</label>
    <div class="col-sm-8">
        <?php $date12=date("d-m-Y");?>
      <input type="date"  value="<?php echo $date12;?>"  class="form-control" name="date"  required>
    </div>
  </div>
				 
				    
			
  
   
  <div class="form-group">
      <span style="color:blue">&emsp;Pre Fee-<?php echo $row3['fee'];?></span>
    <label  class="col-sm-4 control-label">MonthFee</label>
    <div class="col-sm-8">
  <input type="number" class="form-control" id="fee" value="<?php echo $row3['fee'];?>" name="fees"  readonly required>
      <input type="hidden" class="form-control" id="feess" value="<?php echo $fees;?>" >
    </div>
  </div>
  <div class="form-group">
      <span style="color:blue">&emsp;Pre Conv-<?php echo $row3['van'];?></span>
    <label  class="col-sm-4 control-label">Conveyance</label>
    <div class="col-sm-8">
     <input type="number" class="form-control" id="conv" value="<?php echo $row3['van']?>" name="conv" readonly required>
      <input type="hidden" class="form-control" id="conv123" value="<?php echo $conv;?>" >
    </div>
  </div>
  
  
  <div class="form-group">
      <span style="color:blue">&emsp;Pre Dues-<?php echo $row3['remain'];?></span>
    <label  class="col-sm-4 control-label">PreDues</label>
    <div class="col-sm-8">
      <input type="number" style="color:red" id="dew" name="pre" value="<?php echo $row3 [remain];?>" class="form-control"  required>
    </div>
  </div>
  <div class="form-group">
      <span style="color:blue">&emsp;Pre Month Total-<?php echo $row3['mtotal'];?></span>
    <label  class="col-sm-4 control-label">MonthTotal</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="mtotal"  name="mtotal"  value="<?php echo $row3['mtotal'];?>" style="background-color:#3F729B;color:yellow" title="Please select Month" required>
    </div>
  </div>
  <div class="form-group">
      
     <label  class="col-sm-4 control-label" STYLE="FONT-SIZE:13PX;FONT-WEIGHT:BOLD;color:blue;">GRAND TOTAL</label>
    <div class="col-sm-8">
         
      <input type="number" class="form-control" id="total"  style="font-size:18px;font-weight:bold;color:blue;background-color:#f06292" name="total1" readonly required>
    </div>
  </div>
   <div class="form-group">
    <label  class="col-sm-4 control-label">Consession</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="con" value="<?php echo $row3['con'];?>" name="con" required>
       <input id="remark" class="form-control" style="height:50px" name="remark" value="<?php echo $rowapp['remark'];?>"/>
    </div>
  </div>
  
  <div class="form-group">
    <label  class="col-sm-4 control-label">Paid</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="paid" value="<?php echo $row3['paid'];?>" name="paid" required>
      <input type="hidden" value="<?php echo $row3['paid'];?>" name="paid12">
    </div>
  </div>
 
			<div class="form-group">
    <label  class="col-sm-4 control-label">New Dues</label>
    <div class="col-sm-8">
      <input type="number" style="color:red" class="form-control" id="ndew"  name="due" readonly required>
    </div>
  </div>  	
    	
			

  
				</div>
				
				<!----dusari row-->
				
				
				
				
  <div class="form-group">
    
    <div class="col-sm-5">
      
	   <br/>
				<center><button class="btn btn-primary" id="btn"  >Submit</button>
				 &emsp;&emsp;&emsp;<button class="btn btn-danger" data-dismiss="modal"> Close</button>
				</center>
				</div>
				</form>
	</div>
	</div>
	</div>
	
	
	
	<?php
	break;
	
	case 47:
	
	 
	$ch=implode(',',$_POST['choice']);
//	echo $ch;
	$name=$_POST['name'];
	$exam=$_POST['exam'];
	$other=$_POST['other'];
	$scho=$_POST['scho'];
	$ann=$_POST['ann'];
	$paid=$_POST['paid'];
	$add=$_POST['add'];
	$reg=$_POST['reg'];
	$comp=$_POST['comp'];
		$odate=$_POST['odate'];
			$omonth=$_POST['omonth'];
			$opaid=$_POST['opaid'];
			$ototal=$_POST['ototal'];
		$pre=$_POST['pre'];
	$gen=$_POST['gen'];
	$van=$_POST['conv'];
		$paid12=$_POST['paid12'];
	$con=$_POST['con'];
	$idapp=$_POST['idapp'];
		
	$board=$_POST['board'];
	$remain=$_POST['due'];
		$mtotal=$_POST['mtotal'];
		$remark=$_POST['remark'];
	$class=$_POST['class'];
	$month=$_POST['month'];
	$fee=$_POST['fees'];
		$date1=$_POST['date'];
$edate=date("d-m-Y",strtotime($date1));
//echo $edate;
	date_default_timezone_set("asia/kolkata");
	$time=date("h:i:sa");
	
	$year=$_POST['year'];
	$total=$_POST['total1'];
	$sel3="select * from studentfees where search='$search' and year='$year'";
	$res3=mysqli_query($conn,$sel3);
	$row3=mysqli_fetch_array($res3,MYSQLI_BOTH);
	$monthc=$row3['month'];
	
	$up="update studentfees set month='$ch',fee='$fee',date='$date1',van='$van',exam='$exam',other='$other',total='$total',remain='$remain',ann='$ann',addm='$add',reg='$reg',comp='$comp',gen='$gen',paid='$paid',con='$con',mtotal='$mtotal',remark='$remark' where id='$idapp'";
	if(mysqli_query($conn,$up))
	{
	    


		$ins12="insert into updatefees(name,class,month,fee,date,year,search,van,exam,other,total,paid,dues,opaid,ototal,odate,omonth) values('$name','$class','$ch','$fee','$edate','$year','$scho','$van','$exam','$other','$total','$paid','$remain','$paid12','$ototal','$odate','$omonth')";
		if(mysqli_query($conn,$ins12))
		{
			echo"Fees update";
		}
	}
	else
	{
		echo"Fees Not update";
	}
	
	
	break;

	/// update data fees
	break;
	
	case 28:
	$date4=$_POST['date1'];
	$date1=date("d-m-Y",strtotime($date4));
//	$date3=$_POST['date2'];
//	$date2=date("d-m-Y",strtotime($date3));
	
  $sel="select * from updatefees where date Like '$date1' order by id desc";
	$res=mysqli_query($conn,$sel);
	$sel1="select * from updatefees where date Like '$date1' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	
	$row1=mysqli_num_rows($res1);
	if($row1!="")
	{
		
	
	
	
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th>Sr.</th><th>Sch No.</th><th>Name</th><th>Class</th><th>Old Month</th><th> Change Month</th><th>Old Total Fees</th><th>Change Total Fees</th><th>Old Date</th><th>Change Date</th><th>Delete</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                 <th>Sr.</th><th>Sch No.</th><th>Name</th><th>Class</th><th>Old Month</th><th> Change Month</th><th>Old Total Fees</th><th>Change Total Fees</th><th>Old Date</th><th>Change Date</th><th>Delete</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['search'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['class'];?></td><td><?php echo $row['omonth'];?></td><td style="color:red"><?php echo $row['month'];?></td><td><?php echo $row['opaid'];?></td><td style="color:red"><?php echo $row['paid'];?></td><td><?php echo $row['odate'];?></td><td style="color:red"><?php echo $row['date'];?></td>
	<td><a href="javascript:;" onclick="deleterow12(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-trash"></span></a></td>
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	
	
	
	
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt>Not Update Fees.</font>";
	}
	break;
	
	
	/////////print student date//////
	case 29:
	
	?>
	

	


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr >
                <th style="text-align:center">Sr.</th><th style="text-align:center">Photo</th><th style="text-align:center">App.No.</th><th style="text-align:center">Name</th><th style="text-align:center">Fname</th><th style="text-align:center">Mname</th><th style="text-align:center">Session</th><th style="text-align:center">Class</th><th style="text-align:center">Address</th><th style="text-align:center">Mobile</th>
            </tr>
        </thead>

<tbody>		
  <?php
  
  $session=$_POST['session'];
	$class=$_POST['class'];
  $sel="select * from  registration where session='$session' and status='' and subject='$class'";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		$a=$row['village'];
		$b=$row['postoffice'];
	
	$c=$row['dist'];
	$d=$row['mobile'];
	
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><img src="../code/img/<?php echo $row['picture'];?>" height="90px" width="90px;"></td><td><?php echo $row['application'];?></td><td><?php echo $row['name']."<br/><b>Dob-</b>".$row['dob'];?></td><td><?php echo $row['fname']."<br/><b>Cate-</b>".$row['caste']."<br/><b>Adhar-</b>".$row['adhar']."<br/><b>Gen-</b>".$row['gender'];?></td><td><?php echo $row['mname'];?></td><td><?php echo $row['session']."<br/>".$row['date'];?></td><td><?php echo $row['subject'];?></td><td><?php echo $a."<br>"."<b>Post-</b>".$b."<br/>"."<b>Dist-</b>".$c;?></td><td><?php echo $row['mobile'];?></td>
	
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	
	
	
	
	
	<?php
	break;
	
	
	///////all fees print////
	////for presenty////
	case 291:
	
	?>
	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: []
    });
	
});
</script>

	


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr >
               <th style="text-align:center">Sch.No.</th><th style="text-align:center">Name</th><th style="text-align:center">Status</th><th style="text-align:center">Save</th>
            </tr>
        </thead>

<tbody>		
  <?php
  
	
  $session=$_POST['session'];
	$class=$_POST['class'];
  $sel="select * from  registration where session='$session' and status=''  and subject='$class'";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		$a=$row['village'];
		$b=$row['postoffice'];
	
	$c=$row['dist'];
	$app1=$row['id'];
	$date=date('Y-m-d');
//$edate=date("d-m-Y",strtotime($date1));
//echo $edate;
	date_default_timezone_set("asia/kolkata");
	$d=$row['mobile'];
	$sel1="select * from  present1 where sch='$app1' and session='$session' and status='' and date='$date'";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$status1=$row1['status'];
		?>
		 
	<tr class="text-center">
	<td><?php echo $row['id'];?></td><td><?php echo $row['name']."<br/><b>F-</b>".$row['fname']?></td><td><?php if($status1=='P'){echo"<font color=green size=6pt> P</font>";} if($status1=='A') {echo"<font color=red size=6pt> A</font>";}?></td><td><a href="javascript:;" onclick="record(<?php echo $row['id'];?>)"><button><span class="glyphicon glyphicon-ok"></span></button></a>&emsp;<a href="javascript:;" onclick="recordup(<?php echo $row['application'];?>)"><button><span class="glyphicon glyphicon-pencil"></span></button></a></td>
	
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	
	
	
	
	
	<?php
	break;
	
	
	///////all fees print////
	
	
	
	////for presenty////
	
	case 292:
	$name=$_POST['name'];
	$sch=$_POST['sch'];
	//$other=$_POST['other'];
	$fname=$_POST['fname'];
	$session=$_POST['session'];
	$class=$_POST['class'];
	$date=$_POST['date'];
	$status=$_POST['status'];
	 
	 $ins="insert into present1(sch,name,class,date,user,status,fname,session) values('$sch','$name','$class','$date','user','$status','$fname','$session')";
	$res=mysqli_query($conn,$ins);
	if($res)
	{
		echo"ok";
		if($status=='A')
		{
		$sel="select * from  registration where id='$sch' and session='$session'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$mob=$row['mobile'];
	$to=$mob;
	$date1=date("d-m-Y",strtotime($date));
$message='Dear Parents, Your Child ' .$name. ' is Absent Today ' .$date1. "/-". "in Class  
Regards 
GYAN VATIKA SCHOOL.";

$msg=urlencode($message);


$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=SENDE&receiver=$to&route=TA&msgtype=1&sms=$msg";

$result=file_get_contents($api);
		

$ins2="insert into message (message,count) value('$message','1')";
	$res2=mysqli_query($conn,$ins2);
	}
	}
	else
	{
		echo "not";
	}
	break;
	case 293:
	
	
	$id=$_REQUEST['id'];
	//echo"$eid";
	$sel="select * from  registration where id='$id'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	 $date=date('Y-m-d');
//$edate=date("d-m-Y",strtotime($date1));
//echo $edate;
	date_default_timezone_set("asia/kolkata");
	$time=date("h:i:sa");
	 $app=$row['id'];
	 $name=$row['name'];
	 $subject=$row['subject'];
	?>
	<div class="table-responsive">

      
            
      
		<tbody>
		<form onsubmit="return recordupdate(this)">
		<div class="form-group">
				<label class="col-sm-3 control-label">Sch.</label>
				<div class="col-sm-3"><input type="text" value="<?php echo $name;?>"  readonly style="background-color:yellow;color:green"/></div>
				<input type="hidden" value="<?php echo $app;?>" name="sch"/>
				<input type="hidden" value="<?php echo $date;?>" name="date"/>
				<input type="hidden" value="<?php echo $row['name'];?>" name="name"/>
				<input type="hidden" value="<?php echo $row['fname'];?>" name="fname"/>
				<input type="hidden" value="<?php echo $row['subject'];?>" name="class"/>
				<input type="hidden" value="<?php echo $date;?>" name="date"/>
					<input type="hidden" value="<?php echo $row['session'];?>" name="session"/>
				</div>
		
				
		<br/>
		<br/>
				
		
				<div class="form-group">
				<label class="col-sm-3 control-label">Status.</label>
				<div class="col-sm-3">
				<select name="status"><option style="font-size:15px;color:green;font-weight:bold">P</option><option style="font-size:15px;color:red;font-weight:bold">A</option></select>
				</div>
		<center><button class="btn btn-danger">Save</button></center>
		
		</form>
		<br/>
	<button style="background-color:red "class="close btn-block btn btn-danger" data-dismiss="modal"> <span style="color:yellow;background-color:red">Close </span> </button>
	</div>
	<?php
	break;
	case 295:
	
	$sch=$_REQUEST['application'];
	date_default_timezone_set("asia/kolkata");
	$date=date('Y-m-d');
	//echo"$eid";
	$sel="select * from  present1 where sch='$sch' order by id desc ";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	 
//$edate=date("d-m-Y",strtotime($date1));
//echo $edate;
	
	$time=date("h:i:sa");
	// $app=$row['application'];
	 $name=$row['name'];
	 
	?>
	<div class="table-responsive">

      
            
      
		<tbody>
		<form onsubmit="return recordupdate1(this)">
		<div class="form-group">
				<label class="col-sm-3 control-label">Sch.</label>
				<div class="col-sm-3"><input type="text" value="<?php echo $name;?>"  readonly style="background-color:yellow;color:green"/></div>
				<input type="hidden" value="<?php echo $sch;?>" name="sch"/>
				<input type="hidden" value="<?php echo $date;?>" name="date"/>
				<input type="hidden" value="<?php echo $row['name'];?>" name="name"/>
				<input type="hidden" value="<?php echo $row['fname'];?>" name="fname"/>
				<input type="hidden" value="<?php echo $row['subject'];?>" name="class"/>
				<input type="hidden" value="<?php echo $row['id'];?>" name="id"/>
				<input type="hidden" value="<?php echo $date;?>" name="date"/>
					<input type="hidden" value="<?php echo $row['session'];?>" name="session"/>
				</div>
		
				
		<br/>
		<br/>
				
		
				<div class="form-group">
				<label class="col-sm-3 control-label">Status.</label>
				<div class="col-sm-3">
				<select name="status"><option  <?php if($row['status']=='P'){echo'selected';}?> >P</option><option  <?php if($row['status']=='A'){echo'selected';}?>>A</option></select>
				</div>
		<center><button class="btn btn-danger">Update</button></center>
		
		</form>
		<br/>
	<button style="background-color:red "class="close btn-block btn btn-danger" data-dismiss="modal"> <span style="color:yellow;background-color:red">Close </span> </button>
	</div>
	<?php
	break;
	case 296:
	$name=$_POST['name'];
	$id=$_POST['id'];
	$sch=$_POST['sch'];
	//$other=$_POST['other'];
	$fname=$_POST['fname'];
	$session=$_POST['session'];
	$class=$_POST['class'];
	$date=$_POST['date'];
	$status=$_POST['status'];
	 
	 $ins="update  present1 set sch='$sch',name='$name',class='$class',date='$date',user='$user',status='$status',fname='$fname',session='$session' where id='$id'";
	$res=mysqli_query($conn,$ins);
	if($res)
	{
		echo"update";
		if($status=='A')
		{
		$sel="select * from  registration where application='$sch' and session='$session'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$mob=$row['mobile'];
	$to=$mob;
	$date1=date("d-m-Y",strtotime($date));
$message='Dear Parents, Your Child ' .$name. ' is Absent Today ' .$date1. "/-". "in Class  
Regards 
GYAN VATIKA SCHOOL.";

$msg=urlencode($message);


$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=SENDE&receiver=$to&route=TA&msgtype=1&sms=$msg";

$result=file_get_contents($api);
		

$ins2="insert into message (message,count) value('$message','1')";
	$res2=mysqli_query($conn,$ins2);
	}
	}
	else
	{
		echo "not update";
	}
	break;
case 297:
	
	?>
	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['pdf','print','excel']
    });
	
});
</script>

	


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr >
               <th style="text-align:center">Sch.No.</th><th style="text-align:center">Name</th><th style="text-align:center">Father</th><th style="text-align:center">Class</th><th style="text-align:center">Date</th><th style="text-align:center">Status</th>
            </tr>
        </thead>

<tbody>		
  <?php
  
	
  $session=$_POST['session'];
  $sdate=$_POST['sdate'];
  $edate=$_POST['edate'];
	$class=$_POST['class'];
	
	$selch="select * from  classteacher where class1='$class'  ";
	$resch=mysqli_query($conn,$selch);
	$rowch=mysqli_fetch_array($resch,MYSQLI_BOTH);
	/////
	$sel2="select * from  present1 where session='$session' and class='$class' and status='P' and date between '$sdate' and '$edate' ";
	$res2=mysqli_query($conn,$sel2);
	$count=mysqli_num_rows($res2);
//	echo $count;
	
	$sel21="select * from  present1 where session='$session' and class='$class' and status='A' and date between '$sdate' and '$edate' ";
	$res21=mysqli_query($conn,$sel21);
	$count1=mysqli_num_rows($res21);
	
	$sel211="select * from  present1 where session='$session' and status='A' and date between '$sdate' and '$edate' ";
	$res211=mysqli_query($conn,$sel211);
	$count11=mysqli_num_rows($res211);
	
	$sel2111="select * from  present1 where session='$session' and status='P' and date between '$sdate' and '$edate' ";
	$res2111=mysqli_query($conn,$sel2111);
	$count111=mysqli_num_rows($res2111);
//	echo $count1;
	//$s=0;
	
	//echo $s++;
	/////
  $sel="select * from  present1 where session='$session' and class='$class' and date between '$sdate' and '$edate'";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
//$edate=date("d-m-Y",strtotime($date1));
//echo $edate;
	date_default_timezone_set("asia/kolkata");
	//$d=$row['mobile'];
	$sel1="select * from  present1 where session='$session' and class='$class' and date between '$sdate' and '$edate'";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$status1=$row1['status'];
	$date12=$row1['date'];
	$date=date("d-m-Y",strtotime($date12));
		?>
		 
	<tr class="text-center">
	<td><?php echo $row['sch'];?></td><td><?php echo $row['2'];?></td><td><?php echo $row['fname']?></td><td><?php echo $row['class'] ;?></td><td><?php echo $date;?></td><td><?php echo $row['status'] ;?></td>
	
	
	
	</tr>
	
	<?php
	$s++;
	}
	
	?>
	
	<tr class="text-center">
	<td style="font-weight:bold" >TOTAL</td><td style="font-weight:bold;color:green">ALL PRESENT</td><td style="font-weight:bold;color:green;font-size:18px"><?php echo $count111;?></td><td style="font-weight:bold">ALL ABSENT</td><td style="font-weight:bold;color:red;font-size:18px"><?php echo $count11  ;?></td><td></td>
	
	</tr>
		<tr class="text-center">
	<td style="font-weight:bold" > Record </td><td style="font-weight:bold;color:green"> PRESENT</td><td style="font-weight:bold;color:green;font-size:18px"><?php echo $count;?></td><td style="font-weight:bold"> ABSENT</td><td style="font-weight:bold;color:red;font-size:18px"><?php echo $count1 ;?></td><td></td>
	
	</tr>
	
	<tr class="text-center">
	<td style="font-weight:bold"> CHECK BY </td><td style="font-weight:bold;color:red"> CLASS TEACHER</td><td style="font-weight:bold;color:red;font-size:18px"><?php echo $rowch['name'];?></td><td style="font-weight:bold"> </td><td style="font-weight:bold;color:red;font-size:18px"><?php  ;?></td><td></td>
	
	</tr>
	 </tbody>
    </table>
	
	</div>
	
	
	
	
	
	
	<?php
	break;
	case 2971:
	
	?>
	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['pdf','print','excel']
    });
	
});
</script>

	


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr >
               <th style="text-align:center">Sch.No.</th><th style="text-align:center">Name</th><th style="text-align:center">Father</th><th style="text-align:center">Class</th><th style="text-align:center">Date</th><th style="text-align:center">Status</th>
            </tr>
        </thead>

<tbody>		
  <?php
  
	
  $session=$_POST['session'];
  $sdate=$_POST['sdate'];
  $edate=$_POST['edate'];
	$class=$_POST['class'];
	$sch=$_POST['sch'];
	/////
	$sel2="select * from  present1 where session='$session' and class='$class' and sch=$sch and status='P' and date between '$sdate' and '$edate' ";
	$res2=mysqli_query($conn,$sel2);
	$count=mysqli_num_rows($res2);
//	echo $count;
	
	$sel21="select * from  present1 where session='$session' and class='$class' and sch=$sch and status='A' and date between '$sdate' and '$edate' ";
	$res21=mysqli_query($conn,$sel21);
	$count1=mysqli_num_rows($res21);
	
	$sel211="select * from  present1 where session='$session' and status='A' and date between '$sdate' and '$edate' ";
	$res211=mysqli_query($conn,$sel211);
	$count11=mysqli_num_rows($res211);
	
	$sel2111="select * from  present1 where session='$session' and status='P' and date between '$sdate' and '$edate' ";
	$res2111=mysqli_query($conn,$sel2111);
	$count111=mysqli_num_rows($res2111);
//	echo $count1;
	//$s=0;
	
	//echo $s++;
	/////
  $sel="select * from  present1 where session='$session' and class='$class' and sch=$sch and date between '$sdate' and '$edate'";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
//$edate=date("d-m-Y",strtotime($date1));
//echo $edate;
	date_default_timezone_set("asia/kolkata");
	//$d=$row['mobile'];
	$sel1="select * from  present1 where session='$session' and class='$class' and sch=$sch and date between '$sdate' and '$edate'";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$status1=$row1['status'];
	$date12=$row1['date'];
	$date=date("d-m-Y",strtotime($date12));
		?>
		 
	<tr class="text-center">
	<td><?php echo $row['sch'];?></td><td><?php echo $row['2'];?></td><td><?php echo $row['fname']?></td><td><?php echo $row['class'] ;?></td><td><?php echo $date;?></td><td><?php echo $row['status'] ;?></td>
	
	
	
	</tr>
	
	<?php
	$s++;
	}
	
	?>
	
	
		<tr class="text-center">
	<td style="font-weight:bold" > Record </td><td style="font-weight:bold;color:green"> PRESENT</td><td style="font-weight:bold;color:green;font-size:18px"><?php echo $count;?></td><td style="font-weight:bold"> ABSENT</td><td style="font-weight:bold;color:red;font-size:18px"><?php echo $count1 ;?></td><td></td>
	
	</tr>
	 </tbody>
    </table>
	
	</div>
	
	
	
	
	
	
	<?php
	break;
	case 298:
	
	?>
	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['pdf','print','excel']
    });
	
});
</script>

	


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr >
               <th style="text-align:center">Sch.No.</th><th style="text-align:center">Name</th><th style="text-align:center">Father</th><th style="text-align:center">Class</th><th style="text-align:center">Date</th><th style="text-align:center">Status</th>
            </tr>
        </thead>

<tbody>		
  <?php
  
	
  $session=$_POST['session'];
  $sdate=$_POST['sdate'];
  $edate=$_POST['edate'];
	$class=$_POST['class'];
	$sch=$_POST['sch'];
	/////
	$sel2="select * from  present1 where session='$session' and class='$class' and status='P' and sch='$sch' and date between '$sdate' and '$edate' ";
	$res2=mysqli_query($conn,$sel2);
	$count=mysqli_num_rows($res2);
//	echo $count;
	
	$sel21="select * from  present1 where session='$session' and class='$class' and status='A' and sch='$sch' and date between '$sdate' and '$edate' ";
	$res21=mysqli_query($conn,$sel21);
	$count1=mysqli_num_rows($res21);
//	echo $count1;
	//$s=0;
	
	//echo $s++;
	/////
  $sel="select * from  present1 where session='$session' and class='$class' and sch='$sch' and date between '$sdate' and '$edate'";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
//$edate=date("d-m-Y",strtotime($date1));
//echo $edate;
	date_default_timezone_set("asia/kolkata");
	//$d=$row['mobile'];
	$sel1="select * from  present1 where session='$session' and class='$class' and sch='$sch' and date between '$sdate' and '$edate'";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$status1=$row1['status'];
	$date12=$row1['date'];
	$date=date("d-m-Y",strtotime($date12));
		?>
		 
	<tr class="text-center">
	<td><?php echo $row['sch'];?></td><td><?php echo $row['2'];?></td><td><?php echo $row['fname']?></td><td><?php echo $row['class']?></td><td><?php echo $date;?></td><td><?php echo $row['status'] ;?></td>
	
	
	
	</tr>
	
	<?php
	$s++;
	}
	
	?>
	<tr class="text-center">
	<td style="font-weight:bold" colspan="2"> TOTAL</td><td style="font-weight:bold;color:green">PRESENT</td><td style="font-weight:bold;color:green;font-size:18px"><?php echo $count;?></td><td style="font-weight:bold">ABSENT</td><td style="font-weight:bold;color:red;font-size:18px"><?php echo $count1 ;?></td>
	
	
	
	</tr>
	 </tbody>
    </table>
	
	</div>
	
	
	
	
	
	
	<?php
	break;
	case 30:
	
  $sel="select * from  studentfees order by id desc ";
	$res=mysqli_query($conn,$sel);
	
	
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th>Sr.</th><th>Scho. No.</th><th>Session</th><th>Month</th><th>Name</th><th>Class</th><th>Paid</th><th>Dues</th><th>Date</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                 <th>Sr.</th><th>Scho. No.</th><th>Session</th><th>Month</th><th>Name</th><th>Class</th><th>Paid</th><th>Dues</th><th>Date</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['search'];?></td><td><?php echo $row['year'];?></td><td><?php echo $row['month'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['class'];?></td><td style="font-weight:bold"><?php echo $row['paid'];?></td><td><?php echo $row['remain'];?></td><td><?php echo $row['date'];?></td>
	
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	
	<?php
	
	break;
	
case 31:
	$eid=$_REQUEST['id'];
	//echo"$eid";
	$sel="select * from  registration where id='$eid' order by id desc";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$a=$row['village'];
	$b=$row['postoffice'];
	$c=$row['dist'];
	$d=$a." ".$b." ".$c;
	?>
	
	
	<div class="panel-group">
				<div class="panel panel-primary">
				
				
				<div class="panel-body">
				<form class="form-horizontal" id="myform" onsubmit="return changerow(this)">
				
				
				<div class="form-group">
				<label class="col-sm-3 control-label">Session</label>
				<div class="col-sm-8">
				<select class="form-control"  name="session">
	<option>---select---</option>
	<option <?php if($row['session']=='2012-2013'){echo'selected';}?>>2012-2013</option>
	<option <?php if($row['session']=='2013-2014'){echo'selected';}?>>2013-2014</option>
	<option <?php if($row['session']=='2014-2015'){echo'selected';}?>>2014-2015</option>
	<option <?php if($row['session']=='2015-2016'){echo'selected';}?>>2015-2016</option>
	<option <?php if($row['session']=='2016-2017'){echo'selected';}?>>2016-2017</option>
	<option <?php if($row['session']=='2017-2018'){echo'selected';}?>>2017-2018</option>
				<option <?php if($row['session']=='2018-2019'){echo'selected';}?>>2018-2019</option>
				<option <?php if($row['session']=='2019-2020'){echo'selected';}?>>2019-2020</option>
				<option <?php if($row['session']=='2020-2021'){echo'selected';}?>>2020-2021</option>
				<option <?php if($row['session']=='2021-2022'){echo'selected';}?>>2021-2022</option>
				<option <?php if($row['session']=='2022-2023'){echo'selected';}?>>2022-2023</option>
					<option <?php if($row['session']=='2023-2024'){echo'selected';}?>>2023-2024</option>
						<option <?php if($row['session']=='2024-2025'){echo'selected';}?>>2024-2025</option>
	</select>
				
				
			
				</div>
				</div>
				<br/>
				<br/>
				
				<div class="form-group">
				<label class="col-sm-3 control-label">Class</label>
				<div class="col-sm-8">
				<?php 
	$selc="select * from subclass";
	$resc=mysqli_query($conn,$selc);
	?>
				<select class="form-control" style="font-weight:bold" id="select" name="class">
	
	  <option >--Select--</option>
	  <?php 
	  
	  while($rowc=mysqli_fetch_array($resc,MYSQLI_BOTH))
	  {
	  ?>
	  <option value="<?php echo $rowc['subclass'];?>"><?php echo $rowc['subclass'];?></option>
	  <?php
	  }
	  
	  ?>
	  </select>
				
				
			
				</div>
				</div>
				<br/>
			
	<input type="hidden" value="<?php echo $row['application'];?>" name="app"/>
				
				
				<center><button class="btn btn-primary">Trans</button>
				 &emsp;&emsp;&emsp;<button class="btn btn-danger" data-dismiss="modal"> Close</button>
				</center>
				</div>
				
				</form>
	</div>
	</div>
	
	
	
	
	
	
	
	
	
	
	<?php
	
	
	
	break;
	
	case 32:
	$application=$_POST['app'];
	$sel="select * from  registration where application='$application' order by id desc";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	// for registration
	
	$name=$row['name'];
$code=$row['code'];
$adhar=$row['adhar'];
$mediam=$row['mediam'];
$caste=$row['caste'];
$minority=$row['minority'];
$last=$row['last'];
$nationality=$row['nationality'];
$occupation=$row['occupation'];
$tahsil=$row['tahsil'];

$subcategory=$row['subcategory'];

//echo"$name";
//echo"<br/>";
$father=$row['fname'];
//echo"$father";
$mother=$row['mname'];
//echo"$mother";
//echo"<br/>";
$app=$row['application'];
//echo"$app";
//echo"<br/>";
$app=$row['application'];
$gender=$row['gender'];
$session=$_POST['session'];
//echo"$gender";
$dob=$row['dob'];
//echo"$dob";

//echo"$class";

//echo"$mother";


//echo"$high1";


$subject=$_POST['class'];
//echo"$inter1";

//echo"$grade";
$newimgname=$row['picture'];
$city=$row['city'];
//echo"$city";
$city1=$row['city1'];
//echo"$city";
$village=$row['village'];
//echo"$village";
$village1=$row['village1'];
//echo"$village1";
$postoffice=$row['postoffice'];
//echo"$postoffice";
$postoffice1=$row['postoffice1'];
//echo"$postoffice1";
$dist=$row['dist'];
//echo"$dist";
$dist1=$row['dist1'];
//echo"$dist1";
$state=$row['state'];
//echo"$state";
$state1=$row['state1'];
//echo"$state1";
$mobile=$row['mobile'];
//echo"$mobile";
$mobile1=$row['mobile1'];
//echo"$mobile1";
$pincode=$row['pincode'];
//echo"$pincode";
$pincode1=$row['pincode1'];
	// for registration
	///
	
	
	
	
	
	
	$date=date("d-m-Y");
	date_default_timezone_set("asia/kolkata");
	$time=date("h:i:sa");
	$datetime=$date." ".$time;
	
	
	$ins="insert into  registration(application,name,fname,	mname,dob,gender,class,ele,board,year,total,obtain,per,grade,subject,city,village,postoffice,dist,state,mobile,pincode,picture,city1,village1,postoffice1,dist1, state1,mobile1,pincode1,session,mediam,adhar,datetime,minority,caste,code,subcategory,tahsil,nationality,last,occupation,date,action,action1,trans,tra) values('$app','$name','$father','$mother','$dob','$gender','$class','$ele','$board','$year','$tmark','$omark','$per','$grade','$subject','$city','$village','$postoffice','$dist','$state','$mobile','$pincode','$newimgname','$city1','$village1','$postoffice1','$dist1','$state1','$mobile1','$pincode1','$session','$mediam','$adhar','$datetime','$minority','$caste','$code','$subcategory','$tahsil','$nationality','$last','$occupation','$date','','','','tra')";
	if(mysqli_query($conn,$ins))
				{
					echo "Transfered";
					$up="update registration set trans='$subject' where application='$app' and session='2018-2019' order by id desc";
					$res1=mysqli_query($conn,$up);
				}
				else
				{
					echo"not";
				}
	break;
	
	case 34:
	$application=$_REQUEST['application'];
	//echo $application;
	?>
	<form action="slip.php" method="post">

	
	
	
	
	<input type="date"  required name='date'>
	<input type="hidden" value="<?php echo $application;?>" name="app">
	<input type="hidden" value="<?php echo '1';?>" name="no">
	<button >Go</button>
	
	&emsp;&emsp;&emsp;<button class="btn btn-danger" data-dismiss="modal"> Close</button>
	</form>
	<h3 style="color:green"></h3>
	<br/>
	<form action="slip.php" method="post">
	<input type="hidden" value="<?php echo $application;?>" name="app">
	<?php $date=date("d-m-Y");?>
	<input type="hidden" value="<?php echo $date;?>" name="date">
	<input type="hidden" value="<?php echo '2';?>" name="no">
	
	</form>
	<?php 
	
	
	
	
	break;
		case 36:
	$session=$_POST['session'];
  $sel1="select * from  registration where session ='$session' and status='' order by application asc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	
<link href="jq/jquery.dataTables.min.css" type="text/css" rel="stylesheet"/>
<link href="jq/buttons.dataTables.min.css" type="text/css" rel="stylesheet"/>


<script src="jq/jquery.dataTables.min.js"></script>
<script src="jq/dataTables.buttons.min.js"></script>
<script src="jq/buttons.flash.min.js"></script>
<script src="jq/jszip.min.js"></script>
<script src="jq/pdfmake.min.js"></script>
<script src="jq/vfs_fonts.js"></script>
<script src="jq/buttons.html5.min.js"></script>
<script src="jq/buttons.print.min.js"></script>

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: []
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr align="center">
               <th style="text-align:center">Sr.</th><th  style="text-align:center">Sr</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class</th><th  style="text-align:center">Session</th><th  style="text-align:center">Action</th>
            </tr>
        </thead>
<tfoot>
            <tr tr align="center">
                <th style="text-align:center">Sr.</th><th  style="text-align:center">Sch No .</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class</th><th  style="text-align:center">Session</th><th  style="text-align:center">Action</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
  
  $sel="select * from  registration where session ='$session' and status='' order by id asc";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		$a=$row['village'];
	$b=$row['postoffice'];
	$c=$row['dist'];
	$e=$row['mobile'];
	$d=$a." ".$c;
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['application'];?></td><td><img src="../code/img/<?php echo $row['picture'];?>" height="90px" width="90px;"></td><td><?php echo $row['name']."<br/>"." <b>Father-</b>".$row['fname']."<br/>"." <b>Mother-</b>".$row['mname']."<br/>". "<b>D.O.B-</b>".$row['dob']."<br/>"."<b>Adh-</b>".$row['adhar'];?></td><td><?php echo $row['subject'];?>/<?php echo $row['section'];?></td><td><?php echo $row['session']."<br/>".$row['datetime'];?></td>
	
	<td>
	
	<a href="javascript:;" onclick="feesrow(<?php echo $row['id'];?>)"> <span class=""><button type="button" class="btn btn-primary">Fees</button></span></a>
&nbsp;
<a href="javascript:;" onclick="app1234(<?php echo $row['id'];?>)"><span> <button type="button" class="btn btn-info">Fees Details</button></span></a><BR/><br/>
<a href="javascript:;" onclick="no123(<?php echo $row['id'];?>)"><span><button type="button" class="btn btn-warning">Noti_add</button></span></a>
<a href="javascript:;" onclick="no1234(<?php echo $row['id'];?>)"><span> <button type="button" class="btn btn-success">Noti Details</button></span></a><br/><br/>
<a href="javascript:;" onclick="app12349(<?php echo $row['id'];?>)"><span> <button type="button" class="btn btn-info">Old Fees Details</button></span></a>


	</td>
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
	case 37:
	$id=$_POST['rowid'];
	
	
	$del="delete from updatefees where id='$id'";
	if(mysqli_query($conn,$del))
	{
		echo"deleted Successfully";
		
	}
	else
	{
		echo"Not Deleted";
	}
	break;
	
	case 38:
	$year=$_POST['year'];
	$class=$_POST['class'];
  $sel="select * from  studentfees where year='$year' and class='$class' and status='' order by date desc ";
	$res=mysqli_query($conn,$sel);
	$sel1="select * from  studentfees where year='$year' and class='$class' and status='' ";
	$res1=mysqli_query($conn,$sel1);
	$row2=mysqli_num_rows($res1);
	if($row2!=" ")
	{
	
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th>Sr.</th><th>Sch No.</th><th>Session</th><th>Name</th><th>Class</th><th> Month</th><th>Month Fee</th><th>Annual Fee</th><th>Exam Fee</th><th>Conveyance </th><th>Admission.</th><th>Dues Charge</th><th>Other Charge</th><th> Total</th><th>DateTime</th><th>Delete</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                 <th>Sr.</th><th>Sch No.</th><th>Session</th><th>Name</th><th>Class</th><th> Month</th><th>Month Fee</th><th>Annual Fee</th><th>Exam Fee</th><th>Conveyance </th><th>Admission.</th><th>Dues Charge</th><th>Other Charge</th><th> Total</th><th>DateTime</th><th>Delete</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['search'];?></td><td><?php echo $row['year'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['class'];?></td><td><?php echo $row['month'];?></td><td><?php echo $row['fee'];?></td><td><?php echo $row['ann'];?></td><td><?php echo $row['exam'];?></td><td><?php echo $row['van'];?></td><td><?php echo $row['addm'];?></td><td><?php echo $row['remain'];?></td><td><?php echo $row['other'];?></td><td><?php echo $row['total'];?></td><td><?php echo $row['date'];?></td>
	
	
	<td><a href="javascript:;" onclick="deleterow13(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-trash"></span></a></td>
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt>Not Record Available.</font>";
	}
	break;
		case 39:
	$id=$_POST['rowid'];

	$sel="select * from  fees_paid where id='$id'   order by date desc";
	
	$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);
$pr=$row['pr'];
	
	$del="update  fees_paid set status='Delete' where id='$id'";
	if(mysqli_query($conn,$del))
	{
	    $del1="update  fees_data set status='' where pr='$pr'";
	    mysqli_query($conn,$del1);
		echo"deleted Successfully";
		
		
		
	}
	else
	{
		echo"Not Deleted";
	}

	break;
	case 41:
	$month=$_POST['month'];
	
  $sel1="select * from  studentfees where month ='$month'";
	$res1=mysqli_query($conn,$sel1);
	$paid1="";
	$dues1="";
	$con1="";
	while($row1=mysqli_fetch_array($res1,MYSQLI_BOTH))
		
	{
		$paid=$row1['paid'];
		$cons=$row1['con'];
		$remain=$row1['remain'];
		$paid1=$paid+$paid1;
		$con1=$cons+$con1;
		$dues1=$remain+$dues1;
	}
	?>
	<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
	<tr align="center">
	<th style="text-align:center">Paid</th><th style="text-align:center">Dues</th><th style="text-align:center">Consession</th>
	</tr>
	<tr>
	
	<td style="text-align:center"><?php echo $paid1;?></td><td style="text-align:center"><?php echo $dues1;?></td><td style="text-align:center"><?php echo $con1;?></td>
	
	</tr>
	</table>
	
	<?php
	
	break;
	case 42:
	?>
<script>
$("document").ready(function(){
		
		$("#cons").keyup(function(){
			var dew1=$("#dew").val();
			var paid1=$("#paid").val();
			var cons1=$("#cons").val();
			var ndew1=$("#ndew").val();
			
			var total1= parseInt(dew1) -parseInt(cons1)- parseInt(paid1) ;
			
			$("#ndew").val(total1);
		});
		
	
		
		
	});
	$("document").ready(function(){
		
		$("#paid").keyup(function(){
			var dew1=$("#dew").val();
			var paid1=$("#paid").val();
			var cons1=$("#cons").val();
			var ndew1=$("#ndew").val();
			
			var total1= parseInt(dew1) -parseInt(cons1)- parseInt(paid1) ;
			
			$("#ndew").val(total1);
		});
	
		
		
	});
		$(document).ready(function(){
		
		$("#cons").keyup(function(){
			//alert('c');
        var co=$("#cons").val();
		
        var re=$("#remark").val();
		if(co!='0')
		{
			$("#remark").attr("required", "true");
		}
		else
		{
			$("#remark").removeAttr('required');
		}
    });
		
});
	
	</script>
	<?php
	$sch=$_REQUEST['application'];
	//echo"$eid";

	
		$sel1="select * from  registration where id='$sch' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$app=$row1['application'];
	$session=$row1['session'];
		$sel="select * from  studentfees where sch='$app' and year='$session' and status='' order by id desc";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$paid12=$row['paid'];
		$year=$row['year'];
	?>
	<div class="table-responsive">

       <center><h2 class="modal-title" style="color:green;background-color:yellow"> DUES PAID (<?php echo $year;?>) </h2> </center>
            
      
		<tbody>
		<form onsubmit="return feesupdate(this)">
		<div class="form-group">
				<label class="col-sm-3 control-label">Sch.</label>
				<div class="col-sm-3"><input type="text" value="<?php echo $app;?>" name="app" id="search" readonly style="background-color:yellow;color:green"/></div>
				<input type="hidden" value="<?php echo $row['id'];?>" name="id"/>
					<input type="hidden" value="<?php echo $sch;?>" name="search"/>
				<input type="hidden" value="<?php echo $row['paid'];?>" name="paid13"/>
				<input type="hidden" value="<?php echo $row['class'];?>" name="class"/>
				<input type="hidden" value="<?php echo $row['year'];?>" name="year"/>
					<input type="hidden" value="<?php echo $row1['mediam'];?>" name="mediam"/>
				</div>
		<div class="form-group">
				<label class="col-sm-3 control-label">Name</label>
				<div class="col-sm-3"><input type="text" value="<?php echo $row['name'];?>" name="name" readonly style="background-color:gray;color:pink" /></div>
				
				</div>
		<div class="form-group">
				<label class="col-sm-3 control-label">Dues</label>
				<div class="col-sm-3"><input type="number" value="<?php echo $row['remain'];?>"  name="dew" id="dew" readonly style="background-color:white;color:red"/></div>
				<input type="hidden" value="<?php echo $row['remain'];?>"  name="total" id="total" readonly style="background-color:white;color:red"/>
				</div>
				
		<div class="form-group">
				<label class="col-sm-3 control-label">Paid</label>
				<div class="col-sm-3"><input type="number"   name="paid" id="paid" required /></div>
				
				</div>
				<br/>
				<div class="form-group">
				<label class="col-sm-3 control-label">Concession</label>
				<div class="col-sm-3"><input type="number"   value="0" id="cons" name="cons" required /></div>
				
				</div>
		
			<br/>
			<div class="form-group">
				<label class="col-sm-3 control-label">Remark</label>
				<div class="col-sm-3"><input type="text"   id="remark"  name="remark"  /></div>
				
				</div>
				<div class="form-group">
				<?php 
				
				date_default_timezone_set("asia/kolkata");
				
				$date1=date('Y-m-d');?>
				<div class="col-sm-3"><input type="hidden" value="<?php echo $date1;?>" name="date"  required /></div>
				
				</div>
		<center><button class="btn btn-danger">Paid</button></center>
		
		</form>
		
	<button style="background-color:red "class="close btn-block btn btn-danger" data-dismiss="modal"> <span style="color:yellow;background-color:red">Close </span> </button>
	</div>
	<?php
	break;
	case 43:

	$id=$_POST['id'];
	$name=$_POST['name'];
		$board=$_POST['mediam'];
//	echo $name;
	$class=$_POST['class'];
//	echo $class;
	$date1=$_POST['date'];
	
	$year=$_POST['year'];
	$cons=$_POST['cons'];
//	echo $year;
	$dew=$_POST['dew'];
	$remark=$_POST['remark'];
//	echo $dew;
	$date=date("d-m-Y",strtotime($date1));
//	echo $date;
	//echo $id;
	$search=$_POST['search'];
//	echo $search;
	$paid13=$_POST['paid13'];
	//echo $search;
	$paid=$_POST['paid'];
	$sch=$_POST['app'];
		$total=$_POST['total'];
	echo $paid;
	//echo $paid;
//	$ndew=$_POST['ndew'];
//	echo $ndew;
	$paid8=$paid+$paid13;
	$amou=$paid+$cons;
	$re=$dew-$amou;
	$b='0';
	//echo"$eid";
		$ins="insert into studentfees(name,class,search,month,paid,remain,pre,date,year,exam,other,ann,addm,reg,comp,gen,board,con,remark,sch,total,status) values('$name','$class','$search','Dues','$paid','$re','$dew','$date1','$year','0','0','0','0','0','0','0','$board','$cons','$remark','$sch','$total','')";
	
	if($res=mysqli_query($conn,$ins))
	{
		echo " Dues Paid";
	}
	else
	{
		echo "not update";
	}
	
	break;
	case 50:
	    $session=$_POST['session'];
	
  $sel1="select * from message1 where session='$session' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	
	
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: []
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr tr align="center">
                <th style="text-align:center">Sr.</th><th  style="text-align:center">Message</th><th  style="text-align:center">Date</th><th  style="text-align:center">Delete</th>
            </tr>
        </thead>
<tfoot>
            <tr tr align="center">
                <th style="text-align:center">Sr.</th><th  style="text-align:center">Message</th><th  style="text-align:center">Date</th><th  style="text-align:center">Delete</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
  $sel="select * from  message1 where session='$session' order by id desc";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><textarea cols="45" rows='5' style="" readonly><?php echo $row['message'];?></textarea></td><td><?php echo $row['date'];?></td>
	
	<td>
	
	
<a href="del12.php?flag=<?php echo $row['id'];?>"><span><button type="button" class="btn btn-danger">Delete</button></span></a>


	</td>
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	
	break;
case 51:
	$id=$_POST['rowid'];
	
	$del="delete from message1 where id='$id'";
	if(mysqli_query($conn,$del))
	{
		echo"deleted Successfully";
		
	}
	else
	{
		echo"Not Deleted";
	}
	break;
	case 52:
	$session=$_POST['session'];
	$month=$_POST['month'];
	echo $month;
  $sel="select  registration.name,registration.fname,registration.mname,registration.subject,registration.application,studentfees.remain,studentfees.month  from registration LEFT JOIN  studentfees on registration.application=studentfees.search  where registration.session='2018-2019' and month not like '%$month' order by studentfees.id desc ";
	$res=mysqli_query($conn,$sel);
	
	
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th>Sr.</th><th>Sch No.</th><th>Name</th><th>fname</th><th>mname</th><th>subject</th><th>Amount</th>
            </tr>
        </thead>
<tfoot>
            <tr>
     <th>Sr.</th><th>Sch No.</th><th>Name</th><th>fname</th><th>mname</th><th>subject</th><th>Amount</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['application'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['fname'];?></td><td><?php echo $row['mname'];?></td><td><?php echo $row['subject'];?></td><td><?php echo $row['remain'];?></td>
	
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	
	<?php
	
	break;
	case 61:
	//$ch=$_POST['choice'];
	//echo $ch;
	$session=$_POST['session'];
  $sel1="SELECT DISTINCT name,search,class FROM studentfees where year='$session' order by id desc ";
	$res1=mysqli_query($conn,$sel1);
	
	
	
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['copy',  'excel', 'print']
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr tr align="center">
                <th  style="text-align:center">Sch No.</th><th  style="text-align:center">Name</th><th  style="text-align:center">Father</th><th  style="text-align:center">Class</th><th  style="text-align:center">Paid Month</th><th  style="text-align:center">Dues</th>
            </tr>
        </thead>
<tfoot>
            <tr tr align="center">
                <th  style="text-align:center">Sch No.</th><th  style="text-align:center">Name</th><th  style="text-align:center">Father</th><th  style="text-align:center">Class</th><th  style="text-align:center">Paid Month </th><th  style="text-align:center">Dues</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
  
	$s=1;
	while($row=mysqli_fetch_array($res1,MYSQLI_BOTH))
		
	{
		$search=$row['search'];
		$mon='';
		$paidt=0;
	$sel2="select * from studentfees where search='$search' and year='$session' order by id desc ";
	$res2=mysqli_query($conn,$sel2);
	while($row2=mysqli_fetch_array($res2,MYSQLI_BOTH))
	{
		$mon=$row2['month'].','.$mon;
		$paidt=$row2['paid']+$paidt;
		//echo $mon;
	
	}
	$sel13="select DISTINCT * from registration where application= '$search' and session='$session' ";
	$res13=mysqli_query($conn,$sel13);
	$row13=mysqli_fetch_array($res13,MYSQLI_BOTH);
	
	//// for dues
	$sel14="select  * from studentfees where search= '$search'and year='$session' order by id desc ";
	$res14=mysqli_query($conn,$sel14);
	$row14=mysqli_fetch_array($res14,MYSQLI_BOTH);
	
		?>
		 
	<tr class="text-center">
<td><?php echo $row['search'] ;?></td><td><?php echo $row['name'];?></td><td><?php echo $row13['fname'];?></td><td><?php echo $row['class'];?></td><td><?php echo $mon;?></td><td><?php echo $row14['remain'];?></td>
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	<?php
	
	?>
	
	</div>
	
	<?php
	
	break;
	case 63:
	$class=$_POST['class'];
	$session=$_POST['session'];
	
	$selm="SELECT *  FROM studentfees where class= '$class' and year='$session' order by id desc ";
	$resm=mysqli_query($conn,$selm);
	$seln="SELECT *  FROM studentfees where class= '$class' and year='$session' order by id desc ";
	$resn=mysqli_query($conn,$seln);
	$paidm1=0;
	$paidm1=0;
	$cons1=0;
	while($rowm=mysqli_fetch_array($resm,MYSQLI_BOTH))
	{
		$paidm=$rowm['paid'];
		$paidm1=$paidm1+$paidm;
			$cons1=$rowm['con']+$cons1;
		//echo $paidm;
	}
	//echo $paidm1;
	//echo $ch;
  $sel1="SELECT DISTINCT name,search,class FROM studentfees where class= '$class' and year='$session' order by id desc ";
	$res1=mysqli_query($conn,$sel1);
	
	
	
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['copy',  'excel', 'print']
    });
	
});
</script>


	<div class="table-responsive">
<table id="" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr tr align="center">
                <th  style="text-align:center">Sch No.</th><th  style="text-align:center">Name</th><th  style="text-align:center">Father</th><th  style="text-align:center">Class</th><th  style="text-align:center">Paid Month</th><th  style="text-align:center">Total Paid</th><th  style="text-align:center">Dues</th><th  style="text-align:center">Cons</th>
            </tr>
        </thead>
<tfoot>
            <tr tr align="center">
                <th  style="text-align:center">Sch No.</th><th  style="text-align:center">Name</th><th  style="text-align:center">Father</th><th  style="text-align:center">Class</th><th  style="text-align:center">Paid Month </th><th  style="text-align:center">Total Paid</th><th  style="text-align:center">Dues</th><th  style="text-align:center">Cons</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  $due=0;
  
	$s=1;
	while($row=mysqli_fetch_array($res1,MYSQLI_BOTH))
		
	{
		$search=$row['search'];
		/////////paid total////////
		$mon='';
		$paidt=0;
		$cons=0;
		
	$sel2="select * from studentfees where search='$search'and year='$session' order by id desc ";
	$res2=mysqli_query($conn,$sel2);
	while($row2=mysqli_fetch_array($res2,MYSQLI_BOTH))
	{
		$mon=$row2['month'].','.$mon;
		$paidt=$row2['paid']+$paidt;
		$cons=$row2['con']+$cons;
	
		
		//echo $mon;
	
	}
	/////////paid total////////
	
	
	/////////dues total////////
		
		
		
	$sel23="select * from studentfees where search='$search'  and year='$session' order by id desc limit 1 ";
	$res23=mysqli_query($conn,$sel23);
	while($row23=mysqli_fetch_array($res23,MYSQLI_BOTH))
	{
		$due1=$row23['remain'];
		$due=$row23['remain']+$due;
		
		
		//echo $due1;
		//echo $due;
	
	}
	/////////paid total////////
	$sel13="select DISTINCT * from registration where application= '$search'and session='$session' ";
	$res13=mysqli_query($conn,$sel13);
	$row13=mysqli_fetch_array($res13,MYSQLI_BOTH);
	
	//// for dues
	$sel14="select  * from studentfees where search= '$search' and year='$session' order by id desc ";
	$res14=mysqli_query($conn,$sel14);
	$row14=mysqli_fetch_array($res14,MYSQLI_BOTH);
	
		?>
		 
	<tr class="text-center">
<td><?php echo $row['search'] ;?></td><td><?php echo $row['name'];?></td><td><?php echo $row13['fname'];?></td><td><?php echo $row['class'];?></td><td><textarea rows="4" cols="26"><?php echo $mon;?></textarea></td><td><?php echo $paidt;?></td><td><?php echo $row14['remain'];?></td><td><?php echo $cons;?></td>
	
	
	</tr>
	
	<?php
	$s++;
	}
	?>
	<tr class="text-center">
<td colspan="5"><b>Total</b></td><td><b><?php echo $paidm1;?></b></td><td><b><?php echo $due; ?></b></td><td><b><?php echo $cons1; ?></b></td>
	
	
	</tr>
	 </tbody>
    </table>
	<?php
	
	?>
	
	</div>
	
	<?php
	
	break;
	case 68:
	$year=$_POST['year'];
	$class=$_POST['class'];
  $sel="select * from  studentfees where year='$year' and class='$class' order by id asc ";
	$res=mysqli_query($conn,$sel);
	$sel1="select * from  studentfees where year='$year' and class='$class' ";
	$res1=mysqli_query($conn,$sel1);
	$row2=mysqli_num_rows($res1);
	if($row2!=" ")
	{
	
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th>Sr.</th><th>Sch No.</th><th>Session</th><th>Name</th><th>Class</th><th> Month</th><th>Month Fee</th><th> Total</th><th>DateTime</th><th>Edit</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                 <th>Sr.</th><th>Sch No.</th><th>Session</th><th>Name</th><th>Class</th><th> Month</th><th>Month Fee</th><th> Total</th><th>DateTime</th><th>Edit</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['search'];?></td><td><?php echo $row['year'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['class'];?></td><td><?php echo $row['month'];?></td><td><?php echo $row['fee'];?></td><td><?php echo $row['total'];?></td><td><?php echo $row['date'];?></td>
	
	
	<td><a href="javascript:;" onclick="edit13(<?php echo $row['id'];?>)"><span class="">Edit</span></a></td>
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt>Not Record Available.</font>";
	}
	break;
		case 69:
	$id=$_REQUEST['id'];
	//echo $application;
	$sel="select * from  studentfees where id='$id' ";
	$res=mysqli_query($conn,$sel);
	?>
	<form onsubmit="return updaterow(this)">

	
	
	
	
	<input type="date"  required name='date'>
		<input type="hidden" value='<?php echo $id;?>' required name='id'>
	
	<button >Change</button>
	
	&emsp;&emsp;&emsp;<button class="btn btn-danger" data-dismiss="modal"> Close</button>
	</form>

	<?php 
	
	
	
	
	break;
	
		case 70:
	$date=$_POST['date'];
	$id=$_POST['id'];
	//echo $application;
	$up="update studentfees set date='$date' where id='$id' ";
	$res=mysqli_query($conn,$up);
	if($res)
	{
	    echo 'change';
	}
	else
	{
	    echo 'not ';
	}



	
	
	
	
	break;
	
	///// for fees details 
		case 7100:
	$id=$_REQUEST['id'];
	$selr="select * from  registration where id ='$id'";
$resr=mysqli_query($conn,$selr);
$rowr=mysqli_fetch_array($resr,MYSQLI_BOTH);
$sessionr=$rowr['session'];
//echo $sessionr;
$applicationr=$rowr['application'];
	$selcmm="select * from  studentfees where   year='$sessionr' and search='$applicationr' and month!='Dues' order by id desc ";
	$rescmm=mysqli_query($conn,$selcmm);
$l2='';
	if($rowcmm=mysqli_fetch_array($rescmm,MYSQLI_BOTH))
	{
		 $l2=$rowcmm['month'];
	}
	else
	{
	     $l2='no';
	}

$sel1="select * from  studentfees where search ='$applicationr' and year='$sessionr'";
$res1=mysqli_query($conn,$sel1);
$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
//$search=$row1['search'];
$sel="select * from  registration where application ='$applicationr' and session='$sessionr'";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);


$selb="select * from  registration where application ='$applicationr' and session='sessionr' order by id desc";
$resb=mysqli_query($conn,$selb);
$rowb=mysqli_fetch_array($resb,MYSQLI_BOTH);

$date=date("d/m/Y");
date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");
$datetime=$date." ".$time;
?>
<html>
<head>
<style>
#name2
{
	font-weight:bold;
	font-size:12px;
}
#name3
{
    font-size:12px;
}
</style>

	
<script>

$(document).ready(function(){

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

</script>
<link href="css/student_print.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id='DivIdToPrint'>
<table frame="border" width="100%" >
<tr>
<td><span><img src="../images/logo2.png" height="70px" width="70px"/></span></td><td align="center"><span id="name"  style="font-size:20px;font-weight:bold">GLORIOLE CONVENT SCHOOL</span><br/><br/><span id="name1" style="font-size:18px;font-weight:bold">Navodaya Nagar,Jiyanpur- Azamgarh</span></td><td style="font-size:14px"><b>Contact-</b>9450677302<br/>&emsp;&emsp;&emsp;&emsp; 9450119224<br/><b>Web-</b>gcschool.co.in</td>
</tr>
</table>
<table border="1px;" width="100%" cellspacing="0">
<caption style="font-size:18px;font-weight:bold">Fees Statement <?php echo $row1['year'];?></caption>
<tr>
<td width="30%"><span id="name2">Scho. Number</span></td><td><span id="name3"><?php echo $row1['search'];?></span></td><td><b>Class</b></td><td><?php echo $row['subject'];?></td><td width="10%"align="right" rowspan="3"><span><img src="../code/img/<?php echo $row['picture'];?>" style="width:100%;" class="img-responsive" ></span></td>
</tr>
<tr>
<td width="30%"><span id="name2">Student Name</span></td><td width="" colspan="3"><span id="name3"><?php echo $row['name'];?></span></td>
</tr>
<tr>
<td width="30%"><span id="name2"> Father Name</span></td><td colspan="3"><span id="name3"><?php echo $row['fname'];?></span></td>
</tr>


</table>

<table border="1px" width="100%" cellspacing="0px">
<tr>
<td colspan='15' align="center"><span id="name4" style="font-size:18px;font-weight:bold">Fees Receipt</span></td>

</tr>
<tr align="center">

<td><span id="name2">Sr.</span></td>
<td><span id="name2">Month</span></td>
<td><span id="name2" >Month Fee</span></td>
<td><span id="name2" >Exam</span></td>
<td><span id="name2">Conv</span></td>

<td><span id="name2">Main</span></td>
<td><span id="name2">Add</span></td>
<td><span id="name2">Reg</span></td>
<td><span id="name2">Comp</span></td>
<td><span id="name2">Gene</span></td>
<td><span id="name2">Ann</span></td>

<td><span id="name2">I card</span></td>
<td><span id="name2">Con</span></td>
<td><span id="name2">Remark</span></td>
<td><span id="name2">Pre Dues</span></td>

<td><span id="name2">Paid</span></td>

<td><span id="name2">Dues</span></td>

<td><span id="name2">Date</span></td>


</tr>
<?php

$sum=0;
$sum1=0;

$remain1=0;


$sel2="select * from  studentfees where search='$applicationr' and year='$sessionr'";
$res2=mysqli_query($conn,$sel2);
while($row2=mysqli_fetch_array($res2,MYSQLI_BOTH))
{
	$tot=$row2['total'];
	$paid13=$row2['paid'];
	
	$remain12=$row2['remain'];
	$sum=$tot+$sum;
	$sum1=$paid13+$sum1;
	$remain1=$remain12+$remain1;
?>
<tr align="center">

<td><span id="name3"><?php echo $row2['id'];?></span></td>
<td><span id="name3"><textarea ><?php echo $row2['month'];?></textarea></span></td>
<td><span id="name3"><?php echo $row2['fee'];?></span></td>
<td><span id="name3"><?php echo $row2['exam'];?></span></td>
<td><span id="name3"><?php echo $row2['van'];?></span></td>

<td><span id="name3"><?php echo $row2['reg'];?></span></td>
<td><span id="name3"><?php echo $row2['addm'];?></span></td>
<td><span id="name3"><?php echo $row2['reg1'];?></span></td>
<td><span id="name3"><?php echo $row2['comp'];?></span></td>
<td><span id="name3"><?php echo $row2['gen'];?></span></td>
<td><span id="name3"><?php echo $row2['ann'];?></span></td>

<td><span id="name3"><?php echo $row2['other'];?></span></td>
<td><span id="name3"><?php echo $row2['con'];?></span></td>
<td ><span id="name3"><?php echo $row2['remark'];?></span></td>
<td><span id="name3"><?php echo $row2['pre'];?></span></td>

<td><span id="name3"><?php echo $row2['paid'];?></span></td>

<td><span id="name3"><?php echo $row2['remain'];?></span></td>
<?php $daten=$row2['date'];
$date1=date("d-m-Y",strtotime($daten));  ?>
<td><span id="name3"><?php echo $date1;?></span></td>


</tr>


<?php
}
?>
<tr align="center">

<td colspan="15" style="font-weight:bold;font-size:19px">Sub Total</td><td style="font-weight:bold;font-size:18px"><span id="name3"colspan="2"><?php echo $sum1;?></span></td><td style="font-weight:bold;font-size:18px"><span id="name3"colspan="2">
    <?php
    $sel23="select * from  studentfees where search='$applicationr' and year='$sessionr' order by id desc";
$res23=mysqli_query($conn,$sel23);
$row23=mysqli_fetch_array($res23,MYSQLI_BOTH);
	$remain23=$row23['remain'];
    
    
    echo $remain12;?></span></td>

</tr>
</table>

<table width="100%" frame="border" cellspacing="0">
<tr align="center">
<td width="50%"  align="left"><span id="name3" style="font-size:15px;font-weight:bold">Datetime</span></td>
</tr>
<tr>
<td  width="70%" align="left"><span ><?php echo $datetime;?></span></td><td><br/><br/></td><td width="50%" align="right"><span id="name3" style="font-size:15px;font-weight:bold" align="rightt">Sign Of Received Staff</span></td>
</tr>
</table>
</div>
<br/>
<br/><br/>


<input type='button' id='btn' value='Print' onclick='printDiv();'>
	  <script>
	  
	function printDiv() 
{
var divToPrint=document.getElementById('DivIdToPrint');
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
newWin.document.close();

}
	
	</script>
</body>
</html>









<?php


	
	
	
	
	break;
	
	case 71:
	$id=$_REQUEST['id'];
	$selr="select * from  registration where id ='$id'";
$resr=mysqli_query($conn,$selr);
$rowr=mysqli_fetch_array($resr,MYSQLI_BOTH);
$sessionr=$rowr['session'];
//echo $sessionr;
$applicationr=$rowr['application'];

$sel1="select * from  fees_paid where sch ='$applicationr' and session='$sessionr' and status=''";
$res1=mysqli_query($conn,$sel1);
$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
//$search=$row1['search'];
$sel="select * from  registration where application ='$applicationr' and session='$sessionr' and status=''";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);


$selb="select * from  registration where application ='$applicationr' and session='sessionr' and status='' order by id desc";
$resb=mysqli_query($conn,$selb);
$rowb=mysqli_fetch_array($resb,MYSQLI_BOTH);

$date=date("d/m/Y");
date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");
$datetime=$date." ".$time;
?>
<html>
<head>
<style>
#name2
{
	font-weight:bold;
	font-size:12px;
}
#name3
{
    font-size:12px;
}
</style>

	
<script>

$(document).ready(function(){

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

</script>
<link href="css/student_print.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id='DivIdToPrint'  >
<table frame="border" width="100%" >
   
<tr>
<td><span><img src="../images/logo2.png" height="70px" width="70px"/></span></td><td align="center"><span id="name"  style="font-size:20px;font-weight:bold">GLORIOLE CONVENT SCHOOL</span><br/><br/><span id="name1" style="font-size:18px;font-weight:bold">Navodaya Nagar,Jiyanpur- Azamgarh</span></td><td style="font-size:14px"><b>Contact-</b>9450677302<br/>&emsp;&emsp;&emsp;&emsp; 9450119224<br/><b>Web-</b>gcschool.co.in</td>
</tr>
</table>
<table border="1px;" width="100%" cellspacing="0">
<caption style="font-size:18px;font-weight:bold">Fees Statement <?php echo $row1['session'];?></caption>
<tr>
<td width="30%"><span id="name2">Scho. Number</span></td><td><span id="name3"><?php echo $row['sr'];?></span></td><td><b>Class</b></td><td><?php echo $row['subject'];?></td><td width="10%"align="right" rowspan="3"><span><img src="../code/img/<?php echo $row['picture'];?>" style="width:100%;" class="img-responsive" ></span></td>
</tr>
<tr>
<td width="30%"><span id="name2">Student Name</span></td><td width="" colspan="3"><span id="name3"><?php echo $row['name'];?></span></td>
</tr>
<tr>
<td width="30%"><span id="name2"> Father Name</span></td><td colspan="3"><span id="name3"><?php echo $row['fname'];?></span></td>
</tr>


</table>
<div class="table-responsive">
<table border="1px" width="100%" cellspacing="0px" >
<tr>
<td colspan='15' align="center"><span id="name4" style="font-size:18px;font-weight:bold">Fees Receipt</span></td>

</tr>
<tr align="center">

<td><span id="name2">Sr.</span></td>
<td><span id="name2">Month</span></td>
<td><span id="name2" >Tution Fee</span></td>
<td><span id="name2" >Conv Fee</span></td>
<td><span id="name2" >Exam</span></td>

<td><span id="name2">Other</span></td>
<td><span id="name2">Other Remark</span></td>
<td><span id="name2">Late Charge</span></td>
<td><span id="name2">Con</span></td>
<td><span id="name2">Cons Remark</span></td>
<td><span id="name2">Pre Dues</span></td>

<td><span id="name2">Paid</span></td>

<td><span id="name2">Dues</span></td>

<td><span id="name2">Date</span></td>
<td><span id="name2">Print</span></td>

</tr>
<?php

$sum=0;
$sum1=0;

$remain1=0;


$sel2="select * from  fees_paid where sch='$applicationr' and session='$sessionr' and status=''";
$res2=mysqli_query($conn,$sel2);
while($row2=mysqli_fetch_array($res2,MYSQLI_BOTH))
{
	$tot=$row2['total'];
	$paid13=$row2['paid'];
	
	$remain12=$row2['remain'];
	$sum=$tot+$sum;
	$sum1=$paid13+$sum1;
	$remain1=$remain12+$remain1;
	$tags = explode(',',$row2['month']);
	$m='';
foreach($tags as $key) {    
     $key;    
	
	$sel4="select * from  plan where id ='$key'";
$res4=mysqli_query($conn,$sel4);
$row4=mysqli_fetch_array($res4,MYSQLI_BOTH);
$m1=$row4['month'];
$m=$m1.','.$m;
}
?>
<tr align="center">

<td><span id="name3"><?php echo $row2['id'];?></span></td>
<td><span id="name3"><?php echo $m;?></span></td>
<td><span id="name3"><?php echo $all_fees=$row2['fees'];?></span></td>
<td><span id="name3"><?php echo $conv_fees=$row2['conv'];?></span></td>
<td><span id="name3"><?php echo $row2['exam'];?></span></td>
<td><span id="name3"><?php echo $row2['other'];?></span></td>
<td><span id="name3"><?php echo $row2['remark'];?></span></td>
<td><span id="name3"><?php echo $row2['cons'];?></span></td>
<td ><span id="name3"><?php echo $row2['cons_remark'];?></span></td>
<td ><span id="name3"><?php echo $row2['late'];?></span></td>
<td><span id="name3"><?php echo $row2['pre_dues'];?></span></td>

<td><span id="name3"><?php echo $p= $row2['paid'];?></span></td>

<td><span id="name3"><?php echo $re=$row2['remain'];?></span></td>
<?php $daten=$row2['date'];
$date1=date("d-m-Y",strtotime($daten));  ?>
<td><span id="name3"><?php echo $date1;?></span></td>
<td><span id="name3"><a href="slip.php?flag=<?php echo $row2['id'];?>" target="_blank"><span class="fa fa-print"></span></a></span></td>
<td><a href="https://wa.me/<?php echo $row['mobile']?>/?text=https://khis.brkweb.in/admin/slip_w.php?flag=<?php echo $row2['id'] ;?> <?php echo $row['name'] ?> S/O <?php echo $row['fname'] ?>        
**[ Total Paid = <?php echo $p;?> 
( Dues = <?php echo $re;?> , 
Month Fee Paid = <?php echo $all_fees;?> 
, Conv Paid = <?php echo $conv_fees;?> ) ]**     
- Month = (<?php echo $m;?>) 
 GLORIOLE CONVENT School  Please Click Link Download Slip" data-action="share/whatsapp/share" target="_blank" download><i class="fa fa-whatsapp" aria-hidden="true" style='font-size:20px'  ></i></a></td>

</tr>


<?php
}
?>
<tr align="center">

<td colspan="10" style="font-weight:bold;font-size:19px">Sub Total</td><td style="font-weight:bold;font-size:18px"><span id="name3"colspan="2"><?php echo $sum1;?></span></td><td style="font-weight:bold;font-size:18px"><span id="name3"colspan="2">
    <?php
    $sel23="select * from  studentfees where search='$applicationr' and year='$sessionr' and status='' order by id desc";
$res23=mysqli_query($conn,$sel23);
$row23=mysqli_fetch_array($res23,MYSQLI_BOTH);
	$remain23=$row23['remain'];
    
    
    echo $remain12;?></span></td>

</tr>
</table>
</div>
<table width="100%" frame="border" cellspacing="0">
<tr align="center">
<td width="50%"  align="left"><span id="name3" style="font-size:15px;font-weight:bold">Datetime</span></td>
</tr>
<tr>
<td  width="70%" align="left"><span ><?php echo $datetime;?></span></td><td><br/><br/></td><td width="50%" align="right"><span id="name3" style="font-size:15px;font-weight:bold" align="rightt">Sign Of Received Staff</span></td>
</tr>
</table>
</div>
<br/>
<br/><br/>


<input type='button' id='btn' value='Print' onclick='printDiv();'>
	  <script>
	function printDiv() 
{
var divToPrint=document.getElementById('DivIdToPrint');
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
newWin.document.close();

}
	
	</script>
</body>
</html>









<?php


	
	
	
	
	break;
	
	///// for fees details 
case 72:
	   
 	$search=$_REQUEST['app'];
	
include("../link/databaseconnection.php");
$sel4="select * from  registration where id ='$search' order by id desc";
$res4=mysqli_query($conn,$sel4);

$row4=mysqli_fetch_array($res4,MYSQLI_BOTH);
$app=$row4['application'];
$sel12="select * from  studentfees where search ='$search' and status='' order by id desc";
$res12=mysqli_query($conn,$sel12);
$row12=mysqli_fetch_array($res12,MYSQLI_BOTH);
$search=$row12['search'];
$idd=$row12['id'];
$id12=$idd-1;
//echo $id12;

$sel121="select * from  studentfees where search ='$search' and id='$idd' and status='' ";
$res121=mysqli_query($conn,$sel121);
$row121=mysqli_fetch_array($res121,MYSQLI_BOTH);

$date12=date("d-m-Y");
$sel1="select * from  studentfees where search ='$search' ";
$res1=mysqli_query($conn,$sel1);

$sel10="select * from  studentfees where search ='$search' and status='' order by id desc ";
$res10=mysqli_query($conn,$sel10);
$row10=mysqli_fetch_array($res10,MYSQLI_BOTH);
$paid12=$row10['paid'];
//echo $paid12;
$selde="select * from  studentfees where search ='$search' order by id desc limit 2  ";
$resde=mysqli_query($conn,$selde);
$rowde=mysqli_fetch_array($resde,MYSQLI_BOTH);
$idd=$rowde['id'];

//echo $idd;
$selmo="select * from  studentfees where search ='$search' order by id desc ";
$resmo=mysqli_query($conn,$selmo);


$month12='';
while($rowmo=mysqli_fetch_array($resmo,MYSQLI_BOTH))
{
	 $month13=$rowmo['month'];
	 $month12=$month13.",".$month12;
}



//echo $date;

//echo"$app1";
?>

<html>
<head>
<style>
#name2
{
	
}

</style>
<script>

$(document).ready(function(){
//alert('Thanks For Print');
var divToPrint=document.getElementById('DivIdToPrint1');
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
newWin.document.close();

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

}
});

</script>
<script>

$(document).ready(function(){

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

</script>
<div id='DivIdToPrint1'>
<style>
.a{
width:46%;
float:left;
}
@media print
   {
      .a{width:46%;}
	  .ab{width:5%;}
	  .sd{font-size:11px;}
	  #name7{font-size:10px;}
	  
	  }
      
   
   @media print
   {
      
	  table{width:100%;}
	  #mo{width:230px;}
	  #mo{height:20px;}
	  td(font-size:10px)
	  
	  }
      
   
   
</style>
<link href="css/student_print.css" rel="stylesheet" type="text/css">
</head>
<body>

    <script>
        
        $(document).ready(function(){
	
	var p=$("#pay").val();
});
    </script>
     <?php
  /**
   * Created by PhpStorm.
   * User: sakthikarthi
   * Date: 9/22/14
   * Time: 11:26 AM
   * Converting Currency Numbers to words currency format
   */
  
$number = $row10['paid'];
   $no = round($number);
   $point = round($number - $no, 2) * 100;
   $hundred = null;
   $digits_1 = strlen($no);
   $i = 0;
   $str = array();
   $words = array('0' => '', '1' => 'One', '2' => 'Two',
    '3' => 'Three', '4' => 'Four', '5' => 'Five', '6' => 'Six',
    '7' => 'Seven', '8' => 'Eight', '9' => 'Nine',
    '10' => 'Ten', '11' => 'Eleven', '12' => 'Twelve',
    '13' => 'Thirteen', '14' => 'Fourteen',
    '15' => 'Fifteen', '16' => 'Sixteen', '17' => 'Seventeen',
    '18' => 'Eighteen', '19' =>'Nineteen', '20' => 'Twenty',
    '30' => 'Thirty', '40' => 'Forty', '50' => 'Fifty',
    '60' => 'Sixty', '70' => 'Seventy',
    '80' => 'Eighty', '90' => 'Ninety');
   $digits = array('', 'Hundred', 'Thousand', 'Lakh', 'Crore');
   while ($i < $digits_1) {
     $divider = ($i == 2) ? 10 : 100;
     $number = floor($no % $divider);
     $no = floor($no / $divider);
     $i += ($divider == 10) ? 1 : 2;
     if ($number) {
        $plural = (($counter = count($str)) && $number > 9) ? 's' : null;
        $hundred = ($counter == 1 && $str[0]) ? ' and ' : null;
        $str [] = ($number < 21) ? $words[$number] .
            " " . $digits[$counter] . $plural . " " . $hundred
            :
            $words[floor($number / 10) * 10]
            . " " . $words[$number % 10] . " "
            . $digits[$counter] . $plural . " " . $hundred;
     } else $str[] = null;
  }
  $str = array_reverse($str);
  $result = implode('', $str);
  $points = ($point) ?
    "." . $words[$point / 10] . " " . 
          $words[$point = $point % 10] : '';
  
 ?> 

 <script>
function getIndianCurrency(float $number)
{
    $decimal = round($number - ($no = floor($number)), 2) * 100;
    $hundred = null;
    $digits_length = strlen($no);
    $i = 0;
    $str = array();
    $words = array(0 => '', 1 => 'one', 2 => 'two',
        3 => 'three', 4 => 'four', 5 => 'five', 6 => 'six',
        7 => 'seven', 8 => 'eight', 9 => 'nine',
        10 => 'ten', 11 => 'eleven', 12 => 'twelve',
        13 => 'thirteen', 14 => 'fourteen', 15 => 'fifteen',
        16 => 'sixteen', 17 => 'seventeen', 18 => 'eighteen',
        19 => 'nineteen', 20 => 'twenty', 30 => 'thirty',
        40 => 'forty', 50 => 'fifty', 60 => 'sixty',
        70 => 'seventy', 80 => 'eighty', 90 => 'ninety');
    $digits = array('', 'hundred','thousand','lakh', 'crore');
    while( $i < $digits_length ) {
        $divider = ($i == 2) ? 10 : 100;
        $number = floor($no % $divider);
        $no = floor($no / $divider);
        $i += $divider == 10 ? 1 : 2;
        if ($number) {
            $plural = (($counter = count($str)) && $number > 9) ? 's' : null;
            $hundred = ($counter == 1 && $str[0]) ? ' and ' : null;
            $str [] = ($number < 21) ? $words[$number].' '. $digits[$counter]. $plural.' '.$hundred:$words[floor($number / 10) * 10].' '.$words[$number % 10]. ' '.$digits[$counter].$plural.' '.$hundred;
        } else $str[] = null;
    }
    $Rupees = implode('', array_reverse($str));
    $paise = ($decimal) ? "." . ($words[$decimal / 10] . " " . $words[$decimal % 10]) . ' Paise' : '';
    return ($Rupees ? $Rupees . 'Rupees ' : '') . $paise .;
}
</script>

<div style="border:1px solid" class="a">
<table frame="border" width="100%" >
<tr>
<td><span><img src="../images/logo.png" height="50px" width="50px"/></span></td><td align="center"><span id="name"  style="font-size:11px;text-align:left;font-weight:bold;font-family:ravie">KIDS HARBOUR</span><br/><span style='font-size:11px'>International School <br/>Qazi tola, Walidpur- Mau </span></td><td style="font-size:10px;text-align:right"><b>Contact:&nbsp;</b>9125002009<br/>9125828677</td>
</tr>
</table>
<table border="1px;"  width="100%"cellspacing="0">
<caption style="font-size:11px;font-weight:bold">Fee Receipt(<?php echo $row12['year'];?>)</caption>
<tr>
<td><span id="name2"  style="font-size:11px;font-weight:bold">Sch. Number</span></td><td colspan="2"><span  style="font-size:11px"><?php echo $app;?>&nbsp;&nbsp; (Sr.-<?php echo $row12['id'];?>)</span></td><td align="center" rowspan="2"><span><img src="../code/img/<?php echo $row4['picture'];?>"  style="width:50px;height:50px" class="img-responsive" ></span></td>
</tr>
<tr>
    
<td ><span id="name2"  style="font-size:11px;font-weight:bold">Student Name</span></td><td colspan='2'><span  style="font-size:11px"><?php echo $row12['name'];?></span></td>
</tr>
<tr>
<td ><span id="name2"  style="font-size:11px;font-weight:bold"> Father Name</span></td><td><span  style="font-size:11px"><?php echo $row4['fname'];?></span></td><td style="font-size:11px"><b>Class</b></td><td  style="font-size:11px"><?php echo $row10['class'];?></td>
</tr>


</table>


<table frame="border" width="100%" cellspacing="0" height="25%"style='margin-top:-20px'>
<tr>
<td colspan='4' align="center"><span id="name4" style="font-size:12px;font-weight:bold">Fees Category</span></td>
</tr>
<tr >
<td align="center" style="border: 1px solid black"><span id="name2"  ><b>Month</b></span></td><td colspan="12" style="border: 1px solid black"><?php echo $row121['month'];?></td>
</tr>
<tr align="center" style="border:1px solid black">
<td width="25%" colspan="2" ><span id="name2" >Fee Month</span></td>
<td width="25%" ><span id="name2" ><?php if($row10['fee']=='0'){echo '';}else{echo $row10['fee'];}?></span></td>



</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Admission</span></td>
<td><span id="name2" ><?php if($row10['addm']=='0'){echo '';}else{echo $row10['addm'];}?></td>

</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Registration</span></td>
<td><span id="name2" ><?php if($row10['reg1']=='0'){echo '';}else{echo $row10['reg1'];}?></td>

</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Conveyance</span></td>
<td  ><span id="name2" ><?php if($row10['van']=='0'){echo '';}else{echo $row10['van'];}?></td>

</tr>

<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Half.Exam</span></td>
<td ><span id="name2" ><?php if($row10['exam']=='0'){echo '';}else{echo $row10['exam'];}?></span></td>

</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Annual Charge</span></td>
<td  ><span id="name2" ><?php if($row10['ann']=='0'){echo '';}else{echo $row10['ann'];}?></td>

</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Annual Exam </span></td>
<td><span id="name2" ><?php if($row10['gen']=='0'){echo '';}else{echo $row10['gen'];}?></span></td>

</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Sport</span></td>
<td><span id="name2" ><?php if($row10['reg']=='0'){echo '';}else{echo $row10['reg'];}?></span></td>

</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Other</span></td>
<td><span id="name2" ><?php if($row10['other']=='0'){echo '';}else{echo $row10['other'];}?></span></td>

</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Old Dues</span></td>
<td><span id="name2" ><?php if($row10['pre']=='0'){echo '';}else{echo $row10['pre'];}?></span></td>

</tr>
<tr align="center" style="border:1px solid black;font-weight:bold">
<td colspan="2"><span id="name2" >Net Total</span></td>
<td><span id="name2" ><?php echo $row10['total'];?></span></td>

</tr>
<tr align="center" style="border:1px solid black;font-weight:bold">
<td colspan="2"><span id="name2" >Concession</span></td>
<td><span id="name2" ><?php echo $row10['con'];?></span></td>

</tr>
<tr align="center" style="border:1px solid black;font-weight:bold">
<td colspan="2"><span id="name2" >Paid Amount</span></td>
<td><span id="name2" ><?php echo $row10['paid'];?></span></td>

</tr>
<tr align="center" style="border:1px solid black;font-weight:bold">
<td colspan="2"><span id="name2" >New Due Amount</span></td>
<td><span id="name2" ><?php echo $row10['remain'];?></span></td>

</tr>
<br/>
<tr >
    <td colspan="4" style="text-align:center">
        <!-- <p style="font-size:12px"><b>Paid-</b> &nbsp; <?php echo $result . "Rupees  " . $points . " Only.";?></p> ----->
    </td>
</tr>




<?php
$tot='0';
$paid16='0';
$due16='0';
$con12='0';
while($row1=mysqli_fetch_array($res1,MYSQLI_BOTH))
	
	{
		$tot1=$row1['mtotal'];
		$paid15=$row1['paid'];
		$con=$row1['con'];
		$remain15=$row1['remain'];
	
		$tot16=$remain15+$paid15+$con;
		$due16=$remain15+$due16;
		$con12=$con+$con12;
		$tot=$tot16+$tot;
		$paid16=$paid16+$paid15;
		
	



?>

<?php

	}

?>

</table>
<table>
<tr>
<td width="40%" colspan='3'>
<p style="font-size:10px"><b>Paid-</b> &nbsp; <?php echo $result . "Rupees  " . $points . " Only.";?></p>
</td>
</tr>
<tr>
<td width="10%">Date</td><td width="40%">

<?php 

$date12=$row10['date'];
$date14=date("d-m-Y",strtotime($date12));

echo $date14;?></td><td width="50%" align="right" style="font-size:10px"><br/>Sign Of Received Staff</td>
</tr>
</table>




</div>
<div  class="ab" style="float:left;width:5%">--</div>
&emsp;<div style="border:1px solid" class="a">
<table frame="border" width="100%" >
<tr>
<td><span><img src="../images/logo.png" height="50px" width="50px"/></span></td><td align="center"><span id="name"  style="font-size:11px;text-align:left;font-weight:bold;font-family:ravie">KIDS HARBOUR</span><br/><span style='font-size:11px'>International School <br/>Qazi tola, Walidpur- Mau </span></td><td style="font-size:10px;text-align:right"><b>Contact:&nbsp;</b>9125002009<br/>9125828677</td>
</tr>
</table>
<table border="1px;"  width="100%"cellspacing="0">
<caption style="font-size:11px;font-weight:bold">Fee Receipt(<?php echo $row12['year'];?>)</caption>
<tr>
<td><span id="name2"  style="font-size:11px;font-weight:bold">Sch. Number</span></td><td colspan="2"><span  style="font-size:11px"><?php echo $app;?>&nbsp;&nbsp; (Sr.-<?php echo $row12['id'];?>)</span></td><td align="center" rowspan="2"><span><img src="../code/img/<?php echo $row4['picture'];?>"  style="width:50px;height:50px" class="img-responsive" ></span></td>
</tr>
<tr>
    
<td ><span id="name2"  style="font-size:11px;font-weight:bold">Student Name</span></td><td colspan='2'><span  style="font-size:11px"><?php echo $row12['name'];?></span></td>
</tr>
<tr>
<td ><span id="name2"  style="font-size:11px;font-weight:bold"> Father Name</span></td><td><span  style="font-size:11px"><?php echo $row4['fname'];?></span></td><td style="font-size:11px"><b>Class</b></td><td  style="font-size:11px"><?php echo $row10['class'];?></td>
</tr>


</table>


<table frame="border" width="100%" cellspacing="0" height="25%">
<tr>
<td colspan='4' align="center"><span id="name4" style="font-size:12px;font-weight:bold">Fees Category</span></td>
</tr>
<tr >
<td align="center" style="border: 1px solid black"><span id="name2"  ><b>Month</b></span></td><td colspan="12" style="border: 1px solid black"><?php echo $row121['month'];?></td>
</tr>
<tr align="center" style="border:1px solid black">
<td width="25%" colspan="2" ><span id="name2" >Fee Month</span></td>
<td width="25%" ><span id="name2" ><?php if($row10['fee']=='0'){echo '';}else{echo $row10['fee'];}?></span></td>



</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Admission</span></td>
<td><span id="name2" ><?php if($row10['addm']=='0'){echo '';}else{echo $row10['addm'];}?></td>

</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Registration</span></td>
<td><span id="name2" ><?php if($row10['reg1']=='0'){echo '';}else{echo $row10['reg1'];}?></td>

</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Conveyance</span></td>
<td  ><span id="name2" ><?php if($row10['van']=='0'){echo '';}else{echo $row10['van'];}?></td>

</tr>

<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Half.Exam</span></td>
<td ><span id="name2" ><?php if($row10['exam']=='0'){echo '';}else{echo $row10['exam'];}?></span></td>

</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Annual Charge</span></td>
<td  ><span id="name2" ><?php if($row10['ann']=='0'){echo '';}else{echo $row10['ann'];}?></td>

</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Annual Exam </span></td>
<td><span id="name2" ><?php if($row10['gen']=='0'){echo '';}else{echo $row10['gen'];}?></span></td>

</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Sport</span></td>
<td><span id="name2" ><?php if($row10['reg']=='0'){echo '';}else{echo $row10['reg'];}?></span></td>

</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Other</span></td>
<td><span id="name2" ><?php if($row10['other']=='0'){echo '';}else{echo $row10['other'];}?></span></td>

</tr>
<tr align="center" style="border:1px solid black">
<td colspan="2"><span id="name2" >Old Dues</span></td>
<td><span id="name2" ><?php if($row10['pre']=='0'){echo '';}else{echo $row10['pre'];}?></span></td>

</tr>
<tr align="center" style="border:1px solid black;font-weight:bold">
<td colspan="2"><span id="name2" >Net Total</span></td>
<td><span id="name2" ><?php echo $row10['total'];?></span></td>

</tr>
<tr align="center" style="border:1px solid black;font-weight:bold">
<td colspan="2"><span id="name2" >Concession</span></td>
<td><span id="name2" ><?php echo $row10['con'];?></span></td>

</tr>
<tr align="center" style="border:1px solid black;font-weight:bold">
<td colspan="2"><span id="name2" >Paid Amount</span></td>
<td><span id="name2" ><?php echo $row10['paid'];?></span></td>

</tr>
<tr align="center" style="border:1px solid black;font-weight:bold">
<td colspan="2"><span id="name2" >New Due Amount</span></td>
<td><span id="name2" ><?php echo $row10['remain'];?></span></td>

</tr>



<?php
$tot='0';
$paid16='0';
$due16='0';
$con12='0';
while($row1=mysqli_fetch_array($res1,MYSQLI_BOTH))
	
	{
		$tot1=$row1['mtotal'];
		$paid15=$row1['paid'];
		$con=$row1['con'];
		$remain15=$row1['remain'];
	
		$tot16=$remain15+$paid15+$con;
		$due16=$remain15+$due16;
		$con12=$con+$con12;
		$tot=$tot16+$tot;
		$paid16=$paid16+$paid15;
		
	



?>

<?php

	}

?>

</table>

<table>
<tr>
<td width="40%" colspan='3'>
<p style="font-size:10px"><b>Paid-</b> &nbsp; <?php echo $result . "Rupees  " . $points . " Only.";?></p>
</td>
</tr>
<tr>
<td width="10%">Date</td><td width="40%">
 
<?php 

$date12=$row10['date'];
$date14=date("d-m-Y",strtotime($date12));

echo $date14;?></td><td width="50%" align="right" style="font-size:10px"><br/>Sign Of Received Staff</td>
</tr>
</table>



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



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


<input type='button' id='btn' value='Print' onclick='printDiv1();'>
	 
	 <script>
	function printDiv1() 
{
var divToPrint=document.getElementById('DivIdToPrint1');
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
newWin.document.close();

}
	
	</script>
	

				
</body>
</html>









<?php


	
	
	
	
	break;
	
	
	///// for fees details 
	case 73:
	$session=$_POST['session'];
	$scholer=$_POST['scholer'];
	$pass2=$_POST['pass'];
	$selr="select * from  registration where application ='$scholer' and session='$session'";
$resr=mysqli_query($conn,$selr);
$rowr=mysqli_fetch_array($resr,MYSQLI_BOTH);
$sessionr=$rowr['session'];
$pass=$rowr['application'];
$pass1='gcs'.$pass;
//echo $pass1;
if($scholer=='' or $scholer==NULL)
{
	
	//echo "<SCRIPT>alert('Scholer Number Invailid');window.location.href='checkfess.php';</SCRIPT>";
	//header("location:../checkfees.php");
}
if($pass2!=$pass1)
{
	echo "<SCRIPT>alert('Password Invailid');window.location.href='checkfess.php';</SCRIPT>";
	//header("location:../checkfees.php");
}
//echo $sessionr;
$applicationr=$rowr['application'];

$sel1="select * from  studentfees where search ='$applicationr' and year='$sessionr'";
$res1=mysqli_query($conn,$sel1);
$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
//$search=$row1['search'];
$sel="select * from  registration where application ='$applicationr' and session='$sessionr'";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);


$selb="select * from  registration where application ='$applicationr' and session='sessionr' order by id desc";
$resb=mysqli_query($conn,$selb);
$rowb=mysqli_fetch_array($resb,MYSQLI_BOTH);

$date=date("d/m/Y");
date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");
$datetime=$date." ".$time;
if($pass2==$pass1)
{
?>
<html>
<head>
<style>
#name2
{
	font-weight:bold;
	font-size:12px;
}
#name3
{
    font-size:12px;
}
</style>

	
<script>

$(document).ready(function(){

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

</script>
<link href="css/student_print.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id='DivIdToPrint'>
<table frame="border" width="100%" >
<tr>
<td><span><img src="../images/logo.png" height="50px" width="50px"/></span></td><td align="center"><span id="name"  style="font-size:12px;text-align:left;font-weight:bold">Gyan Vatika Public School <br/>Ramugrah Nagar,Hasanpur- Mau </span></td><td style="font-size:12px;text-align:right"><b>Contact:&nbsp;</b>9454282172<br/>9473726442</td>
</tr>
</table>
<table border="1px;" width="100%" cellspacing="0">
<caption style="font-size:18px;font-weight:bold">Fees Statement <?php echo $row1['year'];?></caption>
<tr>
<td width="30%"><span id="name2">Scho. Number</span></td><td><span id="name3"><?php echo $row1['search'];?></span></td><td><b>Class</b></td><td><?php echo $row['subject'];?></td><td width="10%"align="right" rowspan="3"><span><img src="../code/img/<?php echo $row['picture'];?>" style="width:100%;" class="img-responsive" ></span></td>
</tr>
<tr>
<td width="30%"><span id="name2">Student Name</span></td><td width="" colspan="3"><span id="name3"><?php echo $row['name'];?></span></td>
</tr>
<tr>
<td width="30%"><span id="name2"> Father Name</span></td><td colspan="3"><span id="name3"><?php echo $row['fname'];?></span></td>
</tr>


</table>

<table border="1px" width="100%" cellspacing="0px">
<tr>
<td colspan='17' align="center"><span id="name4" style="font-size:12px;font-weight:bold">Fees Receipt</span></td>

</tr>
<tr align="center">


<td><span id="name2">Sr.</span></td>
<td><span id="name2">Month</span></td>
<td><span id="name2" >Month Fee</span></td>
<td><span id="name2" >Half Exam</span></td>
<td><span id="name2">Conv</span></td>

<td><span id="name2">Sport</span></td>
<td><span id="name2">Add</span></td>
<td><span id="name2">Comp</span></td>
<td><span id="name2">Ann.Exam</span></td>
<td><span id="name2">Ann</span></td>

<td><span id="name2">Other</span></td>
<td><span id="name2">Con</span></td>
<td><span id="name2">Remark</span></td>
<td><span id="name2">Pre Dues</span></td>

<td><span id="name2">Paid</span></td>

<td><span id="name2">Dues</span></td>

<td><span id="name2">Date</span></td>


</tr>
<?php

$sum=0;
$sum1=0;

$remain1=0;



$sel2="select * from  studentfees where search='$applicationr' and year='$sessionr'";
$res2=mysqli_query($conn,$sel2);
while($row2=mysqli_fetch_array($res2,MYSQLI_BOTH))
{
	$tot=$row2['total'];
	$paid13=$row2['paid'];
	
	$remain12=$row2['remain'];
	$sum=$tot+$sum;
	$sum1=$paid13+$sum1;
	$remain1=$remain12+$remain1;
?>
<tr align="center">

<td><span id="name3"><?php echo $row2['id'];?></span></td>
<td><span id="name3"><?php echo $row2['month'];?></span></td>
<td><span id="name3"><?php echo $row2['fee'];?></span></td>
<td><span id="name3"><?php echo $row2['exam'];?></span></td>
<td><span id="name3"><?php echo $row2['van'];?></span></td>

<td><span id="name3"><?php echo $row2['reg'];?></span></td>
<td><span id="name3"><?php echo $row2['addm'];?></span></td>
<td><span id="name3"><?php echo $row2['comp'];?></span></td>
<td><span id="name3"><?php echo $row2['gen'];?></span></td>
<td><span id="name3"><?php echo $row2['ann'];?></span></td>

<td><span id="name3"><?php echo $row2['other'];?></span></td>
<td><span id="name3"><?php echo $row2['con'];?></span></td>
<td ><span id="name3"><?php echo $row2['remark'];?></span></td>
<td><span id="name3"><?php echo $row2['pre'];?></span></td>

<td><span id="name3"><?php echo $row2['paid'];?></span></td>

<td><span id="name3"><?php echo $row2['remain'];?></span></td>
<?php $daten=$row2['date'];
$date1=date("d-m-Y",strtotime($daten));  ?>
<td><span id="name3"><?php echo $date1;?></span></td>


</tr>


<?php
}
?>
<tr align="center">

<td colspan="14" style="font-weight:bold;font-size:19px">Sub Total</td><td style="font-weight:bold;font-size:18px"><span id="name3"colspan="2"><?php echo $sum1;?></span></td><td style="font-weight:bold;font-size:18px"><span id="name3"colspan="2">
    <?php
    $sel23="select * from  studentfees where search='$applicationr' and year='$sessionr' order by id desc";
$res23=mysqli_query($conn,$sel23);
$row23=mysqli_fetch_array($res23,MYSQLI_BOTH);
	$remain23=$row23['remain'];
    
    
    echo $remain12;?></span></td>

</tr>
</table>

<table width="100%" frame="border" cellspacing="0">
<tr align="center">
<td width="50%"  align="left"><span id="name3" style="font-size:15px;font-weight:bold">Datetime</span></td>
</tr>
<tr>
<td  width="70%" align="left"><span ><?php echo $datetime;?></span></td><td><br/><br/></td><td width="50%" align="right"><span id="name3" style="font-size:15px;font-weight:bold" align="rightt">Sign Of Received Staff</span></td>
</tr>
</table>
</div>
<br/>
<br/><br/>


<input type='button' id='btn' value='Print' onclick='printDiv();'>
	  <script>
	function printDiv() 
{
var divToPrint=document.getElementById('DivIdToPrint');
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
newWin.document.close();
setTimeout(function(){newWin.close();},10);
}
	
	</script>
</body>
</html>









<?php

}
	
	
	
	
	break;
	
	///// for fees details 
	case 611:
	//$ch=$_POST['choice'];
	//echo $ch;
	$session=$_POST['session'];
	$class=$_POST['class'];
	$month=$_POST['month'];
  $sel1="select * from registration where session='$session' and subject='$class' order by id asc ";
	$res1=mysqli_query($conn,$sel1);
	
	
	
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['copy',  'excel', 'print']
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr tr align="center">
                <th  style="text-align:center">Sch No.</th><th  style="text-align:center">Name</th><th  style="text-align:center">Father</th><th  style="text-align:center">Class</th><th  style="text-align:center">Paid Month</th><th  style="text-align:center">Half Exam</th><th  style="text-align:center">Yearly Exam</th><th  style="text-align:center">Paid</th><th  style="text-align:center">Old Dues</th>
            </tr>
        </thead>
<tfoot>
           <tr tr align="center">
                <th  style="text-align:center">Sch No.</th><th  style="text-align:center">Name</th><th  style="text-align:center">Father</th><th  style="text-align:center">Class</th><th  style="text-align:center">Paid Month</th><th  style="text-align:center">Half Exam</th><th  style="text-align:center">Yearly Exam</th><th  style="text-align:center">Paid</th><th  style="text-align:center">Old Dues</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  $s=0;
  while($row=mysqli_fetch_array($res1,MYSQLI_BOTH))
  {
  $app=$row['id'];
$sel="select * from studentfees where year='$session' and class='$class' and search='$app'  order by id asc ";
	$res=mysqli_query($conn,$sel);
	/////for fees paid 
	$am=0;
	$half=0;
	$yearly=0;
	$mon='';
	while($row1=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$paid=$row1['paid'];
		$half=$row1['exam']+$half;
		$yearly=$row1['gen']+$yearly;
		$am=$am+$paid;
		$m=$row1['month'];
		$mon=$mon.','.$m;
	}
	/////for fees paid 
	
	////for class fees 
	$sel2="select * from fees where session='$session' and class='$class'  ";
	$res2=mysqli_query($conn,$sel2);
	/////for fees paid 
	$row2=mysqli_fetch_array($res2,MYSQLI_BOTH);
	$fees=$row2['fees'];
	//echo $fees;
	////for class fees 
	$sel21="select * from studentfees where year='$session' and class='$class' and search='$app' order by id desc ";
	$res21=mysqli_query($conn,$sel21);
	$row21=mysqli_fetch_array($res21,MYSQLI_BOTH);
	$dues=$row21['remain'];
		?>
		 
	<tr class="text-center">
<td><?php echo $row['id'] ;?></td><td><?php echo $row['name'];?></td><td><?php echo $row['fname'];?></td><td><?php echo $row['subject'];?></td><td><?php echo $mon;?></td><td><?php echo $half;?></td><td><?php echo $yearly;?></td><td><?php echo $am;?></td><td><?php echo $dues;?></td>
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	<?php
	
	?>
	
	</div>
	
	<?php
	
	break;
		case 6111:
	//$ch=$_POST['choice'];
	//echo $ch;
	$session=$_POST['session'];
	$class=$_POST['class'];
	$month=$_POST['month'];
  $sel1="select * from registration where session='$session' and subject='$class' order by id asc ";
	$res1=mysqli_query($conn,$sel1);
	
	
	
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['copy',  'excel', 'print']
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
           <tr tr align="center">
                <th  style="text-align:center">Sch No.</th><th  style="text-align:center">Name</th><th  style="text-align:center">Father</th><th  style="text-align:center">Class</th><th  style="text-align:center">Paid Month </th><th  style="text-align:center">Paid</th><th  style="text-align:center"> Dues To <?php $ma=date("M"); echo $ma;?></th><th>Min</th>
            </tr>
        </thead>
<tfoot>
            <tr tr align="center">
                <th  style="text-align:center">Sch No.</th><th  style="text-align:center">Name</th><th  style="text-align:center">Father</th><th  style="text-align:center">Class</th><th  style="text-align:center">Paid Month </th><th  style="text-align:center">Paid</th><th  style="text-align:center"> Dues To <?php $ma=date("M"); echo $ma;?></th><th>Min</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  $s=0;
  while($row=mysqli_fetch_array($res1,MYSQLI_BOTH))
  {
  $app=$row['id'];
  $application=$row['id'];
  $code=$row['code'];
  $tra=$row['tra'];
  $subject=$row['subject'];
  $sel24="select * from convence where code='$code' and session='$session'";
	$res24=mysqli_query($conn,$sel24);
	$row24=mysqli_fetch_array($res24,MYSQLI_BOTH);
	//$vill=$row2['vill'];
	$conv=$row24['conv'];
	$conv12=(int)$conv;
	

  ////////////for month show///////////
  	  //echo $conc;
	  	  $selca="select * from  studentfees where  month like '%April%' and year='$session' and search='$application' order by id asc ";
	$resca=mysqli_query($conn,$selca);
	$a='';
	if($rowca=mysqli_fetch_array($resca,MYSQLI_BOTH))
	{
		$a='1';
	}
	//////may
	$selcm="select * from  studentfees where  month like '%May%' and year='$session' and search='$application' order by id asc ";
	$rescm=mysqli_query($conn,$selcm);
	$b='';
	if($rowcm=mysqli_fetch_array($rescm,MYSQLI_BOTH))
	{
		$a='2';
	}
	//////Jun
	$selcj="select * from  studentfees where  month like '%Jun%' and year='$session' and search='$application' order by id asc ";
	$rescj=mysqli_query($conn,$selcj);
	$c='';
	if($rowcj=mysqli_fetch_array($rescj,MYSQLI_BOTH))
	{
		$a='3';
	}
	//////july
	$selcmj="select * from  studentfees where  month like '%July%' and year='$session' and search='$application' order by id asc ";
	$rescmj=mysqli_query($conn,$selcmj);
	$d='';
	if($rowcmj=mysqli_fetch_array($rescmj,MYSQLI_BOTH))
	{
		$a='4';
	}
	//////August
	$selcmja="select * from  studentfees where  month like '%August%' and year='$session' and search='$application' order by id asc ";
	$rescmja=mysqli_query($conn,$selcmja);
	$e='';
	if($rowcmja=mysqli_fetch_array($rescmja,MYSQLI_BOTH))
	{
		$a='5';
	}
	//////sep
	$selcms="select * from  studentfees where  month like '%September%' and year='$session' and search='$application' order by id asc ";
	$rescms=mysqli_query($conn,$selcms);
	$f='';
	if($rowcms=mysqli_fetch_array($rescms,MYSQLI_BOTH))
	{
		$a='6';
	}
	//////oct
	$selcmjo="select * from  studentfees where  month like '%October%' and year='$session' and search='$application' order by id asc ";
	$rescmjo=mysqli_query($conn,$selcmjo);
	$g='';
	if($rowcmjo=mysqli_fetch_array($rescmjo,MYSQLI_BOTH))
	{
		$a='7';
	}
	//////Nov
	$selcmjn="select * from  studentfees where  month like '%November%' and year='$session' and search='$application' order by id asc ";
	$rescmjn=mysqli_query($conn,$selcmjn);
	$h='';
	if($rowcmjn=mysqli_fetch_array($rescmjn,MYSQLI_BOTH))
	{
		$a='8';
	}
	//////Dec
	$selcmjd="select * from  studentfees where  month like '%December%' and year='$session' and search='$application' order by id asc ";
	$rescmjd=mysqli_query($conn,$selcmjd);
	$i='';
	if($rowcmjd=mysqli_fetch_array($rescmjd,MYSQLI_BOTH))
	{
		$a='9';
	}
	//////Jan
	$selcmjdj="select * from  studentfees where  month like '%January%' and year='$session' and search='$application' order by id asc ";
	$rescmjdj=mysqli_query($conn,$selcmjdj);
	$j='';
	if($rowcmjdj=mysqli_fetch_array($rescmjdj,MYSQLI_BOTH))
	{
		$a='10';
	}
	//////Jan
	$selcmf="select * from  studentfees where  month like '%February%' and year='$session' and search='$application' order by id asc ";
	$rescmf=mysqli_query($conn,$selcmf);
	$k='';
	if($rowcmf=mysqli_fetch_array($rescmf,MYSQLI_BOTH))
	{
		$a='11';
	}
	//////mar
	$selcmm="select * from  studentfees where  month like '%March%' and year='$session' and search='$application' order by id asc ";
	$rescmm=mysqli_query($conn,$selcmm);
	$l='';
	if($rowcmm=mysqli_fetch_array($rescmm,MYSQLI_BOTH))
	{
		$a='12';
	}
  ////////////for month show///////////
  
  ////max for month/////////
  $max=$a;
 echo $max;
  ////max for month/////////
  
  
  
  ////for month cal_days_in_month/////
  $sel211="select * from studentfees where year='$session' and class='$class' and search='$app' ";
	$res211=mysqli_query($conn,$sel211);
	
	$row211=mysqli_fetch_array($res211,MYSQLI_BOTH);
	$month=$row211['month'];
	
  ////////for month cal close/////
 
$sel="select * from studentfees where year='$session' and class='$class' and search='$app'  order by id asc ";
	$res=mysqli_query($conn,$sel);
	/////for fees paid 
	$am=0;
	$co=0;
	$mon='';
	while($row1=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$paid=$row1['paid'];
		$con=$row1['con'];
		$am=$am+$paid;
		$co=$co+$con;
		$m=$row1['month'];
		$mon=$mon.','.$m;
	}
	/////for fees paid 
	
	////for class fees 
	$sel2="select * from fees where session='$session' and class='$class'  ";
	$res2=mysqli_query($conn,$sel2);
	/////for fees paid 
	$row2=mysqli_fetch_array($res2,MYSQLI_BOTH);
	
	//echo $tra1;
	$fees=$row2['fees'];
	$addm=$row211['addm'];
	$computer=$row211['comp'];
	$gen=$row211['gen'];
	
	
	$other=$row211['other'];
	$date=date("m");
	$m1=(int)$addm;
	$m2=(int)$computer;
	$m3=(int)$gen;
	
	$date5=(int)$date;

	
	if($date==4)
	{
		$cal=1;
	}
	if($date==5)
	{
		$cal=2;
	}
	if($date==6)
	{
		$cal=3;
	}
	if($date==7)
	{
		$cal=4;
	}
	if($date==8)
	{
		$cal=5;
	}
	if($date==9)
	{
		$cal=6;
	}
	if($date==10)
	{
		$cal=7;
	}
	if($date==11)
	{
		$cal=8;
	}
	if($date==12)
	{
		$cal=9;
	}
	if($date==1)
	{
		$cal=10;
	}
	if($date==2)
	{
		$cal=11;
	}
	if($date==3)
	{
		$cal=12;
	}
	//echo $cal;
	
	$n=(int)$fees;
	$ma=(int)$max;
		$pai=$cal-$ma;
	 ////free///
  $sel211f="select * from fix where session='$session' and class='$class' and sch='$app' ";
	$res211f=mysqli_query($conn,$sel211f);
	
	$row211f=mysqli_fetch_array($res211f,MYSQLI_BOTH);
	
	$sel211f1="select * from studentfees where year='$session' and class='$class' and search='$app' order by id asc";
	$res211f1=mysqli_query($conn,$sel211f1);
	
	$row211f1=mysqli_fetch_array($res211f1,MYSQLI_BOTH); 
		$pre=$row211f1['pre'];
	$feef=$row211f['fees'];
//	$convf=$row211f['conv'];

  ////free///
//	echo $ff;
//	echo $fc;
	//echo $n;
	$balance=$pai*$n;
	$fixc=(int)$feef;
		$fixd=$fixc*$pai;
		
	$convm=$conv12*$pai;
//	echo $n;
	$main=$balance+$m1+$m2+$m3+$other+$convm;
	$amountnet=$main-$am-$fixd-$con;
	//echo $balance;
	////for class fees 
	$sel21="select * from studentfees where year='$session' and class='$class' and search='$app'  ";
	$res21=mysqli_query($conn,$sel21);
	$row21=mysqli_fetch_array($res21,MYSQLI_BOTH);
	$dues=$row21['remain'];
		?>
		 
	<tr class="text-center">
<td><?php echo $row['id'] ;?></td><td><?php echo $row['name'];?></td><td><?php echo $row['fname'];?></td><td><?php echo $row['subject'];?></td><td><?php echo $mon;?></td><td><?php echo $am;?></td><td><?php echo $amountnet;?></td><td><?php echo $max;?></td>
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	<?php
	
	?>
	
	</div>
	
	<?php
	
	break;
	case 211:
	
	$session=$_POST['session'];
//	echo $session;
	$nsession=$_POST['nsession'];
	//	echo $nsession;
	$date=date("d-m-Y");
	$class=$_POST['class'];
//	echo $class;
	$nclass=$_POST['nclass'];
//		echo $nclass;
	$sel="select * from registration where subject='$class' and session='$session'";
	$res=mysqli_query($conn,$sel);
	
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$sch1=$row['application'];
		
	//	echo $sch1;
	$sel4="select * from registration where  session='$nsession' and application='$sch1'";
	$res4=mysqli_query($conn,$sel4);
	$row4=mysqli_fetch_array($res4,MYSQLI_BOTH);
		$name=$row['name'];
		echo $name;
		echo '-';
$code=$row['code'];
$adhar=$row['adhar'];
$mediam=$row['mediam'];
$caste=$row['caste'];
$minority=$row['minority'];
//echo"$name";
//echo"<br/>";
$father=$row['fname'];
//echo"$father";
$mother=$row['mname'];
$subcategory=$row['subcategory'];
//echo"$mother";
//echo"<br/>";
$app=$row['application'];
//echo"$app";
//echo"<br/>";

$gender=$row['gender'];
$session=$_POST['session'];
//echo"$gender";
$dob=$row['dob'];
//echo"$dob";

//echo"$class";

//echo"$mother";
$ele=$row['ele'];
$year=$row['year'];
$board=$row['board'];
$date=date("d-m-y");
//echo"$high1";


//$subject=$_POST['class'];
//echo"$inter1";

//echo"$grade";
$picture=$row['picture'];
$city=$row['city'];
//echo"$city";
$city1=$row['city1'];
//echo"$city";
$village=$row['village'];
//echo"$village";
$village1=$row['village1'];
//echo"$village1";
$postoffice=$row['postoffice'];
//echo"$postoffice";
$postoffice1=$row['postoffice1'];
//echo"$postoffice1";
$dist=$row['dist'];
//echo"$dist";
$dist1=$row['dist1'];
//echo"$dist1";
$state=$row['state'];
//echo"$state";
$state1=$row['state1'];
//echo"$state1";
$mobile=$row['mobile'];
//echo"$mobile";
$mobile1=$row['mobile1'];
//echo"$mobile1";
$pincode=$row['pincode'];
//echo"$pincode";
$pincode1=$row['pincode1'];
	// for registration
	///
	$tahsil=$row['tahsil'];
	$whatsapp=$row['whatsapp'];
	
	
	
	
	$date=date("d-m-Y");
	date_default_timezone_set("asia/kolkata");
	$time=date("h:i:sa");
	$datetime=$date." ".$time;
	
	if($row4)
	{echo"already transfered in New Session";}
	else
	{
		$ins="INSERT INTO `registration` (`application`, `name`, `fname`, `mname`, `dob`, `gender`, `class`, `session`, `subject`, `ele`, `board`, `year`, `total`, `obtain`, `per`, `grade`, `city`, `tahsil`, `village`, `postoffice`, `dist`, `state`, `mobile`, `pincode`, `picture`, `city1`, `village1`, `postoffice1`, `dist1`, `state1`, `mobile1`, `pincode1`, `datetime`, `mediam`, `adhar`, `action`, `action1`, `code`, `minority`, `caste`, `subcategory`, `trans`, `tra`, `nationality`, `last`, `occupation`, `date`) VALUES ('$app', '$name', '$father', '$mother', '$dob', '$gender', '$class', '$nsession', '$nclass', '$ele', '$board', '$year', '$total', '$obtain', '$per', '$grade', '$city', '$tahsil', '$village', '$postoffice', '$dist', '$state', '$mobile', '$pincode', '$picture', '$city1', '$village1', '$postoffice1', '$dist1', '$state1', '$mobile1', '$pincode1', '$datetime', '$mediam', '$adhar', '', '', '', 'HINDU', 'OBC', '', '', '', 'INDIAN', '', '', '$date');";
	
	if(mysqli_query($conn,$ins))
				{
					echo "Transfered";
					$up="update registration set trans='$nclass' where application='$sch1' and session='$session' order by id desc";
					$res1=mysqli_query($conn,$up);
				}
				else
				{
					echo"not";
				}
	}
	}
	
	
	
	break ;
		case 1659:
	$year1=$_POST['session'];
  $sel1="select * from  registration where session ='$year1' and status!='' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: []
    });
	
});
</script>



	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">Sch No.</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class<span style="color:red">/Trans.</span></th><th  style="text-align:center">Address</th><th  style="text-align:center">Action</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">App. No.</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class<span style="color:red">/Trans.</span></th><th  style="text-align:center">Address</th><th  style="text-align:center">Action</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  $year=$_POST['session'];
  $sel="select * from  registration where session ='$year1' and status!='' order by id desc";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		$a=$row['village'];
	$b=$row['postoffice'];
	$scholar=$row['application'];
	$name=$row['name'];
	$c=$row['dist'];
	$e=$row['mobile'];
	$d=$a." ".$c;
	


//$up="update sales set name='$name' where scholar='$scholar' and name=''";
//mysqli_query($conn,$up);
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['application'];?></td><td><img src="../code/img/<?php echo $row['picture'];?>" height="90px" width="90px;"></td><td><?php echo $row['name']."<br/>"." <b>Father-</b>".$row['fname']."<br/>"." <b>Mother-</b>".$row['mname']."<br/>". "<b>D.O.B-</b>".$row['dob']."<br/>"."<b>Adh-</b>".$row['adhar'];?></td><td><?php echo $row['subject']."<br/>"."<font color=red size=2pt>".$row['trans'].'</font>';?></td><td><?php echo "<b>Vill-</b>".$a."<br/>"."<b>Post-</b>".$b."<br/>"."<b>Dist-</b>".$c."<br/>"."<b>Mob-</b>".$row['mobile'];?></td>
	
	
	<td>
	
	&emsp;<a href="javascript:;" onclick="deleterow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-refresh"></span>Restore</a></td>
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
		case 1669:
	$id=$_POST['rowid'];
	$sel="select * from  registration where id='$id'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$photo=$row['picture'];
	$location="../code/img/".$photo;
	$application=$row['application'];
	$del="update registration set status='' where id='$id'";
	if(mysqli_query($conn,$del))
	{
		echo"Restore Successfully";
	
	}
	else
	{
		echo"Not Deleted";
	}
	break;
	case 18192023:
	$year1=$_POST['year'];
	 $class=$_POST['class'];
  $sel1="select * from  registration where session ='$year1' and subject='$class'  order by application asc ";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

		<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['print','pdf']
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">Sch No.</th><th  style="text-align:center">Name</th><th  style="text-align:center">Father</th><th  style="text-align:center">Class</th><th  style="text-align:center">Marks</th><th  style="text-align:center">Rank</th>
            </tr>
        </thead>
<tfoot>
             <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">Sch No.</th><th  style="text-align:center">Name</th><th  style="text-align:center">Father</th><th  style="text-align:center">Class</th><th  style="text-align:center">Marks</th><th  style="text-align:center">Rank</th>
            </tr>
        </tfoot>
<tbody>	
  <?php
  $year=$_POST['year'];
  $class=$_POST['class'];
 $exam=$_POST['exam'];
  
       $sel="select * from  registration where session ='$year' and subject='$class' and status='' order by r1 desc  ";
  
   
       $sel="select * from  registration where session ='$year' and subject='$class'  and status='' order by r2 desc  ";
  
	$res=mysqli_query($conn,$sel);
	$s=1;
		$sp='';
			$sp1=1;
			$p=1;
			$k='';
			$sp2='';
			$sp1=1;
			$p=1;
			$k1='';
			$sp='';
			$a=array();
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		$ap=$row['application'];
	$session=$row['session'];
	$c=$row['dist'];
	$e=$row['mobile'];
	$d=$a." ".$c;
	

$sel1="select * from six_eightresult where  session='$session' and exam='HALF YEARLY EXAM' and class='$class' and rol='$ap'";
$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);

    
     if($row1['mark1']=='A'){'0';}else{$row1['mark1'] ;}
    if($row1['mark2']=='A'){'0';}else{$row1['mark2'] ;}
    if($row1['mark3']=='A'){'0';}else{$row1['mark3'] ;}
    if($row1['mark4']=='A'){'0';}else{$row1['mark4'] ;}
    if($row1['mark5']=='A'){'0';}else{$row1['mark5'] ;}
     if($row1['mark6']=='A'){'0';}else{$row1['mark6'] ;}
     
      

//$per1=$marktotal/6;

$sel12="select * from six_eightresult where  session='$session' and exam='ANNUAL EXAM' and class='$class' and rol='$ap'";
$res12=mysqli_query($conn,$sel12);
$row12=mysqli_fetch_array($res12,MYSQLI_BOTH);


     if($row1['mark1']=='A'){'0';}else{$row1['mark1'] ;}
    if($row1['mark2']=='A'){'0';}else{$row1['mark2'] ;}
    if($row1['mark3']=='A'){'0';}else{$row1['mark3'] ;}
    if($row1['mark4']=='A'){'0';}else{$row1['mark4'] ;}
    if($row1['mark5']=='A'){'0';}else{$row1['mark5'] ;}
     if($row1['mark6']=='A'){'0';}else{$row1['mark6'] ;}
if($class=='P.G.' or $class=='' or $class=='Jr.K.G.' or $class=='Sr.K.G.' )
{
    $r1=$row1['mark1p']+$row1['mark1n']+$row1['mark1m']+$row1['mark2p']+$row1['mark2n']+$row1['mark2m']+$row1['mark3p']+$row1['mark3n']+$row1['mark3m']+$row1['mark4p']+$row1['mark4n']+$row1['mark4m']+$row1['mark5p']+$row1['mark5n']+$row1['mark5m']+$row1['mark6p']+$row1['mark6n']+$row1['mark6m']+$row1['mark7p']+$row1['mark7n']+$row1['mark7m']+$row1['mark8p']+$row1['mark8n']+$row1['mark8m']+$row1['mark9p']+$row1['mark9n']+$row1['mark9m']+$row1['mark10p']+$row1['mark10n']+$row1['mark10m'];
    $r21=$row12['mark1n']+$row12['mark1m']+$row12['mark2n']+$row12['mark2m']+$row12['mark3n']+$row12['mark3m']+$row12['mark4n']+$row12['mark4m']+$row12['mark5n']+$row12['mark5m']+$row12['mark6n']+$row12['mark6m']+$row12['mark7n']+$row12['mark7m']+$row12['mark8n']+$row12['mark8m']+$row12['mark9n']+$row12['mark9m']+$row12['mark10n']+$row12['mark10m'];
    $pr2=$r1+$r21;
    $per_2=$pr2/8;
}

if($class=='1st' or $class=='2nd' or $class=='3rd' or $class=='4th' or $class=='5th' or $class=='6th' or $class=='7th' or $class=='8th')
     {
        $r1= $marktotal=$row1['mark1p']+$row1['mark1n']+$row1['mark1m']+$row1['mark2p']+$row1['mark2n']+$row1['mark2m']+$row1['mark3p']+$row1['mark3n']+$row1['mark3m']+$row1['mark4p']+$row1['mark4n']+$row1['mark4m']+$row1['mark5p']+$row1['mark5n']+$row1['mark5m']+$row1['mark6p']+$row1['mark6n']+$row1['mark6m']+$row1['mark7p']+$row1['mark7n']+$row1['mark7m']+$row1['mark8p']+$row1['mark8n']+$row1['mark8m'];
        $r21= $marktotal12=$row12['mark1p']+$row12['mark1n']+$row12['mark1m']+$row12['mark2p']+$row12['mark2n']+$row12['mark2m']+$row12['mark3p']+$row12['mark3n']+$row12['mark3m']+$row12['mark4p']+$row12['mark4n']+$row12['mark4m']+$row12['mark5p']+$row12['mark5n']+$row12['mark5m']+$row12['mark6p']+$row12['mark6n']+$row12['mark6m']+$row12['mark7p']+$row12['mark7n']+$row12['mark7m']+$row12['mark8p']+$row12['mark8n']+$row12['mark8m'];
        $pr2=$r1+$r21;
        $per_2=$pr2/16;
//$per1=$marktotal12/6;
     }
$r2=$r1+$r21;
//echo $r2;
	$up="update registration set r1='$r1' , r2='$r2' where session='$session' and application='$ap'";
	mysqli_query($conn,$up);
	$per1=$r1/4;
	$per2=$r2/4;
	$t=1;
	$v=0;

		$sel22="select * from  registration where session ='$year' and subject='$class' and r1='$r1'   ";
		$res22=mysqli_query($conn,$sel22);
			$n=mysqli_num_rows($res22);
			if($n>1)
			{
while($row22=mysqli_fetch_array($res22,MYSQLI_BOTH))
		
	{
	    
	    $v++;
	    if($v==1)
	    {
	          $sp=$k+1;
	      
	        break;
	    }
	    else
	    {
	         $sp=$sp;
	        
	    }
	    
	}
			}
			else
			{
			    $sp++;
			    $k=$sp;
			}
 
      $v1=0;
			$sel221="select * from  registration where session ='$year' and subject='$class' and r2='$r2'   ";
		$res221=mysqli_query($conn,$sel221);
			$n1=mysqli_num_rows($res221);
			if($n1>1)
			{
while($row221=mysqli_fetch_array($res221,MYSQLI_BOTH))
		
	{
	    
	    $v1++;
	    if($v1==1)
	    {
	          $sp2=$k1+1;
	      
	        break;
	    }
	    else
	    {
	         $sp2=$sp2;
	        
	    }
	    
	}
			}
			else
			{
			    $sp2++;
			    $k1=$sp2;
			}
   
		?>
		 
		

		<tr class="text-center">
	<td><?php echo $s++ ;?></td><td><?php echo $row['application'];?></td><td><?php echo $row['name'];?></td><td><?php echo  $row['fname'];?></td><td><?php echo $row['subject'];?></td><td><?php echo $r2;?></td><td>
	<?php if($r2>0){
	    if($exam=='ANNUAL EXAM')
	    {
	 $up1="update registration set rank_2='$sp2',per_2='$per_2' where session='$session' and application='$ap'";
	mysqli_query($conn,$up1);
	
	
	 echo $sp2;}}?></td>
	
	</tr>
	<?php

	}

	?>
	  </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
	case 189898:
	
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th>Sr.</th><th>Sch.</th><th>Name</th><th>Father</th><th>Session</th><th>class</th><th>Obtain</th><th>Per</th>
            </tr>
        </thead>
<tfoot>
             <tr>
                <th>Sr.</th><th>Sch.</th><th>Name</th><th>Father</th><th>Session</th><th>class</th><th>Obtain</th><th>Per</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  $session=$_POST['year'];
  $sel="select * from  registration where session='$session' and status=''  order by per_2 desc";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['application'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['fname'];?></td><td><?php echo $row['session'];?></td><td><?php echo $row['subject'];?></td><td><?php echo $row['r2'];?></td><td><?php echo $row['per_2'];?></td>
	
	
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	
	
	
	
	
	<?php
	break;
		case 100500:
	$year1=$_POST['session'];
  $sel1="select * from  registration where session ='$year1' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: []
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">Sch No.</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class<span style="color:red"></span></th><th  style="text-align:center">Address</th><th  style="text-align:center">Action</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">Sch No.</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class<span style="color:red"></span></th><th  style="text-align:center">Address</th><th  style="text-align:center">Action</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  $year=$_POST['session'];
  $sel="select * from  registration where session ='$year1' order by id asc";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		$a=$row['village'];
		$id=$row['id'];
	$b=$row['postoffice'];
	$c=$row['dist'];
	$e=$row['mobile'];
	$d=$a." ".$c;
	
	//$up="update registration set application='$id' where id='$id' order by id asc";
				//	mysqli_query($conn,$up);
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['application'];?></td><td><img src="../code/img/<?php echo $row['picture'];?>" height="90px" width="90px;"></td><td><?php echo $row['2']."<br/>"." <b>Father-</b>".$row['fname']."<br/>"." <b>Mother-</b>".$row['mname']."<br/>". "<b>D.O.B-</b>".$row['dob']."<br/>"."<b>Adh-</b>".$row['adhar'];?></td><td><?php echo $row['subject']."<br/>"."<font color=red size=2pt>".'</font>';?></td><td><?php echo "<b>Vill-</b>".$a."<br/>"."<b>Post-</b>".$b."<br/>"."<b>Dist-</b>".$c."<br/>"."<b>Mob-</b>".$row['mobile'];?></td>
	
	
	<td><a href="javascript:;" onclick="editrow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-pencil"></span></a>
	
	
	</td>
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
	case 1005001:
	$eid=$_REQUEST['id'];
//echo"$eid";
	$sel="select * from  registration where id='$eid'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$application=$row['application'];
	$session=$row['session'];
	?>
<form class="form-horizontal" onsubmit="return updaterow(this)">
	    <div class="row">
	       	<div class="form-group">
		
	<label class="col-sm-4 control-label"> Scholar No. </label>
		<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $application;?>" name="sch"  readonly ></div>
	
	</div>
	
	<div class="form-group">
		
	<label class="col-sm-4 control-label"> Student Name </label>
		<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['name'];?>" name="name"  readonly ></div>
	
	</div>
	
	<div class="form-group">
		
	<label class="col-sm-4 control-label">Father Name</label>
		<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['fname'];?>" name="fname" readonly></div>
	
	</div>
	
	<div class="form-group">
	
	<label class="col-sm-4 control-label">Class </label>
		<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['subject'];?>" name="class" readonly ></div>
	<input type="hidden" class="form-control" value="<?php echo $eid;?>" name="id" readonly >
	</div>

	 <div class="form-group">
 
    <label  class="col-sm-4 control-label">Session <span style="color:red">*</span></label>
    <div class="col-sm-8">
	
	<select class="form-control"  name="session" >
				
				<option ><?php echo $row['session'];?></option>
	</select>
		<br/>
	</div>
		<div class="form-group">
	
	<label class="col-sm-4 control-label">Add Position</label>
		<div class="col-sm-8"><input type="text" class="form-control"  name="position" required></div>
	
	</div>

  </div>
    </div>
	</div>
	
	
	 <button class="btn btn-success" >Update</button>&emsp;&emsp;
	</form>
	
<?php 
	break;
	case 1005002:
	$name=$_POST['name'];
$student_id=$_POST['id'];
//$student_id=$_POST['student_id'];
$session=$_POST['session'];
$class=$_POST['class'];
$position=$_POST['position'];
$sch=$_POST['sch'];

//echo $newimgname;
$date=date("Y-m-d");
date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");
$datetime=$date." ".$time;
$location="img/";
$location1="img/";
$size=$size/1024;


			
//--------------------------------------------------------------------
			
		$ins1="insert into achievement(student_id,sch,position,date,session,class) values('$student_id','$sch','$position','$date','$session','$class')";
	if(mysqli_query($conn,$ins1))
	{
		echo"Submit";
	}
	else
	{
		echo"not Submit";
	}

				// for updation and image 
				//
			
//-------------------------------------------------------------
	break;
		case 1005003:
	$year1=$_POST['session'];
  $sel1="select * from  achievement where session ='$year1' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: []
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">Sch No.</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class<span style="color:red"></span></th><th  style="text-align:center">Position</th><th  style="text-align:center">Action</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">Sch No.</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class<span style="color:red"></span></th><th  style="text-align:center">Position</th><th  style="text-align:center">Action</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  $year=$_POST['session'];
  $sel="select * from  achievement where session ='$year1' order by id asc";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
	    $student_id=$row['student_id'];
	    $sel3="select * from  registration where id ='$student_id' order by id asc";
	$res3=mysqli_query($conn,$sel3);
	$row3=mysqli_fetch_array($res3,MYSQLI_BOTH);
		$a=$row['village'];
		$id=$row['id'];
	$b=$row['postoffice'];
	$c=$row['dist'];
	$e=$row['mobile'];
	$d=$a." ".$c;
	
	//$up="update registration set application='$id' where id='$id' order by id asc";
				//	mysqli_query($conn,$up);
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row3['application'];?></td><td><img src="../code/img/<?php echo $row3['picture'];?>" height="90px" width="90px;"></td><td><?php echo $row3['2']."<br/>"." <b>Father-</b>".$row3['fname']."<br/>"." <b>Mother-</b>".$row3['mname']."<br/>". "<b>D.O.B-</b>".$row3['dob']."<br/>"."<b>Adh-</b>".$row3['adhar'];?></td><td><?php echo $row3['subject']."<br/>"."<font color=red size=2pt>".'</font>';?></td><td><?php echo $row['position'];?></td>
	
	
	<td><a href="javascript:;" onclick="deleterow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-trash"></span></a>
	
	
	
	<br/><br/>&emsp;<a href="achievement_print.php?flag=<?php echo $row['id'];?>"><span class="fa fa-print"></span></a>
	</td>
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
		case 1005004:
	$id=$_POST['rowid'];

	$del="delete from achievement where id='$id'";
	if(mysqli_query($conn,$del))
	{
		echo"deleted Successfully";
	
		
	}
	else
	{
		echo"Not Deleted";
	}
	break;
		case 4289:
	?>
	
<script>

$("document").ready(function(){
		
		$("#cons").keyup(function(){
		  
			var dew1=$("#dew").val();
			var paid1=$("#paid12").val();
			var cons1=$("#cons").val();
			var ndew1=$("#ndew").val();
				var other1=$("#other1").val();
				var p=parseInt(paid1);
			var total1= parseInt(dew1)+parseInt(other1) -parseInt(cons1)- parseInt(paid1) ;
			
			$("#ndew12").val(total1);
			// alert(paid1);
		});
		
	
		
		
	});
	
	$("document").ready(function(){
		
		$("#ndew").focus(function(){
		   // alert('ok');
		var dew1=$("#dew").val();
			var paid1=$("#paid12").val();
			var cons1=$("#cons").val();
			var ndew1=$("#ndew").val();
				var other1=$("#other1").val();
				var p=parseInt(paid1);
			var total1= parseInt(dew1)+parseInt(other1) -parseInt(cons1)- parseInt(paid1) ;
			
			$("#ndew12").val(total1);
		});
		
	
		
		
	});
	

	$("document").ready(function(){
		
		$("#paid12").keyup(function(){
		var dew1=$("#dew").val();
			var paid1=$("#paid12").val();
			var cons1=$("#cons").val();
			var ndew1=$("#ndew").val();
				var other1=$("#other1").val();
				var p=parseInt(paid1);
			var total1= parseInt(dew1)+parseInt(other1) -parseInt(cons1)- parseInt(paid1) ;
			
			$("#ndew12").val(total1);
		});
	
		
		
	});
	
	$("document").ready(function(){
		
		$("#paid12").keyup(function(){
		var dew1=$("#dew").val();
			var paid1=$("#paid12").val();
			var cons1=$("#cons").val();
			var ndew1=$("#ndew").val();
				var other1=$("#other1").val();
				var p=parseInt(paid1);
			var total1= parseInt(dew1)+parseInt(other1) -parseInt(cons1)- parseInt(paid1) ;
			
			$("#ndew12").val(total1);
		});
	
		
		
	});
	
		$("document").ready(function(){
		
		$("#other1").keyup(function(){
		var dew1=$("#dew").val();
			var paid1=$("#paid12").val();
			var cons1=$("#cons").val();
			var ndew1=$("#ndew").val();
				var other1=$("#other1").val();
				var p=parseInt(paid1);
			var total1= parseInt(dew1)+parseInt(other1) -parseInt(cons1)- parseInt(paid1) ;
			
			$("#ndew12").val(total1);
		});
	
		
		
	});
	
	
	
	</script>
	<?php
	$id=$_REQUEST['application'];
	
	
	
	/////////
		$sel1="select * from  registration where id='$id' and status='' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$sch=$row1['application'];
	$session=$row1['session'];
	?>
	<div class="table-responsive">

       <center><h2 class="modal-title" style="color:green;background-color:yellow"> Notification Add (Sch- <?php echo $sch;?>) </h2> </center>
            
      
		<tbody>
		<form onsubmit="return feesupdate34(this)">
		<div class="form-group">
				<label class="col-sm-3 control-label">Sch.</label>
				<div class="col-sm-3"><input type="text" value="<?php echo $sch;?>" name="sch" id='search' readonly style="background-color:yellow;color:green"/></div>
				<input type="hidden" value="<?php echo $id;?>" name="id" id='search' readonly style="background-color:yellow;color:green"/>
					<input type="hidden" value="<?php echo $session;?>" name="session" id='search' readonly style="background-color:yellow;color:green"/>
				</div>
		<div class="form-group">
				<label class="col-sm-3 control-label">Name</label>
				<div class="col-sm-3"><input type="text" value="<?php echo $row1['name'];?>" name="name" readonly style="background-color:gray;color:pink" /></div>
				
				</div>
		<div class="form-group">
				<label class="col-sm-3 control-label">Response Add</label>
				<div class="col-sm-3"><textarea class='form-control' name='response' required /></textarea></div>
				
				</div>
				<br/>
		<div class="form-group">
				<label class="col-sm-3 control-label">Response Date</label>
				<div class="col-sm-3"><input type="date"   class='form-control'name="re_date"  required /></div>
				
				</div>
				<br/>
				
			
				
				
		<center><button class="btn btn-danger" id='btn' >Submit</button></center>
		
		</form>
		
	<button style="background-color:red "class="close btn-block btn btn-danger" data-dismiss="modal"> <span style="color:yellow;background-color:red">Close </span> </button>
	</div>
	<?php
	break;
	case 4389:

	$sch=$_POST['sch'];
	$id=$_POST['id'];
	$name=$_POST['name'];
		$response=$_POST['response'];
		$session=$_POST['session'];

	$re_date=$_POST['re_date'];
	
	$date=date("Y-m-d");
	$sel1="select * from  notification where sch='$sch' and status='' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	if($row1)
	{
	    echo "Status Allready Active Please Update ";
	}
	else
	{
		$ins="insert into notification(s_id,sch,name,response,re_date,date,date_up,session,status) values('$id','$sch','$name','$response','$re_date','$date','0000-00-00','$session','')";
	
	if($res=mysqli_query($conn,$ins))
	{
		echo " Submit";
	}
	else
	{
		echo "not update";
	}
	}
	break;
	case 717236:
	$id=$_REQUEST['id'];
	$selr="select * from  registration where id ='$id'";
$resr=mysqli_query($conn,$selr);
$rowr=mysqli_fetch_array($resr,MYSQLI_BOTH);
$sessionr=$rowr['session'];
//echo $sessionr;
$applicationr=$rowr['application'];


$date=date("d/m/Y");
date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");
$datetime=$date." ".$time;
?>
<html>
<head>
<style>
#name2
{
	font-weight:bold;
	font-size:12px;
}
#name3
{
    font-size:12px;
}
</style>

	
<script>

$(document).ready(function(){

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

</script>
<link href="css/student_print.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id='DivIdToPrint'  >
<table frame="border" width="100%" >
<tr>
<td><span><img src="../images/logo2.png" height="70px" width="70px"/></span></td><td align="center"><span id="name"  style="font-size:20px;font-weight:bold">GLORIOLE CONVENT SCHOOL  </span><br/> <br/><span id="name1" style="font-size:18px;font-weight:bold"></span></td><td style="font-size:14px"></td>
</tr>
</table>

<div class="table-responsive">
<table border="1px" width="100%" cellspacing="0px" >
<tr>
<td colspan='15' align="center"><span id="name4" style="font-size:18px;font-weight:bold">Notification Receipt</span></td>

</tr>
<tr align="center">

<td><span id="name2">Sr.</span></td>
<td><span id="name2">Sch</span></td>
<td><span id="name2" >Name</span></td>
<td><span id="name2" >Response</span></td>
<td><span id="name2">Response_date</span></td>



<td><span id="name2">Session</span></td>
<td><span id="name2">Add Date</span></td>

<td><span id="name2">Date-up</span></td>

<td><span id="name2">Action</span></td>


</tr>
<?php

$sum=0;
$sum1=0;

$remain1=0;

$s=1;
$sel2="select * from  notification where s_id='$id' ";
$res2=mysqli_query($conn,$sel2);
while($row2=mysqli_fetch_array($res2,MYSQLI_BOTH))
{
	
?>
<tr align="center">

<td><span id="name3"><?php echo $s++;?></span></td>
<td><span id="name3"><?php echo $row2['sch'];?></span></td>
<td><span id="name3"><?php echo $row2['name'];?></span></td>
<td><span id="name3"><?php echo $row2['response'];?></span></td>
<td><span id="name3"><?php echo $row2['re_date'];?></span></td>


<td><span id="name3"><?php echo $row2['session'];?></span></td>

<td><span id="name3"><?php echo $row2['date'];?></span></td>

<td><span id="name3"><?php echo $row2['date_up'];?></span></td>

<td>
	
<a href="javascript:;" onclick="deleterow13(<?php echo $row2['id'];?>)"><?php if($row2['status']=='') {?><span class="glyphicon glyphicon-remove"></span><?php } else{?><span class="glyphicon glyphicon-ok"></span><?php };?></a>
	
	</td>

</tr>


<?php
}
?>

</table>
</div>

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


<input type='button' id='btn' value='Print' onclick='printDiv();'>
	  <script>
	function printDiv() 
{
var divToPrint=document.getElementById('DivIdToPrint');
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
newWin.document.close();

}
	
	</script>
</body>
</html>









<?php


	
	
	
	
	break;
	case 2090:
	$id=$_POST['rowid'];
	$sel="select * from  notification where id='$id'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$date=date("Y-m-d");
	if($row['status']=='')
	{
		$del="update notification  set status='Done',date_up='$date' where id='$id'";
	if(mysqli_query($conn,$del))
	{
		echo"Update Successfully";
	//	unlink($location);
	
	}
	else
	{
		echo"Not Deleted";
	}
	}
	else
	{
		$del="update notification  set status='' ,date_up='$date' where id='$id'";
	if(mysqli_query($conn,$del))
	{
		echo"UPDATE Successfully";
	//	unlink($location);
	
	}
	else
	{
		echo"Not Deleted";
	}
	}
	
	break;
	case 209010:
$date=date('Y-m-d');
$sel26="select * from  notification where re_date='$date' and status=''";
$res26=mysqli_query($conn,$sel26);
$c=mysqli_num_rows($res26);
echo $c;
	break;
	case 7172369:
	
	
$date=date("d/m/Y");
date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");
$datetime=$date." ".$time;
$date12=date('Y-m-d');
?>
<html>
<head>
<style>
#name2
{
	font-weight:bold;
	font-size:12px;
}
#name3
{
    font-size:12px;
}
</style>

	
<script>

$(document).ready(function(){

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

</script>
<link href="css/student_print.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id='DivIdToPrint'  >


<div class="table-responsive">
<table border="1px" width="100%" cellspacing="0px" >
<tr>
<td colspan='15' align="center"><span id="name4" style="font-size:18px;font-weight:bold">Notification Receipt</span></td>

</tr>
<tr align="center">

<td><span id="name2">Sr.</span></td>
<td><span id="name2">Sch</span></td>
<td><span id="name2" >Name</span></td>
<td><span id="name2" >Class</span></td>
<td><span id="name2" >Response</span></td>
<td><span id="name2">Response_date</span></td>



<td><span id="name2">Session</span></td>
<td><span id="name2">Add Date</span></td>

<td><span id="name2">Date-up</span></td>

<td><span id="name2">Action</span></td>


</tr>
<?php

$sum=0;
$sum1=0;

$remain1=0;

$s=1;
$sel2="select * from  notification where re_date='$date12' and status=''  ";
$res2=mysqli_query($conn,$sel2);
while($row2=mysqli_fetch_array($res2,MYSQLI_BOTH))
{
	$id=$row2['s_id'];
	$sel21="select * from  registration where id='$id'  ";
$res21=mysqli_query($conn,$sel21);
$row21=mysqli_fetch_array($res21,MYSQLI_BOTH);
?>
<tr align="center">

<td><span id="name3"><?php echo $s++;?></span></td>
<td><span id="name3"><?php echo $row2['sch'];?></span></td>
<td><span id="name3"><?php echo $row2['name'];?></span></td>
<td><span id="name3"><?php echo $row21['subject'];?></span></td>
<td><span id="name3"><?php echo $row2['response'];?></span></td>
<td><span id="name3"><?php echo $row2['re_date'];?></span></td>


<td><span id="name3"><?php echo $row2['session'];?></span></td>

<td><span id="name3"><?php echo $row2['date'];?></span></td>

<td><span id="name3"><?php echo $row2['date_up'];?></span></td>

<td>
	
<a href="javascript:;" onclick="deleterow13(<?php echo $row2['id'];?>)"><?php if($row2['status']=='') {?><span class="glyphicon glyphicon-ok"></span><?php } else{?><span class="glyphicon glyphicon-remove"></span><?php };?></a>
	
	</td>

</tr>


<?php
}
?>

</table>
</div>

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


<input type='button' id='btn' value='Print' onclick='printDiv();'>
	  <script>
	function printDiv() 
{
var divToPrint=document.getElementById('DivIdToPrint');
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
newWin.document.close();

}
	
	</script>
</body>
</html>









<?php


	
	
	
	
	break;
	case 717236910:
	
	
$date=date("d/m/Y");
date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");
$datetime=$date." ".$time;
$date12=date('Y-m-d');
?>
<html>
<head>
<style>
#name2
{
	font-weight:bold;
	font-size:12px;
}
#name3
{
    font-size:12px;
}
</style>

	
<script>

$(document).ready(function(){

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

</script>
<link href="css/student_print.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id='DivIdToPrint'  >


<div class="table-responsive">
<table border="1px" width="100%" cellspacing="0px" >
<tr>
<td colspan='15' align="center"><span id="name4" style="font-size:18px;font-weight:bold">Notification Receipt</span></td>

</tr>
<tr align="center">

<td><span id="name2">Sr.</span></td>
<td><span id="name2">Sch</span></td>
<td><span id="name2" >Name</span></td>
<td><span id="name2" >Class</span></td>
<td><span id="name2" >Response</span></td>
<td><span id="name2">Response_date</span></td>



<td><span id="name2">Session</span></td>
<td><span id="name2">Add Date</span></td>

<td><span id="name2">Date-up</span></td>

<td><span id="name2">Action</span></td>


</tr>
<?php

$sum=0;
$sum1=0;

$remain1=0;

$s=1;
$sel2="select * from  notification where status='' order by re_date asc ";
$res2=mysqli_query($conn,$sel2);
while($row2=mysqli_fetch_array($res2,MYSQLI_BOTH))
{
	$id=$row2['s_id'];
	$sel21="select * from  registration where id='$id'  ";
$res21=mysqli_query($conn,$sel21);
$row21=mysqli_fetch_array($res21,MYSQLI_BOTH);
?>
<tr align="center">

<td><span id="name3"><?php echo $s++;?></span></td>
<td><span id="name3"><?php echo $row2['sch'];?></span></td>
<td><span id="name3"><?php echo $row2['name'];?></span></td>
<td><span id="name3"><?php echo $row21['subject'];?></span></td>
<td><span id="name3"><?php echo $row2['response'];?></span></td>
<td><span id="name3"><?php echo $row2['re_date'];?></span></td>


<td><span id="name3"><?php echo $row2['session'];?></span></td>

<td><span id="name3"><?php echo $row2['date'];?></span></td>

<td><span id="name3"><?php echo $row2['date_up'];?></span></td>

<td>
	
<a href="javascript:;" onclick="deleterow13(<?php echo $row2['id'];?>)"><?php if($row2['status']=='') {?><span class="glyphicon glyphicon-ok"></span><?php } else{?><span class="glyphicon glyphicon-remove"></span><?php };?></a>
	
	</td>

</tr>


<?php
}
?>

</table>
</div>

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


<input type='button' id='btn' value='Print' onclick='printDiv();'>
	  <script>
	function printDiv() 
{
var divToPrint=document.getElementById('DivIdToPrint');
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
newWin.document.close();

}
	
	</script>
</body>
</html>









<?php


	
	
	
	
	break;
		case 9696:
	     $date=date('Y-m-d');
		
			$sel1="select * from  fees_paid  where date='$date'  and status=''  order by id asc ";
		 
	            
	            $sum=0;
$res1=mysqli_query($conn,$sel1);
while($row1=mysqli_fetch_array($res1,MYSQLI_BOTH))
{
	$tot=$row1['total'];
	$search=$row1['search'];
	
	$paid=$row1['paid'];
	$remain12=$row1['remain'];
	$sum=$paid+$sum;
}
echo $row785['name'].'='.$sum;
	    
	    break;
	    
	    	case 3637:
	$session=$_POST['session'];
  $sel1="select * from  registration where session ='$session' and status='' order by application asc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	
<link href="jq/jquery.dataTables.min.css" type="text/css" rel="stylesheet"/>
<link href="jq/buttons.dataTables.min.css" type="text/css" rel="stylesheet"/>


<script src="jq/jquery.dataTables.min.js"></script>
<script src="jq/dataTables.buttons.min.js"></script>
<script src="jq/buttons.flash.min.js"></script>
<script src="jq/jszip.min.js"></script>
<script src="jq/pdfmake.min.js"></script>
<script src="jq/vfs_fonts.js"></script>
<script src="jq/buttons.html5.min.js"></script>
<script src="jq/buttons.print.min.js"></script>

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: []
    });
	
});
</script>


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr align="center">
               <th style="text-align:center">Sr.</th><th  style="text-align:center">Sch No .</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class</th><th  style="text-align:center">Session</th><th  style="text-align:center">Action</th>
            </tr>
        </thead>
<tfoot>
            <tr tr align="center">
                <th style="text-align:center">Sr.</th><th  style="text-align:center">Sch No .</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class</th><th  style="text-align:center">Session</th><th  style="text-align:center">Action</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
  $sel="select * from  registration where session ='$session' and status='' order by id asc";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		$a=$row['village'];
	$b=$row['postoffice'];
	$c=$row['dist'];
	$e=$row['mobile'];
	$d=$a." ".$c;
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['application'];?></td><td><img src="../code/img/<?php echo $row['picture'];?>" height="90px" width="90px;"></td><td><?php echo $row['name']."<br/>"." <b>Father-</b>".$row['fname']."<br/>"." <b>Mother-</b>".$row['mname']."<br/>". "<b>D.O.B-</b>".$row['dob']."<br/>"."<b>Adh-</b>".$row['adhar'];?></td><td><?php echo $row['subject'];?>/<?php echo $row['section'];?></td><td><?php echo $row['session']."<br/>".$row['datetime'];?></td>
	
	<td>
	
	
<a href="javascript:;" onclick="app1234(<?php echo $row['id'];?>)"><span> <button type="button" class="btn btn-info">Fees Details</button></span></a><BR/><br/>



	</td>
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
	case 7172:
	$id=$_REQUEST['id'];
	$selr="select * from  registration where id ='$id'";
$resr=mysqli_query($conn,$selr);
$rowr=mysqli_fetch_array($resr,MYSQLI_BOTH);
$sessionr=$rowr['session'];
//echo $sessionr;
$applicationr=$rowr['application'];

$sel1="select * from  fees_paid where sch ='$applicationr' and session='$sessionr' and status=''";
$res1=mysqli_query($conn,$sel1);
$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
//$search=$row1['search'];
$sel="select * from  registration where application ='$applicationr' and session='$sessionr' and status=''";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);


$selb="select * from  registration where application ='$applicationr' and session='sessionr' and status='' order by id desc";
$resb=mysqli_query($conn,$selb);
$rowb=mysqli_fetch_array($resb,MYSQLI_BOTH);

$date=date("d/m/Y");
date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");
$datetime=$date." ".$time;
?>
<html>
<head>
<style>
#name2
{
	font-weight:bold;
	font-size:12px;
}
#name3
{
    font-size:12px;
}
</style>

	
<script>

$(document).ready(function(){

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

</script>
<link href="css/student_print.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id='DivIdToPrint'  >
<table frame="border" width="100%" >
<tr>
<td><span><img src="../images/logo.png" height="70px" width="70px"/></span></td><td align="center"><span id="name"  style="font-size:11px;text-align:left;font-weight:bold;font-family:ravie">KIDS HARBOUR</span> International School<br/>Qazi tola, Walidpur- Mau<br/><span id="name1" style="font-size:18px;font-weight:bold"></span></td><td style="font-size:14px"><b>Contact-</b>9125002009<br/>9125828677 </td>
</tr>
</table>
<table border="1px;" width="100%" cellspacing="0">
<caption style="font-size:18px;font-weight:bold">Fees Statement <?php echo $row1['session'];?></caption>
<tr>
<td width="30%"><span id="name2">Scho. Number</span></td><td><span id="name3"><?php echo $row['application'];?></span></td><td><b>Class</b></td><td><?php echo $row['subject'];?></td><td width="10%"align="right" rowspan="3"><span><img src="../code/img/<?php echo $row['picture'];?>" style="width:100%;" class="img-responsive" ></span></td>
</tr>
<tr>
<td width="30%"><span id="name2">Student Name</span></td><td width="" colspan="3"><span id="name3"><?php echo $row['name'];?></span></td>
</tr>
<tr>
<td width="30%"><span id="name2"> Father Name</span></td><td colspan="3"><span id="name3"><?php echo $row['fname'];?></span></td>
</tr>


</table>
<div class="table-responsive">
<table border="1px" width="100%" cellspacing="0px" >
<tr>
<td colspan='15' align="center"><span id="name4" style="font-size:18px;font-weight:bold">Fees Receipt</span></td>

</tr>
<tr align="center">

<td><span id="name2">Sr.</span></td>
<td><span id="name2">Month</span></td>
<td><span id="name2" >Tution Fee</span></td>
<td><span id="name2" >Conv Fee</span></td>
<td><span id="name2" >Exam</span></td>

<td><span id="name2">Other</span></td>
<td><span id="name2">Other Remark</span></td>
<td><span id="name2">Con</span></td>
<td><span id="name2">Cons Remark</span></td>
<td><span id="name2">Pre Dues</span></td>

<td><span id="name2">Paid</span></td>

<td><span id="name2">Dues</span></td>

<td><span id="name2">Date</span></td>
<td><span id="name2">Print</span></td>

</tr>
<?php

$sum=0;
$sum1=0;

$remain1=0;


$sel2="select * from  fees_paid where sch='$applicationr' and session='$sessionr' and status=''";
$res2=mysqli_query($conn,$sel2);
while($row2=mysqli_fetch_array($res2,MYSQLI_BOTH))
{
	$tot=$row2['total'];
	$paid13=$row2['paid'];
	
	$remain12=$row2['remain'];
	$sum=$tot+$sum;
	$sum1=$paid13+$sum1;
	$remain1=$remain12+$remain1;
	$tags = explode(',',$row2['month']);
	$m='';
foreach($tags as $key) {    
     $key;    
	
	$sel4="select * from  plan where id ='$key'";
$res4=mysqli_query($conn,$sel4);
$row4=mysqli_fetch_array($res4,MYSQLI_BOTH);
$m1=$row4['month'];
$m=$m1.','.$m;
}
?>
<tr align="center">

<td><span id="name3"><?php echo $row2['id'];?></span></td>
<td><span id="name3"><?php echo $m;?></span></td>
<td><span id="name3"><?php echo $row2['fees'];?></span></td>
<td><span id="name3"><?php echo $row2['conv'];?></span></td>
<td><span id="name3"><?php echo $row2['exam'];?></span></td>
<td><span id="name3"><?php echo $row2['other'];?></span></td>
<td><span id="name3"><?php echo $row2['remark'];?></span></td>
<td><span id="name3"><?php echo $row2['cons'];?></span></td>
<td ><span id="name3"><?php echo $row2['cons_remark'];?></span></td>
<td><span id="name3"><?php echo $row2['pre_dues'];?></span></td>

<td><span id="name3"><?php echo $row2['paid'];?></span></td>

<td><span id="name3"><?php echo $row2['remain'];?></span></td>
<?php $daten=$row2['date'];
$date1=date("d-m-Y",strtotime($daten));  ?>
<td><span id="name3"><?php echo $date1;?></span></td>
<td><span id="name3"><a href="slip.php?flag=<?php echo $row2['id'];?>" target="_blank"><span class="fa fa-print"></span></a>
	&nbsp;<a href="javascript:;" onclick="deleterow13(<?php echo $row2['id'];?>)"><span class="glyphicon glyphicon-trash"></span></a>
</span></td>

</tr>


<?php
}
?>
<tr align="center">

<td colspan="10" style="font-weight:bold;font-size:19px">Sub Total</td><td style="font-weight:bold;font-size:18px"><span id="name3"colspan="2"><?php echo $sum1;?></span></td><td style="font-weight:bold;font-size:18px"><span id="name3"colspan="2">
    <?php
    $sel23="select * from  studentfees where search='$applicationr' and year='$sessionr' and status='' order by id desc";
$res23=mysqli_query($conn,$sel23);
$row23=mysqli_fetch_array($res23,MYSQLI_BOTH);
	$remain23=$row23['remain'];
    
    
    echo $remain12;?></span></td>

</tr>
</table>
</div>
<table width="100%" frame="border" cellspacing="0">
<tr align="center">
<td width="50%"  align="left"><span id="name3" style="font-size:15px;font-weight:bold">Datetime</span></td>
</tr>
<tr>
<td  width="70%" align="left"><span ><?php echo $datetime;?></span></td><td><br/><br/></td><td width="50%" align="right"><span id="name3" style="font-size:15px;font-weight:bold" align="rightt">Sign Of Received Staff</span></td>
</tr>
</table>
</div>
<br/>
<br/><br/>


<input type='button' id='btn' value='Print' onclick='printDiv();'>
	  <script>
	function printDiv() 
{
var divToPrint=document.getElementById('DivIdToPrint');
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
newWin.document.close();

}
	
	</script>
</body>
</html>









<?php


	
	
	
	
	
	break;
	
case 3939:
	$id=$_POST['rowid'];

	$del="update  fees_paid set status='' where id='$id'";
	if(mysqli_query($conn,$del))
	{
		echo"Restore Successfully";
		
	}
	else
	{
		echo"Not Restore";
	}

	break;
	    

	
	
}

	
?>

MMCT - 2023