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/../code/

[  Home  ][  C0mmand  ][  Upload File  ]

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

$flag=$_REQUEST['flag'];
switch($flag)
{
		case 1:
	
	$title=$_POST['title'];
    $message=$_POST['message'];
    $date=date("Y-m-d");
	$ins="insert into gallery(title,notification,date) values('$title','$message','$date')";
	if(mysqli_query($conn,$ins))
	{
		
		echo"Successfully Add";
	}
	else
	{
		echo"not add";
	}
	break;
	case 2:
	
	
	
	$sel="select * from  notification order by date desc";
	
	$res=mysqli_query($conn,$sel);
	$sel1="select * from  notification order by date desc";
	
	$res1=mysqli_query($conn,$sel1);
	$row1=mysqli_num_rows($res1);
	if($row1==" ")
	{
		echo"<font color=red size=6pt>No Data.</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">Title</th><th style="text-align:center">Message</th><th style="text-align:center">Date</th><th style="text-align:center">Action
                </th>
            </tr>
        </thead>
<tfoot>
            <tr >
                <th style="text-align:center">Title</th><th style="text-align:center">Message</th><th style="text-align:center">Date</th><th style="text-align:center">Action
                </th>
            </tr>
        </tfoot>
<tbody>		
  <?php
  
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
		
	{
		
		?>
		 
	<tr class="text-center">
	</td><td><?php echo $row['title'];?></td><td><textarea><?php echo $row['notification'];?></textarea></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>
	
	
	<?php
		
}



	
	break;
	
	case 3:
	$id=$_POST['rowid'];
	
	
	$del="delete from notification where id='$id'";
	if(mysqli_query($conn,$del))
	{
		echo"deleted Successfully";
		
	}
	else
	{
		echo"Not Deleted";
	}
	break;
	

	//////updatation of classteacher
}






?>

MMCT - 2023