|
Server IP : 2a02:4780:11:1359:0:1d43:a566:2 / Your IP : 216.73.216.60 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 ] |
|---|
<?php
$flag=$_REQUEST['flag'];
include("../link/databaseconnection.php");
if(!$flag)
{
header("location:http://gcschool.co.in");
}
switch($flag)
{
case 1:
$message=$_POST['data'];
//echo $message;
$ins="insert into news(message) value('$message')";
if($res=mysqli_query($conn,$ins))
{
echo "Submit";
}
else
{
echo "Submit not";
}
break;
case 2:
?>
<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.</th><th>Message</th><th>Delete</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Sr.</th><th>Message</th><th>Delete</th>
</tr>
</tfoot>
<tbody>
<?php
$sel="select * from news order by id desc";
$res=mysqli_query($conn,$sel);
$s=1;
while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
{
?>
<tr class="text-center">
<td><?php echo $s;?></td><td><?php echo $row['message'];?></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 3:
$id=$_POST['rowid'];
$del="delete from news where id='$id'";
if(mysqli_query($conn,$del))
{
echo"deleted Successfully";
}
else
{
echo"Not Deleted";
}
break;
case 4:
$oemail=$_POST['email1'];
//$nemail1=$_POST['nemail1'];
$oldpas=$_POST['oldpas'];
$newpas=$_POST['newpas'];
//echo $message;
$sell="select *from admin_login where email='$oemail' and password='$oldpas'";
$res=mysqli_query($conn,$sell);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);
$mob=$row['mobile'];
if($row)
{
$up="update admin_login set password='$newpas' where email='$oemail'";
if($res1=mysqli_query($conn,$up))
{
$username="AwadheshYadav";
$password="AwadheshYadav";
$senderid="GCSNNJ";
$message="G.C. SCHOOL Email and Password Change Email-"." ".$nemail1.' '.'Password-'." ".$newpas;
$msg=urlencode($message);
$to=$mob;
//$api="http://bulksms.jupitersms.com/index.php/smsapi/httpapi/?uname=brkweb&password=india&sender=GCSNNJ&receiver=$to&route=TA&msgtype=1&sms=$msg";
//====
}
else
{
echo"not update";
}
}
else
{
echo "<script>alert('Email Or Password Invailid');window.location.href='../admin/student_details.php'</script>";
}
break;
}
?>