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/ppschool.org.in/public_html/gsmps/code/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u490972518/domains/ppschool.org.in/public_html/gsmps/code/student_detailscode.php
<?php 
include("../link/databaseconnection.php");
$flag=$_REQUEST['flag'];
//$email=$_REQUEST['email'];
session_start();
			$email=$_SESSION['admin'];
			$sel785="select * from admin_login where  email='$email'  and status=''";
$res785=mysqli_query($conn,$sel785);
$row785=mysqli_fetch_array($res785,MYSQLI_BOTH);

$user_login=$row785['area'];
if(!$flag)
			{
				header("location:http://gsmps.ayweb.in");
			}
			if(!$email)
			{
				header("location:http://gsmps.ayweb.in");
			}
	
switch($flag)
{
	case 1:
	$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>
	
	&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>
	</td>
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
	case 1111:
	$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">/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">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>
        </tfoot>
<tbody>		
  <?php
  $year=$_POST['session'];
  $sel="select * from  registration where session ='$year1' 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'];
	$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['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>".$row['trans'].'</font>';?></td><td style=''><?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="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 51512:
	$session=$_POST['session'];
//	$board=$_POST['board'];
	$class=$_POST['class'];
  $sel1="select * from  registration where session ='$session'  and subject='$class' and status='' order by name asc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

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

 
     <style>
					
.work
{
	min-height:200px;
}
.gap
{
	height:100px;
}
				


	
   td{font-size:20px;
		}
		#classset{text-align:right}
   
					</style>
<?php 
		 $sel="select * from  registration where session ='$session'  and subject='$class' and status='' order by name asc";
	$res=mysqli_query($conn,$sel);
	$p=0;
	$s=1;
		while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
			
		{	
		
		?>
				
					<div  style="border-style:solid"> 
					<table >
					<tr><td colspan="4">.</td></tr>
					<th  colspan="6" style="text-align:center">* DESK SLIP *</th>
					</tr>
					<tr>
					<td style="font-weight:bold">Roll No.:-&nbsp;<?php echo $s;?></td><td><?php  $row['id'];?></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><td style='width:50px'></td><td rowspan="3"><img src="../code/img/<?php echo $row['picture'];?>" height="90px" width="90px;" style='border:1px solid'></td>
					</tr>
					<tr>
					<td style="font-weight:bold">Student's Name:-&nbsp;</td><td  colspan="3"><?php echo $row['name'];?></td><td></td>
					</tr>
					<tr>
					<td style="font-weight:bold">Father's Name:-&nbsp;</td><td colspan="3" ><?php echo $row['fname'];?></td><td></td>
					</tr>
					<tr><td colspan="4">.</td></tr>
					</table>
						
					</div>
				</div>
				
				<?php
				$s++;
				$p++;
				if($p==6 )
			{
			    ?><p style="page-break-after: always;">&nbsp;</p> <?php 
			    $p=0;
			}
			
		}
	
			?>
				
	
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	?>
	 
	
	<?php
	break;
	case 51:
	$year1='2018-2019';
  $sel1="select * from  registration where session ='$year1' order by id asc";
	$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</th><th  style="text-align:center">Address</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</th><th  style="text-align:center">Address</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  $year='2018-2019';
  $sel="select * from  registration where session ='$year' order by application 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['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'];?></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>
	
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	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="delete from registration where id='$id'";
	if(mysqli_query($conn,$del))
	{
		echo"deleted Successfully";
		unlink($location);
		
	}
	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">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" 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']=='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>
  
	  <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" data-validation="mime size required" 
		 data-validation-allowing="jpg, png, gif" 
		 data-validation-max-size="80kb" data-validation-error-msg-required="No image selected">
    </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']=='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']=='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 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']=='UP BOARD'){echo'selected';}?>>UP BOARD</option>
	<option <?php if($row['mediam']=='CBSE BOARD'){echo'selected';}?>>CBSE BOARD</option>
	
	
	</select>
	</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">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">
	
	<select class="form-control"  name="session" >
	    	<?php 
	  $selc="select * from session order by id desc";
	$resc=mysqli_query($conn,$selc);
	  while($rowc=mysqli_fetch_array($resc,MYSQLI_BOTH))
	  {
	  ?>
	  <option <?php if($rowc['session']==$row['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" required />
	<input type="hidden" class="form-control" value="<?php echo $eid;?>"  name="id1234" required />
	
	</div>
	</div>
	 <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">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>
	
	</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'];
//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' where id='$id' ";
	if(mysqli_query($conn,$up))
	{
	echo"ok";
	$up1="update registration set adhar='$adhar' where application='$app'";
	mysqli_query($conn,$up1);
	}
	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' where id='$id'  ";
	if(mysqli_query($conn,$up1))
	{
		//unlink($location1);
		move_uploaded_file($tempname,$location.$newimgname);
		echo"ok";
		$up1="update registration set adhar='$adhar' where application='$app'";
	mysqli_query($conn,$up1);
	}
	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"/>
				<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'];
//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=GCS&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"<script>alert('sms not 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=GCS&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');
		}
    });
		
});
</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(){
		$("#btn").prop("disabled",true);
		$("#con").keyup(function(){
			
		
				var total12=$("#total").val();
				
		var paidd=$("#paid").val();
			var con12=$("#con").val();
			
			var total121= parseInt(total12) - parseInt(con12) ;
			
			
			
			$("#paid").val(total121);
			
		});
		
		
	});
	// fo sep exam fee
	$("document").ready(function(){
		
		$("#sep").change(function(){
			
		
			//	alert("ok");
				
				if($("#sep").prop("checked")==true)
				{
				    
				var sess=$("#session1").val();
					if(sess=='2018-2019')
					{
					var febc=parseInt(200);
					}
					if(sess=='2019-2020')
					{
					var febc=parseInt(300);
					}
					
					
					var d=$("#exam").val(febc);
					var sep1=$("#exam").val();
					var feb1=$("#exam").val();
				}
				else
				{
					var d=$("#exam").val('0');
					
				}
		});
		
		
		
	});
	//for feb exam fee
		// fo sep exam fee
	$("document").ready(function(){
		
		$("#feb").change(function(){
			
		
			//	alert("ok");
				
				if($("#feb").prop("checked")==true)
				{
				    
					var de=$("#exam").val();
					var sess=$("#session1").val();
					if(sess=='2018-2019')
					{
					var febc=parseInt(de)+200;
					}
					if(sess=='2019-2020')
					{
					var febc=parseInt(de)+300;
					}
					var feb2=$("#exam").val(febc);
					
				}
				else
				{
					var d=$("#exam").val('0');
					
				}
		});
		
		
	});
	//for feb exam fee
	////for jul
	$("document").ready(function(){
		
		$("#jul").change(function(){
			
		
				//alert("ok");
				
				if($("#jul").prop("checked")==true)
				{
				    
					var class1=$("#class").val();
					var sess=$("#session1").val();
					if(sess=='2018-2019')
					{
						
					var jul1=parseInt(0);
					}
					if(sess=='2019-2020')
					{
						if(class1=='NINTH CBSE')
						{
					var jul1=parseInt(1500);
						}
						else
						{
							var jul1=parseInt(0);
						}
					}
					var feb213=$("#reg12").val(jul1);
					//alert("ok");
				}
				else
				{
					var d8=$("#reg12").val('0');
					
				}
		});
		
		
	});
	////for jul
	
	$("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(){
	    	$("#btn").prop("disabled",true);
		
		$("#con").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(){
		
		$("#con").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);
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	
		$("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=$("#fee").val();
		var conv123=$("#conv").val();
		var comp123=$("#comp").val();
		$(".option").change(function(){
			
			 var m=$(":checkbox").filter(':checked').length;
			 var lem=0;
			 
			 for(i=0;i< m;i++)
			 {
				 lem++;
				 //alert(lem);
			 }
			 if(lem>0)
				{
					//alert();
					$("#btn").prop("disabled",false);
				}
				else
				{
					$("#btn").prop("disabled",true);
				}
	 //for jun conv
	 	$("document").ready(function(){
		
		$("#oct").change(function(){
		//	alert("ok");
		
			
		
			
				if($("#oct").prop("checked")==true)
				{
			var fees1=$("#fee").val();
		var conv1=$("#conv").val();
			
			    $("#exam").val(200);
			
	
			var add1=$("#add").val();
			var dew1=$("#dew").val();
			var gen1=$("#gen").val();
			var paid1=$("#paid").val();
			//var conv1=$("#conv").val();
			var convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg12=$("#reg").val();
			var reg1=$("#reg1").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(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) - parseInt(convcons1);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
				}
		});
		
		
	});
	
	
	$("document").ready(function(){
		
		$("#jun1").change(function(){
			
		
			
				if($("#jun1").prop("checked")==true)
				{	//alert("ok");
				    var con12=$("#convcons1").val();
				    var con13=$('#convcons').val(con12);
					 var con14=$("#convcons").val();
				    var fees1=$("#fee").val();
				//	alert(con14);
		var conv1=$("#conv").val();
	//alert(conv1);
			var add1=$("#add").val();
			//alert(add1);
			var dew1=$("#dew").val();
			var gen1=$("#gen").val();
		//	alert(gen1);
			var paid1=$("#paid").val();
			//var conv1=$("#conv").val();
			var convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg1=$("#reg").val();
		//	alert(reg1);
			var reg12=$("#reg1").val();
			//alert(reg12);
			var comp1=$("#comp").val();
			//alert(comp1);
			var ann1=$("#ann").val();
			//alert(ann1);
			var other1=$("#other").val();
			//alert(other1);
			var exam1=$("#exam").val();
			//alert(exam1);
			var totalm= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg1) - parseInt(con14);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg1)+ parseInt(dew1) - parseInt(con14);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
				}
				else{
				    
				     $('#convcons').val('0');
					
					 var con14=$("#convcons").val();
				    var fees1=$("#fee").val();
				//	alert(con13);
		var conv1=$("#conv").val();
	//alert(conv1);
			var add1=$("#add").val();
			//alert(add1);
			var dew1=$("#dew").val();
			var gen1=$("#gen").val();
		//	alert(gen1);
			var paid1=$("#paid").val();
			//var conv1=$("#conv").val();
			var convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg1=$("#reg").val();
		//	alert(reg1);
			var reg12=$("#reg1").val();
		//	alert(reg12);
			var comp1=$("#comp").val();
			//alert(comp1);
			var ann1=$("#ann").val();
			//alert(ann1);
			var other1=$("#other").val();
			//alert(other1);
			var exam1=$("#exam").val();
			//alert(exam1);
			var totalm= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1) - parseInt(con14);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1) - parseInt(con14);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
				}
				
			
		});
		
		
	});
	//for jun conv
			 ////for consession reason
var con1=$("#con1").val();
var con1267=lem*con1;		
			////for consession reason 
		var fees1=$("#fee").val();
		//var comp1=$("#feess").val();
		
		var fees12=lem*fees123;
		var comp1=lem*comp123;
	//	alert(comp1);
		var conv12=lem*conv123;
			var add1=$("#add").val();
			var dew1=$("#dew").val();
			var gen1=$("#gen").val();
			var paid1=$("#paid").val();
			//var conv1=$("#conv").val();
			var convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg1=$("#reg").val();
		//	alert(reg1);
			var reg12=$("#reg12").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(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) + parseInt(reg1) - parseInt(convcons1);
			var totalg= parseInt(fees12) + parseInt(add1) + parseInt(gen1) + parseInt(conv12)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1) + parseInt(reg1) + parseInt(reg12) - parseInt(convcons1);
		
			
			if($(this).prop("checked")==true)
		{
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			$("#fee").val(fees12);
			$("#comp").val(comp1);
			$("#conv").val(conv12);
			$("#con").val(con1267);
		}
		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);
			$("#comp").val(comp1);
			$("#con").val(con1267);
		}
		});
		
		
	});
	
	///for other
	$("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 convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
		var reg12=$("#reg").val();
			var reg1=$("#reg12").val();
			var comp1=$("#comp").val();
			var ann1=$("#ann").val();
			var other1=$("#other").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(reg1)+ parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) - parseInt(convcons1);
			var totalg= parseInt(reg1)+parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	
		$("document").ready(function(){
		
			$("#mar").change(function(){
		//	alert("ok");
		if($("#mar").prop("checked")==true)
		{
		      $("#exam").val(300);
		}
		else
		{
		      $("#exam").val(0);
		}
			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 convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
		var reg12=$("#reg").val();
			var reg1=$("#reg12").val();
			var comp1=$("#comp").val();
			var ann1=$("#ann").val();
			var other1=$("#other").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(reg1)+ parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) - parseInt(convcons1);
			var totalg= parseInt(reg1)+parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
		$("document").ready(function(){
		
			$("#reg12").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 convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
		var reg12=$("#reg").val();
			var reg1=$("#reg12").val();
			var comp1=$("#comp").val();
			var ann1=$("#ann").val();
			var other1=$("#other").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(reg1)+ parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) - parseInt(convcons1);
			var totalg= parseInt(reg1)+parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	
		$("document").ready(function(){
		
			$("#gen").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 convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
		var reg12=$("#reg").val();
			var reg1=$("#reg12").val();
			var comp1=$("#comp").val();
			var ann1=$("#ann").val();
			var other1=$("#other").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(reg1)+ parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) - parseInt(convcons1);
			var totalg= parseInt(reg1)+parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
		$("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 convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
		var reg12=$("#reg").val();
			var reg1=$("#reg12").val();
			var comp1=$("#comp").val();
			var ann1=$("#ann").val();
			var other1=$("#other").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(reg1)+ parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) - parseInt(convcons1);
			var totalg= parseInt(reg1)+parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	$("document").ready(function(){
		
		$("#convence").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 convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg1=$("#reg").val();
			var reg12=$("#reg").val();
			var reg1=$("#reg12").val();
			var comp1=$("#comp").val();
			var ann1=$("#ann").val();
			var other1=$("#other").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(reg1)+ parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) - parseInt(convcons1);
			var totalg= parseInt(reg1)+parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	

	$("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 convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
		var reg12=$("#reg").val();
			var reg1=$("#reg12").val();
			var comp1=$("#comp").val();
			var ann1=$("#ann").val();
			var other1=$("#other").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(reg1)+ parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) - parseInt(convcons1);
			var totalg= parseInt(reg1)+parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	
	/////payble
	$("document").ready(function(){
		
		$(".option").change(function(){
		//	alert("ok");
		
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	
	
	$("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 convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg12=$("#reg").val();
			var reg1=$("#reg12").val();
			var comp1=$("#comp").val();
			var ann1=$("#ann").val();
			var other1=$("#other").val();
			var exam1=$("#exam").val();
			var totalm= parseInt(reg1)+ parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) - parseInt(convcons1);
			var totalg= parseInt(reg1)+parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	//for other
	
	// for check box coding/////
	</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//
		$selt14="select * from  session where session='$session'   order by id desc limit 1,1";
	$rest14=mysqli_query($conn,$selt14);
	$rowt14=mysqli_fetch_array($rest14,MYSQLI_BOTH);
	$s=$rowt14['session'];
	$selt="select * from  registration where session='2024-2025' and application='$application'  order by id desc";
	$rest=mysqli_query($conn,$selt);
	$rowt=mysqli_fetch_array($rest,MYSQLI_BOTH);
	$trans=$rowt['trans'];
		$selt1="select * from  registration where session='$session' and application='$application'  order by id desc";
	$rest1=mysqli_query($conn,$selt1);
	$rowt1=mysqli_fetch_array($rest1,MYSQLI_BOTH);
	$tra=$rowt1['tra'];
	////////for set transfer////
	//////for consession 
	$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
	
		$sel1="select * from fees where class='$class' and session='$session' ";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$class1=$row1['class'];
	$fees=$row1['fees'];
	$reg=$row1['reg'];
		$reg1=$row1['reg'];
	$add=$row1['addm'];
	$ann=$row1['ann'];
	$comp13=$row1['comp'];
	$gen12=$row1['gen'];
	////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
	$sel2="select * from convence where code='$code' and session='$session'";
	$res2=mysqli_query($conn,$sel2);
	$row2=mysqli_fetch_array($res2,MYSQLI_BOTH);
	$vill=$row2['vill'];
	$conv=$row2['conv'];
	/////for free conv
	
	$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;
	///// for fix free
	///////////////studentfees
	$sel3="select * from studentfees where search='$application' and year='$session' and status='' and month like '%April%'";
	$res3=mysqli_query($conn,$sel3);
	$row3=mysqli_fetch_array($res3,MYSQLI_BOTH);
	$regs=$row3['reg'];
		$regs1=$row3['reg1'];
	$adms=$row3['addm'];
	$comp14=$row3['comp'];
	$anns=$row3['ann'];
		$gen12=$row3['gen'];
		
	///////////////studentfees1
	$sel41="select * from studentfees where search='$application' and year='$session' and status='' ";
	$res41=mysqli_query($conn,$sel41);
	$row41=mysqli_fetch_array($res41,MYSQLI_BOTH);
	
	$sel4="select * from studentfees where search='$application' and year='$session' and status='' order by id desc";
	$res4=mysqli_query($conn,$sel4);
	$row4=mysqli_fetch_array($res4,MYSQLI_BOTH);
	$remain=$row4['remain'];
	$search=$row4['search'];
	$gen12=$row4['gen'];
		$regc=$row4['reg'];
	$hob=explode(",",$row4['month']);
		//echo $hob;
		$sel42="select * from studentfees where search='$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 studentfees where search='$application' and year='$session' and con!='0' and status='' and    order by id desc";
	$resc=mysqli_query($conn,$selc);
	while($rowc=mysqli_fetch_array($resc,MYSQLI_BOTH))
	{
		$dates=$rowc['date'];
		$concs=$rowc['con'];
		$conc=$concs.",";
			$datec=$dates.",";
			echo "<font color=red size=2pt> Cons-".$conc."</font>";
		
	}
	
	
	  //echo $conc;
	  	  $selca="select * from  studentfees where  month like '%April%' and year='$session' and search='$application' and status='' order by id asc ";
	$resca=mysqli_query($conn,$selca);
	if($rowca=mysqli_fetch_array($resca,MYSQLI_BOTH))
	{
		//echo "SHOW1";
	}
	//////may
	$selcm="select * from  studentfees where  month like '%May%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescm=mysqli_query($conn,$selcm);
	if($rowcm=mysqli_fetch_array($rescm,MYSQLI_BOTH))
	{
		//echo "SHOW2";
	}
	//////Jun
	$selcj="select * from  studentfees where  month like '%Jun%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescj=mysqli_query($conn,$selcj);
	if($rowcj=mysqli_fetch_array($rescj,MYSQLI_BOTH))
	{
		//echo "SHOW3";
	}
	//////july
	$selcmj="select * from  studentfees where  month like '%July%' and year='$session' and search='$application' and status=''  order by id asc ";
	$rescmj=mysqli_query($conn,$selcmj);
	if($rowcmj=mysqli_fetch_array($rescmj,MYSQLI_BOTH))
	{
		//echo "SHOW4";
	}
	//////August
	$selcmja="select * from  studentfees where  month like '%August%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescmja=mysqli_query($conn,$selcmja);
	if($rowcmja=mysqli_fetch_array($rescmja,MYSQLI_BOTH))
	{
		//echo "SHOW5";
	}
	//////sep
	$selcms="select * from  studentfees where  month like '%September%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescms=mysqli_query($conn,$selcms);
	if($rowcms=mysqli_fetch_array($rescms,MYSQLI_BOTH))
	{
		//echo "SHOW6";
	}
	//////oct
	$selcmjo="select * from  studentfees where  month like '%October%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescmjo=mysqli_query($conn,$selcmjo);
	if($rowcmjo=mysqli_fetch_array($rescmjo,MYSQLI_BOTH))
	{
		//echo "SHOW7";
	}
	//////Nov
	$selcmjn="select * from  studentfees where  month like '%November%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescmjn=mysqli_query($conn,$selcmjn);
	if($rowcmjn=mysqli_fetch_array($rescmjn,MYSQLI_BOTH))
	{
		//echo "SHOW7";
	}
	//////Dec
	$selcmjd="select * from  studentfees where  month like '%December%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescmjd=mysqli_query($conn,$selcmjd);
	if($rowcmjd=mysqli_fetch_array($rescmjd,MYSQLI_BOTH))
	{
		//echo "SHOW7";
	}
	//////Jan
	$selcmjdj="select * from  studentfees where  month like '%January%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescmjdj=mysqli_query($conn,$selcmjdj);
	if($rowcmjdj=mysqli_fetch_array($rescmjdj,MYSQLI_BOTH))
	{
		//echo "SHOW7";
	}
	//////Jan
	$selcmf="select * from  studentfees where  month like '%February%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescmf=mysqli_query($conn,$selcmf);
	if($rowcmf=mysqli_fetch_array($rescmf,MYSQLI_BOTH))
	{
		//echo "SHOW7";
	}
	//////mar
	$selcmm="select * from  studentfees where  month like '%March%' and year='$session' and search='$application' and status='' order by id asc ";
	$rescmm=mysqli_query($conn,$selcmm);
	if($rowcmm=mysqli_fetch_array($rescmm,MYSQLI_BOTH))
	{
		//echo "SHOW7";
	}
	  
	  ?>
		
	
				<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">
			
			<?php
			$mon='';
	  $selm="select * from studentfees where search='$application' and year='$session' and status='' 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 feesdata(this)" >
				
				 
			<center>	<input type="checkbox" name="choice[]" class="option" value="April"
				<?php if($rowca){echo 'disabled';}?>>Apr&emsp;
				<input type="checkbox" name="choice[]" class="option" value="May"
				<?php if($rowcm){echo 'disabled';}?>>May&emsp;
				<input type="checkbox" name="choice[]"   class="option" value="Jun"
		    	<?php if($rowcj){echo 'disabled';}?>>Jun&emsp;
				<input type="checkbox" name="choice[]"  class="option" value="July"
				<?php if($rowcmj){echo 'disabled';}?>>Jul&emsp;
				<input type="checkbox" name="choice[]" class="option" value="August"
				<?php if($rowcmja){echo 'disabled';}?>>Aug&emsp;
				<input type="checkbox" name="choice[]"  class="option" value="September"
			    <?php if($rowcms){echo 'disabled';}?>>Sep&emsp;
				<input type="checkbox" name="choice[]" class="option" id='oct' value="October"
		    	<?php if($rowcmjo){echo 'disabled';}?>>Oct&emsp;
				<input type="checkbox" name="choice[]" class="option" value="November"
				<?php if($rowcmjn){echo 'disabled';}?>>Nov&emsp;
				<input type="checkbox" name="choice[]" class="option" value="December"
				<?php if($rowcmjd){echo 'disabled';}?>>Dec&emsp;
				<input type="checkbox" name="choice[]" class="option" value="January" 
				  <?php if($rowcmjdj){echo 'disabled';}?> >Jan &emsp;
				<input type="checkbox" name="choice[]" class="option"  value="February"
				<?php if($rowcmf){echo 'disabled';}?>>Feb&emsp;
				<input type="checkbox" name="choice[]" class="option" id='mar'value="March"
				<?php if($rowcmm){echo 'disabled';}?>>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 $application;?>" style="background-color:green;color:yellow"readonly >
    </div>
  </div>
				<div class="form-group">
				<input type="hidden" value="<?php echo $row['application'];?>" name="app" 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 $session;?>" name="" id="session1"/>
					<input type="hidden" value="<?php echo $email;?>" name="email" id="session1"/>
				<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> 
			 <?php
			 $sel1="select * from fees where class='$class' and session='$session' ";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$class1=$row1['class'];
	$fees=$row1['fees'];
	$reg=$row1['reg'];
		$reg1=$row1['reg'];
	$add=$row1['addm'];
	$ann=$row1['ann'];
	$comp13=$row1['comp'];
	$gen12=$row1['gen'];
			 
			 ?>
  <input type="hidden" class="form-control" value="<?php echo $row['session'];?>" name="year"  />
  
  <div class="form-group">
    <label  class="col-sm-4 control-label">Miscellaneous</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="add"  value="<?php if($row3['addm']==''){echo $row1['addm'] ;} else{echo 0;}?>" name="add" readonly 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 
      
      if($rowt)
      {
          if($row3['ann']==''){echo $row1['diary'] ;} else{echo 0;}
      }
      else
      {
          if($row3['ann']==''){echo $row1['ann'] ;} else{echo 0;}
      }
      
      ?>" name="ann" readonly required >
    </div>
  </div>
  <div class="form-group" >
    <label  class="col-sm-4 control-label">Registration</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="reg12"  value="<?php  if($row3['reg1']==''){echo $row1['reg'] ;} else{echo 0;}?>" name="reg1" readonly 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='0' 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 $comp13;;?>"readonly required>
    </div>
  </div>
   <div class="form-group">
    <label  class="col-sm-4 control-label">Tie_Belt</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="gen" value="<?php 
      
      if(!$row41)
      {
          echo $row1['tie'] ;
      }
      else
      {
          echo 0;
      }
      
      ?>" name="gen" required >
    </div>
  </div>
  
  <div class="form-group" style='display: none;'>
    <label  class="col-sm-4 control-label">Maint/Med</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="reg" value="0" name="reg" readonly 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='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="other_remark" >
    </div>
  </div>
  
  
			
  
  
  

  
			 </div>
			  <!----dusari row-->
				<div class="col-sm-6">
				    <br/>
				    	
				 
				    
			
  
   
  <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 $fees;?>" name="fees"  readonly required>
      <input type="hidden" class="form-control" id="feess" value="<?php echo $fees;?>" >
    </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 if($code!='0' or $code!=''){echo $code;}else{echo '0';}?>" name="conv" readonly required>
      <input type="hidden" class="form-control" id="conv123" value="<?php echo $code;?>" >
    </div>
  </div>
  <div class="form-group" style='display: none;'>
    <label  class="col-sm-4 control-label">Conv Cons</label>
    <div class="col-sm-8">
      
      <input type="number" class="form-control" id="convcons" value='0' readonly>
      <input type="hidden" class="form-control" id="convcons1" value="<?php if($conv!=''){echo $conv;}else{echo '0';}?>"">
    </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" value="<?php 
	  
	  if($search!='' or $search!=NULL)
	  {
	  if($remain42!='')
	  { echo $remain42;} 
  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">MonthTotal</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="mtotal"  name="mtotal"  style="background-color:#3F729B;color:yellow" title="Please select Month" readonly 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="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="con" required>
      <textarea id="remark" rows="4" cols="32" style="resize:none" name="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"   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="due" 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 10:
	
	 
	$ch=implode(',',$_POST['choice']);
//	echo $ch;
///
////
	$name=$_POST['name'];
		$remark=$_POST['remark'];
			$other_remark=$_POST['other_remark'];
	$exam=$_POST['exam'];
	$other=$_POST['other'];
	$ann=$_POST['ann'];
	$paid=$_POST['paid'];
	$add=$_POST['add'];
	$reg=$_POST['reg'];
	$reg1=$_POST['reg1'];
	$comp=$_POST['comp'];
		$pre=$_POST['pre'];
	$gen=$_POST['gen'];
	$van=$_POST['conv'];
	$con=$_POST['con'];
	$search=$_POST['app'];
	$board=$_POST['board'];
	$mode=$_POST['mode'];
	$pr=$_POST['pr'];
	$remain=$_POST['due'];
		$mtotal=$_POST['mtotal'];
	$class=$_POST['class'];
	$month=$_POST['month'];
	$fee=$_POST['fees'];
		$email=$_POST['email'];
		$mobile1=$_POST['mobile1'];
	//	$date_add=$_POST['date_add'];
		$date_add=date('Y-m-d');
//$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'];
	///
	$tags = explode(',' , $ch);
$a=array();


foreach($tags as $i) {
	if($i=='April')
	{
		array_push($a,'1');
	}
	if($i=='May')
	{
		array_push($a,'2');
	}
	if($i=='Jun')
	{
		array_push($a,'3');
	}
	if($i=='July')
	{
		array_push($a,'4');
	}
	if($i=='August')
	{
		array_push($a,'5');
	}
	if($i=='September')
	{
		array_push($a,'6');
	}
	if($i=='October')
	{
		array_push($a,'7');
	}
	if($i=='November')
	{
		array_push($a,'8');
	}
	if($i=='December')
	{
		array_push($a,'9');
	}
	if($i=='January')
	{
		array_push($a,'10');
	}
	if($i=='February')
	{
		array_push($a,'11');
	}
	if($i=='March')
	{
		array_push($a,'12');
	}

}
 $count_month=max($a);

//echo '<br/>';
 $count_sel=count($a);

//echo '<br/>';
$s=0;
	$sel2="select * from  studentfees where search='$search' and year='$year' and status='' and month!='Dues'";
$res2=mysqli_query($conn,$sel2);
while($row2=mysqli_fetch_array($res2,MYSQLI_BOTH))
{
	
	$string=$row2['month'];
$tags = explode(',' , $string);


foreach($tags as $i =>$key) {
$i >0;
$s++;
  

}
}
$total_paid=$s+$count_sel;
	$total_paid=$s+$count_sel;
	///
	
	$sel15="select * from  studentfees where  status='Not' and search='$search' order by id desc";
	$res15=mysqli_query($conn,$sel15);
	$row15=mysqli_fetch_array($res15,MYSQLI_BOTH);
	
	if($row15)
	{
	    echo "Please Approved Fees From Admin Login";
	}
	else
	{
	
		if($user_login=='Cashier')
	{
if($con<=500)
{
    
	if($count_month==$total_paid)
	{
	//	echo 'Yes';
	
	$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'];
	
$ins="INSERT INTO `studentfees` (`name`, `class`, `month`, `fee`, `date`, `year`, `search`, `van`, `total`, `exam`, `other`, `board`, `remain`, `ann`, `addm`, `reg`, `comp`, `gen`, `paid`, `con`, `mtotal`, `fine`, `dpaid`, `pre`, `remark`, `reg1`, `pay_method`, `remark1`, `status`, `c_date`, `other_remark`, `mode`, `pr`, `email`) VALUES ('$name', '$class', '$ch', '$fee', '$date_add', '$year', '$search', '$van', '$total', '$exam', '$other', '$board', '$remain', '$ann', '$add', '$reg', '$comp', '$gen', '$paid', '$con', '$motal', '0', '0', '$pre', '$remark', '$reg1', NULL, NULL, '', '$date1', '$other_remark', '$mode','$pr','$email')";

	if(mysqli_query($conn,$ins))
	{
	   
		
			echo"Fees Submit";
		
	}
	else
	{
		echo"Fees Not Submit";
	}
	
	}
	else
	{
		echo 'Please Select Month in Sequence';
	}
}
else
{
        $ins="INSERT INTO `studentfees` (`name`, `class`, `month`, `fee`, `date`, `year`, `search`, `van`, `total`, `exam`, `other`, `board`, `remain`, `ann`, `addm`, `reg`, `comp`, `gen`, `paid`, `con`, `mtotal`, `fine`, `dpaid`, `pre`, `remark`, `reg1`, `pay_method`, `remark1`, `status`, `c_date`, `other_remark`, `mode`, `pr`, `email`) VALUES ('$name', '$class', '$ch', '$fee', '$date_add', '$year', '$search', '$van', '$total', '$exam', '$other', '$board', '$remain', '$ann', '$add', '$reg', '$comp', '$gen', '$paid', '$con', '$motal', '0', '0', '$pre', '$remark', '$reg1', NULL, NULL, '', '$date1', '$other_remark', '$mode','$pr','$email')";

	if(mysqli_query($conn,$ins))
	{
	   
		
			echo"Fees Submit";
		
	}
	else
	{
		echo"Fees Not Submit";
	}
}
}
else
{
    
	if($count_month==$total_paid)
	{
	//	echo 'Yes';
	
	$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'];
	
$ins="INSERT INTO `studentfees` (`name`, `class`, `month`, `fee`, `date`, `year`, `search`, `van`, `total`, `exam`, `other`, `board`, `remain`, `ann`, `addm`, `reg`, `comp`, `gen`, `paid`, `con`, `mtotal`, `fine`, `dpaid`, `pre`, `remark`, `reg1`, `pay_method`, `remark1`, `status`, `c_date`, `other_remark`, `mode`, `pr`, `email`) VALUES ('$name', '$class', '$ch', '$fee', '$date_add', '$year', '$search', '$van', '$total', '$exam', '$other', '$board', '$remain', '$ann', '$add', '$reg', '$comp', '$gen', '$paid', '$con', '$motal', '0', '0', '$pre', '$remark', '$reg1', NULL, NULL, '', '$date1', '$other_remark', '$mode','$pr','$email')";

	if(mysqli_query($conn,$ins))
	{
	   
		
			echo"Fees Submit";
		
	}
	else
	{
		echo"Fees Not Submit";
	}
	
	}
	else
	{
		echo 'Please Select Month in Sequence';
	}
}
}

	break;
	
	//=========================================================message==//
	case 11:
	
	$year=$_POST['year'];
	$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++;
	}
	
	$username="AwadheshYadav";
$password="AwadheshYadav";
$senderid="GCSNNJ";

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

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

$result=file_get_contents($api);
if($result)
{
	$ins="insert into message (message,count) value('$message','$mess')";
	$res=mysqli_query($conn,$ins);
	$insme="insert into message1 (message,date) value('$message','$date')";
	$resme=mysqli_query($conn,$insme);
	echo"sms not send";
}
else
{
	echo"sms not send";
}
	
	
	break ;
	case 111:
	
	$year=$_POST['year'];
	$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++;
	}
	echo $mob;
	$username="AwadheshYadav";
$password="AwadheshYadav";
$senderid="GCSNNJ";

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

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

$result=file_get_contents($api);
if($result)
{
	$ins="insert into message (message,count) value('$message','$mess')";
	$res=mysqli_query($conn,$ins);
	$insme="insert into message1 (message,class,date) value('$message','$class','$date')";
	$resme=mysqli_query($conn,$insme);
	echo"sms not send";
}
else
{
	echo"sms not send";
}
	
	
	break ;
case 111:
	
	$year=$_POST['year'];
	$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++;
	}
	echo $mob;
	$username="AwadheshYadav";
$password="AwadheshYadav";
$senderid="GCSNNJ";

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

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

$result=file_get_contents($api);
if($result)
{
	$ins="insert into message (message,count,session) value('$message','$mess','$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";
}
	
	
	break ;
	case 112:
	
	$year=$_POST['year'];
	$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++;
	}
	echo $mob;
	$username="AwadheshYadav";
$password="AwadheshYadav";
$senderid="GCSNNJ";

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

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

$result=file_get_contents($api);
if($result)
{
	$ins="insert into message (message,count,session) value('$message','$mess','$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";
}
	
	
	break ;
	
	case 13:
	$year=$_POST['year'];
	$class=$_POST['class'];
  $sel="select * from  studentfees where year='$year' and class='$class' order by date desc ";
	$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>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:
	
	$rol=$_POST['std'];
	
	
	
	
	$sel="select * from  registration where id='$rol'  ";
	
	$res=mysqli_query($conn,$sel);
	$sel1="select * from  registration where id='$rol'";
	
	$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">Sch.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 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'];
	$app=$row['application'];
	$p=0;
	$sel2="select * from  registration where session ='$session' and application='$app'  order by id asc";
	$res2=mysqli_query($conn,$sel2);
		while($row2=mysqli_fetch_array($res2,MYSQLI_BOTH))
		
	{
	    $p++;
	    if($p>1)
	    {
	        echo $app;
	        echo '<br/>';
	    }
	}
		?>
		 
	<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['2']."<br/><b>Dob-</b>".$row['dob'];?></td><td><?php echo $row['fname']."<br/><b>Category-</b>".$row['caste'];?></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////
	
	
	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">
  <?php 
	  $selc="select * from session order by id desc";
	$resc=mysqli_query($conn,$selc);
	  while($rowc=mysqli_fetch_array($resc,MYSQLI_BOTH))
	  {
	  ?>
	  <option <?php  if($rowc['session']==$row['session']){echo 'Selected';};?>><?php echo $rowc['session'];?></option>
	  <?php
	  }
	  
	  ?>
	</select>
				
				
			
				</div>
				</div>
				<br/>
				<br/>
				
				<div class="form-group">
				<label class="col-sm-3 control-label">Class</label>
				<div class="col-sm-8">
				<?php 
	
	?>
				<select class="form-control" style="font-weight:bold" id="select" name="class">
	
	  <option >--Select--</option>
	  <?php 
	  $selc="select * from subclass";
	$resc=mysqli_query($conn,$selc);
	  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"/>
	<input type="hidden" value="<?php echo $eid;?>" name="id"/>
				
				
				<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'];
		$id=$_POST['id'];
	$sel="select * from  registration where id='$id' order by id desc";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	// for registration
	$application=$row['application'];
	$name=$row['name'];
$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'];
//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";


//echo"$high1";



//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
	///
	
	
	
	
	$subject=$_POST['class'];
	
	$date=date("d-m-Y");
	date_default_timezone_set("asia/kolkata");
	$time=date("h:i:sa");
	$datetime=$date." ".$time;
		$sel1="select * from  registration where application='$app' and session='$session' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	
	if(!$row1)
	{
	$ins="INSERT INTO `registration` (`application`, `name`, `fname`, `mname`, `dob`, `gender`, `class`, `session`, `subject`, `ele`, `board`, `year`, `total`, `obtain`, `per`, `grade`, `city`, `village`, `postoffice`, `dist`, `state`, `mobile`, `pincode`, `picture`, `city1`, `village1`, `postoffice1`, `dist1`, `state1`, `mobile1`, `pincode1`, `datetime`, `mediam`, `adhar`, `action`, `action1`, `code`, `minority`, `caste`, `trans`, `tra`, `date`, `time`) VALUES ('$app', '$name', '$father', '$mother', '$dob1', '$gender', '$class', '$session', '$subject', '', '', '', '', '', '', '', '$city', '$village', '$postoffice', '$dist', '$state', '$mobile', '$pincode', '$newimgname', '$city1', '$village1', '$postoffice1', '$dist1', '$state1', '$mobile1', '$pincode1', '$datetime', '$mediam', '$adhar', '', '', '$code', 'HINDU', 'OBC','','','$date','$time')";
	if(mysqli_query($conn,$ins))
				{
					echo "Transfered";
					
				}
				else
				{
					echo"not";
				}
   }
   else
   {
       echo 'Allready Transfer in session';
   }
	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 3636:
	$year1=$_POST['session'];
	$class=$_POST['class'];
  $sel1="select * from  registration where session ='$year1' and subject='$class' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

<script>
	

$(document).ready(function() {
    $('#example').DataTable( {
        fixedHeader: true,
		dom: 'Bfrtip',
        lengthMenu: [
            [ 10, 25, 50, -1 ],
            [ '10 rows', '25 rows', '50 rows', 'Show all' ]
        ],
        buttons: [
            'pageLength','print','excel',
			{ extend: 'pdfHtml5', footer: true,
				
                orientation: 'landscape',
                pageSize: 'LEGAL'
			}
			
        ]
		
    } );
} );

</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">Mother</th><th  style="text-align:center">Dob</th><th  style="text-align:center">Class</th><th  style="text-align:center">Mobile</th><th  style="text-align:center">Adhar</th><th  style="text-align:center">Village</th><th  style="text-align:center">DateTime</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">Mother</th><th  style="text-align:center">Dob</th><th  style="text-align:center">Class</th><th  style="text-align:center">Mobile</th><th  style="text-align:center">Adhar</th><th  style="text-align:center">Village</th><th  style="text-align:center">DateTime</th>
        </tr>
        </tfoot>
<tbody>		
  <?php
  $year=$_POST['session'];
  $sel="select * from  registration where session ='$year1' and subject='$class' 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'];
	$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><?php echo $row['name'];?></td><td><?php echo $row['fname'];?></td><td><?php echo $row['mname'];?></td><td><?php echo $row['dob'];?></td><td><?php echo $row['subject'];?></td><td><?php echo $row['mobile'];?></td><td><?php echo $row['adhar'];?></td><td><?php echo $row['village'];?></td><td><?php echo $row['datetime'];?></td>
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
	case 36:
	$session=$_POST['session'];
  $sel1="select * from  registration where session ='$session' 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' 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['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'];?></td><td><?php echo $row['session']."<br/>".$row['date']."<br/>".$row['time'];?></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="dues123(<?php echo $row['application'];?>)"><span><button type="button" class="btn btn-warning">Dues Paid</button></span></a><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-info">Noti 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 3896:
	$year=$_POST['year'];

  $sel="select * from  studentfees where year='$year'  and status='Delete' order by date desc ";
	$res=mysqli_query($conn,$sel);
	$sel1="select * from  studentfees where year='$year'  and status='Delete' ";
	$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'];
	
	$del="update studentfees set status='Delete' where id='$id'";
	if(mysqli_query($conn,$del))
	{
		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=$("#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
	$sch=$_REQUEST['application'];
	$application=$sch;
	//echo"$eid";
	$sel="select * from  studentfees where search='$sch' and status=''  order by id desc";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$paid12=$row['paid'];
		$year=$row['year'];
		$session=$year;
	
	/////////
		$sel1="select * from  registration where application='$sch'  order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	?>
	<div class="table-responsive">

       <center><h2 class="modal-title" style="color:green;background-color:yellow"> DUES PAID (<?php echo $row1['session'];?>) </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 $sch;?>" name="search" 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 $row['paid'];?>" name="paid13"/>
				<input type="hidden" value="<?php echo $row1['subject'];?>" name="class"/>
				<input type="hidden" value="<?php echo $row1['session'];?>" name="year"/>
					<input type="hidden" value="<?php echo rand(10000,500000);?>" name="pr" id="pr"/>
					<input type="hidden" value="<?php echo $row1['mediam'];?>" name="mediam"/>
					<input type="hidden" value="0" name="to"/>
				</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">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>
				
				</div>
				
		<div class="form-group">
				<label class="col-sm-3 control-label">Paid</label>
				<div class="col-sm-3"><input type="number"   name="paid"  value="0" id="paid12" 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>
				<br/>
				<div class="form-group">
				<label class="col-sm-3 control-label">Other</label>
				<div class="col-sm-3"><input type="number"   name="other"  value="0"  id="other1"  required /></div>
				
				</div>
				<br/>
			
				<div class="form-group">
				<label class="col-sm-3 control-label">Other Remark</label>
				<div class="col-sm-3"><input type="text"    id="remark" name="other_remark"  /></div>
				
				</div>
					<div class="form-group" >
				<label class="col-sm-3 control-label">New Dues</label>
				<div class="col-sm-3"><input type="number"  id="ndew12"  value="0" required readonly /></div>
				
				</div>
				<br/>
				<div class="form-group">
				<label class="col-sm-3 control-label">Paid Mode</label>
				<div class="col-sm-3"><select class='form-control' name='mode'><option>Cash</option><option>UPI</option><option>CHECK</option><option>BANK</option></select></div>
				
				</div>
				<br/>
	
			<br/>
				<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" id='btn' >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'];
		$remark=$_POST['remark'];
//	echo $year;
	$dew=$_POST['dew'];
		$to1=$_POST['to'];
//	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'];
	$mode=$_POST['mode'];
		$pr=$_POST['pr'];
	echo $paid;
	$other=$_POST['other'];
	$other_remark=$_POST['other_remark'];
	//echo $paid;
//	$ndew=$_POST['ndew'];
//	echo $ndew;
	$paid8=$paid+$paid13;
$amou=$paid+$cons;
	
	$b='0';
	$total=$dew+$other;
	$re=$total-$amou;
	//echo"$eid";
		$sel15="select * from  studentfees where  status='Not' and search='$search' order by id desc";
	$res15=mysqli_query($conn,$sel15);
	$row15=mysqli_fetch_array($res15,MYSQLI_BOTH);
	if($row15)
	{echo 'Please Fees Aproved From Admin';}
	else
	{
		if($user_login=='Cashier')
	{
if($cons<=500)
{
    	$ins="INSERT INTO `studentfees` (`name`, `class`, `month`, `fee`, `date`, `year`, `search`, `van`, `total`, `exam`, `other`, `board`, `remain`, `ann`, `addm`, `reg`, `comp`, `gen`, `paid`, `con`, `mtotal`, `fine`, `dpaid`, `pre`, `remark`, `reg1`, `pay_method`, `remark1`, `status`, `c_date`, `other_remark`, `mode`, `pr`, `email`) VALUES ('$name', '$class', 'Dues', '0', '$date1', '$year', '$search', '0', '$total', '$exam', '$other', '', '$re', '0', '0', '0', '0', '0', '$paid', '$cons', '$motal', '0', '0', '$dew', '$remark', '$reg1', NULL, NULL, '', '$date1', '$other_remark', '$mode','$pr','$email')";

	if($res=mysqli_query($conn,$ins))
	{
		echo "Dues Paid";
	}
	else
	{
		echo "not update";
	}
}
else
{
     $ins="INSERT INTO `studentfees` (`name`, `class`, `month`, `fee`, `date`, `year`, `search`, `van`, `total`, `exam`, `other`, `board`, `remain`, `ann`, `addm`, `reg`, `comp`, `gen`, `paid`, `con`, `mtotal`, `fine`, `dpaid`, `pre`, `remark`, `reg1`, `pay_method`, `remark1`, `status`, `c_date`, `other_remark`, `mode`, `pr`, `email`) VALUES ('$name', '$class', 'Dues', '0', '$date1', '$year', '$search', '0', '$total', '$exam', '$other', '', '$re', '0', '0', '0', '0', '0', '$paid', '$cons', '$motal', '0', '0', '$dew', '$remark', '$reg1', NULL, NULL, 'Not', '$date1', '$other_remark', '$mode','$pr','$email')";
     	if($res=mysqli_query($conn,$ins))
	{
	 echo"Dues Paid Please Fees Approved From Admin";
	}
	else
	{
		echo "not update";
	}
}
}
else
{
    	$ins="INSERT INTO `studentfees` (`name`, `class`, `month`, `fee`, `date`, `year`, `search`, `van`, `total`, `exam`, `other`, `board`, `remain`, `ann`, `addm`, `reg`, `comp`, `gen`, `paid`, `con`, `mtotal`, `fine`, `dpaid`, `pre`, `remark`, `reg1`, `pay_method`, `remark1`, `status`, `c_date`, `other_remark`, `mode`, `pr`, `email`) VALUES ('$name', '$class', 'Dues', '0', '$date1', '$year', '$search', '0', '$total', '$exam', '$other', '', '$re', '0', '0', '0', '0', '0', '$paid', '$cons', '$motal', '0', '0', '$dew', '$remark', '$reg1', NULL, NULL, '', '$date1', '$other_remark', '$mode','$pr','$email')";

	if($res=mysqli_query($conn,$ins))
	{
		echo "Dues Paid";
	}
	else
	{
		echo "not update";
	}
}
	}
	
	break;
	case 50:
	
  $sel1="select * from message1 order bi 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 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;
  $sel1="SELECT DISTINCT name,search,class FROM studentfees 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 status='' 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' ";
	$res13=mysqli_query($conn,$sel13);
	$row13=mysqli_fetch_array($res13,MYSQLI_BOTH);
	
	//// for dues
	$sel14="select  * from studentfees where search= '$search' and status='' 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'];
	
	$selm="SELECT *  FROM studentfees where class= '$class' and status='' order by id desc ";
	$resm=mysqli_query($conn,$selm);
	$seln="SELECT *  FROM studentfees where class= '$class' and status='' 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 status='' 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 status='' 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 status='' 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' ";
	$res13=mysqli_query($conn,$sel13);
	$row13=mysqli_fetch_array($res13,MYSQLI_BOTH);
	
	//// for dues
	$sel14="select  * from studentfees where search= '$search' and status='' 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' and status='' order by id asc ";
	$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> 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 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  studentfees where search ='$applicationr' and year='$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' ";
$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/logo.jpg" height="70px" width="70px"/></span></td><td align="center"><span id="name"  style="font-size:20px;font-weight:bold">G.S. MEMORIAL PUBLIC SCHOOL</span><br/><br/><span id="name1" style="font-size:18px;font-weight:bold">FAZULLAHPUR KOPAGANJ- MAU</span></td><td style="font-size:14px"><b>Contact-</b>9140528801<br/>&emsp;&emsp;&emsp;&emsp; 7459809817<br/></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='18' 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">Reg</span></td>
<td><span id="name2">Id/Stat.</span></td>
<td><span id="name2">Add</span></td>
<td><span id="name2">Tie&Belt</span></td>
<td><span id="name2">Diary</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>
<td><span id="name2">Print</span></td>

</tr>
<?php

$sum=0;
$sum1=0;

$remain1=0;


$sel2="select * from  studentfees where search='$applicationr' and year='$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;
?>
<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['reg1'];?></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['gen'];?></span></td>
<td><span id="name3"><?php echo $row2['comp'];?></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>

<td><span id="name3"><a href="slip.php?flag=<?php echo $row2['id'];?>" target="_blank"><span class="fa fa-print"></span></a></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;
	
	///// for fees details 
	case 72:
	   
	$search=$_REQUEST['app'];
	
include("../link/databaseconnection.php");
$sel4="select * from  registration where application ='$search'  order by id desc";
$res4=mysqli_query($conn,$sel4);
$row4=mysqli_fetch_array($res4,MYSQLI_BOTH);
$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;
$date20=date("d-m-Y",strtotime($row12['date']));
$sel121="select * from  studentfees where search ='$search' and status='' and id='$idd' ";
$res121=mysqli_query($conn,$sel121);
$row121=mysqli_fetch_array($res121,MYSQLI_BOTH);

$date12=date("d-m-Y");
$sel1="select * from  studentfees where search ='$search' and status=''";
$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);

$selde="select * from  studentfees where search ='$search' and status='' 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' and status='' order by id desc ";
$resmo=mysqli_query($conn,$selmo);
date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");

$month12='';
$rowmo=mysqli_fetch_array($resmo,MYSQLI_BOTH);

	 $month12=$rowmo['month'];
	 //$month12=$month13.",".$month12;




//echo $date;

//echo"$app1";
?>

<html>
<head>
<style>
#name2
{
	
}
body{
  -webkit-print-color-adjust:exact !important;
  print-color-adjust:exact !important;
}
   
    @media print
   {
       print-color-adjust: exact;
	  table{width:100%;}
	  #mo{width:230px;}
	  
	  }
</style>

<script>

$(document).ready(function(){
//alert('Thanks For Print');
var divToPrint=document.getElementById('DivIdToPrint12');
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>

<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 id='DivIdToPrint12'>
<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;}
	  
	  }
      
   body{
  -webkit-print-color-adjust:exact !important;
  print-color-adjust:exact !important;
}
   
    @media print
   {
       print-color-adjust: exact;
	  table{width:100%;}
	  #mo{width:230px;}
	  
	  }
   
</style>
<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="left"><span id="name"  style="font-size:13px;text-align:left;font-weight:bold">G.S. MEMORIAL PUBLIC SCHOOL</span><br/><span style='font-size:12px'>THE LAND OF WISDOM</span><br/><span style='font-size:10px'>Faizullahpur,Kopaganj- Mau  </span></td><td style=' border-left: double;'><div style='margin-left:5px'><span style='font-size:10px;'>Registration/Affilatio No.</span><br/>09620905602<span style='font-size:11px;'></span><br/><span style='font-size:10px'><i class="fa fa-phone-square"></i> 9140528801<br/><i class="fa fa-phone-square"></i> 9450480563</span></div></td>
</tr>
</table>
<table border="1px;"  width="100%"cellspacing="0" >
	<tr style='background-color:gray'>
<td  colspan='2' style='padding:3px'><span style='font-size:12px;color:white'>Fee Receipt</span></td><td colspan="2"><span  style="font-size:11px;color:white">Session : <?php echo $row12['year'];?></span></td>
</tr>
<tr style='background-color:#D7D1D1'>
<td  colspan='2' style='padding:3px'><span style='font-size:12px;color:black'> Receipt No: <?php echo $row10['id'];?></span></td><td colspan="2"><span  style="font-size:11px;color:black">Date : <?php echo $date20;?></span></td>
</tr>
<tr>
<td style='padding:3px'><span id="name2"  style="font-size:11px;font-weight:bold">Scho. Number</span></td><td colspan="2"><span  style="font-size:11px"><?php echo $row12['search'];?></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 style='padding:3px'><span id="name2"  style="font-size:11px;font-weight:bold">Student Name</span></td><td colspan='2'><span  style="font-size:11px"><?php echo $row4['name'];?></span></td>
</tr>
<tr>
<td style='padding:3px'><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 $row4['subject'];?>/<?php echo $row4['section'];?></td>
</tr>


</table>


<table frame="border" width="100%" cellspacing="0" height="25%">
<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"><textarea id="mo" class="mo" style="font-weight:bold;font-size:10px;resize:none" rows="3" cols="80"><?php echo $month12;?></textarea></td>
</tr>
<tr style='background-color:#D7D1D1'>
<td  colspan='9' style='padding: 3px'><span style='font-size:13px;color:black;font-weight:bold;padding: 6px'>Fee Type</span></td><td colspan="2" align="right" style='padding: 3px'><span  style="font-size:13px;color:black;font-weight:bold;padding:6px">Fee Amount </span></td>
</tr>
<tr >
<td width="25%" colspan='9' align="left" style='padding: 2px;'><span id="name2" >Tution Fee</span></td>
<td width="25%" colspan='2' align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['fee']=='0'){echo '';}else{echo $row10['fee'];}?> </span></td>

</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Conv Fee</span></td>
<td width="25%" align="right" colspan='2' style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['van']=='0'){echo '';}else{echo $row10['van'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Miscellaneous Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['addm']=='0'){echo '';}else{echo $row10['addm'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Annual Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['ann']=='0'){echo '';}else{echo $row10['ann'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Exam Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['exam']=='0'){echo '';}else{echo $row10['exam'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Computer Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['comp']=='0'){echo '';}else{echo $row10['comp'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Regi</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['reg1']=='0'){echo '';}else{echo $row10['reg1'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Tie+belt</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['gen']=='0'){echo '';}else{echo $row10['gen'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Other Fee ( <?php echo $row10['other_remark']?>)</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['other']=='0'){echo '';}else{echo $row10['other'];}?> </span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Old Dues </span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['pre']=='0'){echo '';}else{echo $row10['pre'];}?> </span></td>
</tr>


<tr style='background-color:#D7D1D1;margin-top:100px' >
	
<td  colspan='9' style='border: 1px solid black;padding: 7px'><span style='font-size:13px;color:black;font-weight:bold'>Paymode Mode : <?php echo $row10['mode']?> </span></td><td colspan="2" align="right" style='border: 1px solid black;padding: 7px'><span  style="font-size:13px;color:black;font-weight:bold"><?php echo $row10['total']?> Rs. </span></td>
</tr>
<tr style='background-color:#D7D1D1;margin-top:40px' >
<td  colspan='11'style='border: 1px solid black;padding: 7px;text-align:left' ><span style='font-size:13px;color:black;font-weight:bold'>Discount (<?php echo $row10['remark']?>) : <?php if($row10['con']=='0'){echo '';}else{echo $row10['con'];}?> Rs.</span></td>
</tr>
<tr style='background-color:#D7D1D1;margin-top:40px' >
<td  colspan='5'style='border: 1px solid black;padding: 7px;text-align:left' ><span style='font-size:13px;color:black;font-weight:bold'>Paid : <?php echo $row10['paid']?> Rs.</span></td><td  colspan='6'style='border: 1px solid black;padding: 7px;text-align:center' ><span style='font-size:13px;color:black;'>Dues Fee : <?php echo $row10['remain']?> </span></td>
</tr>

<tr style='background-color:#D7D1D1;margin-top:40px' >
<td  colspan='11'style='border: 1px solid black;padding: 7px;' ><span style='font-size:13px;color:black;'> Amount in Word : <?php echo $result . "Rupees  " . $points . " Only.";?> </span></td>
</tr>
<tr style='background-color:;margin-top:30px' >
<td  colspan='7'style='border: 1px solid black;padding: 7px;' ><br/><span style='font-size:11px;color:black;'> PPRINCIPAL  </span></td><td  colspan='5'style='border: 1px solid black;padding: 7px;text-align:right' ><br/><span style='font-size:11px;color:black;'> ACCOUNTANT </td>
</tr>
<tr style='background-color:;margin-top:40px' >
<td  colspan='7'style='border: 1px solid black;padding: 7px;' ><span style='font-size:11px;color:black;'> Print : <?php echo date('d-M-Y')?> :  <?php echo $time;?> </span></td><td  colspan='5'style='border: 1px solid black;padding: 7px;' ><span style='font-size:11px;color:black;'> Student Copy  </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>





</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="left"><span id="name"  style="font-size:13px;text-align:left;font-weight:bold">G.S. MEMORIAL PUBLIC SCHOOL</span><br/><span style='font-size:12px'>THE LAND OF WISDOM</span><br/><span style='font-size:10px'>Faizullahpur,Kopaganj- Mau  </span></td><td style=' border-left: double;'><div style='margin-left:5px'><span style='font-size:10px;'>Registration/Affilatio No.</span><br/>09620905602<span style='font-size:11px;'></span><br/><span style='font-size:10px'><i class="fa fa-phone-square"></i> 9140528801<br/><i class="fa fa-phone-square"></i> 9450480563</span></div></td>
</tr>
</table>
<table border="1px;"  width="100%"cellspacing="0" >
	<tr style='background-color:gray'>
<td  colspan='2' style='padding:3px'><span style='font-size:12px;color:white'>Fee Receipt</span></td><td colspan="2"><span  style="font-size:11px;color:white">Session : <?php echo $row12['year'];?></span></td>
</tr>
<tr style='background-color:#D7D1D1'>
<td  colspan='2' style='padding:3px'><span style='font-size:12px;color:black'> Receipt No: <?php echo $row10['id'];?></span></td><td colspan="2"><span  style="font-size:11px;color:black">Date : <?php echo $date20;?></span></td>
</tr>
<tr>
<td style='padding:3px'><span id="name2"  style="font-size:11px;font-weight:bold">Scho. Number</span></td><td colspan="2"><span  style="font-size:11px"><?php echo $row12['search'];?></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 style='padding:3px'><span id="name2"  style="font-size:11px;font-weight:bold">Student Name</span></td><td colspan='2'><span  style="font-size:11px"><?php echo $row4['name'];?></span></td>
</tr>
<tr>
<td style='padding:3px'><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 $row4['subject'];?>/<?php echo $row4['section'];?></td>
</tr>


</table>


<table frame="border" width="100%" cellspacing="0" height="25%">
<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"><textarea id="mo" class="mo" style="font-weight:bold;font-size:10px;resize:none" rows="3" cols="80"><?php echo $month12;?></textarea></td>
</tr>
<tr style='background-color:#D7D1D1'>
<td  colspan='9' style='padding: 3px'><span style='font-size:13px;color:black;font-weight:bold;padding: 6px'>Fee Type</span></td><td colspan="2" align="right" style='padding: 3px'><span  style="font-size:13px;color:black;font-weight:bold;padding:6px">Fee Amount </span></td>
</tr>
<tr >
<td width="25%" colspan='9' align="left" style='padding: 2px;'><span id="name2" >Tution Fee</span></td>
<td width="25%" colspan='2' align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['fee']=='0'){echo '';}else{echo $row10['fee'];}?> </span></td>

</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Conv Fee</span></td>
<td width="25%" align="right" colspan='2' style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['van']=='0'){echo '';}else{echo $row10['van'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Miscellaneous Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['addm']=='0'){echo '';}else{echo $row10['addm'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Annual Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['ann']=='0'){echo '';}else{echo $row10['ann'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Exam Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['exam']=='0'){echo '';}else{echo $row10['exam'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Computer Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['comp']=='0'){echo '';}else{echo $row10['comp'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Regi</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['reg1']=='0'){echo '';}else{echo $row10['reg1'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Tie+Belt</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['gen']=='0'){echo '';}else{echo $row10['gen'];}?></span></td>
</tr>

<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Other Fee ( <?php echo $row10['other_remark']?>)</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['other']=='0'){echo '';}else{echo $row10['other'];}?> </span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Old Dues </span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['pre']=='0'){echo '';}else{echo $row10['pre'];}?> </span></td>
</tr>

<tr style='background-color:#D7D1D1;margin-top:100px' >
	
<td  colspan='9' style='border: 1px solid black;padding: 7px'><span style='font-size:13px;color:black;font-weight:bold'>Paymode Mode : <?php echo $row10['mode']?> </span></td><td colspan="2" align="right" style='border: 1px solid black;padding: 7px'><span  style="font-size:13px;color:black;font-weight:bold"><?php echo $row10['total']?> Rs. </span></td>
</tr>
<tr style='background-color:#D7D1D1;margin-top:40px' >
<td  colspan='11'style='border: 1px solid black;padding: 7px;text-align:left' ><span style='font-size:13px;color:black;font-weight:bold'>Discount (<?php echo $row10['remark']?>) : <?php if($row10['con']=='0'){echo '';}else{echo $row10['con'];}?> Rs.</span></td>
</tr>
<tr style='background-color:#D7D1D1;margin-top:40px' >
<td  colspan='5'style='border: 1px solid black;padding: 7px;text-align:left' ><span style='font-size:13px;color:black;font-weight:bold'>Paid : <?php echo $row10['paid']?> Rs.</span></td><td  colspan='6'style='border: 1px solid black;padding: 7px;text-align:center' ><span style='font-size:13px;color:black;'>Dues Fee : <?php echo $row10['remain']?> </span></td>
</tr>

<tr style='background-color:#D7D1D1;margin-top:40px' >
<td  colspan='11'style='border: 1px solid black;padding: 7px;' ><span style='font-size:13px;color:black;'> Amount in Word : <?php echo $result . "Rupees  " . $points . " Only.";?> </span></td>
</tr>
<tr style='background-color:;margin-top:30px' >
<td  colspan='7'style='border: 1px solid black;padding: 7px;' ><br/><span style='font-size:11px;color:black;'> PPRINCIPAL  </span></td><td  colspan='5'style='border: 1px solid black;padding: 7px;text-align:right' ><br/><span style='font-size:11px;color:black;'> ACCOUNTANT </td>
</tr>
<tr style='background-color:;margin-top:40px' >
<td  colspan='7'style='border: 1px solid black;padding: 7px;' ><span style='font-size:11px;color:black;'> Print : <?php echo date('d-M-Y')?> :  <?php echo $time;?> </span></td><td  colspan='5'style='border: 1px solid black;padding: 7px;' ><span style='font-size:11px;color:black;'> Office Copy  </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>




</div>
</div>

</div>
<br/>


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

<input type='button'  value='Print' onclick='printDiv();'>

	  <script>

	function printDiv() 
{
var divToPrint=document.getElementById('DivIdToPrint12');
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write(' <html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html> ');



}
	
	</script>


	

				
</body>
</html>









<?php


	
	
	
	
	break;
	
	
	
	
	///// for fees details 
	case 721:
	   
	$search=$_REQUEST['app'];
	$application=$search;
	
include("../link/databaseconnection.php");
$sel4="select * from  registration where application ='$search' and status='' order by id desc";
$res4=mysqli_query($conn,$sel4);
$row4=mysqli_fetch_array($res4,MYSQLI_BOTH);
$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;
$date20=date("d-m-Y",strtotime($row12['date']));
$sel121="select * from  studentfees where search ='$search' and status='' and id='$idd' ";
$res121=mysqli_query($conn,$sel121);
$row121=mysqli_fetch_array($res121,MYSQLI_BOTH);

$date12=date("d-m-Y");
$sel1="select * from  studentfees where search ='$search' and status='' ";
$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);

$selde="select * from  studentfees where search ='$search' and status='' 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' and status='' order by id desc ";
$resmo=mysqli_query($conn,$selmo);


$month12='';
$rowmo=mysqli_fetch_array($resmo,MYSQLI_BOTH);

	 $month12=$rowmo['month'];
	// $month12=$month13.",".$month12;


date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");

//echo $date;

//echo"$app1";
?>

<html>
<head>
<style>
#name2
{
	
}
body{
  -webkit-print-color-adjust:exact !important;
  print-color-adjust:exact !important;
}
   
    @media print
   {
       print-color-adjust: exact;
	  table{width:100%;}
	  #mo{width:230px;}
	  
	  }
</style>

<script>

$(document).ready(function(){
//alert('Thanks For Print');
var divToPrint=document.getElementById('DivIdToPrint12');
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>

<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 id='DivIdToPrint12'>
<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;}
	  
	  }
     body{
  -webkit-print-color-adjust:exact !important;
  print-color-adjust:exact !important;
}
   
    @media print
   {
       print-color-adjust: exact;
	  table{width:100%;}
	  #mo{width:230px;}
	  
	  } 
   
   
</style>
<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="left"><span id="name"  style="font-size:13px;text-align:left;font-weight:bold">G.S. MEMORIAL PUBLIC SCHOOL</span><br/><span style='font-size:12px'>THE LAND OF WISDOM</span><br/><span style='font-size:10px'>Faizullahpur,Kopaganj- Mau  </span></td><td style=' border-left: double;'><div style='margin-left:5px'><span style='font-size:10px;'>Registration/Affilatio No.</span><br/>09620905602<span style='font-size:11px;'></span><br/><span style='font-size:10px'><i class="fa fa-phone-square"></i> 9140528801<br/><i class="fa fa-phone-square"></i> 9450480563</span></div></td>
</tr>
</table>
<table border="1px;"  width="100%"cellspacing="0" >
	<tr style='background-color:gray'>
<td  colspan='2' style='padding:3px'><span style='font-size:12px;color:white'>Fee Receipt</span></td><td colspan="2"><span  style="font-size:11px;color:white">Session : <?php echo $row12['year'];?></span></td>
</tr>
<tr style='background-color:#D7D1D1'>
<td  colspan='2' style='padding:3px'><span style='font-size:12px;color:black'> Receipt No: <?php echo $row10['id'];?></span></td><td colspan="2"><span  style="font-size:11px;color:black">Date : <?php echo $date20;?></span></td>
</tr>
<tr>
<td style='padding:3px'><span id="name2"  style="font-size:11px;font-weight:bold">Scho. Number</span></td><td colspan="2"><span  style="font-size:11px"><?php echo $row12['search'];?></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 style='padding:3px'><span id="name2"  style="font-size:11px;font-weight:bold">Student Name</span></td><td colspan='2'><span  style="font-size:11px"><?php echo $row4['name'];?></span></td>
</tr>
<tr>
<td style='padding:3px'><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 $row4['subject'];?>/<?php echo $row4['section'];?></td>
</tr>


</table>


<table frame="border" width="100%" cellspacing="0" height="25%">
<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"><textarea id="mo" class="mo" style="font-weight:bold;font-size:10px;resize:none" rows="3" cols="80"><?php echo $month12;?></textarea></td>
</tr>
<tr style='background-color:#D7D1D1'>
<td  colspan='9' style='padding: 3px'><span style='font-size:13px;color:black;font-weight:bold;padding: 6px'>Fee Type</span></td><td colspan="2" align="right" style='padding: 3px'><span  style="font-size:13px;color:black;font-weight:bold;padding:6px">Fee Amount </span></td>
</tr>
<tr >
<td width="25%" colspan='9' align="left" style='padding: 2px;'><span id="name2" >Tution Fee</span></td>
<td width="25%" colspan='2' align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['fee']=='0'){echo '';}else{echo $row10['fee'];}?> </span></td>

</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Conv Fee</span></td>
<td width="25%" align="right" colspan='2' style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['van']=='0'){echo '';}else{echo $row10['van'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Miscellaneous Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['addm']=='0'){echo '';}else{echo $row10['addm'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Annual Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['ann']=='0'){echo '';}else{echo $row10['ann'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Exam Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['exam']=='0'){echo '';}else{echo $row10['exam'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Computer Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['comp']=='0'){echo '';}else{echo $row10['comp'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Other Fee ( <?php echo $row10['other_remark']?>)</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['other']=='0'){echo '';}else{echo $row10['other'];}?> </span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Old Dues </span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['pre']=='0'){echo '';}else{echo $row10['pre'];}?> </span></td>
</tr>


<tr style='background-color:#D7D1D1;margin-top:100px' >
	
<td  colspan='9' style='border: 1px solid black;padding: 7px'><span style='font-size:13px;color:black;font-weight:bold'>Paymode Mode : <?php echo $row10['mode']?> </span></td><td colspan="2" align="right" style='border: 1px solid black;padding: 7px'><span  style="font-size:13px;color:black;font-weight:bold"><?php echo $row10['total']?> Rs. </span></td>
</tr>
<tr style='background-color:#D7D1D1;margin-top:40px' >
<td  colspan='11'style='border: 1px solid black;padding: 7px;text-align:left' ><span style='font-size:13px;color:black;font-weight:bold'>Discount (<?php echo $row10['remark']?>) : <?php if($row10['con']=='0'){echo '';}else{echo $row10['con'];}?> Rs.</span></td>
</tr>
<tr style='background-color:#D7D1D1;margin-top:40px' >
<td  colspan='5'style='border: 1px solid black;padding: 7px;text-align:left' ><span style='font-size:13px;color:black;font-weight:bold'>Paid : <?php echo $row10['paid']?> Rs.</span></td><td  colspan='6'style='border: 1px solid black;padding: 7px;text-align:center' ><span style='font-size:13px;color:black;'>Dues Fee : <?php echo $row10['remain']?> </span></td>
</tr>

<tr style='background-color:#D7D1D1;margin-top:40px' >
<td  colspan='11'style='border: 1px solid black;padding: 7px;' ><span style='font-size:13px;color:black;'> Amount in Word : <?php echo $result . "Rupees  " . $points . " Only.";?> </span></td>
</tr>
<tr style='background-color:;margin-top:30px' >
<td  colspan='7'style='border: 1px solid black;padding: 7px;' ><br/><span style='font-size:11px;color:black;'> PPRINCIPAL  </span></td><td  colspan='5'style='border: 1px solid black;padding: 7px;text-align:right' ><br/><span style='font-size:11px;color:black;'> ACCOUNTANT </td>
</tr>
<tr style='background-color:;margin-top:40px' >
<td  colspan='7'style='border: 1px solid black;padding: 7px;' ><span style='font-size:11px;color:black;'> Print : <?php echo date('d-M-Y')?> :  <?php echo $time;?> </span></td><td  colspan='5'style='border: 1px solid black;padding: 7px;' ><span style='font-size:11px;color:black;'> Student Copy  </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>





</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="left"><span id="name"  style="font-size:13px;text-align:left;font-weight:bold">G.S. MEMORIAL PUBLIC SCHOOL</span><br/><span style='font-size:12px'>THE LAND OF WISDOM</span><br/><span style='font-size:10px'>Faizullahpur,Kopaganj- Mau  </span></td><td style=' border-left: double;'><div style='margin-left:5px'><span style='font-size:10px;'>Registration/Affilatio No.</span><br/>09620905602<span style='font-size:11px;'></span><br/><span style='font-size:10px'><i class="fa fa-phone-square"></i> 9140528801<br/><i class="fa fa-phone-square"></i> 9450480563</span></div></td>
</tr>
</table>
<table border="1px;"  width="100%"cellspacing="0" >
	<tr style='background-color:gray'>
<td  colspan='2' style='padding:3px'><span style='font-size:12px;color:white'>Fee Receipt</span></td><td colspan="2"><span  style="font-size:11px;color:white">Session : <?php echo $row12['year'];?></span></td>
</tr>
<tr style='background-color:#D7D1D1'>
<td  colspan='2' style='padding:3px'><span style='font-size:12px;color:black'> Receipt No: <?php echo $row10['id'];?></span></td><td colspan="2"><span  style="font-size:11px;color:black">Date : <?php echo $date20;?></span></td>
</tr>
<tr>
<td style='padding:3px'><span id="name2"  style="font-size:11px;font-weight:bold">Scho. Number</span></td><td colspan="2"><span  style="font-size:11px"><?php echo $row12['search'];?></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 style='padding:3px'><span id="name2"  style="font-size:11px;font-weight:bold">Student Name</span></td><td colspan='2'><span  style="font-size:11px"><?php echo $row4['name'];?></span></td>
</tr>
<tr>
<td style='padding:3px'><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 $row4['subject'];?>/<?php echo $row4['section'];?></td>
</tr>


</table>


<table frame="border" width="100%" cellspacing="0" height="25%">
<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"><textarea id="mo" class="mo" style="font-weight:bold;font-size:10px;resize:none" rows="3" cols="80"><?php echo $month12;?></textarea></td>
</tr>
<tr style='background-color:#D7D1D1'>
<td  colspan='9' style='padding: 3px'><span style='font-size:13px;color:black;font-weight:bold;padding: 6px'>Fee Type</span></td><td colspan="2" align="right" style='padding: 3px'><span  style="font-size:13px;color:black;font-weight:bold;padding:6px">Fee Amount </span></td>
</tr>
<tr >
<td width="25%" colspan='9' align="left" style='padding: 2px;'><span id="name2" >Tution Fee</span></td>
<td width="25%" colspan='2' align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['fee']=='0'){echo '';}else{echo $row10['fee'];}?> </span></td>

</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Conv Fee</span></td>
<td width="25%" align="right" colspan='2' style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['van']=='0'){echo '';}else{echo $row10['van'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Miscellaneous Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['addm']=='0'){echo '';}else{echo $row10['addm'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Annual Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['ann']=='0'){echo '';}else{echo $row10['ann'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Exam Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['exam']=='0'){echo '';}else{echo $row10['exam'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Computer Fee</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['comp']=='0'){echo '';}else{echo $row10['comp'];}?></span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Other Fee ( <?php echo $row10['other_remark']?>)</span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['other']=='0'){echo '';}else{echo $row10['other'];}?> </span></td>
</tr>
<tr align="left">
	<td width="25%" style=";padding: 2px" colspan='9'><span id="name2" >Old Dues </span></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 2px'><span id="name2" ><?php if($row10['pre']=='0'){echo '';}else{echo $row10['pre'];}?> </span></td>
</tr>

<tr align="left">
	<td width="25%" style=";padding: 20px" colspan='9'><span id="name2" ></td>
<td width="25%" align="right" style='border-left: 1px solid black;padding: 20px'><span id="name2" > </span></td>
</tr>
<tr style='background-color:#D7D1D1;margin-top:100px' >
	
<td  colspan='9' style='border: 1px solid black;padding: 7px'><span style='font-size:13px;color:black;font-weight:bold'>Paymode Mode : <?php echo $row10['mode']?> </span></td><td colspan="2" align="right" style='border: 1px solid black;padding: 7px'><span  style="font-size:13px;color:black;font-weight:bold"><?php echo $row10['total']?> Rs. </span></td>
</tr>
<tr style='background-color:#D7D1D1;margin-top:40px' >
<td  colspan='11'style='border: 1px solid black;padding: 7px;text-align:left' ><span style='font-size:13px;color:black;font-weight:bold'>Discount (<?php echo $row10['remark']?>) : <?php if($row10['con']=='0'){echo '';}else{echo $row10['con'];}?> Rs.</span></td>
</tr>
<tr style='background-color:#D7D1D1;margin-top:40px' >
<td  colspan='5'style='border: 1px solid black;padding: 7px;text-align:left' ><span style='font-size:13px;color:black;font-weight:bold'>Paid : <?php echo $row10['paid']?> Rs.</span></td><td  colspan='6'style='border: 1px solid black;padding: 7px;text-align:center' ><span style='font-size:13px;color:black;'>Dues Fee : <?php echo $row10['remain']?> </span></td>
</tr>

<tr style='background-color:#D7D1D1;margin-top:40px' >
<td  colspan='11'style='border: 1px solid black;padding: 7px;' ><span style='font-size:13px;color:black;'> Amount in Word : <?php echo $result . "Rupees  " . $points . " Only.";?> </span></td>
</tr>
<tr style='background-color:;margin-top:40px' >
<td  colspan='7'style='border: 1px solid black;padding: 7px;' ><br/><span style='font-size:11px;color:black;'> PPRINCIPAL  </span></td><td  colspan='5'style='border: 1px solid black;padding: 7px;text-align:right' ><br/><span style='font-size:11px;color:black;'> ACCOUNTANT </td>
</tr>
<tr style='background-color:;margin-top:40px' >
<td  colspan='7'style='border: 1px solid black;padding: 7px;' ><span style='font-size:11px;color:black;'> Print : <?php echo date('d-M-Y')?> :  <?php echo $time;?> </span></td><td  colspan='5'style='border: 1px solid black;padding: 7px;' ><span style='font-size:11px;color:black;'> Office Copy  </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>



</div>
</div>

</div>
<br/>


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

<input type='button'  value='Print' onclick='printDiv();'>

	  <script>

	function printDiv() 
{
var divToPrint=document.getElementById('DivIdToPrint12');
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write(' <html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html> ');



}
	
	</script>


	

				
</body>
</html>









<?php


	
	
	
	
	break;
	
	
	///// for fees details 
	
	///// 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;

//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;

?>
<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='17' 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">Comp</span></td>
<td><span id="name2">Gene</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"><td></td>
    <?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 
		////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 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['application'];
	$fname=$row['fname'];
	$name=$row['name'];
	$session=$row['session'];
	$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 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['application'];?></td><td><?php echo $row['2']."<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="recordup(<?php echo $row['application'];?>)"><button><span class="glyphicon glyphicon-pencil"></span></button></a></td>
	
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	
	
	
	
	
	<?php
	break;
	
	case 29196:
	
	?>
	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['pdf','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">Sr</th> <th style="text-align:center">Class</th><th style="text-align:center">Classteacher</th><th style="text-align:center">Total Students</th><th style="text-align:center">Present</th><th style="text-align:center">Absent</th><th style="text-align:center">Date</th>
            </tr>
        </thead>

<tbody>		
  <?php
   $date=$_POST['date'];
    $session=$_POST['session'];
	 $sel12="select * from  subclass order by  subclassid";
	$res12=mysqli_query($conn,$sel12);
	$to_abs=0;
	$to_p=0;
	$to_st;
	$s=1;
	while($row12=mysqli_fetch_array($res12,MYSQLI_BOTH))
	
	{
	    	
 
	$class=$row12['subclass'];
 
	
///	$date=date('Y-m-d');
//$edate=date("d-m-Y",strtotime($date1));
//echo $edate;
 	$sel19="select * from  classteacher where class1='$class'";
	$res129=mysqli_query($conn,$sel19);
	$row129=mysqli_fetch_array($res129,MYSQLI_BOTH);
	
	date_default_timezone_set("asia/kolkata");

	$sel1="select * from  present1 where class='$class' and session='$session' and date='$date' and status='P'";
	$res1=mysqli_query($conn,$sel1);
	$p=mysqli_num_rows($res1);
	
		$sel15="select * from  registration where subject='$class' and session='$session'  and status=''";
	$res15=mysqli_query($conn,$sel15);
	$st=mysqli_num_rows($res15);
	
	
	$sel11="select * from  present1 where class='$class' and session='$session' and date='$date' and status='A'";
	$res11=mysqli_query($conn,$sel11);
	$a=mysqli_num_rows($res11);
	
	$to_abs=$to_abs+$a;
	$to_p=$to_p+$p;
	$to_st=$to_st+$st;
	?>
		 
	<tr class="text-center">
		<td><?php echo $s;?></td><td><?php echo $row12['subclass'];?></td>	<td><?php echo $row129['name'];?></td><td style='color:blue'><?php echo $st;?></td><td style='color:green'><?php echo $p;?></td><td style='color:red'><?php echo $a;?></td>
	

	
	<td style='color:red'><?php echo $date;?></td>
	
	
	
	</tr>
	<?php
	$s++;
	}
	
	?>
		<tr class="text-center">
	<td>14</td><td style='color:black;font-weight:bold'  >Total</td>	<td></td><td style='color:blue;font-weight:bold'><?php echo $to_st;?></td><td style='color:green;font-weight:bold'><?php echo $to_p;?></td><td style='color:red;font-weight:bold'><?php echo $to_abs;?></td>
	

	
	<td style='color:red'><?php echo $date;?></td>
	
	
	
	</tr>
	 </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 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 
GLORIOLE CONVENT SCHOOL JIYANPUR.";

$msg=urlencode($message);


///$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=GCSNNJ&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['application'];
	 $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 
GLORIOLE CONVENT SCHOOL JIYANPUR.";

$msg=urlencode($message);


///$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=g&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'];
	/////
	$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);
//	echo $count1;
	//$s=0;
	
	//echo $s++;
	$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);
	/////
  $sel="select * from  present1 where session='$session' and class='$class' and date between '$sdate' and '$edate' order by date asc";
	$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'];
	$app=$row['sch'];
	$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=$row['date'];
	$date=date("d-m-Y",strtotime($date12));
	
	
	
					    	$sel177="select * from  present1 where date ='$date12' and sch='$app' and  session='$session' ";
	$res177=mysqli_query($conn,$sel177);
	$count177=mysqli_num_rows($res177);
	if($count177>1)
	{
	    $del="delete from present1 where date='$date12' and sch='$app' and  session='$session' limit 1 ";
	    mysqli_query($conn,$del);
	}
	
		?>
		 
	<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">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" > ALL 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>

	
	 </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=$row['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=$row['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">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;
	//////for present
	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">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">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['application'];
$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;
	$mon='';
	while($row1=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$paid=$row1['paid'];
		$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['application'] ;?></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 $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 UP TO <?php $ma=date("M"); echo $ma;?></th>
            </tr>
        </thead>

<tbody>		
  <?php
  $s=0;
  $am2=0;
   $amn=0;
  while($row=mysqli_fetch_array($res1,MYSQLI_BOTH))
  {
  $app=$row['application'];
  $application=$row['application'];
  $code=$row['code'];
  $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 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;
	$mon='';
	$co='';
	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 
	$am2=$am+$am2;
	
	////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'];
	$ann=$row2['ann'];
	
	$reg=$row2['reg'];
	$addm=$row2['addm'];
	$tie=$row2['tie'];
	$diary=$row2['diary'];
	$other=$row2['other'];
	$comp=$row2['comp'];
	$gen=$row2['gen'];
		
	$date=date("m");
	$m1=(int)$ann;
	$m2=(int)$reg;
	$m3=(int)$addm;
	$m4=(int)$tie;
	$m5=(int)$diary;
		$m6=(int)$other;
		$m7=(int)$comp;
		$m8=(int)$gen;
		
	$date5=(int)$date;
	if($date==4)
	{
		$cal=1;
		$exa=0;
	}
	if($date==5)
	{
		$cal=2;
		$exa=0;
	}
	if($date==6)
	{
		$cal=3;
		$exa=0;
	}
	if($date==7)
	{
		$cal=4;
		$exa=0;
	}
	if($date==8)
	{
		$cal=5;
		$exa=0;
	}
	if($date==9)
	{
		$cal=6;
		$exa=0;
	}
	if($date==10)
	{
		$cal=7;
		$exa=200;
	}
	if($date==11)
	{
		$cal=8;
		$exa=0;
	}
	if($date==12)
	{
		$cal=9;
		$exa=0;
	}
	if($date==1)
	{
		$cal=10;
		$exa=0;
	}
	if($date==2)
	{
		$cal=11;
		$exa=0;
	}
	if($date==3)
	{
		$cal=12;
		$exa=200;
	}
	//echo $cal;

	$n=(int)$fees;
	$ex=(int)$exa;
	$balance=$cal*$n;
	$convm=$conv12*$cal;
	//echo $balance;
	$main=$balance+$m1+$m2+$m3+$m4+$m5+$m6+$m7+$m8+$ex+$convm;
	$amountnet=$main-$am-$co;
	$amn=$amn+$amountnet;
	//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['application'] ;?></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>
	
	
	</tr>
	<?php
	$s++;
	}
	?>
		<tr class="text-center">
<td>TOTAL</td><td></td><td></td><td></td><td></td><td><?php echo $am2;?></td><td><?php echo $amn;?></td>
	
	
	</tr>
	 </tbody>
	 <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"><?php echo $am2?></th><th  style="text-align:center"> <?php echo $amn;?></th>
            </tr>
        </tfoot>
    </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 '-';
$name=$row['name'];
$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'];
//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";


//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;
	
	if(!$row4)
	{
	$ins="INSERT INTO `registration` (`application`, `name`, `fname`, `mname`, `dob`, `gender`, `class`, `session`, `subject`, `ele`, `board`, `year`, `total`, `obtain`, `per`, `grade`, `city`, `village`, `postoffice`, `dist`, `state`, `mobile`, `pincode`, `picture`, `city1`, `village1`, `postoffice1`, `dist1`, `state1`, `mobile1`, `pincode1`, `datetime`, `mediam`, `adhar`, `action`, `action1`, `code`, `minority`, `caste`, `trans`, `tra`, `date`, `time`) VALUES ('$app', '$name', '$father', '$mother', '$dob1', '$gender', '$class', '$nsession', '$nclass', '', '', '', '', '', '', '', '$city', '$village', '$postoffice', '$dist', '$state', '$mobile', '$pincode', '$newimgname', '$city1', '$village1', '$postoffice1', '$dist1', '$state1', '$mobile1', '$pincode1', '$datetime', '$mediam', '$adhar', '', '', '$code', 'HINDU', 'OBC','','','$date','$time')";
	if(mysqli_query($conn,$ins))
				{
					echo "Transfered";
					
				}
				else
				{
					echo"not";
				}
	}
	
	else
	{
	    echo 'Allredy Transfer';
	}
	
	}
	
	break ;
	 case 2009999:
	$year1=$_POST['session'];
		$session=$_POST['session'];
	$class=$_POST['class'];
  $sel1="select * from  registration where session ='$year1' and subject='$class' ";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

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


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
    <caption id='pr' style='font-size:20px;font-weight:bold'>Class =  <?php echo $class;?></caption>
        <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">Mobile</th><th  style="text-align:center">Vill</th><th  style="text-align:center">Charge</th><th  style="text-align:center">Apr</th><th  style="text-align:center">May</th><th  style="text-align:center">Jun</th><th  style="text-align:center">Jul</th><th  style="text-align:center">Aug</th><th  style="text-align:center">Sep</th><th  style="text-align:center">Oct</th><th  style="text-align:center">Nov</th><th  style="text-align:center">Dec</th><th  style="text-align:center">Jan</th><th  style="text-align:center">Feb</th><th  style="text-align:center">Mar</th><th  style="text-align:center">Paid</th>
            </tr>
        </thead>

<tbody>		
  <?php
  $year=$_POST['session'];
  $sel="select * from  registration where session ='$year1' and subject='$class' ";
	$res=mysqli_query($conn,$sel);
	$s=1;
		$p=0;
		$al_paid=0;
		$b_all=0;
		$c_all=0;
		$d_all=0;
		$e_all=0;
		$f_all=0;
		$g_all=0;
		$h_all=0;
		$i_all=0;
		$j_all=0;
		$k_all=0;
		$l_all=0;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
	    $application=$row['application'];
	    $selcm3="select * from  fees where  session='$session' and class='$class' order by id desc ";
	$rescm3=mysqli_query($conn,$selcm3);
	$row3=mysqli_fetch_array($rescm3,MYSQLI_BOTH);
	
	     $selca="select * from  studentfees where  month like '%April%' and year='$session' and search='$application' order by id desc ";
	$resca=mysqli_query($conn,$selca);
	$a='';
	$a1=0;
	if($rowca=mysqli_fetch_array($resca,MYSQLI_BOTH))
	{
		$a=$row3['fees'];
		$a1=$a1+$a;
	
		$p++;
	}
	else
	{
	    $a=0;
	}
		$a_all=$a_all+$a;
	//////may
	$selcm="select * from  studentfees where  month like '%May%' and year='$session' and search='$application' order by id desc ";
	$rescm=mysqli_query($conn,$selcm);
	$b='';
	if($rowcm=mysqli_fetch_array($rescm,MYSQLI_BOTH))
{
		$b=$row3['fees'];
		$p++;
	}
	else
	{
	    $b=0;
	}
		$b_all=$b_all+$b;
	//////Jun
	$selcj="select * from  studentfees where  month like '%Jun%' and year='$session' and search='$application' order by id desc ";
	$rescj=mysqli_query($conn,$selcj);
	$c='';
	if($rowcj=mysqli_fetch_array($rescj,MYSQLI_BOTH))
	{
		$c=$row3['fees'];
		$p++;
	}
	else
	{
	    $c=0;
	}
		$c_all=$c_all+$c;
	//////july
	$selcmj="select * from  studentfees where  month like '%July%' and year='$session' and search='$application' order by id desc ";
	$rescmj=mysqli_query($conn,$selcmj);
	$d='';
	if($rowcmj=mysqli_fetch_array($rescmj,MYSQLI_BOTH))
	{
		$d=$row3['fees'];
		$p++;
	}
	else
	{
	    $d=0;
	}
	$d_all=$d_all+$d;
	//////August
	$selcmja="select * from  studentfees where  month like '%August%' and year='$session' and search='$application' order by id desc ";
	$rescmja=mysqli_query($conn,$selcmja);
	$e='';
	if($rowcmja=mysqli_fetch_array($rescmja,MYSQLI_BOTH))
	{
		$e=$row3['fees'];
		$p++;
	}
	else
	{
	    $e=0;
	}
	$e_all=$e_all+$e;
	//////sep
	$selcms="select * from  studentfees where  month like '%September%' and year='$session' and search='$application' order by id desc ";
	$rescms=mysqli_query($conn,$selcms);
	$f='';
	if($rowcms=mysqli_fetch_array($rescms,MYSQLI_BOTH))
	{
		$f=$row3['fees'];
		$p++;
	}
	else
	{
	    $f=0;
	}
	$f_all=$f_all+$f;
	//////oct
	$selcmjo="select * from  studentfees where  month like '%October%' and year='$session' and search='$application' order by id desc ";
	$rescmjo=mysqli_query($conn,$selcmjo);
	$g='';
	if($rowcmjo=mysqli_fetch_array($rescmjo,MYSQLI_BOTH))
	{
		$g=$row3['fees'];
		$p++;
	}
	else
	{
	    $g=0;
	}
	$g_all=$g_all+$g;
	//////Nov
	$selcmjn="select * from  studentfees where  month like '%November%' and year='$session' and search='$application' order by id desc ";
	$rescmjn=mysqli_query($conn,$selcmjn);
	$h='';
	if($rowcmjn=mysqli_fetch_array($rescmjn,MYSQLI_BOTH))
	{
		$h=$row3['fees'];
		$p++;
	}
	else
	{
	    $h=0;
	}
	$h_all=$h_all+$h;
	//////Dec
	$selcmjd="select * from  studentfees where  month like '%December%' and year='$session' and search='$application' order by id desc ";
	$rescmjd=mysqli_query($conn,$selcmjd);
	$i='';
	if($rowcmjd=mysqli_fetch_array($rescmjd,MYSQLI_BOTH))
{
		$i=$row3['fees'];
		$p++;
	}
	else
	{
	    $i=0;
	}
	$i_all=$i_all+$i;
	//////Jan
	$selcmjdj="select * from  studentfees where  month like '%January%' and year='$session' and search='$application' order by id desc ";
	$rescmjdj=mysqli_query($conn,$selcmjdj);
	$j='';
	if($rowcmjdj=mysqli_fetch_array($rescmjdj,MYSQLI_BOTH))
	{
		$j=$row3['fees'];
		$p++;
	}
	else
	{
	    $j=0;
	}
	$j_all=$j_all+$j;
	//////Jan
	$selcmf="select * from  studentfees where  month like '%February%' and year='$session' and search='$application' order by id desc ";
	$rescmf=mysqli_query($conn,$selcmf);
	$k='';
	if($rowcmf=mysqli_fetch_array($rescmf,MYSQLI_BOTH))
{
		$k=$row3['fees'];
		$p++;
	}
	else
	{
	    $k=0;
	}
	$k_all=$k_all+$k;
	//////mar
	$selcmm="select * from  studentfees where  month like '%March%' and year='$session' and search='$application' order by id desc ";
	$rescmm=mysqli_query($conn,$selcmm);
	$l='';
	if($rowcmm=mysqli_fetch_array($rescmm,MYSQLI_BOTH))
	{
		$l=$row3['fees'];
		$p++;
	}
	else
	{
	    $l=0;
	}
	$l_all=$l_all+$l;
	$al=$p*$row3['fees'];
	$al_paid=$al_paid+$al;
		?>
		 
	<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['mobile'];?></td><td><?php echo $row['village'];?></td><td><?php echo $row3['fees'];?></td><td><?php echo $a;?></td><td><?php echo $b;?></td><td><?php echo $c;?></td><td><?php echo $d;?></td><td><?php echo $e;?></td><td><?php echo $f;?></td><td><?php echo $g;?></td><td><?php echo $h;?></td><td><?php echo $i;?></td><td><?php echo $j;?></td><td><?php echo $k;?></td><td><?php echo $l;?></td><td><?php echo $al;?></td>
	
	</tr>
	<?php
	$p=0;
	$s++;
	}
	?>
	 </tbody>
	 <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">Mobile</th><th  style="text-align:center">Vill</th><th  style="text-align:center">Charge</th><th  style="text-align:center"><?php echo $a_all ;?></th><th  style="text-align:center"><?php echo $b_all ;?></th><th  style="text-align:center"><?php echo $c_all ;?></th><th  style="text-align:center"><?php echo $d_all ;?></th><th  style="text-align:center"><?php echo $e_all ;?></th><th  style="text-align:center"><?php echo $f_all ;?></th><th  style="text-align:center"><?php echo $g_all ;?></th><th  style="text-align:center"><?php echo $h_all ;?></th><th  style="text-align:center"><?php echo $i_all ;?></th><th  style="text-align:center"><?php echo $j_all ;?></th><th  style="text-align:center"><?php echo $k_all ;?></th><th  style="text-align:center"><?php echo $l_all ;?></th><th  style="text-align:center"><?php echo $al_paid;?></th>
            </tr>
        </tfoot>
    </table>
	<?php
	$tot=$row3['fees']*$s;
	
	?>
	<h2><b>Total 1 Months Fees =<?php echo $tot-$row3['fees'];?></b></h2>
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
	case 5555:
	$session=$_POST['session'];
		$sel="select * from  registration where session='$session' ";
	$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['application'];
	$fname=$row['fname'];
	$name=$row['name'];
	$class=$row['subject'];
	$session=$row['session'];
	$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 date='$date'";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$status1=$row1['status'];
	if($status1=='')
	{
	    $inst="insert into present1(sch,name,class,date,user,status,fname,session) values('$app1','$name','$class','$date','user','P','$fname','$session')";
	$rest=mysqli_query($conn,$inst);
	if($rest)
	{
	   // echo 'insert';
	}
	///	$q=mysqli_query($conn,$rest);
	}
	
	
	$s++;
	}
	echo 'Students of All Class Present Successfully ! Please Absent One By One Student With Attendence Button';
	break;
		case 511:
	$session=$_POST['session'];
	$board=$_POST['board'];
	$class=$_POST['class'];
  $sel1="select * from  registration where session ='$session'  and subject='$class' order by id asc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	



<?php 
		 $sel="select * from  registration where session ='$session'  and subject='$class' order by id asc";
	$res=mysqli_query($conn,$sel);
	
	$sel1="select * from  pgukgadmit where  class='$class' order by id asc";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$p=0;
		while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
			
		{	
		
		?>
				
						
				
				
					<table  border="1px solid" height='160px' WIDTH="100%">
					<tr>
					<th   colspan="10" style="text-align:center">* EXAM ATTENDENCE *</th>
					</tr>
					<tr>
				<td rowspan='4' style='font-weight:bold'><?php echo $row['name'];?><br/>F-<?php echo $row['fname'];?></td>	<td>Exam</td><td ><?php echo $row1['date1'];?></td><td><?php echo $row1['date2'];?></td><td ><?php echo $row1['date3'];?></td><td ><?php echo $row1['date4'];?></td><td ><?php echo $row1['date5'];?></td><td ><?php echo $row1['date6'];?></td><td ><?php echo $row1['date7'];?></td><td ><?php echo $row1['date8'];?></td><td ><?php echo $row1['date9'];?></td><td ><?php echo $row1['date10'];?></td>
					</tr>
				
						<tr>
					<td>Sign </td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td>
					</tr>
				<tr>
					<td>Date </td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td>
					</tr>
						<tr>
					<td>Sign </td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td><td style="font-weight:bold"></td>
					</tr>
					
					</table>
						
				
				
				<?php
			$p++;
				if($p==4 )
			{
			    ?><p style="page-break-after: always;">&nbsp;</p> <?php 
			    $p=0;
			}
		}
		?></br><br/><?php
			?>
				
	
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	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 9696:
	     $date=date('Y-m-d');
	            $sel1="select * from  studentfees  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 $sum;
	    
	    break;
	    	case 9191:
	?>
<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(){
		$("#btn").prop("disabled",true);
		$("#con").keyup(function(){
			
		
				var total12=$("#total").val();
				
		var paidd=$("#paid").val();
			var con12=$("#con").val();
			
			var total121= parseInt(total12) - parseInt(con12) ;
			
			
			
			$("#paid").val(total121);
			
		});
		
		
	});
	// fo sep exam fee
	$("document").ready(function(){
		
		$("#sep").change(function(){
			
		
			//	alert("ok");
				
				if($("#sep").prop("checked")==true)
				{
				    
				var sess=$("#session1").val();
					if(sess=='2018-2019')
					{
					var febc=parseInt(200);
					}
					if(sess=='2019-2020')
					{
					var febc=parseInt(300);
					}
					
					
					var d=$("#exam").val(febc);
					var sep1=$("#exam").val();
					var feb1=$("#exam").val();
				}
				else
				{
					var d=$("#exam").val('0');
					
				}
		});
		
		
		
	});
	//for feb exam fee
		// fo sep exam fee
	$("document").ready(function(){
		
		$("#feb").change(function(){
			
		
			//	alert("ok");
				
				if($("#feb").prop("checked")==true)
				{
				    
					var de=$("#exam").val();
					var sess=$("#session1").val();
					if(sess=='2018-2019')
					{
					var febc=parseInt(de)+200;
					}
					if(sess=='2019-2020')
					{
					var febc=parseInt(de)+300;
					}
					var feb2=$("#exam").val(febc);
					
				}
				else
				{
					var d=$("#exam").val('0');
					
				}
		});
		
		
	});
	//for feb exam fee
	////for jul
	$("document").ready(function(){
		
		$("#jul").change(function(){
			
		
				//alert("ok");
				
				if($("#jul").prop("checked")==true)
				{
				    
					var class1=$("#class").val();
					var sess=$("#session1").val();
					if(sess=='2018-2019')
					{
						
					var jul1=parseInt(0);
					}
					if(sess=='2019-2020')
					{
						if(class1=='NINTH CBSE')
						{
					var jul1=parseInt(1500);
						}
						else
						{
							var jul1=parseInt(0);
						}
					}
					var feb213=$("#reg12").val(jul1);
					//alert("ok");
				}
				else
				{
					var d8=$("#reg12").val('0');
					
				}
		});
		
		
	});
	////for jul
	
	$("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(){
		
		$("#con").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(){
		
		$("#con").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);
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	
		$("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=$("#fee").val();
		var conv123=$("#conv").val();
		var comp123=$("#comp").val();
		$(".option").change(function(){
			
			 var m=$(":checkbox").filter(':checked').length;
			 var lem=0;
			 
			 for(i=0;i< m;i++)
			 {
				 lem++;
				 //alert(lem);
			 }
			 if(lem>0)
				{
					//alert();
					$("#btn").prop("disabled",false);
				}
				else
				{
					$("#btn").prop("disabled",true);
				}
	 //for jun conv
	$("document").ready(function(){
		
		$("#jun1").change(function(){
			
		
			
				if($("#jun1").prop("checked")==true)
				{	//alert("ok");
				    var con12=$("#convcons1").val();
				    var con13=$('#convcons').val(con12);
					 var con14=$("#convcons").val();
				    var fees1=$("#fee").val();
				//	alert(con14);
		var conv1=$("#conv").val();
	//alert(conv1);
			var add1=$("#add").val();
			//alert(add1);
			var dew1=$("#dew").val();
			var gen1=$("#gen").val();
		//	alert(gen1);
			var paid1=$("#paid").val();
			//var conv1=$("#conv").val();
			var convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg1=$("#reg").val();
		//	alert(reg1);
			var reg12=$("#reg1").val();
			//alert(reg12);
			var comp1=$("#comp").val();
			//alert(comp1);
			var ann1=$("#ann").val();
			//alert(ann1);
			var other1=$("#other").val();
			//alert(other1);
			var exam1=$("#exam").val();
			//alert(exam1);
			var totalm= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg1) - parseInt(con14);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg1)+ parseInt(dew1) - parseInt(con14);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
				}
				else{
				    
				     $('#convcons').val('0');
					
					 var con14=$("#convcons").val();
				    var fees1=$("#fee").val();
				//	alert(con13);
		var conv1=$("#conv").val();
	//alert(conv1);
			var add1=$("#add").val();
			//alert(add1);
			var dew1=$("#dew").val();
			var gen1=$("#gen").val();
		//	alert(gen1);
			var paid1=$("#paid").val();
			//var conv1=$("#conv").val();
			var convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg1=$("#reg").val();
		//	alert(reg1);
			var reg12=$("#reg1").val();
		//	alert(reg12);
			var comp1=$("#comp").val();
			//alert(comp1);
			var ann1=$("#ann").val();
			//alert(ann1);
			var other1=$("#other").val();
			//alert(other1);
			var exam1=$("#exam").val();
			//alert(exam1);
			var totalm= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1) - parseInt(con14);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1) - parseInt(con14);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
				}
				
			
		});
		
		
	});
	//for jun conv
			 ////for consession reason
var con1=$("#con1").val();
var con1267=lem*con1;		
			////for consession reason 
		var fees1=$("#fee").val();
		//var comp1=$("#feess").val();
		
		var fees12=lem*fees123;
		var comp1=lem*comp123;
	//	alert(comp1);
		var conv12=lem*conv123;
			var add1=$("#add").val();
			var dew1=$("#dew").val();
			var gen1=$("#gen").val();
			var paid1=$("#paid").val();
			//var conv1=$("#conv").val();
			var convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg1=$("#reg").val();
		//	alert(reg1);
			var reg12=$("#reg12").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(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) + parseInt(reg1) - parseInt(convcons1);
			var totalg= parseInt(fees12) + parseInt(add1) + parseInt(gen1) + parseInt(conv12)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1) + parseInt(reg1) + parseInt(reg12) - parseInt(convcons1);
		
			
			if($(this).prop("checked")==true)
		{
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			$("#fee").val(fees12);
			$("#comp").val(comp1);
			$("#conv").val(conv12);
			$("#con").val(con1267);
		}
		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);
			$("#comp").val(comp1);
			$("#con").val(con1267);
		}
		});
		
		
	});
	
	///for other
	$("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 convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg12=$("#reg").val();
		//	var reg1=$("#reg1").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(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) - parseInt(convcons1);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
		$("document").ready(function(){
		
			$("#reg12").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 convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg12=$("#reg").val();
		var reg123=$("#reg12").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(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12)+ parseInt(reg123) - parseInt(convcons1);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12)+ parseInt(reg123) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
		$("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 convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg12=$("#reg").val();
		//	var reg1=$("#reg1").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(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) - parseInt(convcons1);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	$("document").ready(function(){
		
		$("#convence").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 convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg1=$("#reg").val();
			var reg12=$("#reg1").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(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) - parseInt(convcons1);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	

	$("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 convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg12=$("#reg").val();
			var reg1=$("#reg1").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(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) - parseInt(convcons1);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	
	/////payble
	$("document").ready(function(){
		
		$(".option").change(function(){
		//	alert("ok");
		
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	
	
	$("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 convcons1=$("#convcons").val();
			//	alert(convcons1);
			var con1=$("#con").val();
			var reg12=$("#reg").val();
			var reg1=$("#reg1").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(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(reg12) - parseInt(convcons1);
			var totalg= parseInt(fees1) + parseInt(add1) + parseInt(gen1) + parseInt(conv1)  + parseInt(comp1) + parseInt(ann1) + parseInt(other1) + parseInt(exam1)+ parseInt(dew1)+ parseInt(reg12) - parseInt(convcons1);
			$("#mtotal").val(totalm);
			$("#total").val(totalg);
			
			var total3=$("#total").val();
		
			var con14=$("#con").val();
			var payble1=parseInt(total3)-parseInt(con14);
			$("#payble").val(payble1);
		});
		
		
	});
	//for other
	
	// for check box coding/////
	</script>
	
	
	<?php
	$fee_id=$_REQUEST['id'];
	//echo"$eid";
	$sel31="select * from studentfees where id='$fee_id' and status=''";
	$res31=mysqli_query($conn,$sel31);
	$row31=mysqli_fetch_array($res31,MYSQLI_BOTH);
	$eid=$row31['search'];
	$sel="select * from  registration where application='$eid' order by id desc";
	$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//
	$selt="select * from  registration where session='2022-2023' and application='$application' and status='' order by id desc";
	$rest=mysqli_query($conn,$selt);
	$rowt=mysqli_fetch_array($rest,MYSQLI_BOTH);
	$trans=$rowt['trans'];
		$selt1="select * from  registration where session='$session' and application='$application' and status='' order by id desc";
	$rest1=mysqli_query($conn,$selt1);
	$rowt1=mysqli_fetch_array($rest1,MYSQLI_BOTH);
	$tra=$rowt1['tra'];
	////////for set transfer////
	//////for consession 
	
	//echo $fix;
	//echo $reason;
	/// for consession
	///////////////fees
	
	$sel4="select * from studentfees where id='$fee_id'  and status='' order by id desc";
	$res4=mysqli_query($conn,$sel4);
	$row4=mysqli_fetch_array($res4,MYSQLI_BOTH);
	$remain=$row4['remain'];
	$search=$row4['search'];
	$gen12=$row4['gen'];
		$regc=$row4['reg'];
	$hob=explode(",",$row4['month']);
		//echo $hob;
		
	
	?>
	
	<div class="panel-group">
				<div class="panel panel-primary">
				
				
		<?php
	  
	  ?>
		
	
				<div class="panel-body">
				<center><h2 class="modal-title" style="color:green;background-color:yellow"> CASH UPDATE (<?php echo $session;?>) </h2> </center>
				<div style="background-color:yellow">
			
			<?php
			$mon='';
	  $selm="select * from studentfees where id='$fee_id' and status='' 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 feesdata(this)" >
				
				 
				 <!----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="app" id="app"/>
				<input type="hidden" value="<?php echo $fee_id;?>" name="fee_id" />
					<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 $session;?>" name="" id="session1"/>
				<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> 
			 <?php
			 $sel1="select * from fees where class='$class' and session='$session' ";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$class1=$row1['class'];
	$fees=$row1['fees'];
	$reg=$row1['reg'];
		$reg1=$row1['reg'];
	$add=$row1['addm'];
	$ann=$row1['ann'];
	$comp13=$row1['comp'];
	$gen12=$row1['gen'];
			 
			 ?>
  <input type="hidden" class="form-control" value="<?php echo $row['session'];?>" name="year"  />
  
  <div class="form-group">
    <label  class="col-sm-4 control-label">Miscellaneous</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="add"  value="<?php echo $row4['addm']?>" name="add" readonly 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 $row4['ann']?>" name="ann" readonly required >
    </div>
  </div>
  <div class="form-group" style='display: none;'>
    <label  class="col-sm-4 control-label">Registration</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="reg12"  value="<?php echo $row4['reg']?>" name="reg1" 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 $row4['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 $row4['comp']?>"readonly required>
    </div>
  </div>
  <div class="form-group" style='display: none;'>
    <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 $row4['gen']?>"  name="gen" readonly required>
    </div>
  </div>
  <div class="form-group" style='display: none;'>
    <label  class="col-sm-4 control-label">Maint/Med</label>
    <div class="col-sm-8">
      <input type="number" class="form-control" id="reg" value="0" name="reg" readonly 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 $row4['other']?>' 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" value='<?php echo $row4['other_remark']?>'name="other_remark" >
    </div>
  </div>
  
  
			
  
  
  

  
			 </div>
			  <!----dusari row-->
				<div class="col-sm-6">
				    <br/>
				    	
				 
				    
			
  
   
  <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 $row4['fee']?>" name="fees"  readonly required>
      <input type="hidden" class="form-control" id="feess" value="<?php echo $fees;?>" >
    </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 $row4['van']?>" name="conv" readonly required>
      <input type="hidden" class="form-control" id="conv123" value="<?php echo $code;?>" >
    </div>
  </div>
  <div class="form-group" style='display: none;'>
    <label  class="col-sm-4 control-label">Conv Cons</label>
    <div class="col-sm-8">
      
      <input type="number" class="form-control" id="convcons" value='0' readonly>
      <input type="hidden" class="form-control" id="convcons1" value="<?php if($conv!=''){echo $conv;}else{echo '0';}?>"">
    </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" value="<?php echo $row4['pre']?>" class="form-control"  required>
    </div>
  </div>
  <div class="form-group">
    <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 $row4['addm']?>' style="background-color:#3F729B;color:yellow" title="Please select Month" readonly 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" value='<?php echo $row4['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="hidden" class="form-control" id="con1"  value="<?php echo $row4['con']?>" >
         <input type="hidden" class="form-control" id="convcons1"  value="<?php echo $conv;?>">
      
      <input type="number" class="form-control" id="con" value="<?php echo $row4['con']?>" name="con" required>
      <textarea id="remark" rows="4" cols="32" style="resize:none" name="remark" ><?php echo $row4['remark']?></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" value='<?php echo $row4['total']-$row4['paid']-$row4['con']?>'  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" value='<?php echo $row4['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="due" value='<?php echo $row4['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 <?php if($row4['mode']=='Cash'){echo 'Selected';}?>>Cash</option>
		<option <?php if($row4['mode']=='UPI'){echo 'Selected';}?>>UPI</option>
		<option <?php if($row4['mode']=='CHECK'){echo 'Selected';}?>>CHECK</option>
		<option <?php if($row4['mode']=='BANK'){echo 'Selected';}?>>BANK</option></select>
      
    </div>
  </div>	
	<div class="form-group">
    <label  class="col-sm-4 control-label">Date</label>
    <div class="col-sm-8">
      <input type="date" style="color:red" class="form-control"   name="date12" value='<?php echo $row4['date']?>' required>
    </div>
  </div>  
  
				</div>
				
				<!----dusari row-->
				
				
				
				
  <div class="form-group">
    
    <div class="col-sm-5">
      
	   <br/>
				<center><button class="btn btn-primary" >Update</button>
				 &emsp;&emsp;&emsp;<button class="btn btn-danger" data-dismiss="modal"> Close</button>
				</center>
				</div>
				</form>
	</div>
	</div>
	</div>
	
	
	
	<?php
	break;
	case 1090:
	
	 
	//$ch=implode(',',$_POST['choice']);
//	echo $ch;
	$name=$_POST['name'];
		$remark1=$_POST['remark'];
			$other_remark1=$_POST['other_remark'];
			
			$remark=addslashes($remark1);
				$other_remark=addslashes($other_remark1);
	$exam=$_POST['exam'];
	$fee_id=$_POST['fee_id'];
	$other=$_POST['other'];
	$ann=$_POST['ann'];
	$paid=$_POST['paid'];
	$add=$_POST['add'];
	$reg=$_POST['reg'];
	$reg1=$_POST['reg1'];
	$comp=$_POST['comp'];
		$pre=$_POST['pre'];
	$gen=$_POST['gen'];
	$van=$_POST['conv'];
	$con=$_POST['con'];
	$search=$_POST['app'];
	$board=$_POST['board'];
$date12=$_POST['date12'];
		$mtotal=$_POST['mtotal'];
	$class=$_POST['class'];
	//$month=$_POST['month'];
	$mode=$_POST['mode'];
	$fee=$_POST['fees'];
		$pr=$_POST['pr'];
		$mobile1=$_POST['mobile1'];
	//	$date_add=$_POST['date_add'];
	
//$edate=date("d-m-Y",strtotime($date1));
//echo $edate;
	date_default_timezone_set("asia/kolkata");
	$time=date("h:i:sa");
			$date1=date('Y-m-d');
	$year=$_POST['year'];
	$total=$_POST['total1'];
	$remain=$total-$paid-$con;
	
	
$ins="update studentfees set fee='$fee',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',pre='$pre',remark='$remark',reg1='$reg1',other_remark='$other_remark',mode='$mode',date='$date12' where id='$fee_id'";

	if(mysqli_query($conn,$ins))
	{
	    
		
			echo"Fees Update";
		
	}
	else
	{
		echo"Fees Not Update";
	}
	break;
	case 3637:
	$session=$_POST['session'];
  $sel1="select * from  registration where session ='$session'  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'  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  studentfees where search ='$applicationr' and year='$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' ";
$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/logo.png" height="70px" width="70px"/></span></td><td align="center"><span id="name"  style="font-size:20px;font-weight:bold">GS MEMORIAL PUBLIC SCHOOL </span><br/><span id="name1" style="font-size:18px;font-weight:bold"></span></td><td style="font-size:14px"> </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>
<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" >Exam</span></td>
<td><span id="name2">Conv</span></td>

<td><span id="name2">Main</span></td>
<td><span id="name2">Miscellaneous</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">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">Action</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['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['other_remark'];?></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>
<td><span id="name3"><a href="slip.php?flag=<?php echo $row2['id'];?>" target="_blank"><span class="fa fa-print"></span></a></span>
	
	&nbsp;<a href="javascript:;" onclick="deleterow13(<?php echo $row2['id'];?>)"><span class="glyphicon glyphicon-trash"></span></a>
	<?php if($row2['status']=='Not'){?>
	&emsp;<a href="javascript:;" onclick="deleterow136(<?php echo $row2['id'];?>)">Approved</a>
	<?php }?>
	</td>

</tr>


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

<td colspan="16" 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 396:
	$id=$_POST['rowid'];

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

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

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

	break;
	
	case 3839:
	$year=$_POST['year'];
//	$class=$_POST['class'];
  $sel="select * from  studentfees where year='$year'  and status='Delete'  order by date desc ";
	$res=mysqli_query($conn,$sel);
	$sel1="select * from  studentfees  where year='$year' and status='Delete'  ";
	$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>Slip No.</th><th>Session</th><th>Name</th><th>Class</th><th> Month</th><th>Tution Fee</th><th>Annual Fee</th><th>Exam Fee</th><th>Conveyance </th><th>Misc.</th><th>Paid</th><th>Dues Charge</th><th>Other Charge</th><th> Total</th><th>Add DateTime</th><th>Action</th>
            </tr>
        </thead>
<tfoot>
           <tr>
                <th>Sr.</th><th>Sch No.</th><th>Slip No.</th><th>Session</th><th>Name</th><th>Class</th><th> Month</th><th>Tution Fee</th><th>Annual Fee</th><th>Exam Fee</th><th>Conveyance </th><th>Misc.</th><th>Paid</th><th>Dues Charge</th><th>Other Charge</th><th> Total</th><th>DateTime</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['id'];?></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['paid'];?></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-refresh"></span></a></td>
	
	

	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt>Not Record Available.</font>";
	}
	break;
		case 363637:
	$old=$_POST['session'];
	$new=$_POST['nsession'];
	$class=$_POST['class'];
  $sel1="select * from  registration where session ='$old' 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: ['print','pdf','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">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">Mother</th><th  style="text-align:center">Class</th><th  style="text-align:center">Mobile</th><th  style="text-align:center">Village</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">Mother</th><th  style="text-align:center">Class</th><th  style="text-align:center">Mobile</th><th  style="text-align:center">Village</th>
        </tr>
        </tfoot>
<tbody>		
  <?php
 
  $sel="select * from  registration where session ='$new'  order by id desc";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
	    $app=$row['application'];
		$a=$row['village'];
	$b=$row['postoffice'];
	$c=$row['dist'];
	$e=$row['mobile'];
	$d=$a." ".$c;
	
	$sel11="select * from  registration where session='$old' and application='$app'  ";
		$res11=mysqli_query($conn,$sel11);
		$row11=mysqli_fetch_array($res11,MYSQLI_BOTH);
		if(!$row11)
		{
		?>
		 
	<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['mobile'];?></td><td><?php echo $row['village'];?></td>
	
	</tr>
	<?php
	$s++;
	}
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
		case 3689:
	$year1=$_POST['session'];
	$class=$_POST['class'];
  $sel1="select * from  registration where session ='$year1' and subject='$class' and code>=0 order by name asc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['print','pdf','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">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/Sec</th><th  style="text-align:center">Mobile</th><th  style="text-align:center">Vill</th><th  style="text-align:center">Trns. Charge</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/Sec</th><th  style="text-align:center">Mobile</th><th  style="text-align:center">Vill</th><th  style="text-align:center">Trans. Charge</th>
        </tr>
        </tfoot>
<tbody>		
  <?php
  $year=$_POST['session'];
  $sel="select * from  registration where session ='$year1' and subject='$class' and code>0 order by id desc";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		$c=$row['code'];
				?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['id'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['fname'];?></td><td><?php echo $row['subject'];?>/<?php echo $row['section'];?></td><td><?php echo $row['mobile'];?></td><td><?php echo $row['village'];?></td><td><?php echo $row['code'];?></td>
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;

	case 36899:
	$year1=$_POST['session'];
//	$class=$_POST['class'];
  $sel1="select * from  registration where session ='$year1'  and code>=0 order by name asc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['print','pdf','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">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/Sec</th><th  style="text-align:center">Mobile</th><th  style="text-align:center">Vill</th><th  style="text-align:center">Trns. Charge</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/Sec</th><th  style="text-align:center">Mobile</th><th  style="text-align:center">Vill</th><th  style="text-align:center">Trans. Charge</th>
        </tr>
        </tfoot>
<tbody>		
  <?php
  $year=$_POST['session'];
  $sel="select * from  registration where session ='$year1'  and code>0 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><?php echo $row['id'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['fname'];?></td><td><?php echo $row['subject'];?>/<?php echo $row['section'];?></td><td><?php echo $row['mobile'];?></td><td><?php echo $row['village'];?></td><td><?php echo $row['code'];?></td>
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
	case 181920:
	$year1=$_POST['year'];
	 $class=$_POST['class'];
  $sel1="select * from  registration where session ='$year1' and subject='$class'  ";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

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


	<div class="table-responsive">
<table  class="display nowrap"  cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">Roll</th><th  style="text-align:center">NAME</th><th  style="text-align:center">EXAM</th> <th  style="text-align:center" colspan='3'>HINDI</th><th  style="text-align:center">ENGLISH</th><th  style="text-align:center">MATH</th><th  style="text-align:center">SCIENCE/EVS<span style="color:red"></span></th><th  style="text-align:center">SOC.SCIE</th><th  style="text-align:center">G.K./SANSKRIT</th><th  style="text-align:center">COMPUTER</th><th  style="text-align:center">ART</th><th  style="text-align:center">HOME SC/P.T.</th><th  style="text-align:center">TOTAL</th>
           
            </tr>
        </thead>

<tbody>		
  <?php
  $year=$_POST['year'];
  $class=$_POST['class'];
  $sel="select * from  registration where session ='$year' and subject='$class'  ";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		$ap=$row['application'];
	$session=$row['session'];
	$c=$row['dist'];
	$e=$row['mobile'];
	$d=$a." ".$c;
	
	
	$sel121="select * from  six_eightresult where session ='$session' and rol='$ap' and exam='HALF YEARLY EXAM'";
	$res121=mysqli_query($conn,$sel121);
	$row121=mysqli_fetch_array($res121,MYSQLI_BOTH);
	$sel1211="select * from  six_eightresult where session ='$session' and rol='$ap' and exam='ANNUAL EXAM'";
	$res1211=mysqli_query($conn,$sel1211);
	$row1211=mysqli_fetch_array($res1211,MYSQLI_BOTH);
		?>
		 
	<tr class="text-center">
	<td><?php echo $s++;?></td><td><?php echo $row['roll'];?></td><td><?php echo $row['name'];?></td><td>Exam</td><td>HINDI</td><td>ENGLISH</td><td>MATHES</td><td>SCIENCE</td><td>SOCIAL SCIENCE</td><td>G.K./SANSKRIT </td><td>COMPUTER</td><td>ART</td><td>HOME SCI./PT</td><td>TOTAL</td>
	
	</tr>
		
		<tr class="text-center">
	<td></td><td></td><td>M-<?php echo $row['mname'];?></td><td>SECOND TERM</td>
	<td><?php echo $row121['mark1p'];?></td><td><?php echo $row121['mark1n'];?></td><td><?php echo $row121['mark1e'];?></td><td><?php echo $row121['mark1m'];?></td>
		<td><?php echo $row121['mark2p'];?></td><td><?php echo $row121['mark2n'];?></td><td><?php echo $row121['mark2e'];?></td><td><?php echo $row121['mark2m'];?></td>
			<td><?php echo $row121['mark3p'];?></td><td><?php echo $row121['mark3n'];?></td><td><?php echo $row121['mark3e'];?></td><td><?php echo $row121['mark3m'];?></td>
            	<td><?php echo $row121['mark4p'];?></td><td><?php echo $row121['mark4n'];?></td><td><?php echo $row121['mark4e'];?></td><td><?php echo $row121['mark4m'];?></td>
            		<td><?php echo $row121['mark5p'];?></td><td><?php echo $row121['mark5n'];?></td><td><?php echo $row121['mark5e'];?></td><td><?php echo $row121['mark5m'];?></td>
            			<td><?php echo $row121['mark6p'];?></td><td><?php echo $row121['mark6n'];?></td><td><?php echo $row121['mark6e'];?></td><td><?php echo $row121['mark6m'];?></td>
            				<td><?php echo $row121['mark7p'];?></td><td><?php echo $row121['mark7n'];?></td><td><?php echo $row121['mark7e'];?></td><td><?php echo $row121['mark7m'];?></td>

	<td><?php echo $row121['mark8p'];?></td><td><?php echo $row121['mark8n'];?></td><td><?php echo $row121['mark8e'];?></td><td><?php echo $row121['mark8m'];?></td>

	<td><?php echo $row121['mark9p'];?></td><td><?php echo $row121['mark9n'];?></td><td><?php echo $row121['mark9e'];?></td><td><?php echo $row121['mark9m'];?></td>





	
	<?php

	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	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 ";
	}
	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/logo.png" height="70px" width="70px"/></span></td><td align="center"><span id="name"  style="font-size:20px;font-weight:bold">PACIFIC PUBLIC SCHOOL </span><br/>Semra No.1 , Chargawan-Gorakhpur<br/><span id="name1" style="font-size:18px;font-weight:bold"></span></td><td style="font-size:14px"><b>Contact-</b>7376598752<br/>9451960467 </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 7172369:
	
	
$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'  >


<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 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 20099:
	$year1=$_POST['session'];
		$session=$_POST['session'];
	$class=$_POST['class'];
//	$section=$_POST['section'];
  $sel1="select * from  registration where session ='$year1' and subject='$class' and code>0 ";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

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


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
    <caption id='pr' style='font-size:20px;font-weight:bold'>Class =  <?php echo $class;?></caption>
        <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">Mobile</th><th  style="text-align:center">Vill</th><th  style="text-align:center">Charge</th><th  style="text-align:center">Apr</th><th  style="text-align:center">May</th><th  style="text-align:center">Jun</th><th  style="text-align:center">Jul</th><th  style="text-align:center">Aug</th><th  style="text-align:center">Sep</th><th  style="text-align:center">Oct</th><th  style="text-align:center">Nov</th><th  style="text-align:center">Dec</th><th  style="text-align:center">Jan</th><th  style="text-align:center">Feb</th><th  style="text-align:center">Mar</th><th  style="text-align:center">Paid</th>
            </tr>
        </thead>

<tbody>		
  <?php
  $year=$_POST['session'];
  $sel="select * from  registration where session ='$year1' and subject='$class'   and code>0 ";
	$res=mysqli_query($conn,$sel);
	$s=1;
		$p=0;
		$al_paid=0;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
	    $application=$row['application'];
	     $selca="select * from  studentfees where  month like '%April%' and year='$session' and search='$application' and status='' order by id desc ";
	$resca=mysqli_query($conn,$selca);
	$a='';
	if($rowca=mysqli_fetch_array($resca,MYSQLI_BOTH))
	{
		$a='Paid';
		$p++;
	}
	else
	{
	    $a='-';
	}
	//////may
	$selcm="select * from  studentfees where  month like '%May%' and year='$session' and search='$application' and status=''  order by id desc ";
	$rescm=mysqli_query($conn,$selcm);
	$b='';
	if($rowcm=mysqli_fetch_array($rescm,MYSQLI_BOTH))
{
		$b='Paid';
		$p++;
	}
	else
	{
	    $b='-';
	}
	//////Jun
	$selcj="select * from  studentfees where  month like '%Jun%' and year='$session' and search='$application' and status=''  order by id desc ";
	$rescj=mysqli_query($conn,$selcj);
	$c='';
	if($rowcj=mysqli_fetch_array($rescj,MYSQLI_BOTH))
	{
		$c='Paid';
		$p++;
	}
	else
	{
	    $c='-';
	}
	//////july
	$selcmj="select * from  studentfees where  month like '%July%' and year='$session' and search='$application' and status=''  order by id desc ";
	$rescmj=mysqli_query($conn,$selcmj);
	$d='';
	if($rowcmj=mysqli_fetch_array($rescmj,MYSQLI_BOTH))
	{
		$d='Paid';
		$p++;
	}
	else
	{
	    $d='-';
	}
	//////August
	$selcmja="select * from  studentfees where  month like '%August%' and year='$session' and search='$application' and status=''  order by id desc ";
	$rescmja=mysqli_query($conn,$selcmja);
	$e='';
	if($rowcmja=mysqli_fetch_array($rescmja,MYSQLI_BOTH))
	{
		$e='Paid';
		$p++;
	}
	else
	{
	    $e='-';
	}
	//////sep
	$selcms="select * from  studentfees where  month like '%September%' and year='$session' and search='$application' and status='' order by id desc ";
	$rescms=mysqli_query($conn,$selcms);
	$f='';
	if($rowcms=mysqli_fetch_array($rescms,MYSQLI_BOTH))
	{
		$f='Paid';
		$p++;
	}
	else
	{
	    $f='-';
	}
	//////oct
	$selcmjo="select * from  studentfees where  month like '%October%' and year='$session' and search='$application' and status=''  order by id desc ";
	$rescmjo=mysqli_query($conn,$selcmjo);
	$g='';
	if($rowcmjo=mysqli_fetch_array($rescmjo,MYSQLI_BOTH))
	{
		$g='Paid';
		$p++;
	}
	else
	{
	    $g='-';
	}
	//////Nov
	$selcmjn="select * from  studentfees where  month like '%November%' and year='$session' and search='$application' and status=''  order by id desc ";
	$rescmjn=mysqli_query($conn,$selcmjn);
	$h='';
	if($rowcmjn=mysqli_fetch_array($rescmjn,MYSQLI_BOTH))
	{
		$h='Paid';
		$p++;
	}
	else
	{
	    $h='-';
	}
	//////Dec
	$selcmjd="select * from  studentfees where  month like '%December%' and year='$session' and search='$application' and status='' order by id desc ";
	$rescmjd=mysqli_query($conn,$selcmjd);
	$i='';
	if($rowcmjd=mysqli_fetch_array($rescmjd,MYSQLI_BOTH))
{
		$i='Paid';
		$p++;
	}
	else
	{
	    $i='-';
	}
	//////Jan
	$selcmjdj="select * from  studentfees where  month like '%January%' and year='$session' and search='$application' and status=''  order by id desc ";
	$rescmjdj=mysqli_query($conn,$selcmjdj);
	$j='';
	if($rowcmjdj=mysqli_fetch_array($rescmjdj,MYSQLI_BOTH))
	{
		$j='Paid';
		$p++;
	}
	else
	{
	    $j='-';
	}
	//////Jan
	$selcmf="select * from  studentfees where  month like '%February%' and year='$session' and search='$application' and status='' order by id desc ";
	$rescmf=mysqli_query($conn,$selcmf);
	$k='';
	if($rowcmf=mysqli_fetch_array($rescmf,MYSQLI_BOTH))
{
		$k='Paid';
		$p++;
	}
	else
	{
	    $k='-';
	}
	//////mar
	$selcmm="select * from  studentfees where  month like '%March%' and year='$session' and search='$application' and status='' order by id desc ";
	$rescmm=mysqli_query($conn,$selcmm);
	$l='';
	if($rowcmm=mysqli_fetch_array($rescmm,MYSQLI_BOTH))
	{
		$l='Paid';
		$p++;
	}
	else
	{
	    $l='-';
	}
	$al=$p*$row['code'];
	$al_paid=$al_paid+$al;
		?>
		 
	<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['mobile'];?></td><td><?php echo $row['village'];?></td><td><?php echo $row['code'];?></td><td><?php echo $a;?></td><td><?php echo $b;?></td><td><?php echo $c;?></td><td><?php echo $d;?></td><td><?php echo $e;?></td><td><?php echo $f;?></td><td><?php echo $g;?></td><td><?php echo $h;?></td><td><?php echo $i;?></td><td><?php echo $j;?></td><td><?php echo $k;?></td><td><?php echo $l;?></td><td><?php echo $al;?></td>
	
	</tr>
	<?php
	$p=0;
	$s++;
	}
	?>
	 </tbody>
	 <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">Mobile</th><th  style="text-align:center">Vill</th><th  style="text-align:center">Charge</th><th  style="text-align:center">Apr</th><th  style="text-align:center">May</th><th  style="text-align:center">Jun</th><th  style="text-align:center">Jul</th><th  style="text-align:center">Aug</th><th  style="text-align:center">Sep</th><th  style="text-align:center">Oct</th><th  style="text-align:center">Nov</th><th  style="text-align:center">Dec</th><th  style="text-align:center">Jan</th><th  style="text-align:center">Feb</th><th  style="text-align:center">Mar</th><th  style="text-align:center"><?php echo $al_paid;?></th>
            </tr>
        </tfoot>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;

}

	
?>

MMCT - 2023