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

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u490972518/domains/ppschool.org.in/public_html/code/img/../scholarcode.php
<?php
include("../link/databaseconnection.php");
$flag=$_REQUEST['flag'];

switch($flag)
{
	case 1:
	
	$religion=$_POST['religion'];
	$pen=$_POST['pen'];
	$reg=$_POST['reg'];
	$m=$_POST['m'];
	$y=$_POST['y'];
	$adm_no=$_POST['adm_no'];
	$withdrawal_no=$_POST['withdrawal_no'];
	$tc_no=$_POST['tc_no'];
	$register_no=$_POST['register_no'];
	$name=$_POST['name'];
	$fname=$_POST['fname'];
	$mname=$_POST['mname'];
	$adhar=$_POST['adhar'];
	$mobile=$_POST['mobile'];
	$dob=$_POST['dob'];
	$caste=$_POST['caste'];
	$address=$_POST['address'];
	$hindi_dob=$_POST['hindi_dob'];
	$last_address=$_POST['last_address'];
	$class=$_POST['class'];
	$occupation=$_POST['occupation'];
	$nationality=$_POST['nationality'];
	$c_name=$_POST['c_name'];
	$date_adm=$_POST['date_adm'];
	$sel="select * from scholar where register_no='$register_no' ";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
		$date=date("d-M-Y");
date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");
$datetime=$date." ".$time;
	
		$ins="insert into scholar(adm_no,withdrawal_no,tc_no,register_no,name,fname,mname,dob,caste,occupation,address,last_school,class,date_adm,nationality,religion,date_promotion,date_removal,cause_removal,year,conduct_work,sch,hindi_dob,adhar,mobile,c_name,status,reg,date,m,y,pen) values('$adm_no','$withdrawal_no','$tc_no','$register_no','$name','$fname','$mname','$dob','$caste','$occupation','$address','$last_address','$class','$date_adm','$nationality','$religion','','','','','','','$hindi_dob','$adhar','$mobile','$c_name','','$reg','$datetime','$m','$y','$pen')";
	
	if(mysqli_query($conn,$ins))
	{
	
		echo "Successfully Add";
	}
	else
	{
		echo "not insert";
	}
	
	
	
	break;
	
	
	
	
	
	case 2:
	
	$sel="select * from class order by id desc";
	$res=mysqli_query($conn,$sel);
	
	?>
	<div class="table-responsive">
	<table class="table table-stript">
	<tr>
	<th>Sr No.</th><th>Class</th><th>Delete</th>
	</tr>
	<?php 
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
	
	?>
	<tr>
	
	<td><?php echo $s++;?></td><td><?php echo $row['class1'];?></td><td><a href="javascript:;" onclick="deleterow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-trash"></span></a></td>
	<?php
	}
	
	?>
	</tr>
	</table>
	</div>
	<?php 
	
	break;
	
	
	case 3:
	
	$rowid=$_POST["rowid"];
	$del="delete from class where id='$rowid'";
	if(mysqli_query($conn,$del))
	{
		echo"Data deleted";
	}
	else
	{
		echo"not delete";
		
	}
	
	
	
	case 4:
	
	$class=$_POST['class'];
	$board=$_POST['board'];
	$subclass1=$_POST['subclass'];
	$subclass=strtoupper($subclass1);
	
	if($class!='' and $subclass!='')
	{
	$ins="insert into subclass(classname,subclass,board) values('$class','$subclass','$board')";
	if(mysqli_query($conn,$ins))
	{
		echo"successfully Add";
	}
	else
	{
		echo"not add";
	}
	}
	else
	{
		echo"Fillup Box";
	}
	break;
	case 41:
	
	$product=$_POST['article'];
	$purpose=$_POST['purpose'];
	$amount=$_POST['amount'];
	date_default_timezone_set('asia/kolkata');
	$date=date('Y-m-d');
	//$subclass=strtoupper($subclass1);
	
	if($product!='' and $purpose!='' and $amount!='')
	{
	$ins="insert into hisab(product,purpose,amount,date) values('$product','$purpose','$amount','$date')";
	if(mysqli_query($conn,$ins))
	{
		echo"successfully Add";
	}
	else
	{
		echo"not add";
	}
	}
	else
	{
		echo"Fillup Box";
	}
	break;
	case 411:
	?>
	

	<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>Sr No.</th><th>S.Register No.</th><th>Adm/With/Tc</th><th>Name</th><th>Gaurdian</th><th>Entry Class</th><th>Prom Class</th><th>Action</th>
	</tr>
        </thead>

<tbody>		
  <?php
	$sel="select * from scholar where status='' order by id asc";
	$res=mysqli_query($conn,$sel);
	
	 
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$date1=$row['date_adm'];
	$date=date("d-m-Y",strtotime($date1));
	$scholar=$row['register_no'];
	$sel1="select * from promotion where scholar='$scholar'";
	$res1=mysqli_query($conn,$sel1);
	
	?>
	<tr>
	
	<td><?php echo $s++;?></td><td><span style="color:red;font-weight:bold"><?php echo $row['register_no'];?></span></td><td>Adm No-<span style='color:green;font-weight:bold'><?php echo $row['adm_no']?></span><br/>Withdrawal No-<span style='color:red;font-weight:bold'><?php echo $row['withdrawal_no']?></span><br/>Tc No-<span style='color:blue;font-weight:bold'><?php echo $row['tc_no']?></span></td><td>Student-<span style="color:red;font-weight:bold"><?php echo $row['name'];?></span><br/>Religion-<span style="color:red;font-weight:bold"><?php echo $row['religion'];?></span><br/>Nationality-<span style="color:green;font-weight:bold"><?php echo $row['nationality'];?></span></td><td>Father-<span style="color:red;font-weight:bold"><?php echo $row['fname'];?></span><br/>Mother-<span style="color:green;font-weight:bold"><?php echo $row['mname'];?></span></td>
	<td><?php echo $row['class'];?><br/><?php echo $date1;?></td>
	<td><?php 
	while($row1=mysqli_fetch_array($res1,MYSQLI_BOTH))
	{
		$class1=$row1['class'];
		$id1=$row1['id'];
		//$class2=$class1.','.$class2;
		$date_adm1=$row1['date_adm'];
		//$date_adm=$date_adm1.','.$date_adm;
		$date_promotion1=$row1['date_promotion'];
		//$date_promotion=$date_promotion1.','.$date_promotion;
		echo $class1.' (Date_Adm ='.$date_adm1.') Date_pro ='.$date_promotion1;
		?>&emsp;<a href="javascript:;" onclick="editrow11(<?php echo $row1['id'];?>)"><span class="glyphicon glyphicon-pencil"></span></a>
		&emsp;<a href="javascript:;" onclick="deleterow11(<?php echo $row1['id'];?>)"><span class="glyphicon glyphicon-trash">Delete</span></a>
		<?php
	
		echo '<br/>';
	}
	
	
	
	
	
	
	
	
	?></td>
	
	
	<td><a href="javascript:;" onclick="editrow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-pencil">Edit</span></a>&emsp;<a href="javascript:;" onclick="editrow1(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-plus">Add Class</span></a>&emsp;<a href="javascript:;" onclick="deleterow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-trash">Delete</span></a>&emsp;<a href='scholarprint.php?flag=<?php echo $row['register_no']?>'><span class="glyphicon glyphicon-print">Print</span></a></td>
	</tr>
	<?php
	}
	
	?>
	</tbody>
	</table>
	</div>
	<?php 
	
	break;
	
	case 412:
	$eid=$_REQUEST['id'];
	//echo"$eid";
	$sel="select * from  scholar where id='$eid'";
	$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;
	date_default_timezone_set('asia/kolkata');
	$date=date('Y-m-d');
	?>
	
	<div class="panel-group">
				<div class="panel panel-primary">
				
				
				<div class="panel-body">
				<form class="form-horizontal" id="myform" onsubmit="return updaterow(this)">
				<div class="form-group">
			<br/>
				<label class=" col-sm-3 label-control">Adm. No.<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['adm_no'];?>' name="adm_no"/>
				<input type="hidden" class="form-control" value='<?php echo $eid;?>' name="id"/>
			</div>
			</div>
			
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Withdrawal No.<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['withdrawal_no'];?>' name="withdrawal_no"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">TC No.<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['tc_no'];?>'name="tc_no"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">S.Register No.<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['register_no'];?>' name="register_no"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Regi No.<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['reg'];?>' name="reg"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">PEN No.<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['pen'];?>'name="pen"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Student Name<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['name'];?>' name="name"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Father Name<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['fname'];?>' name="fname"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Mother Name<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control"value='<?php echo $row['mname'];?>'  name="mname"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">DD<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" placeholder='' value='<?php echo $row['dob'];?>' class="form-control" name="dob"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">MM<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" placeholder='DD-MM-YYYY' value='<?php echo $row['m'];?>' class="form-control" name="m"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">YYYY<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" placeholder='DD-MM-YYYY' value='<?php echo $row['y'];?>' class="form-control" name="y"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Rligion<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['religion'];?>'  name="religion"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Nationality<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['nationality'];?>' name="nationality"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Caste<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['caste'];?>' name="caste"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Occupation<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['occupation'];?>' name="occupation"/>
			</div>
			</div>
			<div class="form-group">
			<br/>
				<label class=" col-sm-3 label-control">Address<span style="color:red"></span></label>
				<div class="col-sm-9"><textarea name='address'  class="form-control"><?php echo $row['address'];?></textarea>
			</div>
			</div>
			<div class="form-group">
			<br/>
				<label class=" col-sm-3 label-control">Last School<span style="color:red"></span></label>
				<div class="col-sm-3"><textarea name='last_address'  class="form-control"><?php echo $row['last_school'];?></textarea>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Class<span style="color:red"></span></label>
				<div class="col-sm-3"> <?php 
	
	?>
	<select class="form-control"  name="class" required>
	<option value="">---select---</option>
	<option <?php if($row['class']=='NURSERY'){echo'selected';}?>>NURSERY</option>
	<option <?php if($row['class']=='LKG'){echo'selected';}?>>LKG</option>
	<option <?php if($row['class']=='UKG'){echo'selected';}?>>UKG</option>
	<option <?php if($row['class']=='PLAY GROUP'){echo'selected';}?>>PLAY GROUP</option>
	<option <?php if($row['class']=='FIRST'){echo'selected';}?>>FIRST</option>
	<option <?php if($row['class']=='SECOND'){echo'selected';}?>>SECOND</option>
	<option <?php if($row['class']=='THIRD'){echo'selected';}?>>THIRD</option>
	<option <?php if($row['class']=='FOURTH'){echo'selected';}?>>FOURTH</option>
	<option <?php if($row['class']=='FIFTH'){echo'selected';}?>>FIFTH</option>
	<option <?php if($row['class']=='SIXTH'){echo'selected';}?>>SIXTH</option>
	<option <?php if($row['class']=='SEVENTH'){echo'selected';}?>>SEVENTH</option>
	<option <?php if($row['class']=='EIGHTH'){echo'selected';}?>>EIGHTH</option>
	
		
		</select>
			</div>
			</div>
			<div class="form-group">
			<br/>
				<label class=" col-sm-3 label-control">Date of Adm<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['date_adm'];?>' placeholder='DD-MM-YYYY' name="date_adm"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Date of Promotion<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" placeholder='DD-MM-YYYY' value='<?php echo $row['date_promotion'];?>' name="date_promotion"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Date of Removal<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['date_removal'];?>' placeholder='DD-MM-YYYY' name="date_removal"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Cause of Removal<span style="color:red"></span></label>
				<div class="col-sm-9"><textarea name='cause_removal'  class="form-control"><?php echo $row['cause_removal'];?></textarea>
			</div>
			</div>
			<div class="form-group">
			<br/>
				<label class=" col-sm-3 label-control">Year<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['year'];?>' name="year"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Conduct & Work<span style="color:red"></span></label>
				<div class="col-sm-9"><input type="text" class="form-control" value='<?php echo $row['conduct_work'];?>' name="conduct_work"/>
			</div>
			</div>
				
				
				
				<br/>
				
					<div class="form-group" style='display:none'>
			
				<label class=" col-sm-3 label-control">Hindi Dob<span style="color:red"></span></label>
				<div class="col-sm-9"><input type="text" class="form-control" value='<?php echo $row['hindi_dob'];?>' name="hindi_dob"/>
			</div>
			</div>
				
				<br/>
					<div class="form-group">
			
				<label class=" col-sm-3 label-control">Aadhar<span style="color:red"></span></label>
				<div class="col-sm-7"><input type="text" class="form-control" value='<?php echo $row['adhar'];?>' name="adhar"/>
			</div>
			</div>
				
				<br/>
					<div class="form-group">
			
				<label class=" col-sm-3 label-control">Mobile<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value='<?php echo $row['mobile'];?>' name="mobile"/>
			</div>
			</div>
				
				<br/>
				<center><button class="btn btn-primary">Update</button>
				
				 &emsp;&emsp;&emsp;<button class="btn btn-danger" data-dismiss="modal"> Close</button>
				</center>
				</div>
				</form>
	</div>
	</div>
	
	
	
	<?php
	break;
	case 413:
	$id=$_POST['id'];
	$religion=$_POST['religion'];
		$pen=$_POST['pen'];
	$adm_no=$_POST['adm_no'];
	$withdrawal_no=$_POST['withdrawal_no'];
	$tc_no=$_POST['tc_no'];
	$register_no=$_POST['register_no'];
	$name=$_POST['name'];
	$fname=$_POST['fname'];
	$mname=$_POST['mname'];
	$dob=$_POST['dob'];
	$caste=$_POST['caste'];
	$address=$_POST['address'];
	$last_address=$_POST['last_address'];
	$class=$_POST['class'];
	$date_adm=$_POST['date_adm'];
	$date_promotion=$_POST['date_promotion'];
	$date_removal=$_POST['date_removal'];
	$occupation=$_POST['occupation'];
	$cause_removal=$_POST['cause_removal'];
	$year=$_POST['year'];
	$conduct_work=$_POST['conduct_work'];
	$nationality=$_POST['nationality'];
	$hindi_dob=$_POST['hindi_dob'];
	$adhar=$_POST['adhar'];
	$mobile=$_POST['mobile'];
	$reg=$_POST['reg'];
		$m=$_POST['m'];
			$y=$_POST['y'];
	$ins="update scholar set pen='$pen',adm_no='$adm_no',m='$m',y='$y',reg='$reg',withdrawal_no='$withdrawal_no',tc_no='$tc_no',register_no='$register_no',name='$name',fname='$fname',mname='$mname',dob='$dob',caste='$caste',occupation='$occupation',address='$address',last_school='$last_address',class='$class',date_adm='$date_adm',date_promotion='$date_promotion',date_removal='$date_removal',cause_removal='$cause_removal',year='$year',conduct_work='$conduct_work',nationality='$nationality',religion='$religion',mobile='$mobile',hindi_dob='$hindi_dob',adhar='$adhar' where id='$id'";
	
	if(mysqli_query($conn,$ins))
	{
	
		echo "Update";
	}
	else
	{
		echo "not update";
	}
	
	break;
	case 414:
	?>
	

	<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>Sr No.</th><th>Article</th><th>Purpose</th><th>Amount</th><th>Date</th><th> Total Income</th><th>  Available Balance </th>
	</tr>
        </thead>

<tbody>		
  <?php
  $sdate=$_POST['sdate'];
  $edate=$_POST['edate'];
 // $sesion=$row['session'];
	$sel1="select * from studentfees where  date between '$sdate' and '$edate' order by id asc ";
	$res1=mysqli_query($conn,$sel1);
	$paidt='0';
	while($row1=mysqli_fetch_array($res1,MYSQLI_BOTH))
	{
		$paid=$row1['paid'];
	$paidt=$paidt+$paid;
	}
	
	 $sel="select * from hisab where  date between '$sdate' and '$edate' order by id asc ";
	$res=mysqli_query($conn,$sel);
	$s=1;
	$tot='0';
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$date1=$row['date'];
	$date=date("d-m-Y",strtotime($date1));
	$amounta=$row['amount'];
	$tot=$tot+$amounta;
	$balance=$paidt-$tot;
	?>
	<tr>
	
	<td><?php echo $s++;?></td><td><textarea rows="3" cols="30"><?php echo $row['product'];?></textarea></td><td><?php echo $row['purpose'];?></td>
	<td><?php echo $row['amount'];?></td><td><?php echo $date;?></td><td>-</td><td>-</td>
	
	</tr>
	<?php
	}
	
	?>
	<tr align="center">
	
	<td style="font-weight:bold;font-size:19px">Total</td><td></td><td style="font-weight:bold;font-size:19px;color:red">Spend</td><td style="font-weight:bold;font-size:19px;color:red"><?php echo $tot;?>&nbsp;(Rs)</td><td style="font-weight:bold;font-size:19px;color:green"></td><td style="font-weight:bold;font-size:19px;color:green"><?php echo $paidt ;?>&nbsp;(Rs)</td><td style="font-weight:bold;font-size:19px;color:green"><?php echo $balance;?>&nbsp;(Rs)</td>
	
	</tr>
	</tbody>
	</table>
	</div>
	<?php 
	
	break;
	case 5:
	
	$sel="select * from subclass order by subclassid desc";
	$res=mysqli_query($conn,$sel);
	
	?>
	<div class="table-responsive">
	<table class="table table-stript">
	<tr>
	<th>Sr No.</th><th>Board</th><th>Class</th><th>SubClass</th><th>Delete</th>
	</tr>
	<?php 
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
	
	?>
	<tr>
	
	<td><?php echo $s++;?></td><td><?php echo $row['board'];?></td><td><?php echo $row['classname'];?></td>
	<td><?php echo $row['subclass'];?></td><td><a href="javascript:;" onclick="deleterow(<?php echo $row['0'];?>)"><span class="glyphicon glyphicon-trash"></span></a></td>
	
	</tr>
	<?php
	}
	
	?>
	</table>
	</div>
	<?php 
	
	break;
	
	case 6:
	$id=$_POST['rowid'];
	$del="update scholar set status='Delete' where id='$id'";
	if(mysqli_query($conn,$del))
		{
			echo"Deleted";
		}
		else
		{
			echo"not delete";
		}
	
	break;
	case 6161:
	$id=$_POST['rowid'];
	$del=" delete from promotion where id='$id'";
	if(mysqli_query($conn,$del))
		{
			echo"Deleted";
		}
		else
		{
			echo"not delete";
		}
	
	break;
		case 4155:
	$eid=$_REQUEST['id'];
	//echo"$eid";
	$sel="select * from  promotion where id='$eid'";
	$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;
	date_default_timezone_set('asia/kolkata');
	$date=date('Y-m-d');
	?>
	
	<div class="panel-group">
				<div class="panel panel-primary">
				
				
				<div class="panel-body">
				<form class="form-horizontal" id="myform" onsubmit="return updaterow12(this)">
				
				
				<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"  name="class" required>
	<option value="">---select---</option>
	<option <?php if($row['class']=='PLAY GROUP'){echo'selected';}?>>PLAY GROUP</option>
	<option <?php if($row['class']=='NURSERY'){echo'selected';}?>>NURSERY</option>
	<option <?php if($row['class']=='LKG'){echo'selected';}?>>LKG</option>
	<option <?php if($row['class']=='UKG'){echo'selected';}?>>UKG</option>
	
	<option <?php if($row['class']=='I'){echo'selected';}?>>I</option>
	<option <?php if($row['class']=='II'){echo'selected';}?>>II</option>
	<option <?php if($row['class']=='III'){echo'selected';}?>>III</option>
	<option <?php if($row['class']=='IV'){echo'selected';}?>>IV</option>
	<option <?php if($row['class']=='V'){echo'selected';}?>>V</option>
	<option <?php if($row['class']=='VI'){echo'selected';}?>>VI</option>
	<option <?php if($row['class']=='VII'){echo'selected';}?>>VII</option>
	<option <?php if($row['class']=='VIII'){echo'selected';}?>>VIII</option>
	
		
		</select></div>
				</div>
				<div class="form-group">
			<br/>
				<label class=" col-sm-3 label-control">Date of Adm<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value="<?php echo $row['date_adm']?>" placeholder='DD-MM-YYYY' name="date_adm"/>
			<input type="hidden" class="form-control" value="<?php echo $eid?> "name="id"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Date of Promotion<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control"value="<?php echo $row['date_promotion']?>" placeholder='DD-MM-YYYY' name="date_promotion"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Date of Removal<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value="<?php echo $row['date_removal']?>" placeholder='DD-MM-YYYY' name="date_removal"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Cause of Removal<span style="color:red"></span></label>
				<div class="col-sm-3"><textarea name='cause_removal' class="form-control"><?php echo $row['cause_removal']?></textarea>
			</div>
			</div>
			<div class="form-group">
			<br/>
				<label class=" col-sm-3 label-control">Year<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value="<?php echo $row['year']?>" name="year"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Conduct<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value="<?php echo $row['conduct_work']?>" name="conduct_work"/>
			</div>
			</div>
				<br/>
				
				<div class="form-group">
			
				<label class=" col-sm-3 label-control">Work<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" value="<?php echo $row['work']?>" name="work"/>
			</div>
			</div>
			<br/>
				<center><button class="btn btn-primary">Update</button>
				
				 &emsp;&emsp;&emsp;<button class="btn btn-danger" data-dismiss="modal"> Close</button>
				</center>
				</div>
				</form>
	</div>
	</div>
	
	
	
	<?php
	break;
	case 4166:
	$id=$_POST['id'];
	$class=$_POST['class'];
	$date_adm=$_POST['date_adm'];
	$date_promotion=$_POST['date_promotion'];
	$date_removal=$_POST['date_removal'];
	//$occupation=$_POST['occupation'];
	$cause_removal=$_POST['cause_removal'];
	$year=$_POST['year'];
	$conduct_work=$_POST['conduct_work'];
	date_default_timezone_set('asia/kolkata');
	$date=date('Y-m-d');
	$work=$_POST['work'];
	
	
	$ins="update promotion set class='$class',date_adm='$date_adm',date_promotion='$date_promotion',date_removal='$date_removal',cause_removal='$cause_removal',year='$year',conduct_work='$conduct_work',work='$work' where id='$id'";
	
	if(mysqli_query($conn,$ins))
	{
	
		echo "Successfully Update";
	}
	else
	{
		echo "not insert";
	}
	
	break;
		case 417:
	$year1=$_POST['session'];
  $sel1="select * from  registration where session ='$year1' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	

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


	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">Sch No.</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class<span style="color:red">/Trans.</span></th><th  style="text-align:center">Address</th><th  style="text-align:center">Action</th>
            </tr>
        </thead>
<tfoot>
            <tr>
                <th  style="text-align:center">Sr.</th><th  style="text-align:center">Sch No.</th><th  style="text-align:center">Photo</th><th  style="text-align:center">Name</th><th  style="text-align:center">Class<span style="color:red">/Trans.</span></th><th  style="text-align:center">Address</th><th  style="text-align:center">Action</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  $year=$_POST['session'];
  $sel="select * from  registration where session ='$year1' and status=''  order by id desc";
	$res=mysqli_query($conn,$sel);
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
	    $ap=$row['application'];
	    $id=$row['id'];
	    // $sel1="update studentfees set search='$ap' where reg_id='$id'";
	//$res1=mysqli_query($conn,$sel1);
//	$row1=mysqli_fetch_array($res1,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'].' '.$row['section']."<br/>"."<font color=red size=2pt>".$row['trans'].'</font>';?></td><td style=''><textarea><?php echo "<b>Vill-</b>".$a."<br/>"."<b>Post-</b>".$b."<br/>"."<b>Dist-</b>".$c."<br/>"."<b>Mob-</b>".$row['mobile'];?></textarea></td>
	
	
	<td>
	
	&emsp;<a href="scholar.php?flag=<?php echo $row['id'];?>" target="_blank"><span class="fa fa-pencil">TC Creat</span></a>
	<br/><a href="scholar.php?flag=<?php echo $row['id'];?>" target="_blank"><span class="fa fa-print">TC Print</span></a>

	</td>
	</tr>
	<?php
	$s++;
	}
	?>
	 </tbody>
    </table>
	
	</div>
	
	<?php
	}
	else
	{
		echo"<font color=red size=6pt> NO DATA  Available</font>";
	}
	break;
	case 415:
	$eid=$_REQUEST['id'];
	//echo"$eid";
	$sel="select * from  scholar where id='$eid'";
	$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;
	date_default_timezone_set('asia/kolkata');
	$date=date('Y-m-d');
	?>
	
	<div class="panel-group">
				<div class="panel panel-primary">
				
				
				<div class="panel-body">
				<form class="form-horizontal" id="myform" onsubmit="return updaterow1(this)">
				
				
				<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"  name="class" required>
	<option value="">---select---</option>
	<option <?php if($row['class']=='PLAY GROUP'){echo'selected';}?>>PLAY GROUP</option>
	<option <?php if($row['class']=='NURSERY'){echo'selected';}?>>NURSERY</option>
	<option <?php if($row['class']=='LKG'){echo'selected';}?>>LKG</option>
	<option <?php if($row['class']=='UKG'){echo'selected';}?>>UKG</option>
	
	<option <?php if($row['class']=='I'){echo'selected';}?>>I</option>
	<option <?php if($row['class']=='II'){echo'selected';}?>>II</option>
	<option <?php if($row['class']=='III'){echo'selected';}?>>III</option>
	<option <?php if($row['class']=='IV'){echo'selected';}?>>IV</option>
	<option <?php if($row['class']=='V'){echo'selected';}?>>V</option>
	<option <?php if($row['class']=='VI'){echo'selected';}?>>VI</option>
	<option <?php if($row['class']=='VII'){echo'selected';}?>>VII</option>
	<option <?php if($row['class']=='VIII'){echo'selected';}?>>VIII</option>
	
		
		</select></div>
				</div>
				<div class="form-group">
			<br/>
				<label class=" col-sm-3 label-control">Date of Adm<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" placeholder='DD-MM-YYYY' name="date_adm"/>
			<input type="hidden" class="form-control" value="<?php echo $row['register_no']?> "name="scholar"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Date of Promotion<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" placeholder='DD-MM-YYYY' name="date_promotion"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Date of Removal<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" placeholder='DD-MM-YYYY' name="date_removal"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Cause of Removal<span style="color:red"></span></label>
				<div class="col-sm-3"><textarea name='cause_removal' class="form-control"></textarea>
			</div>
			</div>
			<div class="form-group">
			<br/>
				<label class=" col-sm-3 label-control">Year<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" name="year"/>
			</div>
			</div>
			<div class="form-group">
			
				<label class=" col-sm-3 label-control">Conduct<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" name="conduct_work"/>
			</div>
			</div>
				<br/>
				
				<div class="form-group">
			
				<label class=" col-sm-3 label-control">Work<span style="color:red"></span></label>
				<div class="col-sm-3"><input type="text" class="form-control" name="work"/>
			</div>
			</div>
			<br/>
				<center><button class="btn btn-primary">Add</button>
				
				 &emsp;&emsp;&emsp;<button class="btn btn-danger" data-dismiss="modal"> Close</button>
				</center>
				</div>
				</form>
	</div>
	</div>
	
	
	
	<?php
	break;
	case 416:
	$scholar=$_POST['scholar'];
	$class=$_POST['class'];
	$date_adm=$_POST['date_adm'];
	$date_promotion=$_POST['date_promotion'];
	$date_removal=$_POST['date_removal'];
	//$occupation=$_POST['occupation'];
	$cause_removal=$_POST['cause_removal'];
	$year=$_POST['year'];
	$conduct_work=$_POST['conduct_work'];
	date_default_timezone_set('asia/kolkata');
	$date=date('Y-m-d');
	$work=$_POST['work'];
	
	
	$ins="insert into promotion(scholar,class,date_adm,date_promotion,date_removal,cause_removal,year,conduct_work,work) values('$scholar','$class','$date_adm','$date_promotion','$date_removal','$cause_removal','$year','$conduct_work','$work')";
	
	if(mysqli_query($conn,$ins))
	{
	
		echo "Successfully Add";
	}
	else
	{
		echo "not insert";
	}
	
	break;

}

?>

MMCT - 2023