<?php
session_start();
include_once "../../../config.php";
include_once "../../database.php";
include_once "../../../validation.php";
include_once "../../../Helper.php";
require_once "../../check_admin.php";

require_once '../check_edit_page_ajax.php';

class EditAjax extends database{
	public function index($id)
	{
		$where['cl_id'] = $id;
		$data['cl_deleted_at'] = date("Y-m-d H:i:s");
		return $this->update('tb_ticket_message', $data,$where);
	}

	
}


$obj = new EditAjax();
$res = $obj->index($id);
if(!$res)
{
	http_response_code(401);
	echo json_encode(array('error_text' => 'Something Went Wrong'));
	exit;
}

session_start();
$_SESSION['error_message'] = 'Comment Deleted Successfully';
$_SESSION['error_type'] = 'success';

http_response_code(200);
echo json_encode(array('message' => 'Comment Deleted Successfully'));
exit;