MMCT TEAM
Server IP : 2a02:4780:11:1359:0:1d43:a566:2  /  Your IP : 216.73.216.161
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/shivbalika.in/public_html/link/../code/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u490972518/domains/shivbalika.in/public_html/link/../code/student_detailscode.php
<?php 
include("../link/databaseconnection.php");

$flag=$_REQUEST['flag'];

	
switch($flag)
{
    
    
    	case 9696:
	     $date=date('Y-m-d');
		
			$sel1="select * from  fees_paid  where date='$date'  and status=''  order by id asc ";
		 
	            
	            $sum=0;
$res1=mysqli_query($conn,$sel1);
while($row1=mysqli_fetch_array($res1,MYSQLI_BOTH))
{
	$tot=$row1['total'];
	$search=$row1['search'];
	
	$paid=$row1['paid'];
	$remain12=$row1['remain'];
	$sum=$paid+$sum;
}
echo $row785['name'].'='.$sum;
	    
	    break;
	    
	case 1:
	$session=$_POST['session'];
	$board=$_POST['board'];
  $sel1="select * from  registration where session ='$session' and mediam='$board' 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<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 ='$session' and mediam='$board' 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'];
	$d=$a." ".$c;
		?>
		 
<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['id'];?></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><?php echo "<b>Vill-</b>".$a."<br/>"."<b>Post-</b>".$b."<br/>"."<b>Dist-</b>".$c."<br/>"."<b>Mob-</b>".$row['mobile'];?></td>
	
	
	<td><a href="javascript:;" onclick="editrow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-pencil"></span></a>
	
	&emsp;<a href="javascript:;" onclick="messagerow(<?php echo $row['id'];?>)"> <span class="glyphicon glyphicon-envelope"></span></a>
	
	<br/><br/>&emsp;<a href="registration_print.php?flag=<?php echo $row['id'];?>"><span class="fa fa-print"></span></a>
	&emsp;<a href="javascript:;" onclick="transferrow(<?php echo $row['id'];?>)"> <span class=""></span>Trans</a>
	&emsp;<a href="javascript:;" onclick="deleterow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-trash"></span></a></td>
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
	
	
	case 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;
	
	$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="date" class="form-control" id="dob" name="dob"><span>Pre Dob.-<p style="color:blue"><?php echo $row['dob']?></p></span>
    </div>
  </div>
  
  <div class="form-group">
  <br/>
    <label  class="col-sm-4 control-label">Session <span style="color:red">*</span></label>
    <div class="col-sm-8">
	
	<select class="form-control"  name="session" data-validation="required">
	<option value="">---select---</option>
				<option <?php if($row['session']=='2018-2019'){echo'selected';}?>>2018-2019</option>
				<option <?php if($row['session']=='2019-2020'){echo'selected';}?>>2019-2020</option>
				<option <?php if($row['session']=='2020-2021'){echo'selected';}?>>2020-2021</option>
				<option <?php if($row['session']=='2021-2022'){echo'selected';}?>>2021-2022</option>
				<option <?php if($row['session']=='2022-2023'){echo'selected';}?>>2022-2023</option>
	</select>
	</div>
	</div>
	<div class="form-group">
  <br/>
    <label  class="col-sm-4 control-label">Minority<span style="color:red">*</span></label>
    <div class="col-sm-8">
	
	<select class="form-control"  name="minority" data-validation="required">
	<option value="">---select---</option>

				<option <?php if($row['minority']=='HINDU'){echo'selected';}?>>HINDU</option>
				<option <?php if($row['minority']=='MUSLIM'){echo'selected';}?>>MUSLIM</option>
				<option <?php if($row['OTHER']=='OTHER'){echo'selected';}?>>OTHER</option>
			
	</select>
	</div>
	</div>
  <div class="form-group">
  <br/>
    <label  class="col-sm-4 control-label"><span style="color:red">*</span></label>
    <div class="col-sm-8">
	
	<input type="hidden" class="form-control" value="<?php echo $application;?>"  name="app" required />
	<input type="hidden" class="form-control" value="<?php echo $eid;?>"  name="id1234" required />
	
	</div>
	</div>
	  <!--dusri row close--->
	  
	<input type="hidden" value="<?php echo strtoupper(substr(md5(uniqid()),0,10));?>" name="app1">
			
			</div>
			
	  <div class="form-group">
  
    <label  class="col-sm-4 control-label"> <span style="color:red"></span></label>
    <div class="col-sm-6">
	
	
	
	
	</div>
	</div>
	  <hr/>
	  <!-- one div-subject open--->
	  <!-- one div-subject close--->
	  
	  <!-- second div-subject open--->
	    <div class="col-sm-4">
	  <br/>
  <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-6 control-label">Choose Group<span style="color:red">*</span></label>
   
   <div class="col-sm-6">
  <span><p style="color:blue"><?php echo $row['class'];?></p></span>
	  <?php 
	$selc="select * from class";
	$resc=mysqli_query($conn,$selc);
	?>
	<select class="form-control" style="font-weight:bold" data-validation="required" id="select" name="class">
	
	  <option value="">--Select--</option>
	  <?php 
	  
	  while($rowc=mysqli_fetch_array($resc,MYSQLI_BOTH))
	  {
	  ?>
	  <option value="<?php echo $rowc['1'];?>"><?php echo $rowc['1'];?></option>
	  <?php
	  }
	  
	  ?>
	  </select>
	   
	  </div>
	  </div>
	
	  <hr/>
	  </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-6">
	<span><p style="color:blue"><?php echo $row['subject'];?></p></span>
	<select class="form-control" id="sel12" name="group" data-validation="required">
	<option value="">---select---</option>
	<option></option>
	</select>
	
	</div>
	</div>
	
	  <hr/>
	  </div>
	  <div class="row">
	  <hr/>
	 <center> <h4 style="color:black">Eligibility</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['mobile1'];?>" 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($row['session']==$rowc['session']){echo'selected';}?> ><?php echo $rowc['session'];?></option>
	  <?php
	  }
	  
	  ?>

	</select>
	</div>
	</div>
	 <div class="form-group">
  <br/>
    <label  class="col-sm-4 control-label"><span style="color:red"></span></label>
    <div class="col-sm-8">
	
	<input type="hidden" class="form-control" value="<?php echo $application;?>"  name="app" required />
	<input type="hidden" class="form-control" value="<?php echo $eid;?>"  name="id1234" required />
	
	</div>
	</div>
	 <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))
	{
	 $up2="update studentfees set search='$app' where name='$name' and class='$subject'";
	 mysqli_query($conn,$up2);
	}
	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);
		$up21="update studentfees set search='$app' where name='$name' and class='$subject'";
	 mysqli_query($conn,$up21);
		echo"ok";
	}
	else
	{
		echo"not update";
	}
	}
				// for updation and image 
				//
			
//-------------------------------------------------------------
	break;
	
	case 6:
	
	$name=$_POST['name'];
	$fname=$_POST['fname'];
	$mname=$_POST['mname'];
	$dob=$_POST['dob'];
	
	$mark1=$_POST['mark1'];
	$mark2=$_POST['mark2'];
	$mark3=$_POST['mark3'];
	$mark4=$_POST['mark4'];
	$mark5=$_POST['mark5'];
	$mark6=$_POST['mark6'];
	$mark7=$_POST['mark7'];
	$mark8=$_POST['mark8'];
	$class=$_POST['class'];
	$session=$_POST['session'];
	$ins1="insert into result(name,fname,mname,dob,sub1,sub2,sub3,sub4,sub5,sub6,sub7,sub8,mark1,mark2,mark3,mark4,mark5,mark6,mark7,mark8,session,class) values('$name','$fname','$mname','$dob','HINDI','ENGLISH','MATHEMATICS','SCIENCE','SOCIAL SCIENCE','AGRICULTURE','SANSKRIT','ART','$mark1','$mark2','$mark3','$mark4','$mark5','$mark6','$mark7','$mark8','$session','$class')";
	if(mysqli_query($conn,$ins1))
	{
		echo"ok";
	}
	else
	{
		echo"not ok";
	}
	
	
	break;
	
	
	case 7:
	$eid=$_REQUEST['id'];
	//echo"$eid";
	$sel="select * from  registration where id='$eid'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	
	?>
	
	
	<div class="panel-group">
				<div class="panel panel-primary">
				
				
				<div class="panel-body">
				<form class="form-horizontal" id="myform21" action="../code/student_detailscode.php?flag=8" method="post" >
				<div class="form-group">
				<input type="hidden" value="<?php echo $row['id'];?>" name="id"/>
				<input type="hidden" value="<?php echo $row['mediam'];?>" name="mediam"/>
				<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'];
	$mediam=$_POST['mediam'];
//echo"$number";

$message=$_POST['message'];
//echo"$message";

$username="AwadheshYadav";
$password="AwadheshYadav";

$to=$number;
$msg=urlencode($message);
if($mediam=='UP BOARD')
{

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

$result=file_get_contents($api);
if($result)
{
	$ins="insert into message (message,count) value('$message','1')";
	$res=mysqli_query($conn,$ins);
	echo"<script>alert('sms send ');window.location.href='../admin/student_details.php';</script>";
}
else
{
	echo"<script>alert('sms not send');window.location.href='../admin/student_details.php';</script>";
}
}
////////////
else
{
	
$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=SHIVBI&receiver=$to&route=TA&msgtype=1&sms=$msg";

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

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


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

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

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

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

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

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

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


?>
	<input type="checkbox" name="choice[]" class="option" id='month' value="22"
		>Dues	
		</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 $eid;?>" style="background-color:green;color:yellow"readonly >
    </div>
  </div>
				<div class="form-group">
				<input type="hidden" value="<?php echo $row['application'];?>" name="sch" id="app"/>
					<input type="hidden" value="<?php echo rand(10000,500000);?>" name="pr" id="pr"/>
					<input type="hidden" value="<?php echo $row['mobile'];?>" name="mobile1" />
					<input type="hidden" value="<?php echo $eid;?>" name="reg_id" id="id"/>
					<input type="hidden" value="<?php echo $session;?>" name="session" id="session"/>
					<input type="hidden" value="<?php echo $email;?>" name="email" />
				<input type="hidden" value="<?php echo $board ;?>" name="board"/>
				<label class="col-sm-2 control-label">Name</label>
				<div class="col-sm-10"><input type="text" class="form-control" value="<?php echo $row['name'];?>" name="name" readonly style="background-color:pink;color:black" /></div>
				</div>
				<div class="form-group">
				<label class="col-sm-4 control-label">Father Name</label>
				<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['fname'];?>"  style="background-color:gray;color:yellow" readonly></div>
				
				</div> 
			    <div class="form-group">
				<label class="col-sm-4 control-label">Class</label>
				<div class="col-sm-5"><input type="text" class="form-control" value="<?php echo $row['subject'];?>" id="class" name="class" style="background-color:#FF8800;color:#0099CC" readonly></div>
				<div class="col-sm-3"><input type="text" class="form-control" value="<?php echo $row['section'];?>"  name="section" style="background-color:#FF8800;color:#0099CC" readonly></div>
				</div> 
			
  <input type="hidden" class="form-control" value="<?php echo $row['session'];?>" name="year"  />
  
					<div id='mo'>
 </div>
				   
			
			 </div>
			  <!----dusari row-->
				<div class="col-sm-6">
				    <br/>
				

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

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

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

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

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


			echo"Fees Submit";
		
	}
	else
	{
		echo"Fees Not Submit";
	}
	}
	
	break;
	
	
	//=========================================================message==//
	//=========================================================message==//
	case 11:
	
	$year=$_POST['session'];
	$board=$_POST['board'];
	$message=$_POST['message'];
	$sel="select * from registration where session='$year' and mediam='$board'";
	$res=mysqli_query($conn,$sel);
	$mob="";
	$count=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$mobile1=$row['mobile'];
		$mob= $mobile1.",".$mob;
		$count++;
		
	}
	if($board=='UP BOARD')
	{
	$username="AwadheshYadav";
$password="AwadheshYadav";
$senderid="SHIV";

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

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

$result=file_get_contents($api);
if($result)
{
	
	$ins="insert into message (message,count) value('$msg','$count')";
	$res=mysqli_query($conn,$ins);
	if($res)
	{
		echo"sms send";
	}
	else
	{
		echo"not insert";
	}
}
else
{
	echo"sms not send";
}
	
	}
	///////////////
	else
	{
		$username="AwadheshYadav";
$password="AwadheshYadav";
$senderid="SHIVBI";

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


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


$result=file_get_contents($api);
if($result)
{
	
	$ins="insert into message (message,count) value('$msg','$count')";
	$res=mysqli_query($conn,$ins);
	if($res)
	{
		echo"sms send";
	}
	else
	{
		echo"not insert";
	}
}
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=SHIVB&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 send";
}
else
{
	echo"sms not send";
}
	
	
	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'];
	$board=$_POST['board'];
		echo $nclass;
	$sel="select * from registration where subject='$class' and session='$session' and mediam='$board'";
	$res=mysqli_query($conn,$sel);
	
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$sch1=$row['id'];
	//	echo $sch1;
		$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
	///
	
	
	
	$sel12="select * from registration where session='$nsession' and application='$sch1'";
	$res12=mysqli_query($conn,$sel12);
	$row12=mysqli_fetch_array($res12,MYSQLI_BOTH);
	
	$date=date("d-m-Y");
	date_default_timezone_set("asia/kolkata");
	$time=date("h:i:sa");
	$datetime=$date." ".$time;
	if($row12)
	{
	    echo 'Allready Transfered';
	    	echo '<br/>';
	}
	else
	{
		$ins="insert into  registration(application,name,fname,	mname,dob,gender,class,ele,board,year,total,obtain,per,grade,subject,city,village,postoffice,dist,state,mobile,pincode,picture,city1,village1,postoffice1,dist1, state1,mobile1,pincode1,session,mediam,adhar,datetime,signature,action,action1,action2,action3,code,caste,minority,trans,tra,status) values('$sch1','$name','$father','$mother','$dob','$gender','$class','$ele','$board','$year','$tmark','$omark','$per','$grade','$nclass','$city','$village','$postoffice','$dist','$state','$mobile','$pincode','$newimgname','$city1','$village1','$postoffice1','$dist1','$state1','$mobile1','$pincode1','$nsession','$mediam','$adhar','$datetime','','','','','','','','','','tra','')";
				
	if(mysqli_query($conn,$ins))
				{
					echo "Transfered";
					echo '<br/>';
				
				}
				else
				{
					echo"not";
				}
}	
	}
	
	
	
	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=SHIVB&receiver=$to&route=TA&msgtype=3&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 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>Slip No.</th><th>Session</th><th>Name</th><th>Board</th><th>Class</th><th> Month</th><th> Total</th><th>Paid</th><th>Dues</th><th>DateTime</th><th>Slip</th><th>Update</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                <th>Sr.</th><th>Slip No.</th><th>Session</th><th>Name</th><th>Board</th><th>Class</th><th> Month</th><th> Total</th><th>Paid</th><th>Dues</th><th>DateTime</th><th>Slip</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['board'];?></td><td><?php echo $row['class'];?></td><td><?php echo $row['month'];?></td><td><?php echo $row['total'];?></td><td><?php echo $row['paid'];?></td><td><?php echo $row['remain'];?></td><td><?php echo $row['date'];?></td>
	
	<td><a href="../admin/slip.php?flag=<?php echo $row['id'];?>"><button class="btn btn-primary">Slip</button></a></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="delete from studentfees where id='$id'";
	if(mysqli_query($conn,$del))
	{
		echo"deleted Successfully";
		
	}
	else
	{
		echo"Not Deleted";
	}
	break;
	
	
	
case 15:
	
	$rol=$_POST['rol'];
	
		$session=$_POST['session'];
	
	$sel="select * from  studentfees where search='$rol' and year='$session' order by date desc";
	
	$res=mysqli_query($conn,$sel);
	$sel1="select * from  studentfees where search='$rol' and year='$session'";
	
	$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">Total</th><th style="text-align:center">Paid</th><th style="text-align:center">Dues</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">Total</th><th style="text-align:center">Paid</th><th style="text-align:center">Dues</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['total'];?></td><td><?php echo $row['paid'];?></td><td><?php echo $row['dues'];?></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="shivbalika9999@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>Slip No.</th><th>Session</th><th>Name</th><th>Class</th><th>Slip</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                <th>Slip No.</th><th>Session</th><th>Name</th><th>Class</th><th>Slip</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">Slip</button></a></td>
	
	
	
	</tr>
	
	 </tbody>
    </table>
	
	</div>
	
	
	
	
	
	
	<?php
	break;
	
	case 24:
	
	$rol=$_POST['std'];
	$session=$_POST['session'];
	
	
	
	$sel="select * from  registration where id='$rol' and session='$session'  ";
	
	$res=mysqli_query($conn,$sel);
	$sel1="select * from  registration where id='$rol' and session='$session'";
	
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_num_rows($res1);
	if($row1==" ")
	{
		echo"<font color=red size=6pt>Not Admission Submit Or Invailid Session and Application Number.</font>";
	}
else
{
	
	?>
	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['print','pdf']
    });
	
});
</script>
<div class="table-responsive">
		<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr >
                <th style="text-align:center">Photo</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">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['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>
	</div>
	
	<?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;
	
	
	// fees update
	
	case 26:
	$eid=$_REQUEST['id'];
	//echo"$eid";
	$sel="select * from  studentfees 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" onsubmit="return feesdatanew(this)" >
				<div class="form-group">
				<label  class="col-sm-4 control-label">Session-</label>
				<div class="col-sm-3">
				  <select class="form-control" name="year">
				<option>--Session--</option>
				
				<option <?php if($row['year']=='2018-2019'){echo'selected';}?>>2018-2019</option>
				<option <?php if($row['year']=='2019-2020'){echo'selected';}?>>2019-2020</option>
				<option <?php if($row['year']=='2020-2021'){echo'selected';}?>>2020-2021</option>
				<option <?php if($row['year']=='2021-2022'){echo'selected';}?>>2021-2022</option>
				<option <?php if($row['year']=='2022-2023'){echo'selected';}?>>2022-2023</option>
				</select>
				</div>
				<br/>
			  </div>
				<div class="form-group">
				<input type="hidden" value="<?php echo $row['search'];?>" name="app"/>
				<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" readonly /></div>
				</div>
				<br/>
				
				<div class="form-group">
				<label class="col-sm-3 control-label">Class</label>
				<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['class'];?>" name="class" readonly ></div>
				<br/>
				</div>
				
				
				<br/>
				<div class="form-group">
    <label  class="col-sm-3 control-label">Month-</label>
    <div class="col-sm-5">      <select class="form-control" name="month">
	  <option <?php if($row['month']=='January'){echo'selected';}?>>January</option>

	  <option <?php if($row['month']=='February'){echo'selected';}?>>February</option>
	  <option <?php if($row['month']=='March'){echo'selected';}?>>March</option>
	  <option <?php if($row['month']=='April'){echo'selected';}?>>April</option>
	  <option <?php if($row['month']=='May'){echo'selected';}?>>May</option>
	  <option <?php if($row['month']=='June'){echo'selected';}?>>June</option>
	  <option <?php if($row['month']=='July'){echo'selected';}?>>July</option>
	  <option <?php if($row['month']=='August'){echo'selected';}?>>August</option>
	  <option <?php if($row['month']=='September'){echo'selected';}?>>September</option>
	  <option <?php if($row['month']=='October'){echo'selected';}?>>October</option>
	  <option <?php if($row['month']=='November'){echo'selected';}?>>November</option>
	  <option <?php if($row['month']=='December'){echo'selected';}?>>December</option>
	  </select>
    </div>
  </div>
 <div class="form-group">
    <label  class="col-sm-3 control-label">Month Fee-</label>
    <div class="col-sm-5">
      <input type="number" class="form-control" value="<?php echo $row['fee'];?>" name="fees" required>
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-3 control-label">Conveyance Fee-</label>
    <div class="col-sm-5">
      <input type="number" class="form-control" value="<?php echo $row['van'];?>" name="conv" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-3 control-label">Exam Fee-</label>
    <div class="col-sm-5">
      <input type="number" class="form-control" value="<?php echo $row['exam'];?>" name="exam" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-3 control-label">Registration Fee-</label>
    <div class="col-sm-5">
      <input type="number" class="form-control" value="<?php echo $row['reg'];?>" name="reg" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-3 control-label">Addmission Fee-</label>
    <div class="col-sm-5">
      <input type="number" class="form-control" value="<?php echo $row['addm'];?>" name="add" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-3 control-label">Computer Fee-</label>
    <div class="col-sm-5">
      <input type="number" class="form-control" value="<?php echo $row['comp'];?>" name="comp" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-3 control-label">Generator Fee-</label>
    <div class="col-sm-5">
      <input type="number" class="form-control" value="<?php echo $row['gen'];?>" name="gen" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-3 control-label">Annual Charge-</label>
    <div class="col-sm-5">
      <input type="number" class="form-control"value="<?php echo $row['ann'];?>" name="ann" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-3 control-label">Other Charge-</label>
    <div class="col-sm-5">
      <input type="number" class="form-control" value="<?php echo $row['other'];?>" name="other" >
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-3 control-label">Due Charge-</label>
    <div class="col-sm-5">
      <input type="number" class="form-control" value="<?php echo $row['remain'];?>" name="due" >
    </div>
  </div>
  <div class="form-group">
    
    <div class="col-sm-5">
      
	   <br/>
				<center><button class="btn btn-primary">Submit</button>
				 &emsp;&emsp;&emsp;<button class="btn btn-danger" data-dismiss="modal"> Close</button>
				</center>
				</div>
				</form>
	</div>
	</div>
	
	<?php
	break;
	
	/// update fees
	
case 27:
	?>
	
	
	<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);
		});
		
		
	});
	// 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);
		
		}
		});
		
		
	});
	
	
	
	// for check box coding/////
	</script>
	
	
	<?php
	$app=$_REQUEST['application'];
	
	
	
	//echo"$eid";
	$sel="select * from  registration where application='$app'";
	$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 $application;?>" 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 $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" value="<?php echo $row3['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>
    </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>
    </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'];
	$ann=$_POST['ann'];
	$paid=$_POST['paid'];
	$add=$_POST['add'];
	$reg=$_POST['reg'];
	$comp=$_POST['comp'];
		$pre=$_POST['pre'];
	$gen=$_POST['gen'];
	$van=$_POST['conv'];
	$con=$_POST['con'];
	$idapp=$_POST['idapp'];
	$board=$_POST['board'];
	$remain=$_POST['due'];
		$mtotal=$_POST['mtotal'];
	$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='$edate',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' where id='$idapp'";
	if(mysqli_query($conn,$up))
	{
	    


		$ins1="insert into updatefees(name,class,month,fee,date,year,search,van,exam,other,total,paid) values('$name','$class','$ch','$fee','$edate','$year','$search','$van','$exam','$other','$total','$paid')";
		if(mysqli_query($conn,$ins1))
		{
			echo"Fees update";
		}
	}
	else
	{
		echo"Fees Not update";
	}
	
	
	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 between '$date1' and '$date2' order by id desc";
	$res=mysqli_query($conn,$sel);
	$sel1="select * from updatefees where date between '$date1' and '$date2' 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>Slip 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>
            </tr>
        </thead>
<tfoot>
            <tr>
                 <th>Sr.</th><th>Slip 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>
            </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['month'];?></td><td style="color:red"><?php echo $row['newmonth'];?></td><td><?php echo $row['total'];?></td><td style="color:red"><?php echo $row['newtotal'];?></td><td><?php echo $row['date'];?></td><td style="color:red"><?php echo $row['newdate'];?></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:
		$class=$_POST['class'];
	$session=$_POST['session'];
	$board=$_POST['mediam'];
	?>
	

	<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>App.</th><th>Name</th><th>Fname</th><th>mname</th><th>Year</th><th>Class</th><th>Address</th><th>Mobile</th>
            </tr>
        </thead>
<tfoot>
            <tr>
             <th>Sr.</th><th>App.</th><th>Name</th><th>Fname</th><th>mname</th><th>Year</th><th>Class</th><th>Address</th><th>Mobile</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  $sel="select * from  registration where subject='$class' and session='$session' and mediam='$board'";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		$a=$row['village'];
	
	$c=$row['dist'];
	$d=$a." ".$c;
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['id'];?></td><td><?php echo $row['2'];?></td><td><?php echo $row['fname'];?></td><td><?php echo $row['mname'];?></td><td><?php echo $row['session'];?></td><td><?php echo $row['subject'];?></td><td><?php echo $d;?></td><td><?php echo $row['mobile'];?></td>
	
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	
	
	
	
	
	<?php
	break;
	
	
	///////all fees print////
	
	
	case 30:
	$session=$_POST['session'];
	$board=$_POST['board'];
  $sel="select * from  studentfees where year='$session' and board='$board' order by date 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>Slip No.</th><th>Session</th><th>Board</th><th>Month</th><th>Name</th><th>Class</th><th>Total Fees</th><th>Dues Charge</th><th>Date</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                 <th>Sr.</th><th>Slip No.</th><th>Session</th><th>Board</th><th>Month</th><th>Name</th><th>Class</th><th>Total Fees</th><th>Dues Charge</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['board'];?></td><td><?php echo $row['month'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['class'];?></td><td><?php echo $row['total'];?></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" required>
 <?php 
	  $selc="select * from session order by id desc";
	$resc=mysqli_query($conn,$selc);
	  while($rowc=mysqli_fetch_array($resc,MYSQLI_BOTH))
	  {
	  ?>
	  <option ><?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 
	$selc="select * from subclass";
	$resc=mysqli_query($conn,$selc);
	?>
				<select class="form-control" style="font-weight:bold" id="select" name="class" required>
	
	  <option >--Select--</option>
	  <?php 
	  
	  while($rowc=mysqli_fetch_array($resc,MYSQLI_BOTH))
	  {
	  ?>
	  <option value="<?php echo $rowc['subclass'];?>"><?php echo $rowc['subclass'];?></option>
	  <?php
	  }
	  
	  ?>
	  </select>
				
				
			
				</div>
				</div>
				<br/>
			
	<input type="hidden" value="<?php echo $row['id'];?>" name="app"/>
				
				
				<center><button class="btn btn-primary">Trans</button>
				 &emsp;&emsp;&emsp;<button class="btn btn-danger" data-dismiss="modal"> Close</button>
				</center>
				</div>
				
				</form>
	</div>
	</div>
	
	
	
	
	
	
	
	
	
	
	<?php
	
	
	
	break;
	
	case 32:
	$application=$_POST['app'];
	$sel="select * from  registration where id='$application' order by id desc";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	// for registration
	
	$name=$row['name'];
$code=$row['code'];
$adhar=$row['adhar'];
$mediam=$row['mediam'];
$caste=$row['caste'];
$minority=$row['minority'];
//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;
	
	
	$ins="insert into  registration(application,name,fname,	mname,dob,gender,subject,city,village,postoffice,dist,state,mobile,pincode,picture,city1,village1,postoffice1,dist1, state1,mobile1,pincode1,session,mediam,adhar,datetime,minority,caste,code) values('$app','$name','$father','$mother','$dob','$gender','$subject','$city','$village','$postoffice','$dist','$state','$mobile','$pincode','$newimgname','$city1','$village1','$postoffice1','$dist1','$state1','$mobile1','$pincode1','$session','$mediam','$adhar','$datetime','$minority','$caste','$code')";
	if(mysqli_query($conn,$ins))
				{
					
					$up13="update registration set trans='$subject' where id='$application' ";
					$res1=mysqli_query($conn,$up13);
					
					if($res1)
					{
					echo "Transfered";
					}
					else
					{
					    echo "not transferd";
					}
				}
				else
				{
					echo"not";
				}
	break;
	
		case 34:
	$application=$_REQUEST['application'];
	//echo $application;
	?>
	<form action="slip.php" method="post">
	Date<input type="date"  required name='date'><SPAN>
	<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">OR</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">
	<button >Today</button>
	</form>
	<?php 
	
	
	
	
	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!="")
	{
	?>
	

	<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">App 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">App 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['id'];?></td><td><img src="../code/img/<?php echo $row['picture'];?>" height="60px" width="60px;"></td><td><?php echo $row['2']."<br/>"." <b>S/O-</b>".$row['fname']."<br/>"." <b>M/O-</b>".$row['mname']."<br/>". "<b>D.O.B-</b>".$row['dob']."<br/>"."<b>Adh-</b>".$row['adhar'];?></td><td><?php echo $row['subject'].'<br/>'.$row['mediam'];?></td><td><?php echo $row['session'];?></td>
	
	<td>
	
<a href="javascript:;" onclick="feesrow(<?php echo $row['id'];?>)"> <span class=""><button type="button" class="btn btn-primary">Fees</button></span></a>

<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 3637:
	$session=$_POST['session'];
  $sel1="select * from  registration where session ='$session' and status='' order by application asc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	
<link href="jq/jquery.dataTables.min.css" type="text/css" rel="stylesheet"/>
<link href="jq/buttons.dataTables.min.css" type="text/css" rel="stylesheet"/>


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

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


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



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

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


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

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

	
<script>

$(document).ready(function(){

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

</script>
<link href="css/student_print.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id='DivIdToPrint'  >
<table frame="border" width="100%" >
<tr>
<td><span><img src="../images/shiv.png" height="50px" width="50px"/></span></td><td align="center"><span id="name"  style="font-size:12px;text-align:left;font-weight:bold" class="sd">Shiv Balika Inter College <br/>Jiyanpur Azamgarh </span></td><td style="font-size:12px;text-align:right"><b>Contact:&nbsp;</b>9415333010<br/><b>Web-</b>shivbalika.com</td>
</tr>
</table>
<table border="1px;" width="100%" cellspacing="0">
<caption style="font-size:18px;font-weight:bold">Fees Statement <?php echo $row1['session'];?></caption>
<tr>
<td width="30%"><span id="name2">Scho. Number</span></td><td><span id="name3"><?php echo $row['application'];?></span></td><td><b>Class</b></td><td><?php echo $row['subject'];?></td><td width="10%"align="right" rowspan="3"><span><img src="../code/img/<?php echo $row['picture'];?>" style="width:100%;" class="img-responsive" ></span></td>
</tr>
<tr>
<td width="30%"><span id="name2">Student Name</span></td><td width="" colspan="3"><span id="name3"><?php echo $row['name'];?></span></td>
</tr>
<tr>
<td width="30%"><span id="name2"> Father Name</span></td><td colspan="3"><span id="name3"><?php echo $row['fname'];?></span></td>
</tr>


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

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

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

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

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

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

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

</tr>
<?php

$sum=0;
$sum1=0;

$remain1=0;


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

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

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

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

</tr>


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

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

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

	break;
	
		case 3636:
	$session=$_POST['session'];
	$class=$_POST['class'];
  $sel1="select * from  registration where session ='$session' ";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['excel','pdf']
    });
	
});
</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">class</th><th  style="text-align:center">mobile</th>
            </tr>
        </thead>
<tfoot>
            <tr align="center">
               <th  style="text-align:center">Sr</th><th  style="text-align:center">class</th><th  style="text-align:center">mobile</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
  $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'];
	$e=$row['mobile'];
	$d=$a." ".$c;
		?>
		 
	<tr class="text-center">
	<td><?php echo $s;?></td><td><?php echo $row['subject'];?></td><td><?php echo $row['mobile'];?></td>
	

	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
	case 42:
	?>
<script>
$("document").ready(function(){
		
		$("#paid").keyup(function(){
			var dew1=$("#dew").val();
			var paid1=$("#paid").val();
			var ndew1=$("#ndew").val();
			
			var total1= parseInt(dew1) - parseInt(paid1) ;
			
			$("#ndew").val(total1);
		});
		
		
	});
	
	
	</script>
	<?php
	$sch=$_REQUEST['id'];
	//echo"$eid";
	$sel="select * from  studentfees where search='$sch' order by id desc";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$paid12=$row['paid'];
	?>
	<div class="table-responsive">

       
            
      
		<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 $row['search'];?>" name="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 $row['class'];?>" name="class"/>
				<input type="hidden" value="<?php echo $row['year'];?>" name="year"/>
				</div>
		<div class="form-group">
				<label class="col-sm-3 control-label">Name</label>
				<div class="col-sm-3"><input type="text" value="<?php echo $row['name'];?>" name="name" readonly style="background-color:gray;color:pink" /></div>
				
				</div>
		<div class="form-group">
				<label class="col-sm-3 control-label">Dues</label>
				<div class="col-sm-3"><input type="number" value="<?php echo $row['remain'];?>"  name="dew" id="dew" readonly style="background-color:green;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" id="paid" required /></div>
				
				</div>
				<br/>
				<div class="form-group">
				<label class="col-sm-3 control-label">New Dues</label>
				<div class="col-sm-3"><input type="number"   id="ndew" name="ndew" required /></div>
				
				</div>
		
			<br/>
				<div class="form-group">
				<label class="col-sm-3 control-label">Date</label>
				<div class="col-sm-3"><input type="date"  name="date"  required /></div>
				
				</div>
		<center><button class="btn btn-danger">Paid</button></center>
		
		</form>
		
	
	</div>
	<?php
	break;
		case 43:

	$id=$_POST['id'];
	$name=$_POST['name'];
	echo $name;
	$class=$_POST['class'];
	echo $class;
	$date1=$_POST['date'];
	
	$year=$_POST['year'];
	echo $year;
	$dew=$_POST['dew'];
	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'];
	echo $paid;
	//echo $paid;
	$ndew=$_POST['ndew'];
	echo $ndew;
	$paid8=$paid+$paid13;
	//echo $ndew;
	//echo"$eid";
		$ins="insert into studentfees(name,class,search,month,paid,remain,pre,date,year) values('$name','$class','$search','Dues','$paid','$ndew','$dew','$date','$year')";
	
	if($res=mysqli_query($conn,$ins))
	{
		echo " Dues Paid";
	}
	else
	{
		echo "not update";
	}
	
	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  fees_paid where reg_id ='$id' and session='$sessionr' and status=''";
$res1=mysqli_query($conn,$sel1);
$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
//$search=$row1['search'];
$sel="select * from  registration where id ='$id' and session='$sessionr' and status=''";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);


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

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

	
<script>

$(document).ready(function(){

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

</script>
<link href="css/student_print.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id='DivIdToPrint'  >
<table frame="border" width="100%" >
   
<tr>
<td><span><img src="../images/logo.png" height="70px" width="70px"/></span></td><td align="center"><span id="name"  style="font-size:11px;text-align:left;font-weight:bold;">SHIV BALIKA INTER COLLEGE</span> Jiyanpur Azamgarh<br/><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['session'];?></caption>
<tr>
<td width="30%"><span id="name2">Scho. Number</span></td><td><span id="name3"><?php echo $row['sr'];?></span></td><td><b>Class</b></td><td><?php echo $row['subject'];?></td><td width="10%"align="right" rowspan="3"><span><img src="../code/img/<?php echo $row['picture'];?>" style="width:100%;" class="img-responsive" ></span></td>
</tr>
<tr>
<td width="30%"><span id="name2">Student Name</span></td><td width="" colspan="3"><span id="name3"><?php echo $row['name'];?></span></td>
</tr>
<tr>
<td width="30%"><span id="name2"> Father Name</span></td><td colspan="3"><span id="name3"><?php echo $row['fname'];?></span></td>
</tr>


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

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

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

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

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

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

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

</tr>
<?php

$sum=0;
$sum1=0;

$remain1=0;


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

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

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

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

</tr>


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

<td colspan="11" 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'];
    
    
     $remain12;?></span></td>

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


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

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









<?php


	
	
	
	
	break;
	
	///// for fees details 
case 72:
	   
	$search=$_REQUEST['app'];
	
include("../link/databaseconnection.php");
$sel4="select * from  registration where 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' order by id desc";
$res12=mysqli_query($conn,$sel12);
$row12=mysqli_fetch_array($res12,MYSQLI_BOTH);
$search=$row12['search'];
$idd=$row12['id'];
$id12=$idd-1;
//echo $id12;

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

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

$sel10="select * from  studentfees where search ='$search' order by id desc ";
$res10=mysqli_query($conn,$sel10);
$row10=mysqli_fetch_array($res10,MYSQLI_BOTH);

$selde="select * from  studentfees where search ='$search' order by id desc limit 2  ";
$resde=mysqli_query($conn,$selde);
$rowde=mysqli_fetch_array($resde,MYSQLI_BOTH);
$idd=$rowde['id'];

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

$sel45="select * from  registration where application ='$search' order by id desc";
$res45=mysqli_query($conn,$sel45);
$row45=mysqli_fetch_array($res45,MYSQLI_BOTH);
$month12='';
while($rowmo=mysqli_fetch_array($resmo,MYSQLI_BOTH))
{
	 $month13=$rowmo['month'];
	 $month12=$month13.",".$month12;
}



//echo $date;

//echo"$app1";
?>

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

</style>

<script>

$(document).ready(function(){
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';
		
	});
});

</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;}
	  
	  }
      
   
   
</style>
<div style="border:1px solid" class="a">
<table frame="border" width="100%" >
<tr>
<td><span><img src="../images/shiv.png" height="50px" width="50px"/></span></td><td align="center"><span id="name"  style="font-size:12px;text-align:left;font-weight:bold" class="sd">Shiv Balika Inter College <br/>Jiyanpur Azamgarh </span></td><td style="font-size:12px;text-align:right"><b>Contact:&nbsp;</b>9415333010<br/><b>Web-</b>shivbalika.com</td>
</tr>
</table>
<table border="1px;"  width="100%"cellspacing="0">
<caption style="font-size:13px;font-weight:bold">Fee Receipt(<?php echo $row12['year'];?>)</caption>
<tr>
<td><span id="name2"  style="font-size:11px;font-weight:bold">App. Number</span></td><td colspan="2"><span  style="font-size:11px"><?php echo $row45['application'];?> &nbsp;&nbsp; (Sr.-<?php echo $row12['id'];?>)</span></td><td align="center" rowspan="2"><span><img src="../code/img/<?php echo $row4['picture'];?>"  style="width:50px;height:50px" class="img-responsive" ></span></td>
</tr>
<tr>
    
<td ><span id="name2"  style="font-size:11px;font-weight:bold">Student Name</span></td><td colspan='2'><span  style="font-size:11px"><?php echo $row45['name'];?></span></td>
</tr>
<tr>
<td ><span id="name2"  style="font-size:11px;font-weight:bold"> Father Name</span></td><td><span  style="font-size:11px"><?php echo $row45['fname'];?></span></td><td style="font-size:11px"><b>Class</b></td><td  style="font-size:11px"><?php echo $row10['class'];?></td>
</tr>


</table>


<table frame="border"  cellspacing="0" height="25%">
<tr>
<td colspan='4' align="center"><span id="name4" style="font-size:13px;font-weight:bold">Fees Category</span></td>

</tr>
<tr >

<td align="center" style="border: 1px solid black"><span id="name2"  ><b>Month</b></span></td><td colspan="12" style="border: 1px solid black"><textarea id="mo"  style="font-weight:bold;font-size:10px;resize:none" rows="3" cols="38"><?php echo $row121['month'];?></textarea></td>
</tr>
<tr align="center">
<td width="25%"><span id="name2" >Regi./LOC</span></td>
<td width="25%"><span id="name2" ><?php if($row10['reg1']=='0'){echo '';}else{echo $row10['reg1'];}?></span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" ></span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" ></span></td>
</tr>
<tr align="center">
<td width="25%"><span id="name2" >Annual</span></td>
<td width="25%"><span id="name2" ><?php if($row10['ann']=='0'){echo '';}else{echo $row10['ann'];}?></span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" >Month Fee</span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" ><?php if($row10['fee']=='0'){echo '';}else{echo $row10['fee'];}?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Addm</span></td>
<td><span id="name2" ><?php if($row10['addm']=='0'){echo '';}else{echo $row10['addm'];}?></td>
<td style="border: 1px solid black"><span id="name2" >Conv</span></td>
<td style="border: 1px solid black"><span id="name2" ><?php echo $row12['van'];?></span></td>
</tr>

<tr align="center">
<td><span id="name2" >Exam</span></td>
<td><span id="name2" ><?php if($row10['exam']=='0'){echo '';}else{echo $row10['exam'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" >Pre Dues</span></td>
<td style="border: 1px solid black"><span id="name2" ><?php if($row10['pre']=='0'){echo '';}else{echo $row10['pre'];}?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Comp </span></td>
<td><span id="name2" ><?php if($row10['comp']=='0'){echo '';}else{echo $row10['comp'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold">Total</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['total']; ?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Maint/Med</span></td>
<td><span id="name2" ><?php if($row10['reg']=='0'){echo '';}else{echo $row10['reg'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold" >Cons</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['con'];?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Generator</span></td>
<td><span id="name2" ><?php if($row10['gen']=='0'){echo '';}else{echo $row10['gen'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold" >Paid</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['paid'];?></span></td>





</tr>

<tr align="center">
<td><span id="name2" >Other</span></td>
<td><span id="name2" ><?php if($row10['other']=='0'){echo '';}else{echo $row10['other'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold">New Dues</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['remain'];?></span></td>
</tr>
<br/>
<tr >
    <td colspan="4" style="text-align:center">
        <!-- <p style="font-size:12px"><b>Paid-</b> &nbsp; <?php echo $result . "Rupees  " . $points . " Only.";?></p> ----->
    </td>
</tr>




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



?>

<?php

	}

?>

</table>
<table>
<tr>
<td width="10%">Date</td><td width="40%"><?php 

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






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




</div>
<div  class="ab" style="float:left;width:5%">--</div>
&emsp;<div style="border:1px solid" class="a">
<table frame="border" width="100%" >
<tr>
<td><span><img src="../images/shiv.png" height="50px" width="50px"/></span></td><td align="center"><span id="name"  style="font-size:12px;text-align:left;font-weight:bold" class="sd">Shiv Balika Inter College <br/>Jiyanpur Azamgarh </span></td><td style="font-size:12px;text-align:right"><b>Contact:&nbsp;</b>9415333010<br/><b>Web-</b>shivbalika.com</td>
</tr>
</table>
<table border="1px;"  width="100%"cellspacing="0">
<caption style="font-size:13px;font-weight:bold">Fee Receipt(<?php echo $row12['year'];?>)</caption>
<tr>
<td><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'];?>&nbsp;&nbsp; (Sr.-<?php echo $row12['id'];?>)</span></td><td align="center" rowspan="2"><span><img src="../code/img/<?php echo $row4['picture'];?>"  style="width:50px;height:50px" class="img-responsive" ></span></td>
</tr>
<tr>
    
<td ><span id="name2"  style="font-size:11px;font-weight:bold">Student Name</span></td><td colspan='2'><span  style="font-size:11px"><?php echo $row12['name'];?></span></td>
</tr>
<tr>
<td ><span id="name2"  style="font-size:11px;font-weight:bold"> Father Name</span></td><td><span  style="font-size:11px"><?php echo $row4['fname'];?></span></td><td style="font-size:11px"><b>Class</b></td><td  style="font-size:11px"><?php echo $row10['class'];?></td>
</tr>


</table>


<table frame="border" width="100%" cellspacing="0" height="25%">
<tr>
<td colspan='4' align="center"><span id="name4" style="font-size:13px;font-weight:bold">Fees Category</span></td>

</tr>
<tr >

<td align="center" style="border: 1px solid black"><span id="name2"  ><b>Month</b></span></td><td colspan="12" style="border: 1px solid black ;width:50%"><textarea id="mo" class="mo" style="font-weight:bold;font-size:10px;resize:none" rows="3" cols="38"><?php echo $row121['month'];?></textarea></td>
</tr>
<tr align="center">
<td width="25%"><span id="name2" >Regi./LOC</span></td>
<td width="25%"><span id="name2" ><?php if($row10['reg1']=='0'){echo '';}else{echo $row10['reg1'];}?></span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" ></span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" ></span></td>
</tr>
<tr align="center">
<td width="25%"><span id="name2" >Annual</span></td>
<td width="25%"><span id="name2" ><?php if($row10['ann']=='0'){echo '';}else{echo $row10['ann'];}?></span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" >Month Fee</span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" ><?php if($row10['fee']=='0'){echo '';}else{echo $row10['fee'];}?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Addm</span></td>
<td><span id="name2" ><?php if($row10['addm']=='0'){echo '';}else{echo $row10['addm'];}?></td>
<td style="border: 1px solid black"><span id="name2" >Conv</span></td>
<td style="border: 1px solid black"><span id="name2" ><?php echo $row12['van'];?></span></td>
</tr>

<tr align="center">
<td><span id="name2" >Exam</span></td>
<td><span id="name2" ><?php if($row10['exam']=='0'){echo '';}else{echo $row10['exam'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" >Pre Dues</span></td>
<td style="border: 1px solid black"><span id="name2" ><?php if($row10['pre']=='0'){echo '';}else{echo $row10['pre'];}?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Comp </span></td>
<td><span id="name2" ><?php if($row10['comp']=='0'){echo '';}else{echo $row10['comp'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold">Total</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['total']; ?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Maint/Med</span></td>
<td><span id="name2" ><?php if($row10['reg']=='0'){echo '';}else{echo $row10['reg'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold" >Cons</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['con'];?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Generator</span></td>
<td><span id="name2" ><?php if($row10['gen']=='0'){echo '';}else{echo $row10['gen'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold" >Paid</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['paid'];?></span></td>





</tr>

<tr align="center">
<td><span id="name2" >Other</span></td>
<td><span id="name2" ><?php if($row10['other']=='0'){echo '';}else{echo $row10['other'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold">New Dues</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['remain'];?></span></td>
</tr>
<br/>
<tr >
    <td colspan="4" style="text-align:center">
       <!-- <p style="font-size:12px"><b>Paid-</b> &nbsp; <?php echo $result . "Rupees  " . $points . " Only.";?></p> ----->
    </td>
</tr>



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



?>

<?php

	}

?>

</table>

<table>
<tr>
<td width="10%">Date</td><td width="40%"><?php 

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






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



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



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


<input type='button' id='btn' value='Print' onclick='printDiv12();'>
	  <script>
	function printDiv12() 
{
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();

}
	
	</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' order by id desc";
$res4=mysqli_query($conn,$sel4);
$row4=mysqli_fetch_array($res4,MYSQLI_BOTH);
$session=$row4['year'];
$sel12="select * from  studentfees where search ='$search' order by id desc";
$res12=mysqli_query($conn,$sel12);
$row12=mysqli_fetch_array($res12,MYSQLI_BOTH);
$search=$row12['search'];
$idd=$row12['id'];
$id12=$idd-1;
//echo $id12;

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

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

$sel10="select * from  studentfees where search ='$search' order by id desc ";
$res10=mysqli_query($conn,$sel10);
$row10=mysqli_fetch_array($res10,MYSQLI_BOTH);

$selde="select * from  studentfees where search ='$search' order by id desc limit 2  ";
$resde=mysqli_query($conn,$selde);
$rowde=mysqli_fetch_array($resde,MYSQLI_BOTH);
$idd=$rowde['id'];

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


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



//echo $date;

//echo"$app1";
?>

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

</style>

<script>

$(document).ready(function(){

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

</script>

<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;}
	  
	  }
      
   
   
</style>
<div style="border:1px solid" class="a">
<table frame="border" width="100%" >
<tr>
<td><span><img src="../images/shiv.png" height="50px" width="50px"/></span></td><td align="center"><span id="name"  style="font-size:12px;text-align:left;font-weight:bold" class="sd">Shiv Balika Inter College <br/>Jiyanpur Azamgarh </span></td><td style="font-size:12px;text-align:right"><b>Contact:&nbsp;</b>9415333010<br/><b>Web-</b>shivbalika.com</td>
</tr>
</table>
<table border="1px;"  width="100%"cellspacing="0">
<caption style="font-size:13px;font-weight:bold">Fee Receipt(<?php echo $row12['year'];?>)</caption>
<tr>
<td><span id="name2"  style="font-size:11px;font-weight:bold">App. Number</span></td><td colspan="2"><span  style="font-size:11px"><?php echo $row45['application'];?> &nbsp;&nbsp; (Sr.-<?php echo $row12['id'];?>)</span></td><td align="center" rowspan="2"><span><img src="../code/img/<?php echo $row4['picture'];?>"  style="width:50px;height:50px" class="img-responsive" ></span></td>
</tr>
<tr>
    
<td ><span id="name2"  style="font-size:11px;font-weight:bold">Student Name</span></td><td colspan='2'><span  style="font-size:11px"><?php echo $row45['name'];?></span></td>
</tr>
<tr>
<td ><span id="name2"  style="font-size:11px;font-weight:bold"> Father Name</span></td><td><span  style="font-size:11px"><?php echo $row45['fname'];?></span></td><td style="font-size:11px"><b>Class</b></td><td  style="font-size:11px"><?php echo $row10['class'];?></td>
</tr>


</table>


<table frame="border"  cellspacing="0" height="25%">
<tr>
<td colspan='4' align="center"><span id="name4" style="font-size:13px;font-weight:bold">Fees Category</span></td>

</tr>
<tr >

<td align="center" style="border: 1px solid black"><span id="name2"  ><b>Month</b></span></td><td colspan="12" style="border: 1px solid black"><textarea id="mo"  style="font-weight:bold;font-size:10px;resize:none" rows="3" cols="38"><?php echo $row121['month'];?> UP TO <?php echo $row12['to1'];?></textarea></td>
</tr>
<tr align="center">
<td width="25%"><span id="name2" >Regi.</span></td>
<td width="25%"><span id="name2" ><?php if($row10['reg1']=='0'){echo '';}else{echo $row10['reg1'];}?></span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" ></span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" ></span></td>
</tr>
<tr align="center">
<td width="25%"><span id="name2" >Annual</span></td>
<td width="25%"><span id="name2" ><?php if($row10['ann']=='0'){echo '';}else{echo $row10['ann'];}?></span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" >Month Fee</span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" ><?php if($row10['fee']=='0'){echo '';}else{echo $row10['fee'];}?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Addm</span></td>
<td><span id="name2" ><?php if($row10['addm']=='0'){echo '';}else{echo $row10['addm'];}?></td>
<td style="border: 1px solid black"><span id="name2" >Conv</span></td>
<td style="border: 1px solid black"><span id="name2" ><?php echo $row12['van'];?></span></td>
</tr>

<tr align="center">
<td><span id="name2" >Exam</span></td>
<td><span id="name2" ><?php if($row10['exam']=='0'){echo '';}else{echo $row10['exam'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" >Pre Dues</span></td>
<td style="border: 1px solid black"><span id="name2" ><?php if($row10['pre']=='0'){echo '';}else{echo $row10['pre'];}?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Comp </span></td>
<td><span id="name2" ><?php if($row10['comp']=='0'){echo '';}else{echo $row10['comp'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold">Total</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['total']; ?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Maint/Med</span></td>
<td><span id="name2" ><?php if($row10['reg']=='0'){echo '';}else{echo $row10['reg'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold" >Cons</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['con'];?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Generator</span></td>
<td><span id="name2" ><?php if($row10['gen']=='0'){echo '';}else{echo $row10['gen'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold" >Paid</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['paid'];?></span></td>





</tr>

<tr align="center">
<td><span id="name2" >Other</span></td>
<td><span id="name2" ><?php if($row10['other']=='0'){echo '';}else{echo $row10['other'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold">New Dues</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['remain'];?></span></td>
</tr>
<br/>
<tr >
    <td colspan="4" style="text-align:center">
        <!-- <p style="font-size:12px"><b>Paid-</b> &nbsp; <?php echo $result . "Rupees  " . $points . " Only.";?></p> ----->
    </td>
</tr>




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



?>

<?php

	}

?>

</table>
<table>
<tr>
<td width="10%">Date</td><td width="40%"><?php 

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






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




</div>
<div  class="ab" style="float:left;width:5%">--</div>
&emsp;<div style="border:1px solid" class="a">
<table frame="border" width="100%" >
<tr>
<td><span><img src="../images/shiv.png" height="50px" width="50px"/></span></td><td align="center"><span id="name"  style="font-size:12px;text-align:left;font-weight:bold" class="sd">Shiv Balika Inter College <br/>Jiyanpur Azamgarh </span></td><td style="font-size:12px;text-align:right"><b>Contact:&nbsp;</b>9415333010<br/><b>Web-</b>shivbalika.com</td>
</tr>
</table>
<table border="1px;"  width="100%"cellspacing="0">
<caption style="font-size:13px;font-weight:bold">Fee Receipt(<?php echo $row12['year'];?>)</caption>
<tr>
<td><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'];?>&nbsp;&nbsp; (Sr.-<?php echo $row12['id'];?>)</span></td><td align="center" rowspan="2"><span><img src="../code/img/<?php echo $row4['picture'];?>"  style="width:50px;height:50px" class="img-responsive" ></span></td>
</tr>
<tr>
    
<td ><span id="name2"  style="font-size:11px;font-weight:bold">Student Name</span></td><td colspan='2'><span  style="font-size:11px"><?php echo $row12['name'];?></span></td>
</tr>
<tr>
<td ><span id="name2"  style="font-size:11px;font-weight:bold"> Father Name</span></td><td><span  style="font-size:11px"><?php echo $row4['fname'];?></span></td><td style="font-size:11px"><b>Class</b></td><td  style="font-size:11px"><?php echo $row10['class'];?></td>
</tr>


</table>


<table frame="border" width="100%" cellspacing="0" height="25%">
<tr>
<td colspan='4' align="center"><span id="name4" style="font-size:13px;font-weight:bold">Fees Category</span></td>

</tr>
<tr >

<td align="center" style="border: 1px solid black"><span id="name2"  ><b>Month</b></span></td><td colspan="12" style="border: 1px solid black ;width:50%"><textarea id="mo" class="mo" style="font-weight:bold;font-size:10px;resize:none" rows="3" cols="38"><?php echo $row121['month'] ;?> UP TO <?php echo $row12['to1'];?></textarea></td>
</tr>
<tr align="center">
<td width="25%"><span id="name2" >Regi.</span></td>
<td width="25%"><span id="name2" ><?php if($row10['reg1']=='0'){echo '';}else{echo $row10['reg1'];}?></span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" ></span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" ></span></td>
</tr>
<tr align="center">
<td width="25%"><span id="name2" >Annual</span></td>
<td width="25%"><span id="name2" ><?php if($row10['ann']=='0'){echo '';}else{echo $row10['ann'];}?></span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" >Month Fee</span></td>
<td width="25%" style="border: 1px solid black"><span id="name2" ><?php if($row10['fee']=='0'){echo '';}else{echo $row10['fee'];}?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Addm</span></td>
<td><span id="name2" ><?php if($row10['addm']=='0'){echo '';}else{echo $row10['addm'];}?></td>
<td style="border: 1px solid black"><span id="name2" >Conv</span></td>
<td style="border: 1px solid black"><span id="name2" ><?php echo $row12['van'];?></span></td>
</tr>

<tr align="center">
<td><span id="name2" >Exam</span></td>
<td><span id="name2" ><?php if($row10['exam']=='0'){echo '';}else{echo $row10['exam'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" >Pre Dues</span></td>
<td style="border: 1px solid black"><span id="name2" ><?php if($row10['pre']=='0'){echo '';}else{echo $row10['pre'];}?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Comp </span></td>
<td><span id="name2" ><?php if($row10['comp']=='0'){echo '';}else{echo $row10['comp'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold">Total</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['total']; ?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Maint/Med</span></td>
<td><span id="name2" ><?php if($row10['reg']=='0'){echo '';}else{echo $row10['reg'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold" >Cons</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['con'];?></span></td>
</tr>
<tr align="center">
<td><span id="name2" >Generator</span></td>
<td><span id="name2" ><?php if($row10['gen']=='0'){echo '';}else{echo $row10['gen'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold" >Paid</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['paid'];?></span></td>





</tr>

<tr align="center">
<td><span id="name2" >Other</span></td>
<td><span id="name2" ><?php if($row10['other']=='0'){echo '';}else{echo $row10['other'];}?></span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold">New Dues</span></td>
<td style="border: 1px solid black"><span id="name2" style="font-weight:bold"><?php echo $row10['remain'];?></span></td>
</tr>
<br/>
<tr >
    <td colspan="4" style="text-align:center">
       <!-- <p style="font-size:12px"><b>Paid-</b> &nbsp; <?php echo $result . "Rupees  " . $points . " Only.";?></p> ----->
    </td>
</tr>



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



?>

<?php

	}

?>

</table>

<table>
<tr>
<td width="10%">Date</td><td width="40%"><?php 

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






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



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



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


<input type='button' id='btn' value='Print' onclick='printDiv12();'>
	  <script>
	function printDiv12() 
{
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();

}
	
	</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 id ='$scholer' and session='$session'";
$resr=mysqli_query($conn,$selr);
$rowr=mysqli_fetch_array($resr,MYSQLI_BOTH);
$sessionr=$rowr['session'];
$pass=$rowr['application'];
$pass1='gcs'.$pass;
//echo $pass1;
if($scholer=='' or $scholer==NULL)
{
	
	//echo "<SCRIPT>alert('Scholer Number Invailid');window.location.href='checkfess.php';</SCRIPT>";
	//header("location:../checkfees.php");
}
if($pass2!=$pass1)
{
	echo "<SCRIPT>alert('Password Invailid');window.location.href='checkfess.php';</SCRIPT>";
	//header("location:../checkfees.php");
}
//echo $sessionr;
$applicationr=$rowr['application'];

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


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

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

	
<script>

$(document).ready(function(){

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

</script>
<link href="css/student_print.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id='DivIdToPrint'>
<table frame="border" width="100%" >
<tr>
<td><span><img src="../images/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();

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









<?php

}
	
	
	
	
	break;
	////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['id'];
	$date=date('Y-m-d');
//$edate=date("d-m-Y",strtotime($date1));
//echo $edate;
	date_default_timezone_set("asia/kolkata");
	$d=$row['mobile'];
	$sel1="select * from  present1 where sch='$app1' and session='$session' and date='$date'";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$status1=$row1['status'];
		?>
		 
	<tr class="text-center">
	<td><?php echo $row['id'];?></td><td><?php echo $row['name']."<br/><b>F-</b>".$row['fname']?></td><td><?php if($status1=='P'){echo"<font color=green size=6pt> P</font>";} if($status1=='A') {echo"<font color=red size=6pt> A</font>";}?></td><td><a href="javascript:;" onclick="record(<?php echo $row['id'];?>)"><button><span class="glyphicon glyphicon-ok"></span></button></a></button></a></td>
	
	
	
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	
	
	
	
	
	<?php
	break;
	
	
	///////all fees print////
	
	
	
	////for presenty////
	
	case 292:
	$name=$_POST['name'];
	$sch=$_POST['sch'];
	//$other=$_POST['other'];
	$fname=$_POST['fname'];
	$session=$_POST['session'];
	$class=$_POST['class'];
	$date=$_POST['date'];
	$status=$_POST['status'];
	$sel1="select * from  present1 where sch='$sch' and date='$date' ";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	if($row1)
	{
	    	$up="update  present1 set sch='$sch',name='$name',class='$class',date='$date',status='$status' where sch='$sch' and date='$date'";
	$res1=mysqli_query($conn,$up);
	//echo "up";
		if($status=='A')
		{
		
		$sel="select * from  registration where id='$sch' and session='$session'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$mob=$row['mobile'];
	$to=$mob;
	$date1=date("d-m-Y",strtotime($date));
	$date1=date("d-m-Y",strtotime($date));
$message='Dear Parents, Your Child ' .$name. ' is Absent Today ' .$date1. "/-". "in Class  
Regards 
SHIV BALIKA I.C. JIYANPUR.";

$msg=urlencode($message);


$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=SHIVB&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
	{
	    	 
	 $ins="insert into present1(sch,name,class,date,user,status,fname,session) values('$sch','$name','$class','$date','user','$status','$fname','$session')";
	$res=mysqli_query($conn,$ins);
	if($res)
	{
		echo"ok";
		if($status=='A')
		{
		$sel="select * from  registration where id='$sch' and session='$session'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$mob=$row['mobile'];
	$to=$mob;
	$date1=date("d-m-Y",strtotime($date));
$message='Dear Parents, Your Child ' .$name. ' is Absent Today ' .$date1. "/-". "in Class  
Regards 
SHIV BALIKA I.C. JIYANPUR.";

$msg=urlencode($message);


$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=SHIVB&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";
	}
	}
//	$name=$row1['name'];

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

      
            
      
		<tbody>
		<form onsubmit="return recordupdate(this)">
		<div class="form-group">
				<label class="col-sm-3 control-label">Name.</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 $id;?>" 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 id='$sch' and session='$session'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$mob=$row['mobile'];
	$to=$mob;
	$date1=date("d-m-Y",strtotime($date));
$message='Dear Parents, Your Child ' .$name. 'is Absent Today ' .$date1. "/-". "in Class  
Regards 
SHIV BALIKA I.C. JIYANPUR.";

$msg=urlencode($message);


$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=SHIVB&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'";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
//$edate=date("d-m-Y",strtotime($date1));
//echo $edate;
	date_default_timezone_set("asia/kolkata");
	//$d=$row['mobile'];
	$sel1="select * from  present1 where session='$session' and class='$class' and date between '$sdate' and '$edate'";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$status1=$row1['status'];
	$date12=$row1['date'];
	$date=date("d-m-Y",strtotime($date12));
		?>
		 
	<tr class="text-center">
	<td><?php echo $row['sch'];?></td><td><?php echo $row['2'];?></td><td><?php echo $row['fname']?></td><td><?php echo $row['class'] ;?></td><td><?php echo $date;?></td><td><?php echo $row['status'] ;?></td>
	
	
	
	</tr>
	
	<?php
	$s++;
	}
	
	?>
		<tr class="text-center">
	<td style="font-weight:bold"> TOTAL</td><td style="font-weight:bold;color:green">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=$row1['date'];
	$date=date("d-m-Y",strtotime($date12));
		?>
		 
	<tr class="text-center">
	<td><?php echo $row['sch'];?></td><td><?php echo $row['2'];?></td><td><?php echo $row['fname']?></td><td><?php echo $row['class'] ;?></td><td><?php echo $date;?></td><td><?php echo $row['status'] ;?></td>
	
	
	
	</tr>
	
	<?php
	$s++;
	}
	
	?>
	
	
		<tr class="text-center">
	<td style="font-weight:bold" > Record </td><td style="font-weight:bold;color:green"> PRESENT</td><td style="font-weight:bold;color:green;font-size:18px"><?php echo $count;?></td><td style="font-weight:bold"> ABSENT</td><td style="font-weight:bold;color:red;font-size:18px"><?php echo $count1 ;?></td><td></td>
	
	</tr>
	 </tbody>
    </table>
	
	</div>
	
	
	
	
	
	
	<?php
	break;
	case 298:
	
	?>
	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['pdf','print','excel']
    });
	
});
</script>

	


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

<tbody>		
  <?php
  
	
  $session=$_POST['session'];
  $sdate=$_POST['sdate'];
  $edate=$_POST['edate'];
	$class=$_POST['class'];
	$sch=$_POST['sch'];
	/////
	$sel2="select * from  present1 where session='$session' and class='$class' and status='P' and sch='$sch' and date between '$sdate' and '$edate' ";
	$res2=mysqli_query($conn,$sel2);
	$count=mysqli_num_rows($res2);
//	echo $count;
	
	$sel21="select * from  present1 where session='$session' and class='$class' and status='A' and sch='$sch' and date between '$sdate' and '$edate' ";
	$res21=mysqli_query($conn,$sel21);
	$count1=mysqli_num_rows($res21);
//	echo $count1;
	//$s=0;
	
	//echo $s++;
	/////
  $sel="select * from  present1 where session='$session' and class='$class' and sch='$sch' and date between '$sdate' and '$edate'";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
//$edate=date("d-m-Y",strtotime($date1));
//echo $edate;
	date_default_timezone_set("asia/kolkata");
	//$d=$row['mobile'];
	$sel1="select * from  present1 where session='$session' and class='$class' and sch='$sch' and date between '$sdate' and '$edate'";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$status1=$row1['status'];
	$date12=$row1['date'];
	$date=date("d-m-Y",strtotime($date12));
		?>
		 
	<tr class="text-center">
	<td><?php echo $row['sch'];?></td><td><?php echo $row['2'];?></td><td><?php echo $row['fname']?></td><td><?php echo $row['class']?></td><td><?php echo $row['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
	///for id card
		case 1341:
	$year1=$_POST['session'];
  $sel1="select * from  registration where session ='$year1'";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['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">Photo</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">Village</th><th  style="text-align:center">Post</th><th  style="text-align:center">Dist</th><th  style="text-align:center">Mobile</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">Father</th><th  style="text-align:center">Mother</th><th  style="text-align:center">Class</th><th  style="text-align:center">Village</th><th  style="text-align:center">Post</th><th  style="text-align:center">Dist</th><th  style="text-align:center">Mobile</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'];
	$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['id'];?></td><td><img src="../code/img/<?php echo $row['picture'];?>" height="90px" width="90px;"></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['village'];?></td><td><?php echo $row['postoffice'];?></td><td><?php echo $row['dist'];?></td><td><?php echo $row['mobile'];?></td>
	
	

	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
		case 51:
	$session=$_POST['session'];
	$board=$_POST['board'];
	$class=$_POST['class'];
  $sel1="select * from  registration where session ='$session' and mediam='$board' and subject='$class' 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>

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

<?php 
		 $sel="select * from  registration where session ='$session' and mediam='$board' and subject='$class' order by id asc";
	$res=mysqli_query($conn,$sel);
	if($class=='FIRST' or $class=='SECOND' or $class=='THIRD' or $class=='FOURTH'or $class=='FIFTH')
	{
	    	$sel1="select * from  firsteightadmit where  class1='five' order by id asc";
	}
	if($class=='PLAY GROUP' or $class=='NURSERY' or $class=='LKG' or $class=='UKG')
	{
	    	$sel1="select * from pgukgadmit where year='$session' and board='$board'";
	}
		if($class=='SIXTH' or $class=='SEVENTH' or $class=='EIGHTH')
	{
	    	$sel1="select * from firsteightadmit where year='$session' and board='$board' and class1='six'";
	}
	if($class=='NINTH' or $class=='TENTH' )
	{
	    	$sel1="select * from firsteightadmit where year='$session' and board='$board' and class1='nine'";
	}
	if($class=='ELEVENTH' or $class=='TWELFTH' )
	{
	    	$sel1="select * from firsteightadmit where year='$session' and board='$board' and class1='eleven'";
	}
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$P=0;
		while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
			
		{	
		
		?>
				<div class="col-sm-3 col-xs-3 "  id="set" >
					<div  style="border-style:solid"> 
					<table  height="100px">
					<tr>
					<th  colspan="7" style="text-align:center">* STUDENT DETAILS *</th>
					</tr>
					<tr>
					<td style="font-weight:bold">Roll No.:-&nbsp;</td><td><?php echo $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>
					</tr>
					<tr>
					<td style="font-weight:bold">Student's Name:-&nbsp;</td><td  colspan="3"><?php echo $row['name'];?></td>
					</tr>
				
				
					</table>
						
					</div>
					
				</div>
				<div class="col-sm-9 col-xs-9 "  id="set1" >
					<div  style="border-style:solid"> 
					<table  border="1px solid" height='100px' WIDTH="100%">
					<tr>
					<th   colspan="9" style="text-align:center">* EXAM ATTENDENCE *</th>
					</tr>
					<tr>
					<td></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>
					</tr>
					<tr>
					<td>Signature</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>
						
					</div>
					
				</div>
				
				<?php
				$p++;
				if($p==5)
				{
				   ?><div style="page-break-before: always"></div> <?php
				   $p=0;
				}
		}
		?></br><?php
			?>
				
	
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
		case 700:
	$date=$_POST['date'];
	$class=$_POST['class'];
	$present=$_POST['present'];
	$sel="select * from  record where  class='$class' and date= '$date'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	if(!$row)
	{
	    $ins="insert into record(date,class,present)values('$date','$class','$present') ";
	$res=mysqli_query($conn,$ins);
	
	if($res)
	{
		echo"Add Successfully";
	
	}
	else
	{
		echo"Not Add";
	}
	}
	else
	{
	    echo 'Allready Add ';
	}
	
	break;
	case 701:
	
	?>
	<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">Sr</th><th style="text-align:center">Class</th><th style="text-align:center">Present</th><th style="text-align:center">Date</th><th style="text-align:center">Delete</th>
            </tr>
        </thead>

<tbody>		
  <?php
  
	
 
  $sdate=$_POST['sdate'];
  $edate=$_POST['edate'];

	/////

  $sel="select * from  record where  date between '$sdate' and '$edate'";
	$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['class'];?></td><td><?php echo $row['present']?></td><td><?php echo $row['date'] ;?></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 702:
	$id=$_POST['rowid'];

	
	$del="delete from record 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'  order by date desc ";
	$res=mysqli_query($conn,$sel);
	$sel1="select * from  studentfees where year='$year'  ";
	$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 5005:
	
	?>
	<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">App.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'];
  
 	$sch=$_POST['rol'];
	/////
	$sel2="select * from  present1 where session='$session' and status='P' and sch='$sch'  ";
	$res2=mysqli_query($conn,$sel2);
	$count=mysqli_num_rows($res2);
//	echo $count;
	
	$sel21="select * from  present1 where session='$session' and status='A' and sch='$sch'  ";
	$res21=mysqli_query($conn,$sel21);
	$count1=mysqli_num_rows($res21);
//	echo $count1;
	//$s=0;
	
	//echo $s++;
	/////
  $sel="select * from  present1 where session='$session' and sch='$sch' ";
	$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 sch='$sch' ";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$status1=$row1['status'];
	$date12=$row1['date'];
	$date=date("d-m-Y",strtotime($date12));
		?>
		 
	<tr class="text-center">
	<td><?php echo $row['sch'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['fname']?></td><td><?php echo $row['class']?></td><td><?php echo $row['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;
	case 2424:
	
	$rol=$_POST['std'];
	$session=$_POST['session'];
	
	
	
	$sel="select * from  studentfees where search='$rol' and year='$session'  ";
	
	$res=mysqli_query($conn,$sel);
	$sel1="select * from  studentfees where search='$rol' and year='$session' ";
	
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_num_rows($res1);
	if($row1==" ")
	{
		echo"<font color=red size=6pt>Not Admission Submit Or Invailid Session and Application Number.</font>";
	}
else
{
	
	?>
	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['print','pdf']
    });
	
});
</script>
<div class="table-responsive">
		<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr >
                <th style="text-align:center">Name</th><th style="text-align:center"> Class</th><th style="text-align:center">Months</th><th style="text-align:center">Paid</th><th style="text-align:center">Dues</th><th style="text-align:center">Date</th>
            </tr>
        </thead>
<tfoot>
            <tr >
                <th style="text-align:center">Name</th><th style="text-align:center"> Class</th><th style="text-align:center">Months</th><th style="text-align:center">Paid</th><th style="text-align:center">Dues</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><?php echo $row['name'];?></td><td><?php echo $row['class'];?></td><td><?php echo $row['month'];?></td><td><?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 2009999:
	$year1=$_POST['session'];
		$session=$_POST['session'];
	$class=$_POST['class'];
		$board=$_POST['board'];
  $sel1="select * from  registration where session ='$year1' and subject='$class' and mediam='$board'";
	$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',
			{ 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">
    <caption id='pr' style='font-size:20px;font-weight:bold'>Class =  <?php echo $class;?>/<?php echo $section;?></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">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 mediam='$board' ";
	$res=mysqli_query($conn,$sel);
	$s=1;
		$p=0;
		$al_paid=0;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
	    $application=$row['id'];
	    $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='';
	if($rowca=mysqli_fetch_array($resca,MYSQLI_BOTH))
	{
		$a='Paid';
		$p++;
	}
	else
	{
	    $a=0;
	}
	//////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='Paid';
		$p++;
	}
	else
	{
	    $b=0;
	}
	//////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='Paid';
		$p++;
	}
	else
	{
	    $c=0;
	}
	//////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='Paid';
		$p++;
	}
	else
	{
	    $d=0;
	}
	//////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='Paid';
		$p++;
	}
	else
	{
	    $e=0;
	}
	//////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='Paid';
		$p++;
	}
	else
	{
	    $f=0;
	}
	//////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='Paid';
		$p++;
	}
	else
	{
	    $g=0;
	}
	//////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='Paid';
		$p++;
	}
	else
	{
	    $h=0;
	}
	//////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='Paid';
		$p++;
	}
	else
	{
	    $i=0;
	}
	//////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='Paid';
		$p++;
	}
	else
	{
	    $j=0;
	}
	//////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='Paid';
		$p++;
	}
	else
	{
	    $k=0;
	}
	//////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='Paid';
		$p++;
	}
	else
	{
	    $l=0;
	}
	$al=$a+$b+$c+$d+$e+$f+$g+$h+$i+$j+$k+$l;
	
	
		$selcmm1="select * from  studentfees where   year='$session' and search='$application'  order by id desc ";
	$rescmm1=mysqli_query($conn,$selcmm1);
	$paid=0;
	while($rowcmm1=mysqli_fetch_array($rescmm1,MYSQLI_BOTH))
	{
		$paid=$rowcmm1['paid']+$paid;
		$p++;
	}
$al_paid=$al_paid+$paid;
		?>
		 
	<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['mobile'];?></td><td><?php echo $row['village'];?></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 $paid;?></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">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