<?php
include("../connect.php"); 
$response = array();
if(isset($_POST['manager_id']) && isset($_POST['status']) && isset($_POST['admin_id']))
{
	$cust_id = $_POST['manager_id'];
	$ver = $_POST['admin_id'];
	$status=$_POST['status'];
	date_default_timezone_set('Asia/Calcutta');
	$cdate  = date("Y-m-d")." ".date('h:i:sa');
	$res_product_stock = mysqli_query($con,"SELECT manager_name FROM  tbl_manager where manager_id='$cust_id' and admin_id='$ver'");
	if(mysqli_num_rows($res_product_stock)>0)
	{	
		$uq2=mysqli_query($con,"update tbl_manager set status='$status',update_datetime='$cdate' where manager_id='$cust_id' and admin_id='$ver'"); 
		$response['success']='1';
		$response['details']="Update Status Successful";		
	}
	else
	{
		$response['success']='0';
		$response['details']="Id Not Valid";
	}
}
else
{
	$response['success']='0';
	$response['details']="Required field missing";
}	
echo json_encode($response);
?>