<?php
require dirname(dirname(__FILE__)) . '/inc/Config.php';
require dirname(dirname(__FILE__)) . '/inc/Crud.php';
header('Content-type: text/json');
$data = json_decode(file_get_contents('php://input'), true);
     
	 $status = $data["status"];
        $store_id = $lundry->real_escape_string($data["store_id"]);
		$mintime = $lundry->real_escape_string($data["mintime"]);
		$maxtime = $lundry->real_escape_string($data["maxtime"]);
		$record_id = $data["record_id"];
		
if ($status == '' or $store_id == '' or $mintime == '' or $record_id == '' or $maxtime == '') {
    $returnArr = array(
        "ResponseCode" => "401",
        "Result" => "false",
        "ResponseMsg" => "Something Went Wrong!"
    );
} else {
	
$table = "tbl_time";
                $field = ["status" => $status, "mintime" => $mintime,"maxtime"=>$maxtime];
				$where = "where id=" . $record_id . "";
                $h = new Crud($lundry);
                $check = $h->lundryupdateData_Api($field, $table, $where);
			$returnArr    = array(
                "ResponseCode" => "200",
                "Result" => "true",
                "ResponseMsg" => "Timeslot Update Successfully"
            );
			
	}

echo json_encode($returnArr);
?>