|
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/sd/../sale/code/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
include("../php-includes/connect.php");
$flag=$_REQUEST['flag'];
switch($flag)
{
case 1:
$photo=$_FILES['photo']['name'];
$title=$_POST['title'];
$tempname=$_FILES['photo']['tmp_name'];
$location="img/";
$pathinfo=pathinfo($photo,PATHINFO_EXTENSION);
//echo"$pathinfo";
if($pathinfo!=""|| $pathinfo!=null)
{
$newimgname=time()."_".$photo.".".$pathinfo;
//echo$newimgname;
}
else
{
$newimgname="";
}
$date=date('Y-m-d');
$ins="insert into gallery(image,title,date) values('$newimgname','$title','$date')";
if(mysqli_query($conn,$ins))
{
move_uploaded_file($tempname,$location.$newimgname);
echo"Successfully Add";
}
else
{
echo"not add";
}
break;
case 2:
$sel="select * from gallery";
$res=mysqli_query($conn,$sel);
?>
<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>Sr. no.</th><th>Image</th><th>Title</th><th>Date</th><th>Delete</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Sr. no.</th><th>Image</th><th>Title</th><th>Date</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><img src="code/img/<?php echo $row['1'];?>" height="100px" width="100px"></td> <td><?php echo $row['title'];?></td><td><?php echo $row['date'];?></td><td><a href="javascript:;" onclick="deleterow(<?php echo$row['0'];?>)"><span class="glyphicon glyphicon-trash"></span></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
break;
case 3:
$id=$_POST['rowid'];
$del="delete from gallery where id='$id'";
$sel="select * from gallery where id='$id'";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);
$image=$row['1'];
$location="img/".$image;
if(mysqli_query($conn,$del))
{
unlink($location);
echo"ok";
}
else
{
echo"not delete";
}
break;
case 4:
$news=$_POST['news'];
$date=date('Y-m-d');
$ins="insert into news(news,date,time) values('$news','$date','')";
if(mysqli_query($conn,$ins))
{
echo"Successfully Add";
}
else
{
echo"not add";
}
break;
case 5:
$sel="select * from news";
$res=mysqli_query($conn,$sel);
?>
<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>Sr. no.</th><th>News</th><th>Date</th><th>Delete</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Sr. no.</th><th>News</th><th>Date</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><textarea><?php echo $row['news'];?></textarea></td><td><?php echo $row['date'];?></td> <td><a href="javascript:;" onclick="deleterow(<?php echo$row['0'];?>)"><span class="glyphicon glyphicon-trash"></span></td>
</tr>
<?php
}
?>
</tr>
</tbody>
</table>
</div>
<?php
break;
case 6:
$id=$_POST['rowid'];
$del="delete from news where id='$id'";
if(mysqli_query($conn,$del))
{
echo"ok";
}
else
{
echo"not delete";
}
break;
case 7:
$sel="select * from query";
$res=mysqli_query($conn,$sel);
?>
<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>Sr. no.</th><th>Course</th><th>Name</th><th>DOB</th><th>Gender</th><th>Mobile</th><th>Address</th><th>Qualification</th><th>Date_Time</th><th>Delete</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Sr. no.</th><th>Course</th><th>Name</th><th>DOB</th><th>Gender</th><th>Mobile</th><th>Address</th><th>Qualification</th><th>Date_Time</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['program'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['dob'];?></td><td><?php echo $row['gender'];?></td><td><?php echo $row['mobile'];?></td><td><textarea><?php echo $row['address'];?></textarea></td><td><?php echo $row['qualification'];?></td><td><?php echo $row['date_time'];?></td> <td><a href="javascript:;" onclick="deleterow(<?php echo $row['0'];?>)"><span class="glyphicon glyphicon-trash"></span></td>
</tr>
<?php
}
?>
</tr>
</tbody>
</table>
</div>
<?php
break;
case 8:
$id=$_POST['rowid'];
$del="delete from query where id='$id'";
if(mysqli_query($conn,$del))
{
echo"ok";
}
else
{
echo"not delete";
}
break;
case 9:
$photo=$_FILES['photo']['name'];
$title=$_POST['title'];
$tempname=$_FILES['photo']['tmp_name'];
$location="img/";
$pathinfo=pathinfo($photo,PATHINFO_EXTENSION);
//echo"$pathinfo";
if($pathinfo!=""|| $pathinfo!=null)
{
$newimgname=time()."_".$photo.".".$pathinfo;
//echo$newimgname;
}
else
{
$newimgname="";
}
$date=date('Y-m-d');
$ins="insert into gallery_front(image,title,date) values('$newimgname','$title','$date')";
if(mysqli_query($conn,$ins))
{
move_uploaded_file($tempname,$location.$newimgname);
echo"Successfully Add";
}
else
{
echo"not add";
}
break;
case 10:
$sel="select * from gallery_front";
$res=mysqli_query($conn,$sel);
?>
<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>Sr. no.</th><th>Image</th><th>Title</th><th>Date</th><th>Delete</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Sr. no.</th><th>Image</th><th>Title</th><th>Date</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><img src="code/img/<?php echo $row['1'];?>" height="100px" width="100px"></td> <td><?php echo $row['title'];?></td><td><?php echo $row['date'];?></td><td><a href="javascript:;" onclick="deleterow(<?php echo$row['0'];?>)"><span class="glyphicon glyphicon-trash"></span></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
break;
case 11:
$id=$_POST['rowid'];
$del="delete from gallery_front where id='$id'";
$sel="select * from gallery_front where id='$id'";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);
$image=$row['1'];
$location="img/".$image;
if(mysqli_query($conn,$del))
{
unlink($location);
echo"ok";
}
else
{
echo"not delete";
}
break;
case 12:
$sel="select * from center_add where status!='' order by id desc";
$res=mysqli_query($conn,$sel);
?>
<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>Sr No.</th><th>Center Name</th><th>Owner Name</th><th>Address</th><th>Mobile</th><th>User Name</th><th>Password</th><th>Date</th><th>Status</th><th>Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Sr No.</th><th>Center Name</th><th>Owner Name</th><th>Address</th><th>Mobile</th><th>User Name</th><th>Password</th><th>Date</th><th>Status</th><th>Action</th>
</tr>
</tfoot>
<tbody>
<?php
$s=1;
while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
{
?>
<tr>
<td><?php echo $s++;?></td><td><textarea><?php echo $row['center_name'];?></textarea></td><td><?php echo $row['owner_name'];?></td><td><textarea><?php echo $row['address'];?></textarea></td><td><?php echo $row['mobile'];?></td><td><?php echo $row['username'];?></td><td><?php echo $row['password'];?></td><td><?php echo $row['date'];?></td><td><?php echo $row['status'];?></td><td><a href="center_update.php?flag=<?php echo $row['id'];?>"><span class="glyphicon glyphicon-pencil"></span></a> <a href="javascript:;" onclick="deleterow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-check"></span></a></td>
<?php
}
?>
</tr>
</tbody>
</table>
</div>
<?php
break;
case 13:
$id=$_POST['rowid'];
$del="update center_add set status='' where id='$id'";
if(mysqli_query($conn,$del))
{
echo"Verify Successfully";
}
else
{
echo"Not Deleted";
}
break;
}
?>