ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/home2/selectio/www/mm-tailor-billing/hrm/api/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/home2/selectio/www/mm-tailor-billing/hrm/api/delete.php

<?php include "../config/config.php";

if($_POST['type']=="dynamic_delete"){
    
$statement = $pdo->prepare("UPDATE ".$_POST['table']." SET status=? WHERE id=?");
$result=$statement->execute(array(0,$_POST['delete_id']));
if($result==1)
{
	    $message='Success..';
	    $error='1';
	}
else
{
	    $message='Failed..';
	    $error='0';
	}
$datas[] = array('message' => $message, 'error' => $error);                   
echo $message;
}

if($_POST['type']=="dynamic_active"){
    
$statement = $pdo->prepare("UPDATE ".$_POST['table']." SET status=? WHERE id=?");
$result=$statement->execute(array(1,$_POST['delete_id']));
if($result==1)
{
	    $message='Success..';
	    $error='1';
	}
else
{
	    $message='Failed..';
	    $error='0';
	}
$datas[] = array('message' => $message, 'error' => $error);                   
echo $message;
}


if($_POST['type']=="records_delete"){
    
$statement = $pdo->prepare("DELETE FROM tbl_reports WHERE date=?");
$result=$statement->execute(array($_POST['delete_date']));
if($result==1)
{
	    $message='Success..';
	    $error='1';
	}
else
{
	    $message='Failed..';
	    $error='0';
	}
$datas[] = array('message' => $message, 'error' => $error);                   
echo $message;
}
?>

Zerion Mini Shell 1.0