MMCT TEAM
Server IP : 2a02:4780:11:1359:0:1d43:a566:2  /  Your IP : 216.73.216.20
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/bbrpsiti/../link/../mjcacademy/code/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u490972518/domains/ppschool.org.in/public_html/bbrpsiti/../link/../mjcacademy/code/w_code.php
<?php
$flag=$_REQUEST['flag'];
	include("../link/databaseconnection.php");
	
	switch($flag)
{
    case 1:
$session=$_POST['session'];
		$class=$_POST['class'];
  $sel1="select * from  registration where session ='$session' order by application asc";
	$res1=mysqli_query($conn,$sel1);
	$count=mysqli_num_rows($res1);
	if($count!="")
	{
	?>
	
<link href="jq/jquery.dataTables.min.css" type="text/css" rel="stylesheet"/>
<link href="jq/buttons.dataTables.min.css" type="text/css" rel="stylesheet"/>


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

	<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: ['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">Name</th><th  style="text-align:center">Father</th><th  style="text-align:center">Class</th><th  style="text-align:center">Whatsapp</th><th  style="text-align:center">Action</th>
            </tr>
        </thead>
<tfoot>
           <tr align="left">
               <th style="text-align:center">Sr.</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">Whatsapp</th><th  style="text-align:center">Action</th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
  $sel="select * from  registration where session ='$session' and subject='$class' 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-left">
	<td><?php echo $s;?></td><td><?php echo $row['name'];?></td><td><?php echo $row['fname'];?></td><td><?php echo $row['subject'];?></td><td><?php echo $row['whatsapp'];?></td>
	
	<td>
	
	
<a href="javascript:;" onclick="dues12334(<?php echo $row['id'];?>)"><span><button type="button" class="btn btn-warning">Up</button></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=$_REQUEST['application'];
	
	
		//echo"$eid";
		$sel1="select * from  registration where id='$id' order by id desc";
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
	$application=$row1['application'];
	//echo $application;
	?>
		
	<h3>Update </h3>
	<form class="form-horizontal" onsubmit="return feesdata(this)" >

	
	
	
	
	
	<input type="hidden" value="<?php echo $id;?>" name="id">
	
 <div class="form-group">
				<label class="col-sm-4 control-label">Name</label>
				<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row1['name'];?>" id="class" name="class" style="background-color:#FF8800;color:#0099CC" readonly></div>
				
				</div>
				 <div class="form-group">
				<label class="col-sm-4 control-label">Whatsapp</label>
				<div class="col-sm-8"><input type="number" class="form-control" value="<?php echo $row1['whatsapp'];?>" id="class" name="whatsapp" required></div>
				
				</div>

	<br/>
	<center><button class="btn btn-primary" id="btn">Update</button>
	
	&emsp;&emsp;&emsp;<button class="btn btn-danger" data-dismiss="modal"> Close</button></center>
	</form>
	
	<?php 
	
	
	
	
	break;
		case 3:
	 $id=$_POST['id'];
	  $whatsapp=$_POST['whatsapp'];

	
	$del="update registration set whatsapp='$whatsapp' where id='$id'";
	if(mysqli_query($conn,$del))
	{
		echo"Update Successfully";
		
	}
	else
	{
		echo"Not Deleted";
	}
	
	
	break;
}
?>

MMCT - 2023